Running the emulator

Interactive Session

If you just want to interact with the Q1 via the keyboard, you should use the following invocation

> python3 emulator.py         # no instr. decode, no hexdump

Typed-in keys are passed to the Q1 system via fake interrupts. Characters are sent to the display emulator.

The keyboard interaction is currently tailored to my MacBook Pro keyboard. If you are using a different system you should make your own bindings. Values for non printable characters are output during an interactive session.

On my MacBook Pro the following Q1 keys are implemented. Here, they are referenced by their variable names, not the names printed on the keys (see emulator.py):

Key bindings

Key Name

MacBook key

GO

Option-g

STOP

Option-s

CORR

Backspace

RETURN

Return (LF -> CR)

CLEAR ENTRY

Option-c

INSERT MODE

Option-m

CHAR ADV

Option-l

DEL CHAR

Option-d

Special functions

MacBook key

Function

Option-f

Function Keys (F1 - F9) by user input

Option-b

hexdump of modified parts of memory

Option-r

Reset button

Option-t

Toggle instruction decode

Option-a

misc. debug

Execution decode

> python3 emulator.py -d   # instruction decode, no hexdump

Breakpoint

You might want to halt the program and print out various information when the Program Counter reaches a certain address. To do this:

> python3 emulator.py -b 0x1ff

This will do a hexdump of the RAM part of the memory, show the previous 10 instructions and dump information about INDEX and LFILE file descriptors.

Triggerpoint

If you want detailed debug, but only starting from a certain Program Counter, do This

> python3 emulator.py -t 0x1ff