[BITS 32]

global stk_ptr
global stk_size
global get_stack_pointer
global set_eax
global get_eax
global stk_alloc
global program_name

section .bss 

stk_ptr: resd 1
stk_size: resd 1
program_name: resd 1

section .text

get_stack_pointer:
	pop ecx
	mov eax,esp
	jmp ecx

stk_alloc:
	pop ecx
	pop eax
	sub esp,eax
	sub esp,4
	mov eax,esp
	jmp ecx

set_eax:
	push ebp
	mov ebp,esp
	mov eax,[ebp+8]
	leave
	ret

get_eax:
	pop ecx
	jmp ecx
