Simplified Instructional Computer (SIC)
A simplified Instructional Computer (SIC) is a hypothetical computer that has hardware features that are often found in real machines. There are two versions of this machine:
- SIC standard Model
- SIC/XE(extra equipment or expensive)
Object programs for SIC can be properly executed on SIC/XE which is known as upward compatibility.
SIC Machine Architecture/Components –
1. Memory –
- Memory is byte-addressable that is words are addressed by the location of their lowest numbered byte.
- There are 2^15 bytes in computer memory (1 byte = 8 bits)
3 consecutive byte = 1 word (24 bits = 1 word)
2. Registers –
There are 5 registers in SIC. Every register has an address associated with it known as a registration number. The size of each register is 3 bytes. On basis of register size, integer size is dependent.
I. A(Accumulator-0): It is used for mathematical operations.
II. X(Index Register-1): It is used for addressing.
III. L(Linkage Register-2): It stores the return address of the instruction in case of subroutines.
IV. PC(Program Counter-8): It holds the address of the next instruction to be executed.
V. SW(Status Word-9): It contains a variety of information
Status Word Register:
- mode bit refers to user mode(value=0) or supervising mode(value=1). It occupies 1 bit.
- state bit refers whether process is in running state(value=0) or idle state(value=1). It also occupies 1 bit.
- id bit refers to process id(PID). It occupies 3 bits.[2-5]
- CC bit refers to condition code i.e. It tells whether the device is ready or not. It occupies 2 bits.[6-7]
Mask bit refers to interrupt mask. It occupies 4 bits.[8-11]
- X refers to unused bit. It also occupies 4 bits.[12-15]
- ICode refers to interrupt code i.e. Interrupt Service Routine. It occupies the remaining bits.[16-23]
3. Data Format –
- Integers are represented by 24 bits.
- Negative numbers are represented in 2’s complement.
- Characters are represented by 8 bit ASCII values.
- No floating-point representation is available.
4. Instruction Format –
All instructions in SIC have a 24-bit format.
- If x=0 it means direct addressing mode.
- If x=1 it means indexed addressing mode.
5. Instruction Set –
- Load And Store Instructions: To move or store data from accumulator to memory or vice-versa. For example LDA, STA, LDX, STX, etc.
- Comparison Instructions: Used to compare data in memory by contents in accumulator. For example COMP data.
- Arithmetic Instructions: Used to perform operations on accumulator and memory and store results in the accumulator. For example ADD, SUB, MUL, DIV, etc.
- Conditional Jump: compare the contents of accumulator and memory and performs task based on conditions. For example JLT, JEQ, JGT
- Subroutine Linkage: Instructions related to subroutines. For example JSUB, RSUB
6. Input and Output –
It is performed by transferring 1 byte at a time from or to the rightmost 8 bits of the accumulator. Each device has an 8-bit unique code.
There are 3 I/O instructions:
- Test Device (TD) tests whether the device is ready or not. Condition code in Status Word Register is used for this purpose. If cc is < then the device is ready otherwise the device is busy.
- Read data(RD) reads a byte from the device and stores it in register A.
- Write data(WD) writes a byte from register A to the device.
Leland.L.Beck: An introduction to systems programming, 3rd Edition, Addison-Wesley, 1997.