1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-07 17:28:45 +10:00
collapseos/recipes/sms/romasm/user-tmpl.h
Virgil Dupras 7cf3ed38da Extract str.asm from core.asm and make core included by userspace
Most of register fiddling routines (which is now the only thing contained
in care.asm) are used by almost all userspace apps, often in inner loops.

That makes the penalty of using jump tables for those a bit too high.
Moreover, it burdens jump tables needlessly.

Because this unit is very small (now that string routines are out), it makes
sense to always include it in binaries.
2019-11-14 10:14:15 -05:00

40 lines
875 B
C

; USER_CODE is filled in on-the-fly with either ED_CODE or ZASM_CODE
.equ ED_CODE 0x1900
.equ ZASM_CODE 0x1d00
.equ USER_RAMSTART 0xc200
.equ FS_HANDLE_SIZE 6
.equ BLOCKDEV_SIZE 8
; Make ed fit in SMS's memory
.equ ED_BUF_MAXLINES 0x100
.equ ED_BUF_PADMAXLEN 0x800
; Make zasm fit in SMS's memory
.equ ZASM_REG_MAXCNT 0x80
.equ ZASM_LREG_MAXCNT 0x10
.equ ZASM_REG_BUFSZ 0x800
.equ ZASM_LREG_BUFSZ 0x100
; *** JUMP TABLE ***
.equ strncmp 0x03
.equ upcase @+3
.equ findchar @+3
.equ parseHex @+3
.equ parseHexPair @+3
.equ blkSel @+3
.equ blkSet @+3
.equ fsFindFN @+3
.equ fsOpen @+3
.equ fsGetB @+3
.equ fsPutB @+3
.equ fsSetSize @+3
.equ parseArgs @+3
.equ printstr @+3
.equ _blkGetB @+3
.equ _blkPutB @+3
.equ _blkSeek @+3
.equ _blkTell @+3
.equ printcrlf @+3
.equ stdioPutC @+3
.equ stdioReadLine @+3