libk  Artifact [c5f65471b5]

Artifact c5f65471b528d1d216ab0da15e3300009aae5550d806ee54fc99dbf9b91a060a:


;; abi definition file for x86 linux 64-bit
; vim: ft=nasm

; syscall numbers - syscall table must be created first!
%include "calls.s"

; extremely stupid freebsd-ism: expects the syscall to
; come from a function
_syscall: int 0x80
          ret

%define sys.call call _syscall

; parameters are passed on the stack
%macro syscall 1-*
	mov eax, %1
	%rep %0-1
		%rotate 1
		push %1
	%endrep
	sys.call
	add esp, 4*(%0-1)
%endmacro