text
.global _start
_start:
LDR R0,=0X50000A28
LDR R1,[R0]
ORR R1,R1,#(0X1<<4)
STR R1,[R0]
LDR R0,=0X50006000
LDR R1,[R0]
BIC R1,R1,#(0X3<<20)
ORR R1,R1,#(0X1<<20)
STR R1,[R0]
LDR R0,=0X50006004
LDR R1,[R0]
AND R1,R1,#(0X0<<10)
STR R1,[R0]
LDR R0,=0X50006008
LDR R1,[R0]
BIC R1,R1,#(0X3<<20)
STR R1,[R0]
LDR R0,=0X5000600C
LDR R1,[R0]
BIC R1,R1,#(0X3<<20)
STR R1,[R0]
LDR R2,=0X50000A28
LDR R3,[R2]
ORR R3,R3,#(0X1<<5)
STR R3,[R2]
LDR R2,=0X50007000
LDR R3,[R2]
BIC R3,R3,#(0X3<<20)
ORR R3,R2,#(0X1<<20)
STR R3,[R2]
LDR R2,=0X50007004
LDR R3,[R2]
AND R3,R3,#(0X0<<10)
STR R3,[R2]
LDR R2,=0X50007008
LDR R3,[R2]
BIC R3,R3,#(0X3<<20)
STR R3,[R2]
LDR R3,=0X5000700C
LDR R3,[R2]
BIC R3,R2,#(0X3<<20)
STR R3,[R2]
LDR R4,=0X50000A28
LDR R5,[R4]
ORR R5,R5,#(0X1<<4)
STR R5,[R4]
LDR R4,=0X50006000
LDR R5,[R4]
BIC R5,R5,#(0X3<<16)
ORR R5,R5,#(0X1<<16)
STR R5,[R4]
LDR R4,=0X50006004
LDR R5,[R4]
AND R5,R5,#(0X0<<8)
STR R5,[R4]
LDR R4,=0X50006008
LDR R5,[R4]
BIC R5,R5,#(0X3<<16)
STR R5,[R4]
LDR R4,=0X5000600C
LDR R5,[R4]
BIC R5,R5,#(0X3<<16)
STR R5,[R4]
LOOP:
bl LED_ON
bl DELAY
bl LED_OFF
bl DELAY
b LOOP
LED_ON:
LDR R0,=0X50006014
LDR R1,[R0]
ORR R1,R1,#(0X1<<10)
STR R1,[R0]
LDR R2,=0X50007014
LDR R3,[R2]
ORR R3,R3,#(0X1<<10)
STR R3,[R2]
LDR R4,=0X50006014
LDR R5,[R4]
ORR R5,R5,#(0X1<<8)
STR R5,[R4]
MOV PC,LR
LED_OFF:
LDR R0,=0X50006014
LDR R1,[R0]
BIC R1,R1,#(0X1<<10)
STR R1,[R0]
LDR R2,=0X50007014
LDR R3,[R2]
BIC R3,R3,#(0X1<<10)
STR R3,[R2]
LDR R4,=0X50006014
LDR R5,[R4]
BIC R5,R5,#(0X1<<8)
STR R5,[R4]
MOV PC,LR
DELAY:
LDR R6,=0X10000000
A:
cmp r6,#0
subne r6,r6,#1
bne A
mov pc,lr
.end
2024.4.11
最新推荐文章于 2024-08-22 22:47:51 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)