本帖最后由 yulindee 于 2010-2-21 17:36 编辑
下面是我用C写的一个中断服务程序编绎出来的汇编,一进中断会把这什么多寄存器入栈呢!不是入A,X吗?这些寄存器哪里介绍呢!给点写汇编的资料也可以。。。
(0119) void SR_C(void)
(0120) {
_HALL_ISR_C:
0964: 08 PUSH A
0965: 5D D0 MOV A,REG[0xD0]
0967: 08 PUSH A
0968: 5D D3 MOV A,REG[0xD3]
096A: 08 PUSH A
096B: 5D D4 MOV A,REG[0xD4]
096D: 08 PUSH A
096E: 5D D5 MOV A,REG[0xD5]
0970: 08 PUSH A
0971: 51 31 MOV A,[__r0]
0973: 08 PUSH A
0974: 51 30 MOV A,[__r1]
0976: 08 PUSH A
0977: 51 2F MOV A,[__r2]
0979: 08 PUSH A
097A: 51 2E MOV A,[__r3]
097C: 08 PUSH A
097D: 51 2D MOV A,[__r4]
097F: 08 PUSH A
0980: 51 2C MOV A,[__r5]
0982: 08 PUSH A
0983: 51 2B MOV A,[__r6]
0985: 08 PUSH A
0986: 51 2A MOV A,[__r7]
0988: 08 PUSH A
0989: 51 29 MOV A,[__r8]
098B: 08 PUSH A
098C: 51 28 MOV A,[__r9]
098E: 08 PUSH A
098F: 51 27 MOV A,[__r10]
0991: 08 PUSH A
0992: 51 26 MOV A,[__r11]
0994: 08 PUSH A
0995: 51 25 MOV A,[__rX]
0997: 08 PUSH A
0998: 51 24 MOV A,[__rY]
099A: 08 PUSH A
099B: 51 23 MOV A,[__rZ]
099D: 08 PUSH A
(0121) // PRT1DR=~(PRT1DR&0X40);
(0122) hall_position_isr( );
099E: 7C 06 39 LCALL _hall_position_isr
09A1: 18 POP A
09A2: 53 23 MOV [__rZ],A
09A4: 18 POP A
09A5: 53 24 MOV [__rY],A
09A7: 18 POP A
09A8: 53 25 MOV [__rX],A
09AA: 18 POP A
09AB: 53 26 MOV [__r11],A
09AD: 18 POP A
09AE: 53 27 MOV [__r10],A
09B0: 18 POP A
09B1: 53 28 MOV [__r9],A
09B3: 18 POP A
09B4: 53 29 MOV [__r8],A
09B6: 18 POP A
09B7: 53 2A MOV [__r7],A
09B9: 18 POP A
09BA: 53 2B MOV [__r6],A
09BC: 18 POP A
09BD: 53 2C MOV [__r5],A
09BF: 18 POP A
09C0: 53 2D MOV [__r4],A
09C2: 18 POP A
09C3: 53 2E MOV [__r3],A
09C5: 18 POP A
09C6: 53 2F MOV [__r2],A
09C8: 18 POP A
09C9: 53 30 MOV [__r1],A
09CB: 18 POP A
09CC: 53 31 MOV [__r0],A
09CE: 18 POP A
09CF: 60 D5 MOV REG[0xD5],A
09D1: 18 POP A
09D2: 60 D4 MOV REG[0xD4],A
09D4: 18 POP A
09D5: 60 D3 MOV REG[0xD3],A
09D7: 18 POP A
09D8: 60 D0 MOV REG[0xD0],A
09DA: 18 POP A
09DB: 7E RETI
(0123) } |
|