mirror of
https://github.com/hsoft/collapseos.git
synced 2024-10-03 02:50:55 +10:00
5387e08437
The goal being to add a new native code dict staging phase.
31 lines
399 B
NASM
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
|