2019-10-18 09:05:06 -04:00
|
|
|
#include "asm.h"
|
2019-10-18 09:05:04 -04:00
|
|
|
|
|
|
|
|
/* Callable from C as
|
|
|
|
|
void *native_stack_pointer(void) */
|
|
|
|
|
.globl MANGLE(native_stack_pointer)
|
|
|
|
|
MANGLE(native_stack_pointer):
|
|
|
|
|
mov %esp,%eax
|
|
|
|
|
ret
|
2019-10-18 09:05:06 -04:00
|
|
|
|
|
|
|
|
/* Callable from C as
|
|
|
|
|
void execute(F_WORD *word) */
|
|
|
|
|
.globl MANGLE(execute)
|
|
|
|
|
MANGLE(execute):
|
|
|
|
|
mov 4(%esp),%eax
|
|
|
|
|
push %ebx
|
|
|
|
|
push %ebp
|
|
|
|
|
push %eax
|
2019-10-18 09:05:08 -04:00
|
|
|
call *36(%eax)
|
2019-10-18 09:05:06 -04:00
|
|
|
pop %eax
|
|
|
|
|
pop %ebp
|
|
|
|
|
pop %ebx
|
|
|
|
|
ret
|