;;; This file define/describes the "machine" ;;; ;;; Abstract Machine: ;;; https://en.wikibooks.org/wiki/X86_Assembly/X86_Architecture ;;; ;;; General Purpose Registers ( * marks those used in syscalls ) ;;; *rax = ( -, eax = ( -, ax = ( ah, al) )) "accumulator" ;;; rbx = ( -, ebx = ( -, bx = ( bh, bl) )) "base" ;;; *rcx = ( -, ecx = ( -, cx = ( ch, cl) )) "counter" ;;; *rdx = ( -, edx = ( -, dx = ( dh, dl) )) "data" ;;; rsp = ( -, esp = ( -, sp = ( -, spl) )) "stack pointer" ;;; rbp = ( -, ebp = ( -, bp = ( -, bpl) )) "stack base pointer" ;;; *rsi = ( -, esi = ( -, si = ( -, sil) )) "source" ;;; *rdi = ( -, edi = ( -, di = ( -, dil) )) "destination" ;;; *r8 ;;; *r9 ;;; r10 ;;; *r11 ;;; r12 ;;; r13 ;;; r14 ;;; r15 ;;; clobbers rdi rsi rdx rcx r8 r9 r11 ;;; rax = syscall id ;;; ;;; Segment Registers ;;; SS "Stack Segment" ;;; CS "Code Segment" ;;; DS "Data Segment" ;;; ES "Extra Segment" ;;; FS "more Extra Segment" ;;; GS "more more Extra Segment" ;;; ;;; EFLAGS Register ;;; 0,0,0,0,0,0,0,0,0,0,ID,VIP,VIF,AC,VM,RF, ;;; 0,NT,[IOPL,IOPL],OF,DF,IF,TF,SF,ZF,0,AF,0,PF,1,CF ;;; ;;; Instruction pointer ;;; EIP ;;; ;;; Syscall allocations ;;; clobbers rdi rsi rdx rcx r8 r9 r11 ;;; rax = syscall id ;;; ;;; function calling