62 points · by luu · 6mo ago · 27 comments
x18 is "the platform register", reserved for the OS. The ISA manual says not to touch it unless you know what you're doing. Also, I don't know but I could believe that android and non-googly linux use different ABIs (but probably not because everyone uses pretty much the same ABI on aarch64 from what I've seen), but surely Alpine is linux and has the same ABI as other linuxes.
And completely ignoring PE and Windows on ARM.
But basically it's similar to elf vs coff. windows also uses several modern alignments and a shadow stack to make life easier. But arm has so much more scratch registers, much more fun.
Even the PC clones didn't had something like portable Assembly if you ventured outside 0x10h and 0x21h interrupts.
Never ‘touching the hardware’ was attainable for a great deal many assembly programs.
You could do a lot with 0x10h and 0x21h on DOS.
> The good news is that it is very easy to write assembly which targets Apple’s computers as well as the other 64-bit ARM devices running operating systems other than Darwin.