一段在IAR写的汇编闪灯程序,在IAR7.51里写的. 灯在P2_3上.
#include "ioCC1110.h"
NAME main
PUBLIC main
ORG 07F00h
DC16 main
RSEG RCODE
main NOP
NOP
e3: MOV P2DIR,#1Fh
led: MOV A, P2
MOV R3, #08H
XRL A, R3
MOV P2, A
LCALL delay
JMP led
delay: MOV R0, #10
delay1: MOV R1, #F0
delay2: MOV R2, #F0
DJNZ R2,$
DJNZ R1,delay2
DJNZ R0,delay1
RET
END
不好排版,把文件放在附件里了.
文章评论(0条评论)
登录后参与讨论