- Assembly programming guide: Intro level guide on x86 assembly.
- computer systems a programmer's perspective: Chapter 3 covers x86 assembly programming.
- x86-64Machine-Level Programming: A detailed guide on x86_64 assembly programming by prof. Bryant and Hallaron.
- x86-64 Assembly Language Programming with Ubuntu: Book on x86_64 assembly programming.
- This document gives a brief summary of the x86-64 architecture and instruction set: This document gives a brief summary of the x86-64 ISA.
- x86_64 Cheatsheet: A cheatsheet on x86_64 assembly programming.
- X86-64 Architecture Guide: X86_64 instructions at a glance.
- x86_64 status flags
- The 64 bit x86 C Calling Convention
- x86 Assembly and Call Stack
- NASM Tutorial
- Linux systemcall table x86 and x86_64
- A Beginners’ Guide to x86-64 Instruction Encoding
- How to read the Intel Opcode notation
- Encoding Real x86 Instructions: x86 instruction encoding.
- x86_64 instruction encoding OSDev
- x86 and x86_64 instruction reference
- X86 and x86_64 Opcode and Instruction Reference
- Intel developer manual vol 2A: 2016 ed
- Intel developer manual vol 2B: 2016 ed
- How to Use Inline Assembly Language in C Code
- Using Inline Assembly in C/C++
- Predefined compiler macros
- Intel SSE4 Programming Reference
- SSE 4.2 Text processing instructions
section .text
global _start
_start:
inc rdi
create object file: nasm -f elf64 -o test.o test.asm
link to make executable (dynamically linked with c std lib): ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test test.o -lc
Using GNU as:
as test.asm -o test.o
objdump: objdump -D -Mintel,x86-64 -b binary -m i386 jit.bin
nasm: ndisasm -b 64 jit.bin
- Registers to pass parameters:
rdi, rsi, rdx, rcx, r8, r9