2019-07-02 10:49:30 -04:00
|
|
|
; 8K of onboard RAM
|
|
|
|
.equ RAMSTART 0xc000
|
|
|
|
; Memory register at the end of RAM. Must not overwrite
|
|
|
|
.equ RAMEND 0xfdd0
|
|
|
|
|
|
|
|
jp init
|
2019-07-01 11:05:25 -04:00
|
|
|
|
|
|
|
.fill 0x66-$
|
|
|
|
retn
|
|
|
|
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "err.h"
|
2019-11-13 20:38:06 -05:00
|
|
|
.inc "ascii.h"
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "core.asm"
|
|
|
|
.inc "parse.asm"
|
2019-07-02 11:14:30 -04:00
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
.equ PAD_RAMSTART RAMSTART
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "sms/pad.asm"
|
2019-07-02 09:02:19 -04:00
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
.equ VDP_RAMSTART PAD_RAMEND
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "sms/vdp.asm"
|
2019-07-02 10:49:30 -04:00
|
|
|
|
2019-07-02 11:14:30 -04:00
|
|
|
.equ STDIO_RAMSTART VDP_RAMEND
|
2019-11-04 09:55:12 -05:00
|
|
|
.equ STDIO_GETC padGetC
|
|
|
|
.equ STDIO_PUTC vdpPutC
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "stdio.asm"
|
2019-07-02 11:14:30 -04:00
|
|
|
|
|
|
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
|
|
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
2019-10-06 14:32:23 -04:00
|
|
|
.inc "shell.asm"
|
2019-07-02 11:14:30 -04:00
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
init:
|
2019-07-02 09:02:19 -04:00
|
|
|
di
|
|
|
|
im 1
|
|
|
|
|
2019-07-02 10:49:30 -04:00
|
|
|
ld sp, RAMEND
|
2019-07-01 11:05:25 -04:00
|
|
|
|
2019-07-02 11:14:30 -04:00
|
|
|
call padInit
|
2019-07-02 10:49:30 -04:00
|
|
|
call vdpInit
|
2019-07-02 11:14:30 -04:00
|
|
|
call shellInit
|
|
|
|
jp shellLoop
|
2019-07-01 11:05:25 -04:00
|
|
|
|
|
|
|
.fill 0x7ff0-$
|
|
|
|
.db "TMR SEGA", 0x00, 0x00, 0xfb, 0x68, 0x00, 0x00, 0x00, 0x4c
|