1. SSEM simulator usage

Date:

2011-05-14

Revision:

$Format:%H$

Copyright:

See LICENSE.txt for terms of use.

This memorandum documents the SSEM simulator.

1.1. Simulator files

sim/
scp.h
sim_console.h
sim_defs.h
sim_fio.h
sim_rev.h
sim_sock.h
sim_timer.h
sim_tmxr.h
scp.c
sim_console.c
sim_fio.c
sim_sock.c
sim_timer.c
sim_tmxr.c
sim/ssem/
ssem_defs.h
ssem_cpu.c
ssem_sys.c

1.2. SSEM features

The SSEM is configured as follows:

Device names

Simulates

CPU

SSEM CPU with 32 words of memory

The LOAD and DUMP commands are implemented. They use a binary file with the extension .st (“store”).

1.2.1. CPU

The CPU implements Manchester SSEM (Small Scale Experimental Machine):

Memory size is fixed at 32 words. Memory is 32b wide.

CPU registers include the visible state of the processor system.

Name

Size

Comments

CI

5

Current instruction

A

32

Accumulator

1.3. Symbolic display and input

The SSEM simulator implements symbolic display and input. Display is controlled by command-line switches:

-h

Display as hexadecimal

-d

Display as decimal

-b

Display as backwards binary. Least significant bit first.

-m

Display instruction mnemonics

Input parsing is controlled by the first character typed in or by command-line switches:

opcode            instruction mnemonic

There is only one instruction format:

op address

Instructions follows the mnemonic style used in the 1998 competition reference manual, The Manchester University Small Scale Experimental Machine Programmer’s Reference manual.

op is one of the following JMP, JRP, LDN, STO, SUB, CMP or STOP. A linear address is one decimal number between 0 and 31. For example:

sim> d -m 31 LDN 21
sim> ex -m 31
31:   LDN 21
sim> ex -h 31
31:   00004015
sim> ex -b 31
31:   10101000000000100000000000000000
sim> ex -d 31
31:   16405