mk90.api
Block-device service
The build-specific interface between storage and registered device drivers.
Routine summary
| Routine | Input | Result |
|---|---|---|
| block_io | R0:R1 = LBA low:high; R2 = 256-byte buffer; R3 = 0 read / 1 write; R4 = device index | R0 = status; R1–R5 preserved. |
block_io
block_io
R0:R1 = LBA low:high; R2 = 256-byte buffer; R3 = 0 read / 1 write; R4 = device index| Contract | Value |
|---|---|
| Entry address | 0x0FE0 |
| Returns | R0 = status; R1–R5 preserved. |
Checks driver presence, read-only flags, logical bounds and volume-base addition, then calls the registered driver with R5 pointing to its descriptor. The SMP driver restricts the physical byte-address space to 64 KiB. A 32-bit LBA interface does not imply 32-bit MKS2 file sizes or working external drivers.
Device descriptor
Four 16-byte records start at 0x0720. A zero callback means OFF.
| Offset | Field |
|---|---|
| 0 | Driver callback. |
| 2 | Physical unit. |
| 4 | Physical sector-size descriptor field; SMP is 256. |
| 6 | Flags; bit 0 marks read-only. |
| 8 / 10 | Logical capacity, low / high word. |
| 12 / 14 | Volume base LBA, low / high word. |
The block API transfer remains 256 bytes in this release. Reserved floppy/CF records do not provide a sector-size conversion driver. Device support.