Add blackboard XSA and main sources
This commit is contained in:
parent
8dad79e2d8
commit
e84c73ae7e
BIN
blackboard.xsa
Normal file
BIN
blackboard.xsa
Normal file
Binary file not shown.
18
src/main.s
Normal file
18
src/main.s
Normal file
@ -0,0 +1,18 @@
|
||||
.text
|
||||
.global main
|
||||
|
||||
@define constants, these can be used as symbols in your code
|
||||
.equ LED_CTL, 0x41210000
|
||||
.set SW_DATA, 0x41220000
|
||||
|
||||
@the set and equ directives are equivalent and can be used interchangeably
|
||||
|
||||
main:
|
||||
ldr r1,=SW_DATA @load switch address from constant
|
||||
ldr r2,=LED_CTL @load LED address from constant
|
||||
loop:
|
||||
ldr r0,[r1] @load switch value *r1 ->r0
|
||||
str r0,[r2] @store value to led register *r2 <-r0
|
||||
b loop @go back to "loop"
|
||||
|
||||
.end
|
||||
Loading…
x
Reference in New Issue
Block a user