mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 09:18:05 +11:00
17 lines
705 B
Plaintext
17 lines
705 B
Plaintext
|
Disk blocks
|
||
|
|
||
|
Disk blocks are Collapse OS' main access to permanent storage.
|
||
|
The system is exceedingly simple: blocks are contiguous
|
||
|
chunks of 1024 bytes each living on some permanent media such
|
||
|
as floppy disks or SD cards. They are mostly used for text,
|
||
|
either informational or source code, which is organized into
|
||
|
16 lines of 64 characters each.
|
||
|
|
||
|
Blocks are referred to by number, 0-indexed. They are read
|
||
|
through BLK@ and written through BLK!. When a block is read,
|
||
|
its 1024 bytes content is copied to an in-memory buffer
|
||
|
starting at BLK( and ending at BLK). Those read/write
|
||
|
operations are often implicit. For example, LIST calls BLK@.
|
||
|
|
||
|
(cont.)
|