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 !
- Will this program work on ( linux ) computer with MIPS 64bit and ARM 64bit architecture?
- Do only system calls change when an assembly code with the different operating systems?
armnormipsso no, it won't work on a computer with those respective CPU architectures, regardless of the OS. The assembly you've provided is OS-agnostic, such that it should be able to assemble and run on pretty much any OS that has a x86-64 compiler. However, the assembly process leaves artifacts that can be OS-dependent, such as invoking the appropriate loader, file formats, and whatnot. In short, the code is portable across OS's but the assembled binary is not. - h0r53