mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 17:58:07 +11:00
ae028e3a86
This huge refactoring remove the Seek and Tell routine from blockdev implementation requirements and change GetC and PutC's API so that they take an address to read and write (through HL/DE) at each call. The "PTR" approach in blockdev implementation was very redundant from device to device and it made more sense to generalize. It's possible that future device aren't "random access", but we'll be able to add more device types later. Another important change in this commit is that the "blockdev handle" is now opaque. Previously, consumers of the API would happily call routines directly from one of the 4 offsets. We can't do that any more. This makes the API more solid for future improvements. This change forced me to change a lot of things in fs, but overall, things are now simpler. No more `FS_PTR`: the "device handle" now holds the active pointer. Lots, lots of changes, but it also feels a lot cleaner and solid.
26 lines
616 B
NASM
26 lines
616 B
NASM
; *** Errors ***
|
|
; We start error at 0x10 to avoid overlapping with shell errors
|
|
; Unknown instruction or directive
|
|
.equ ERR_UNKNOWN 0x11
|
|
|
|
; Bad argument: Doesn't match any constant argspec or, if an expression,
|
|
; contains references to undefined symbols.
|
|
.equ ERR_BAD_ARG 0x12
|
|
|
|
; Code is badly formatted (comma without a following arg, unclosed quote, etc.)
|
|
.equ ERR_BAD_FMT 0x13
|
|
|
|
; Value specified doesn't fit in its destination byte or word
|
|
.equ ERR_OVFL 0x14
|
|
|
|
.equ ERR_FILENOTFOUND 0x15
|
|
|
|
; Duplicate symbol
|
|
.equ ERR_DUPSYM 0x16
|
|
|
|
; Out of memory
|
|
.equ ERR_OOM 0x17
|
|
|
|
; *** Other ***
|
|
.equ ZASM_DEBUG_PORT 42
|