1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-07 07:48:45 +10:00
collapseos/tools/emul/shell/user.h
Virgil Dupras 942d2a952d ed: take filename as an argument
This hard-binds ed to the filesystem (I liked the idea of working
only with blockdevs though...), but this is necessary for the
upcoming `w` command. We need some kind of way to tell the
destination to write to truncate itself.

This only has a meaning in the filesystem, but it's necessary to
let the file know that its registered file size has possibly
shrunk.

I thought of alternatives that would have allowed me to keep ed
blkdev-centered, but they were all too hackish to my own taste.

Hence, this new hard-bind on files.
2019-07-20 19:43:07 -04:00

34 lines
685 B
C

.equ USER_CODE 0x4200
.equ USER_RAMSTART USER_CODE+0x1800
.equ FS_HANDLE_SIZE 8
.equ BLOCKDEV_SIZE 8
; *** JUMP TABLE ***
.equ strncmp 0x03
.equ addDE 0x06
.equ addHL 0x09
.equ upcase 0x0c
.equ unsetZ 0x0f
.equ intoDE 0x12
.equ intoHL 0x15
.equ writeHLinDE 0x18
.equ findchar 0x1b
.equ parseHex 0x1e
.equ parseHexPair 0x21
.equ blkSel 0x24
.equ blkSet 0x27
.equ fsFindFN 0x2a
.equ fsOpen 0x2d
.equ fsGetC 0x30
.equ fsPutC 0x33
.equ cpHLDE 0x36
.equ parseArgs 0x39
.equ printstr 0x3c
.equ _blkGetC 0x3f
.equ _blkPutC 0x42
.equ _blkSeek 0x45
.equ _blkTell 0x48
.equ printcrlf 0x4b
.equ stdioPutC 0x4e
.equ stdioReadLine 0x51