collapseos/emul/forth/glue1.asm

32 lines
491 B
NASM
Raw Normal View History

; Warning: The offsets of native dict entries must be exactly the same between
; glue0.asm and glue1.asm
.equ LATEST RAMSTART ; override
2020-03-10 13:26:02 +11:00
.equ STDIO_PORT 0x00
jp init
2020-03-20 08:26:45 +11:00
.equ GETC emulGetC
.equ PUTC emulPutC
.inc "forth.asm"
2020-03-10 13:26:02 +11:00
init:
di
; setup stack
ld sp, 0xffff
call forthMain
halt
emulGetC:
; Blocks until a char is returned
in a, (STDIO_PORT)
cp a ; ensure Z
ret
emulPutC:
out (STDIO_PORT), a
ret
.out $ ; should be the same as in glue0
.bin "core.bin"
RAMSTART: