I'm trying to learn assembly using the raspberry pi. I have code that compiles using
as but will not compile with
gcc. I thought that
as was the backend for
gcc assembly so I'm confused why it is not working. It says that
udiv is undefined.
.global _start _start: MOV R4, #3 MOV R1, #999 UDIV R2, R1, R4 MOV R7, #1 SVC 0
as -o test.o test.s; ld -o test test.o works ok,
gcc test.s -o test fails.