macro dup
{
        sub esi, 4
        mov [esi],eax
}
macro drop {lodsd}
macro variable name, def {
   call dovar
   name dd  def
}
macro swap {xchg eax,[esi]}
macro nip {add esi,4}
macro rot {
	xchg eax,[esi]
	xchg eax,[esi+4]
}
macro next {ret}

macro upsh op
{
        dup
        mov eax,op
}
macro upop op
{
        mov op,eax
        drop
}

macro code 1 { 
forth_#1: 
}

format ELF
; =====================================================================
_start:
	mov eax, 07dh              ;sys mprotect (pinched from IsForth
	mov ebx, 08048000h
	mov ecx, 00100000h
	mov edx, 7
	int 080h                   ;make the entire program space rwx

	lea esi, [esp-0x200]	;Initialize data stack
        call forth_main
	call forth_bye		; Make sure this exits
; =====================================================================
