mk90.api

Block-device service

The build-specific interface between storage and registered device drivers.

Routine summary

RoutineInputResult
block_ioR0:R1 = LBA low:high; R2 = 256-byte buffer; R3 = 0 read / 1 write; R4 = device indexR0 = 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
ContractValue
Entry address0x0FE0
ReturnsR0 = 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.

OffsetField
0Driver callback.
2Physical unit.
4Physical sector-size descriptor field; SMP is 256.
6Flags; bit 0 marks read-only.
8 / 10Logical capacity, low / high word.
12 / 14Volume 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.