Einstein 256 Primer cover: Graphics 7's 256 colours on the Einstein 256's screen
← Back to Modules
module
21

Appendix I - The Primer at a Glance

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
Memory64K RAM, 16K VRAM64K 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 callsRST 8 / 158, 156, 157, 181the same
Character setMOS 1.2'sthe same, except w
Program entrySP FCEDh, returns to 0769hSP and return address depend on how the program was loaded (FCF3h/070Bh at the prompt, FCEFh/116Dh with -quik)
Stack100 bytes work, 176 reset the machine200 bytes work, 208 don't; overflow hangs
MOS callsas the coursethe 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 pagingport 24the same, and port 26 bit 1 says which is in
Video ports8 data, 9 controlthe same, plus 0Ah palette and 0Bh indirect registers
Registers 0-7, Graphics II layoutas the coursethe same; MOS 2.1 lays out its tables at the same addresses, with every sprite's Y at 192
Register 1 bit 5harmlesscrashes to MOS under EI, unless you give the Z80 its own interrupt table
Colours16 fixedthe same 16 by default, in different shades; any 16 of 512
Frame rate50 Hz50 Hz or 60 Hz, set by a switch; register 9 forces 50
Interrupts1 Hz CTC tick only; poll the frame flaga 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
Statusone registerten (S#0-S#9) through R#15
Sprites4 a line, one colour, Y=208 endsGraphics II the same; in sprite mode 2, 8 a line, a colour per line, OR-ed colours, ninth-sprite flag, Y=216 ends
Screen modesGraphics 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
Scrollingsoftware onlyvertical hardware scroll (R#23), wrapping in the page; horizontal still software
Pagesone screenpage flipping: draw on one page, show another
Drawingthe CPU, byte by bytea command engine: fill, copy, transparent copy, line, point
Joysticksanalogue, through the ADC at 38hdigital, at ports 30h/32h; 38h answers 00/7Fh/FFh only
MOS screen modesnoneSETMOD (MCAL 92, S0-S6): Graphics II, 80-column text, Graphics 6
DOS1.31: BDOS at EC00h2.05E: BDOS at EA00h
CTC, AY soundas the coursethe same
KeyboardSHIFT/CTRL/GRAPH on port 20h; MOS keyboard callsSHIFT/CTRL/GRAPH on port 20h as before, ALPHA LOCK read at port 26h bit 0; the MOS keyboard calls the same: use them

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.