## [DRAFT] Design of the _Cardiograph Mark I_ mainframe computer The components of a Mark I are: - a CG 101 Central Processing Unit - a CG 102 Core Memory Unit - a CG 103 Print-Key-Punch - a CG 104 Matrix Display ### Operator console TBC TBC TBC ## Basic controls - Power - Load - Run - Halt - 4 Sense Switches ## Status lights - 8 Accumulator lights - 8 Address lights - 8 Data lights - 8 Instruction Pointer lights (review IP size?) - 8 Status Register lights ## Debugging controls - Run Single Step - Memory Read - Memory Read Next - Memory Write - Memory Write Next ## IO programming Only one input or output device can be accessed at a time. ### Reading data 1. Use `DEV xx` to select input device _xx_ 2. Use `INP yy` to read one byte into memory at address _yy_ TODO: find a way to allow the input device to refuse to provide input ### Writing data 1. Use `DEV xx` to select output device _xx_ 2. Use `OUT yy` to write one byte from memory at address _yy_ 3. Use `FED xx` to... - card punch: load a new card - printer: begin a new line (CR, LF) - display: begin a new line ### Punched card format FIXME: - ~~Cards are punched in EBCDIC~~ - ~~EBCDIC data is translated into binary by the card reader/punch~~ - Only columns 1-64 are used (for a maximum of 64 bytes of data per card) ### Printer format - The printer format is the same as the card format - One line of printing is equivalent to one card - The printer can print up to 64 characters per line ### Matrix display format - The display is a 5x5 grid of lights - Each light has 16 possible brightness levels (0 = off, 15 = maximum) - The display is written one line at a time - After the display is selected with `DEV`, writing begins on the top line - Writing wraps around and begins at the top again, if more than 5 lines are written ### Device numbers 1. card reader / typewriter 2. card punch / line printer 3. display ### Print-Key-Punch configurations A dial allows you to select which input device to connect to the CPU: 1. none 2. card reader 3. keyboard A similar dial selects the output device to connect: 1. none 2. card punch 3. printer Thus, this all-in-one device allows the following configurations: | | printer | card punch | none | |-----------------|----------------------|------------------|--------------------------| | **keyboard** | ***teletypewriter*** | ***auto punch*** | ***keypunch (offline)*** | | **card reader** | (keys + print) | card duplicator | (card reader) | | **none** | line printer | (auto punch) | (scrap metal) |