DisableContextSaving problem
Posted: 01 Feb 2011 20:56
DisableContextSaving Only works when the routine is in the main program module
a Portion Of The Listing , Showing the Error.
Code: Select all
program test
include "Inc1"
sub procedure dummy() org 0x0033
cnt_flags = 233
end sub
main:
DisableContextSaving
while true
if Cnt_Flags = 1 then
Cnt_Flags = 0
P2 = 255
else
P2 = 0
end if
wend
end.
Code: Select all
module Inc1
dim Cnt_Flags as Byte
sub procedure Int_Tmr_100uS ()
implements
sub procedure Int_Tmr_100uS () org 0x0073
TMR3CN = TMR3CN and %01111111 '.7 = 0 'TF3
Cnt_Flags = 1
end sub
end.
Code: Select all
_dummy:
No Context Saving Here . All Good
;test.mbas,3 :: sub procedure dummy() org 0x0033
;test.mbas,4 :: cnt_flags = 233
0x00AE 0x7508E9 MOV _Cnt_Flags, #233
0x00B1 0x32 RETI
; end of _dummy
_Int_Tmr_100uS:
Unexpected Context Saving Here
0x00B2 0xC0D0 PUSH PSW
0x00B4 0xC0E0 PUSH ACC
0x00B6 0xC0F0 PUSH B
0x00B8 0xC082 PUSH DPL
0x00BA 0xC083 PUSH DPH
;inc1.mbas,6 :: sub procedure Int_Tmr_100uS () org 0x0073
;inc1.mbas,7 :: TMR3CN = TMR3CN and %01111111 '.7 = 0 'TF3
0x00BC 0x53917F ANL TMR3CN, #127
;inc1.mbas,8 :: Cnt_Flags = 1
0x00BF 0x750801 MOV _Cnt_Flags, #1
0x00C2 0xD083 POP DPH
0x00C4 0xD082 POP DPL
0x00C6 0xD0F0 POP B
0x00C8 0xD0E0 POP ACC
0x00CA 0xD0D0 POP PSW
0x00CC 0x32 RETI
; end of _Int_Tmr_100uS
_main: