SKOAL

From Esolang
Jump to navigation Jump to search

SKOAL is an esoteric printed circuit board used in production in the HP 9825T desktop calculator.

The HP 9825B is a desktop calculator with close to 32 kilobytes of ROM and 32 kilobytes of RAM. The HP 9825T is a closely related desktop calculator that extends the RAM size to 64 kilobytes. This was a nontrivial problem because the CPU only has a 16-bit byte-granular address space, so there should be no way to fit more than 64 kilobytes. The usual solution for this would be bank switching logic. That, however, would have required a rewrite of the already pretty mature system software in the ROM. So instead the engineers Rick Dow and Richard Herrington created an esoteric solution.

Apart from the extra 32 kilobytes of DRAM chips and the RAM decode and control logic, the Skoal circuit board contains logic to divine whether a memory access is supposed to be for the ROM or RAM. The inputs for this use bus lines that were, before this board, considered debug lines used to develop the calculator. These expose some important information from the CPU that would not normally be needed for the logic, most importantly which memory reads are fetching an instruction. Instructions are executed almost only from the ROM, except for a certain designated area of the RAM. The hard cases come from data reads, which could typically refer either the ROM or RAM. Since the ROM software was mature at this point, the engineers annotated all of the code to mark which instructions in it fetch data from ROM versus RAM, and this information was encoded in a small extra ROM chip, one bit per instruction, on the Skoal board. In addition to these and other built-in rules, the Skoal board adds new CPU instruction prefixes that future software can use to explicitly read from ROM or RAM. The board allows you to extend both the RAM and ROM size to 64 kilobytes.

The name “Skoal” comes from a brand of chewing tobacco.

References