mirror of
https://github.com/hsoft/collapseos.git
synced 2024-09-16 14:18:45 +10:00
67c55b0b2f
This requires us to significantly adjust our build process, which now has 3 stages.
25 lines
341 B
NASM
25 lines
341 B
NASM
.equ RAMSTART 0xe800
|
|
.equ HERE_INITIAL CODE_END ; override
|
|
.equ LATEST CODE_END ; override
|
|
.equ STDIO_PORT 0x00
|
|
|
|
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
|
|
|
|
.equ GETC emulGetC
|
|
.equ PUTC emulPutC
|