File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Disassembly of section .init:
10
10
800c: e5801004 str r1, [r0, #4]
11
11
8010: e1a01121 lsr r1, r1, #2
12
12
13
- 00008014 <loop $>:
13
+ 00008014 <main $>:
14
14
8014: e5801028 str r1, [r0, #40]
15
15
8018: e3a0283f mov r2, #4128768 ; 0x3f0000
16
16
@@ -25,5 +25,5 @@ Disassembly of section .init:
25
25
8030: e2422001 sub r2, r2, #1 ; 0x1
26
26
8034: e3520000 cmp r2, #0 ; 0x0
27
27
8038: 1afffffc bne 8030 <wait2$>
28
- 803c: eafffff4 b 8014 <loop $>
28
+ 803c: eafffff4 b 8014 <main $>
29
29
8040: 20200000 .word 0x20200000
Original file line number Diff line number Diff line change @@ -18,29 +18,33 @@ mov r1,#1
18
18
lsl r1 , # 18
19
19
str r1 ,[ r0 , # 4 ]
20
20
21
- # Turn off (# 40 ) the 16th pin (#16 ) of the GPIO to turn on the ACT LED.
21
+ # Preselect the 16th pin (# 16 ) of the GPIO to turn on/off the ACT LED.
22
22
# mov r1 , # 1 // These two lines can be factorised in `lsr r1 , # 2 `
23
23
# lsl r1 , # 16 // since r1 currently contains 2 ^ 18
24
24
lsr r1 , # 2
25
25
26
- # Infinite loop
27
- loop $:
26
+ # Main loop
27
+ main $:
28
28
29
+ # Turn off (# 40 ) the pin to turn on the ACT LED
29
30
str r1 ,[ r0 , # 40 ]
30
31
32
+ # Wait a few time
31
33
mov r2 , # 0x3F0000
32
34
wait1$:
33
35
sub r2 , # 1
34
36
cmp r2 , # 0
35
37
bne wait1$
36
38
39
+ # Turn on (# 28 ) the pin to turn off the ACT LED
37
40
str r1 ,[ r0 , # 28 ]
38
41
42
+ # Wait a few time
39
43
mov r2 , # 0x3F0000
40
44
wait2$:
41
45
sub r2 , # 1
42
46
cmp r2 , # 0
43
47
bne wait2$
44
48
45
- b loop $
49
+ b main $
46
50
You can’t perform that action at this time.
0 commit comments