Files
assembly/armv6/tutorial/inputexample.s
2019-02-19 22:02:06 +01:00

24 lines
336 B
ArmAsm

.global _start
_start:
MOV R7, #3 @ system call to say we want to read input
MOV R0, #0 @ read from input device keyboard
MOV R2, #10 @ read 10 chars
LDR R1, =message
SWI 0
_write:
MOV R7, #4 @ output
MOV R0, #1 @ to screen
MOV R2, #5 @ 5 chars
LDR R1, =message
SWI 0
end:
MOV R7, #1
SWI 0
.data
message:
.ascii " "