AREA LEDFLASH,CODE,READONLY
CODE32
MAIN
LDR R4,=0x56000050
MOV R5,#0
STR R5,[R4]
LDR R4,=0x56000054
LDR R5,[R4]
SUBS R5,R5,#0x7b
BLEQ LED
B MAIN
LED
LDR R0,=0x56000010
MOV R1,#0x015400
STR R1,[R0]
LDR R0,=0x56000014
LDR R1,=0xffdf ;
STR R1,[R0]
BL DELAY
LDR R1,=0xffff
STR R1,[R0]
BL DELAY
MOV PC,LR
B MAIN
DELAY
MOV R3,#10
LOOP
SUBS R3,R3,#1
LDR R2,=0x2000
BNE LOOP1
MOV PC,LR
LOOP1
SUBS R2,R2,#1
BNE LOOP1 B
LOOP
END |