blockdev: clarify routines specs
This commit is contained in:
parent
a86738ae84
commit
c77d96da22
@ -8,6 +8,36 @@
|
||||
;
|
||||
; This part exposes a new "bsel" command to select the currently active block
|
||||
; device.
|
||||
;
|
||||
; *** Blockdev routines ***
|
||||
;
|
||||
; There are 4 blockdev routines that can be defined by would-be block devices
|
||||
; and they follow these specifications:
|
||||
;
|
||||
; GetC:
|
||||
; Reads one character from selected device and returns its value in A.
|
||||
; Sets Z according to whether read was successful: Set if successful, unset
|
||||
; if not.
|
||||
;
|
||||
; A successful GetC should advance the "pointer" of the device (if there is one)
|
||||
; by one byte so that a subsequent GetC will read the next char. Unsuccessful
|
||||
; reads generally mean that we reached EOF.
|
||||
;
|
||||
;
|
||||
; PutC:
|
||||
; Writes character in A in current position in the selected device. Sets Z
|
||||
; according to whether the operation was successful.
|
||||
;
|
||||
; A successful PutC should advance the "pointer" of the device (if there is one)
|
||||
; by one byte so that the next PutC places the next char next to this one.
|
||||
; Unsuccessful writes generally mean that we reached EOF.
|
||||
;
|
||||
; Seek:
|
||||
; Place device "pointer" at position dictated by HL.
|
||||
;
|
||||
; Tell:
|
||||
; Return the position of the "pointer" in HL
|
||||
|
||||
|
||||
; *** DEFINES ***
|
||||
; BLOCKDEV_COUNT: The number of devices we manage.
|
||||
|
@ -25,7 +25,7 @@
|
||||
; error out if there's no metadata: we create a new CFS fs with an empty block.
|
||||
;
|
||||
; The can only be one "mounted" fs at once. Selecting another blockdev through
|
||||
; "bsel" foesn't affect the currently mounted fs, which can still be interacted
|
||||
; "bsel" doesn't affect the currently mounted fs, which can still be interacted
|
||||
; with (which is important if we want to move data around).
|
||||
;
|
||||
; *** Block metadata
|
||||
|
Loading…
Reference in New Issue
Block a user