BBC BASIC Commander X16 is now a reality thanks to developer adiee5, who has ported the Acorn MOS to the system. The project’s main goal is to run BBC BASIC smoothly on the Commander X16 while keeping the implementation clean and functional.

Bringing Acorn MOS to the CX16

This experimental Acorn MOS build works by focusing on compatibility with BBC BASIC IV. The source code for BBC MOS, originally hosted on the mdfs site, comes in a BBC-style format that differs significantly from common modern assembly layouts. Working with it on Windows or Linux would be difficult, and refactoring it would require extensive tooling.

Instead of rewriting everything, adiee5 took advantage of the fact that both the source and compiled binaries are largely hardware-agnostic. The approach centers on implementing the MOS API and matching the memory map used by the BASIC ROM. With this done, BBC BASIC Commander X16 can run without major changes to its internal logic.

Memory Mapping and Cartridge Loading

The memory map requirements of BBC BASIC mean this port is best loaded as a cartridge. This approach keeps enough space free for BASIC programs while aligning the memory structure closely with the CX16’s layout. A small patch to the HI-BASIC ROM ensures that $00 and $01 are not used for internal variables, avoiding conflicts on the CX16 hardware.

Input, Output, and Editing Features

The current MOS API implementation supports output to the screen and keyboard input. While limited in terms of I/O features, the internal BASIC functions work as expected. One interesting quirk comes from the OSWORD $0 call, which in this build is based on the Commodore BASIN routine. This has the side effect of enabling full-screen text editing, similar to what Commodore users are familiar with.

A Work in Progress

This is still an early-stage port, but it already allows for a functional BBC BASIC Commander X16 experience. Developers can experiment with BASIC programs in a familiar environment, blending Acorn’s MOS structure with the CX16’s unique hardware.

Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments