GPBCON EQU 0x56000010 GPBDAT EQU 0x56000014 WTCON EQU 0X53000000 CODE32 AREA ASM_LED,CODE ,READONLY ENTRY
LDR R0,=WTCON ;看门狗关闭 LDR R1,#0 STR R1,[R0] LDR SP,=1024*4;堆栈设置 LDR R0,=GPBCON LDR R1,=(1<<10|1<<12|1<<14|1<<16) STR R1,[R0]
AGAIN LDR R0, =GPBDAT LDR R2,[R0] MOV R1,#0XFFFFFFFF;全灭 STR R1,[R0]
LDR R1,=0X01200000 NEXT1 SUB R1,R1,#1 ;延时 CMP R1,#0 BNE NEXT1 LDR R0, =GPBDAT LDR R2,[R0] MOV R1,#0 ;全亮 STR R1,[R0] LDR R1,=0x01200000 NEXT2 SUB R1,R1,#1 CMP R1,#0 BNE NEXT2 LDR R0, =GPBDAT LDR R2,[R0] MOV R1,#0XFFFFFFFF STR R1,[R0]
LDR R1,=0X01200000 NEXT3 SUB R1,R1,#1 CMP R1,#0 BNE NEXT3 LDR R0, =GPBDAT LDR R2,[R0] AND R1,R2,#0 STR R1,[R0] LDR R1,=0X01200000 NEXT4 SUB R1,R1,#1 CMP R1,#0 BNE NEXT4
B AGAIN ;循环 END
|