18-bit SRAM

The Eval board has 1 Mw of 16-bit SRAM. That makes it awkward to store 18-bit instructions. This code packs and unpacks 18-bit data into 16-bit memory. It is surprisingly easy to do. Words are left-justified in a and right-justified in T, then T is right-shifted into a by +*.

Block 1158 is loaded into node 108, next to node 008 which is the SRAM controller.

9/8

Converts a count of 18-bit words to a count of 16-bit words. Multiples by 9/8.

rd

Reads from memory 9 16-bit words and sends 8 18-bit ones.

+read

Analogous to +read in code for 008. Takes count and address and returns 18-bit words.

wr

Receives 8 18-bit words and writes 9 16-bit ones to memory. The inverse of rd.

+write

Analogous to +write in code for 008. Takes count and address and writes 18-bit words.

init

Sets a and awaits instruction with 4-port read.