Reputation: 87
This is a simple NASM 64bit linux assembly program:
_exit:
mov rax, 60
mov rdi, 0
syscall
My computer is AMD ( x86_64 64bit ) and i know this assembly program will working in INTEL 64bit processor too.
but I have these following problems !
Upvotes: 1
Views: 232
Reputation: 3583
Will this program work on ( linux ) computer with MIPS 64bit and ARM 64bit architecture?
No. MIPS and ARM have entirely different instruction sets. It would be comparable to trying to run JVM Bytecode with the .NET VM. It is just not compatible.
Do only system calls change when an assembly code with the different operating systems?
No. The calling conventions differ, for example. For example windows uses RCX, RDX, R8, and R9 for passing int arguments, SystemV (E.g. Linux) uses RDI, RSI, RDX, RCX, R8, R9 for this. Source
Upvotes: 6