1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-10-03 07:30:55 +10:00
collapseos/emul/forth/glue0.asm
Virgil Dupras 5387e08437 forth: make bin staging process a bit less hackish
The goal being to add a new native code dict staging phase.
2020-03-22 21:46:43 -04:00

31 lines
399 B
NASM

.equ RAMSTART 0xe800
.equ HERE_INITIAL CODE_END ; override
.equ STDIO_PORT 0x00
jp init
.equ GETC emulGetC
.equ PUTC emulPutC
.inc "forth.asm"
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
CODE_END:
.out LATEST
.out $ ; should be the same as in glue1