Reputation: 3447
Attempting to compile the following in order to read a 5 byte char from stdin:
.bss
num resb 5
.text
.global _start
_start:
mov r0, $1
mov r1, num
mov r2, $5
mov r7, #3
swi $0
Via the following
as -o readstdin.o readstdin.s
But I get the assembly error:
readstdin.s: Assembler messages:
readstdin.s:2: Error: bad instruction `num resb 5'
readstdin.s:8: Error: immediate expression requires a # prefix -- `mov r1,num'
I am running this on an ARM11 Raspberry Pi Zero.
Upvotes: -1
Views: 1107