我使用的是ST7FLITE05YOM6的芯片,在使用LITE定时器的过程中,出现问题。源程序代码如下,主要实现的功能是一秒钟延时。请问一下各位这个源代码为什么不能够运行,谢谢! st7/ ;------------------------------------------------------ ; SEGMENT MAPPING FILE AUTOMATICALLY GENERATED BY STVD7 ; SHOULD NOT BE MANUALLY MODIFIED. ; CHANGES WILL BE LOST WHEN FILE IS REGENERATED. ;------------------------------------------------------ TITLE "KF85.ASM" MOTOROLA #INCLUDE "st7flite05.inc" BYTES ; The following addresses are 8 bits long segment byte at 80-FF 'ram0' MMSH DS.B $1 MMSL DS.B $1 WORDS ; The following addresses are 16 bits long segment byte at FA00-FFDF 'rom' MAIN: LD A,#0 LD PBDDR,A LD PBOR,A LD A,#$0F LD PADDR,A LD PAOR,A CLR PBDR CLR PADR BSET PADR,#3 BSET PADR,#2 LD A,#0 LD MMSH,A LD MMSL,A LD A,2 LOOP: NOP NOP NOP NOP NOP NOP DEC A JRNE LOOP BRES PADR,#3 NOP NOP NOP NOP BRES PADR,#2 ;JP MAIN LD A,#$10 LD LTCSR,A RIM LOOP1 HALT TBINT: LD A,LTCSR LD A,#3 CP A,MMSH JRNE L2 L1: LD A,MMSL CP A,#$0E7 JRUGE L5 L2: INC MMSL JRNE L4 INC MMSH JRA L4 L5: BRES PADR,#3 BRES PADR,#2 L4: IRET NonHandledInterrupt iret WORDS ; The following addresses are 16 bits long segment byte at FFE0-FFFF 'vectit' DC.W NonHandledInterrupt ;FFE0-FFE1h location DC.W NonHandledInterrupt ;FFE2-FFE3h location DC.W TBINT ;FFE4-FFE5h location DC.W NonHandledInterrupt ;FFE6-FFE7h location DC.W NonHandledInterrupt ;FFE8-FFE9h location DC.W NonHandledInterrupt ;FFEA-FFEBh location DC.W NonHandledInterrupt ;FFEC-FFEDh location DC.W NonHandledInterrupt ;FFEE-FFEFh location DC.W NonHandledInterrupt ;FFF0-FFF1h location DC.W NonHandledInterrupt ;FFF2-FFF3h location DC.W NonHandledInterrupt ;FFF4-FFF5h location DC.W NonHandledInterrupt ;FFF6-FFF7h location DC.W NonHandledInterrupt ;FFF8-FFF9h location DC.W NonHandledInterrupt ;FFFA-FFFBh location DC.W NonHandledInterrupt ;FFFC-FFFDh location DC.W MAIN ;reset END
|