mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 03:18:10 +11:00
5b155a5c15
Also, increase STDIO_BUFSIZE to 0x40 so that those while loops work.
61 lines
1.1 KiB
NASM
61 lines
1.1 KiB
NASM
; 8K of onboard RAM
|
|
.equ RAMSTART 0xc000
|
|
; Memory register at the end of RAM. Must not overwrite
|
|
.equ RAMEND 0xfdd0
|
|
|
|
jp init
|
|
|
|
.fill 0x66-$
|
|
retn
|
|
|
|
.inc "err.h"
|
|
.inc "ascii.h"
|
|
.inc "core.asm"
|
|
.inc "str.asm"
|
|
|
|
.equ PAD_RAMSTART RAMSTART
|
|
.inc "sms/pad.asm"
|
|
|
|
.equ VDP_RAMSTART PAD_RAMEND
|
|
.inc "sms/vdp.asm"
|
|
|
|
.equ STDIO_RAMSTART VDP_RAMEND
|
|
.equ STDIO_GETC padGetC
|
|
.equ STDIO_PUTC vdpPutC
|
|
.inc "stdio.asm"
|
|
|
|
; *** BASIC ***
|
|
|
|
; RAM space used in different routines for short term processing.
|
|
.equ SCRATCHPAD_SIZE STDIO_BUFSIZE
|
|
.equ SCRATCHPAD STDIO_RAMEND
|
|
.inc "lib/util.asm"
|
|
.inc "lib/ari.asm"
|
|
.inc "lib/parse.asm"
|
|
.inc "lib/fmt.asm"
|
|
.equ EXPR_PARSE parseLiteralOrVar
|
|
.inc "lib/expr.asm"
|
|
.inc "basic/util.asm"
|
|
.inc "basic/parse.asm"
|
|
.inc "basic/tok.asm"
|
|
.equ VAR_RAMSTART SCRATCHPAD+SCRATCHPAD_SIZE
|
|
.inc "basic/var.asm"
|
|
.equ BUF_RAMSTART VAR_RAMEND
|
|
.inc "basic/buf.asm"
|
|
.equ BAS_RAMSTART BUF_RAMEND
|
|
.inc "basic/main.asm"
|
|
|
|
init:
|
|
di
|
|
im 1
|
|
|
|
ld sp, RAMEND
|
|
|
|
call padInit
|
|
call vdpInit
|
|
call basInit
|
|
jp basStart
|
|
|
|
.fill 0x7ff0-$
|
|
.db "TMR SEGA", 0x00, 0x00, 0xfb, 0x68, 0x00, 0x00, 0x00, 0x4c
|