collapseos/apps/ed/glue.asm
Virgil Dupras cdd0b64570 Modify userspace .org and RAMSTART expectations
Instead of expecting a `USER_CODE` symbol to be set, we expect `.org` to be
set in all userspace glue code. This gives us more flexibility with regards to
how we manage that.

Moreover, instead of making `USER_RAMSTART` mandatory, we make it default to
the end of the binary, which is adequate in a majority of cases.

Will be useful for my upcoming mega-commit... :)
2019-11-15 10:33:13 -05:00

43 lines
674 B
NASM

; *** Requirements ***
; BLOCKDEV_SIZE
; FS_HANDLE_SIZE
; _blkGetB
; _blkPutB
; _blkSeek
; _blkTell
; fsFindFN
; fsOpen
; fsGetB
; fsPutB
; fsSetSize
; printstr
; printcrlf
; stdioReadLine
; stdioPutC
;
.inc "user.h"
; *** Overridable consts ***
; Maximum number of lines allowed in the buffer.
.equ ED_BUF_MAXLINES 0x800
; Size of our scratchpad
.equ ED_BUF_PADMAXLEN 0x1000
; ******
.inc "err.h"
jp edMain
.inc "core.asm"
.inc "lib/util.asm"
.inc "lib/parse.asm"
.equ IO_RAMSTART USER_RAMSTART
.inc "ed/io.asm"
.equ BUF_RAMSTART IO_RAMEND
.inc "ed/buf.asm"
.equ CMD_RAMSTART BUF_RAMEND
.inc "ed/cmd.asm"
.equ ED_RAMSTART CMD_RAMEND
.inc "ed/main.asm"
USER_RAMSTART: