OSWORD Calls

OSWORD provides extended OS services that need more than the two byte parameters of OSBYTE. Each OSWORD takes a parameter block in memory.

Call: JSR &FFF1 (indirected through &20C) with:

  • A = OSWORD number
  • X = parameter block address LSB
  • Y = parameter block address MSB

The parameter block layout is per-call. NAUG Appendix B (p448) gives the directory; each chapter gives full details.

Standard OS OSWORDs

Hex#FunctionNAUG pSource
&000Read line from currently selected input stream106(Ch6, pending)
&011Read system clock352(Ch19, pending)
&022Write system clock352(Ch19, pending)
&033Read interval timer352(Ch19, pending)
&044Write interval timer352(Ch19, pending)
&055Read byte of I/O processor memory (Tube)347(Ch18, pending)
&066Write byte of I/O processor memory (Tube)347(Ch18, pending)
&077Perform a SOUND command372(Ch21, pending)
&088Define an ENVELOPE372(Ch21, pending)
&099Read pixel value175naug-ch13-video
&0A10Read character definition171naug-ch13-video
&0B11Read palette value for a given logical colour178naug-ch13-video
&0C12Write palette value for a given logical colour (interrupt-safe)177naug-ch13-video
&0D13Read previous + current graphics cursor positions175naug-ch13-video
&0E14Read real-time clock (Master CMOS)353(Ch19, pending)
&0F15Write real-time clock (Master CMOS)355(Ch19, pending)

Filing-system OSWORDs

Hex#FunctionNotes
&7A122Issue Telesoftware commandTelesoft FS
&7D125Read disc cycle numberDFS/ADFS
&7E126Read disc/directory sizeDFS/ADFS
&7F127Issue FDC commandDirect floppy controller; param block format per FDC chip (1770 or 8271) — see Ch16 §16.4 (pending)
&80128Issue IEEE commandIEEE-488

Tube OSWORDs

Hex#FunctionNotes
&FF255R/W I/O processor memory (Z80 second processor)Ch18 (pending)

Performance note

OSWORD round-trip overhead is significant (parameter block fetch + dispatch + work + RTS). For high-rate operations the alternatives are:

  • Palette writes: OSWORD &0C is interrupt-safe and tube-compatible. For raw speed in IRQ-disabled code, STA &FE21 is 4 cycles vs hundreds for OSWORD — but you lose Tube compatibility and must restore OS palette state.
  • Pixel reads (OSWORD &09): there’s no faster way without computing the address yourself. For dense reads, walk screen memory directly using the layout from modes.
  • SOUND/ENVELOPE: there’s no escape — the SN76489 protocol via System VIA addressable latch + slow peripheral bus is involved enough that OSWORD is usually the right answer unless you’re writing your own player.

Cross-reference

For directory-level navigation, see naug-appendix-ab. Per-call detail accrues as relevant chapters are ingested — cross-references appear inline against each call entry above.


This wiki is curated by Claude following the LLM-Wiki methodology — a human curates source documents, the LLM compiles structured cross-linked markdown. Content may contain errors, omissions, or stale claims. For authoritative information refer to the original source documents in the bbc-documents GitHub archive.