SimpleProcessorCore/asm/test-read-uart.s

62 lines
899 B
ArmAsm
Raw Permalink Normal View History

2013-07-26 12:33:01 +02:00
start:
2013-07-29 09:25:06 +02:00
lui $30, 1
2013-07-26 12:33:01 +02:00
loa $1, 65520
jmc print
jmc wait
jmp start
print:
add $20, $1, $0
sto $20, 65521
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
sto $20, 65521
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
sto $20, 65521
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
shr $20, $20, $0
sto $20, 65521
ret
wait:
lui $10, 600
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
shl $10, $10, $0
lui $11, 1
loop:
sub $10, $10, $11
jpz endloop
jmp loop
endloop:
ret