initial commit
This commit is contained in:
23
armv6/tutorial/inputexample.s
Normal file
23
armv6/tutorial/inputexample.s
Normal file
@@ -0,0 +1,23 @@
|
||||
.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 " "
|
||||
Reference in New Issue
Block a user