| ??? 08/08/05 03:49 Read: times |
#98971 - ????????? Responding to: ???'s previous message |
hi,
SAVE_CONTEXT:
PUSH ACC
PUSH AR0
MOV R0,SP
PUSH AR1 ;83
PUSH AR2
PUSH AR3
PUSH AR4
PUSH AR5
PUSH AR6
PUSH AR7 ;89
DEC R0
DEC R0
DEC R0
MOV A,DPH
XCH A,@R0
PUSH ACC
INC R0
MOV A,DPL
XCH A,@R0
PUSH ACC
INC R0
MOV A,@R0
INC R0
MOV AR0,@R0
RET ;returns to the addrees ACC,AR7 not where we came from
so before RET the SP should have the same value of the entry. the first statment should be PUSH SP and last Should be POP SP before ret. simalar way second routine has to be alterd. Abhishek |



