SECTION CODE USE32 CLASS=CODE
..start:

	%include "platform/windows/windows.sdl"

section .text
	global main
main:
	; The stack is bigger than in the svgalib version, because
	; SDL needs it. It could probably be a _lot_ smaller than
	; 0x2000 though...
	lea esi, [esp-0x1000]	;Initialize data stack
	
	call sdl_init
 	mov eax,[screen]
	mov eax,[eax+PIXELS_OFS]
 	mov [frame],eax

MAIN:   call forth_init
        upsh startup            ;Load startup code (startup.f)
        upsh startup.1 - startup
        call eval
        call user_init
	call interpret
;---------------------------------------------------------------------
%include "platform/windows/windows.drivers"
%include "user/user.asm"
;---------------------------------------------------------------------
section .bss
tib  resb   200h
d0   resb 10000h
h0   resb 80000h
section .text
;---------------------------------------------------------------------
%include "forth.asm"
;---------------------------------------------------------------------
section .data
startup: incbin "platform/windows/windows.f"
         incbin "user/user.f"
.1
END

