SWEET 16
Summary
A pseudo-machine 16-bit virtual computer interpreter designed by Steve Wozniak and built into the Apple II Monitor ROM at $F689. Provides sixteen 16-bit registers (R0–RF) at the first 32 bytes of RAM; R0 = accumulator, RC = stack pointer, RE = status, RF = program counter. Invoked from 6502 code via JSR $F689; SWEET 16 reads bytes immediately following the JSR as its own instruction stream. Returns to 6502 via the RTN opcode.
Speed: ~10× slower than 6502 native, ~10–100× faster than Integer BASIC.
Apple's only documentation of SWEET 16 prior to 1979 was five paragraphs and two tables in Wozniak's early BYTE article "System Description: The APPLE-II" — and it doesn't match the shipped behavior. John L. Moon's June 1979 article "SWEET 16, the Computer Within the Computer" is the most accessible 1979 reference. The full opcode set: RTN, BRA, BCC/BCS/BPL/BMI/BEQ/BNE/BNO/BNN, BRK, RTS, JSR, NOP, SET, TRA, TAR, LBI/SBI/LDI/SDI/LBD/SBD, ADD/SUB/CMP, INC/DEC.
How Pi has treated it
- 1979-06 — V01 N05 (Jun 1979) — John L. Moon's full reference article
Related
- 6502 Machine Language
- Steve Wozniak
- WOZPAK
