NASM Error Parsing, Instruction Expected

That assembly language is MASM, not NASM. For starters, NASM segments are defined differently. Instead of Code segment word public ‘CODE’ we write .section text And that “ASSUME” declaration… You must have an ancient book. That is old, old MASM code. Brings back memories from the early 1980s for me! There are many differences between … Read more

Why is RCX not used for passing parameters to system calls, being replaced with R10? [duplicate]

X86-64 system calls use syscall instruction. This instruction saves return address to rcx, and after that it loads rip from IA32_LSTAR MSR. I.e. rcx is immediately destroyed by syscall. This is the reason why rcx had to be replaced for system call ABI. This same syscall instruction also saves rflags into r11, and then masks … Read more