Greetings,
 
I seem to be having trouble using a function within my Serial ISR....
It seems that when i call my function SioIsTxEmpty(), which returns
1 or 0, the problem is that when the register banks
are popped back after the function call it overwrites my return
value...
I can get rid of this by not calling the function...Seems wierd
anyways...
 
the Produced ASM code is below...
 
00128$:
; TinySerial.c 91
 push (0+2)        ;PUSH REGS... (R2 is 0x53 Here)
 push (0+3)
 push (0+4)
 push (0+5)
 push (0+6)
 push (0+7)
 push (0+0)
 push (0+1)
 push psw
 mov psw,#0x00
 lcall _SioIsTxEmpty    ;MAKE MY FUNCTION CALL...
 mov r2,dpl                  ; IT SAVES MY RETURN IN R2 (0x01 For example)
 pop psw                     ; POPS ALL REGISTERS BACK...
 pop (0+1)
 pop (0+0)
 pop (0+7)
 pop (0+6)
 pop (0+5)
 pop (0+4)
 pop (0+3)
 pop (0+2)                    ; CLOBBERS MY RETURN VALUE HERE...
 mov a,r2                     ; TRYS TO USE AN INVALID VALUE...(0x53 in my test case)
 jz  00104$                  ; TEST BASED ON INCORRECT VALUE....