Code: Select all
program test
dim OutBufCount as Byte
sub procedure BT_UART0_ISR() ' org 0x0023
asm
JBC SCON0.1 , Tx_ISR
JBC SCON0.0 , Rx_ISR
end asm
exit 'If This is commented out , the code compiles correctly
asm
Tx_ISR:
end asm
if OutBufCount = 0 then exit end if
'code
asm
Rx_ISR:
end asm
'code
end sub
main:
while true
BT_UART0_ISR
wend
end.
Code: Select all
_BT_UART0_ISR:
0x00AE 0x109905 JBC SCON0.B1, Tx_ISR
0x00B1 0x109806 JBC SCON0.B0, Rx_ISR
;test.mbas,8 :: exit 'If This is commented out , the code compiles correctly
0x00B4 0x8004 SJMP L_end__BT_UART0_ISR
Tx_ISR:
;test.mbas,12 :: if OutBufCount = 0 then exit end if
0x00B6 0xE508 MOV A, _OutBufCount
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PROBLEM HERE
L__BT_UART0_ISR2 doesn't exist & it jumps to nevernever land. ( Rel 0xF4 in this case.)
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0x00B8 0x70F4 JNZ L__BT_UART0_ISR2
Rx_ISR:
L_end__BT_UART0_ISR:
0x00BA 0x22 RET
_main:
0x00BB 0x758180 MOV SP, #128