module
21

Each thing as the TC-01 does it, and what the 256 does instead. The section that teaches it is in the primer's outline order: S3 for anything that trips up TC-01 code, S4-S18 for what is new.
| TC-01 (the assembly course) | Einstein 256 | |
|---|---|---|
| Memory | 64K RAM, 16K VRAM | 64K RAM, 192K VRAM (128K main + 64K expansion) |
| Start-up | *** EINSTEIN ***, MOS 1.2 | *** EINSTEIN 256 ***, MOS 2.1; DOS 2.05E boots only on the 256 |
| Printing, control codes, keyboard calls | RST 8 / 158, 156, 157, 181 | the same |
| Character set | MOS 1.2's | the same, except w |
| Program entry | SP FCEDh, returns to 0769h | SP and return address depend on how the program was loaded (FCF3h/070Bh at the prompt, FCEFh/116Dh with -quik) |
| Stack | 100 bytes work, 176 reset the machine | 200 bytes work, 208 don't; overflow hangs |
| MOS calls | as the course | the course's calls the same (printing, keyboard, line drawing, BE, BF, A4), plus new video calls C1-C3, D5-DC and SETMOD (92); the ROM covers 0000h-7FFFh while a call runs, so data for D6 goes above 8000h |
| ROM paging | port 24 | the same, and port 26 bit 1 says which is in |
| Video ports | 8 data, 9 control | the same, plus 0Ah palette and 0Bh indirect registers |
| Registers 0-7, Graphics II layout | as the course | the same; MOS 2.1 lays out its tables at the same addresses, with every sprite's Y at 192 |
| Register 1 bit 5 | harmless | crashes to MOS under EI, unless you give the Z80 its own interrupt table |
| Colours | 16 fixed | the same 16 by default, in different shades; any 16 of 512 |
| Frame rate | 50 Hz | 50 Hz or 60 Hz, set by a switch; register 9 forces 50 |
| Interrupts | 1 Hz CTC tick only; poll the frame flag | a real 50 Hz frame interrupt, and a line interrupt, through IM 2 vector FFh; the entry must be above 8000h and page the ROM out, in case it interrupts a MOS call |
| Status | one register | ten (S#0-S#9) through R#15 |
| Sprites | 4 a line, one colour, Y=208 ends | Graphics II the same; in sprite mode 2, 8 a line, a colour per line, OR-ed colours, ninth-sprite flag, Y=216 ends |
| Screen modes | Graphics II (as a bitmap) | the same, plus Graphics 3-7 (256 or 512 across, 4, 16 or 256 colours, 192 or 212 lines) and 80-column text |
| Scrolling | software only | vertical hardware scroll (R#23), wrapping in the page; horizontal still software |
| Pages | one screen | page flipping: draw on one page, show another |
| Drawing | the CPU, byte by byte | a command engine: fill, copy, transparent copy, line, point |
| Joysticks | analogue, through the ADC at 38h | digital, at ports 30h/32h; 38h answers 00/7Fh/FFh only |
| MOS screen modes | none | SETMOD (MCAL 92, S0-S6): Graphics II, 80-column text, Graphics 6 |
| DOS | 1.31: BDOS at EC00h | 2.05E: BDOS at EA00h |
| CTC, AY sound | as the course | the same |
| Keyboard | SHIFT/CTRL/GRAPH on port 20h; MOS keyboard calls | SHIFT/CTRL/GRAPH on port 20h as before, ALPHA LOCK read at port 26h bit 0; the MOS keyboard calls the same: use them |