The memory of the God Computer (GC) consists of a 2D array of bits, which is X columns wide by Y rows tall.
X = 2 raised to the 16th power = 65,536 columns
Y = 2 raised to the power of (X - 16) rows
Y = approx. 10 raised to the 20,000th power
The array of bits is divided into 2 vertical sections. The left-hand section is 16 columns wide. The right-hand section is 65,520 columns wide. The top 4 rows are devoted to global data: the locations of 4 cursors (current bits). The first half of the top row (Row 1) contains various housekeeping data. The second half contains the pico-code buffer. Row 2 contains the row no. of the current microcode instruction. Rows 3 and 4 contain the row nos. of the primary and secondary data cursors. The left-hand section of Rows 3 and 4 contain the column nos. of those cursors.
The microcode computer instructions are contained in the left-hand section. Each instruction is 4 bits long, giving a maximum of 16 different instructions, and each row contains one instruction. The instructions are normally executed one at a time, from top to bottom.
Here are the 15 basic microcode instructions (this is subject to change):
0000 U - UP Up
0001 D - DOWN Down
0010 P - PREV Previous
0011 N - NEXT Next
0100 T - TOP Top
0101 L - LEFT Left
0110 E - ESC Escape
1000 R - READ Read
1001 W - WRTE Write
1010 C - CURS Cursor Toggle
1011 V - VERT Vertical Section
1100 X - XOR XOR
1101 J - JUMP Jump
1110 K - UJMP Unconditional Jump
1111 S - STOP Stop
· The Up/Down instructions move the current cursor up/down. If the current cursor is at the top/bottom of the section, it wraps around to the opposite edge of the section.
· The Previous/Next instructions move the current cursor left/right. If the current cursor is at the leftmost/rightmost column of the section, it wraps around to the opposite edge of the section.
· The Top/Left instructions move the current cursor to the top/left edge of the current vertical section.
· The Escape instruction changes the meaning of the next instruction. If the current section is the left-hand section, and the next instruction is Up/Down, the secondary cursor skips vertically to the next one bit, changing the row no. of both primary and secondary cursors. If the current section is the right-hand section, and the next instruction is Down, the distance to skip downward equals 2 raised to the power of the column no. If the next instruction is Next, the direction to skip is from left to right, and the distance to skip equals 2 raised to the power of the row no. If the next instruction is Up, the distance to skip (from left to right) equals 2 raised to the power of the current memory size. If the next instruction is Escape, the row no. of the left-hand section is set equal to the row no. of the right-hand section.
· The Read command copies the bit at the current cursor to the leftmost bit of Row 1. The Write command is like the Read command, except it copies that bit in the opposite direction.
· The Cursor Toggle instruction toggles the cursor between primary and secondary.
· The Vertical Section instruction toggles between the left-hand and right-hand sections.
· The XOR command performs a NOT operation on the leftmost bit of Row 1.
· The Jump command skips the next instruction if the leftmost bit of Row 1 is true (equals one). The Unconditional Jump command always skips the next instruction.
· The Stop command indicates that the current section of microcode should terminate.
There exist at least 3 levels of code. The lowest level is the microcode. The next higher level of code (call it the milli-code) probably has 16 or more possible instructions (I haven't designed it yet). Each line of code in the milli-code has an op-code, and the top section of the lower right quadrant takes the current milli-code op-code, treating it as an address, and looks up the location in the microcode to branch to for the current op-code.