w1.1_lab1.1
This commit is contained in:
3
lab1.1/listing1
Normal file
3
lab1.1/listing1
Normal file
@@ -0,0 +1,3 @@
|
||||
paste folowing code in first address for lazy typers:
|
||||
|
||||
2008d4908d6008d2055d0600d4907d6008d20004906d6008d230dfd031dbd4da05d3da01dd1fdd40586008de7f9d3830d4002d0dc00d4002d0dc14d40025854d0014
|
||||
33
lab1.1/main.asm
Normal file
33
lab1.1/main.asm
Normal file
@@ -0,0 +1,33 @@
|
||||
@ this code produces the same binary as listing 1
|
||||
|
||||
.syntax unified
|
||||
.cpu cortex-m4
|
||||
.thumb
|
||||
.text
|
||||
.global main
|
||||
main:
|
||||
MOVS.N R0, #8
|
||||
LDR.N R1, =0X40023830
|
||||
STR.N R0, [R1, #0]
|
||||
|
||||
MOVS.N R0, #0X55
|
||||
LSLS.N R0, R0, #24
|
||||
LDR.N R1, =0X40020C00
|
||||
STR.N R0, [R1, #0]
|
||||
|
||||
MOVS.N R0, #0
|
||||
LDR.N R1, =0X40020C14
|
||||
STR.N R0, [R1, #0]
|
||||
|
||||
MOVS.N R3, #15
|
||||
LSLS.N R3, R3, #12
|
||||
|
||||
loop:
|
||||
LDR.N R2, =0X00145854
|
||||
delay:
|
||||
SUBS.N R2, #1
|
||||
BNE.N delay
|
||||
updateLed:
|
||||
EORS.N R0, R3
|
||||
STR.N R0, [R1, #0]
|
||||
B.N loop
|
||||
Reference in New Issue
Block a user