Differences From
Artifact [d3081be9ee]:
1 -;; abi definition file for x86 linux 32-bit
2 -; vim: ft=nasm
3 -
4 -; syscall32 numbers - syscall table must be created first!
5 -%include "system_calls.s"
6 -
7 -; syscall32 registers
8 -%define sys.reg.n 6
9 -%define sys.reg.0 eax
10 -%define sys.reg.1 ebx
11 -%define sys.reg.2 ecx
12 -%define sys.reg.3 edx
13 -%define sys.reg.4 esi
14 -%define sys.reg.5 edi
15 -
16 -%macro sys 1-6
17 - %assign i 0
18 - %rep %0
19 - mov sys.reg. %+ i, %1 ; i'm actually shocked this worked
20 - %rotate 1
21 - %assign i i+1
22 - %endrep
23 - syscall
24 -%endmacro
25 -
26 -%define sys.call int 0x80 ; sysenter is allegedly the
27 - ; politically correct option but it does not actually
28 - ; appear to work without a whole lot of extra bullshit
29 -
30 -; todo: learn vdsos