| ??? 07/16/02 06:03 Read: times |
#25862 - Timer interupt question |
I have read a book telling me that the interupt address of timer0 is 0BH while timer1 is 1BH.
By referring the following code, I would like to know the use of the interupt address. I didn't find the program use it. Beside, is it abirtary to assign the address for the Timer subroutine? (i.e. ORG 6BH) And why in the START subroutine, the SP has to be assign the value of #60H? can I put other value between #30H and #7FH? Finally, I would like to know the last command in the program: SJUP $ What is the meaning of $, which register is it referring to? ; ------ DEFINE LOCATION OF MAIN LOOP AND INTERRUPT SUBROUTINE ------ ORG 00H SJMP START ORG 6BH AJMP TIMER0 ; ------ MAIN LOOP START ------ START: MOV SP, #60H MOV R0, #100 MOV R1, #FFH SETB EA ;ENABLE INTERRUPT SETB ET0 ;ENABLE TIMER 0 INTERRUPT MOV TMOD, #0 ;SET THE TIMER 0 TO MODE 0 MOV TH0, #63H ;INITIALIZE THE TIMER MOV TL0, #18H SETB TR0 ;START THE TIMER MOV P1, #AAH SJMP $ Thnx... Sunny CHU |
| Topic | Author | Date |
| Timer interupt question | 01/01/70 00:00 | |
| RE: Timer interupt question | 01/01/70 00:00 | |
RE: Timer interupt question | 01/01/70 00:00 |



