Title: The Simplified Instructional Computer SIC
1The Simplified Instructional Computer (SIC)
- Hsiang-Fu Yu
- National Taipei University of Education
2Outline
- The Simplified Instructional Computer (SIC) (Sec.
1.3) - Traditional CISC Machines (Sec. 1.4)
- RISC Machines (Sec. 1.5)
3SIC Architecture
- Two versions
- SIC
- SIC/XE (extra equipments or extra expensive)
- SIC program can be executed on SIC/XE. (upward
compatible) - Memory consists of 8-bit bytes. 3 consecutive
bytes form a word (24 bits) - There are 215 (32K) bytes in the memory
4Registers
- There are 5 registers
- Each is 24 bits in length
5Data Format
- Integer
- 24-bit binary numbers
- 2s complement representation is used for
negative numbers - Character
- store using their 8-bit ASCII codes
- There is no floating-point hardware on SIC
6Instruction Format
- All machine instructions on SIC has the following
24-bit format - Only two addressing modes
X is used to indicate indexed-addressing mode
7Instruction Set
- Load and store registers
- LDA, LDX, STA, STX
- Integer arithmetic
- ADD, SUB, MUL, DIV, all involve register A and a
word in memory - Comparison
- COMP, involve register A and a word in memory
- set a condition code CC to indicate the compare
result
8Instruction Set (cont.)
- Conditional jump
- JLE, JEQ, JGT, etc.
- test the setting of CC and jump accordingly
- Subroutine linkage
- JSUB
- jump to the subroutine, placing the return
address in register L - RSUB
- return by jumping to the address contained in
register L
9Input and Output
- One byte at a time to or from the rightmost 8
bits of register A - Each device has a unique 8-bit ID code
- Test device (TD)
- test if a device is ready to send or receive a
byte of data - Read data (RD)
- read a byte from the device to register A
- Write data (WD)
- write a byte from register A to the device
10SIC/XE Architecture
- Memory size
- 1 megabytes (220 bytes)
- An address (20 bits) cannot be fitted into a
15-bit field as in SIC Standard - Lead to changes in instruction formats and
addressing modes - Extra registers
11Data Format
- The same as that of SIC
- There is a floating-point data type with the
following format - fraction is between 0 and 1
- exponent is between 0 and 2047
- Zero is presented as all 0
(-1)sfraction2(exponent-1024)
12Instruction Formats
Formats 1 and 2 do not reference memory at all
Format 1 (1 byte)
Format 2 (2 bytes)
Format 3 (3 bytes)
e 0
Format 4 (4 bytes)
e 1
Bit e distinguishes between formats 3 and 4 Large
memory extends addressing capacity
13Addressing Modes
b1, p0, TA(B)disp (0?disp ?4095)
b0, p1, TA(PC)disp (-2048?disp ?2047)
14Addressing Modes (cont.)
Format 3 b0, p0, TAdisp (0?disp ?4095)
Format 4 b0, p0, TAaddr
15Addressing Modes (cont.)
TA(X)disp
TA(X)disp(PC)
TA(X)disp(B)
16Addressing Modes (cont.)
For formats 3 and 4
- Immediate addressing mode (n 0, i 1)
- The target address is used as the operand
- Indirect addressing mode (n 1, i 0)
- The word at the location given by the target
address is fetched - The value contained in this word is then used as
the address of the operand value - Simple addressing mode
- The target address is taken as the location of
the operand - (n 1, i 1) used by SIC/XE
- (n 0, i 0) used by SIC
Indexed addressing cannot be used with immediate
or indirect modes.
174 Format 4 instruction D Direct-addressing
instruction , i.e., non-relative addressing
, b 0 and p 0 A Assembler selects either
program-counter relative or base-
relative mode S Compatible with SIC
18PC-relative simple addressing (PC)
disp Base-relative indexed simple addressing (B)
disp (X) PC-relative indirect addressing
(PC) disp Immediate addressing disp SIC simple
addressing b/p/e disp Simple addressing addr
All of these instructions are LDA.
19Instruction Set
- LDB and STB
- Floating-point operations
- ADDF, SUBF, MULF, DIVF
- Register move
- RMO
- Register-to-register operations
- ADDR, SUBR, MULR, DIVR
- Supervisor call for generating system calls into
the operating system - SVC
- I/O channel operation similar to DMA
- SIO start, TIO test, HIO halt
20Complete Instruction Set
P privileged instruction X available
only on XE F floating- point
Instruction C condition code CC set to
indicate result of operation
21(No Transcript)
22(No Transcript)
23(No Transcript)
24(No Transcript)
25SIC Programming Examples
Immediate addressing makes the program run faster
because it need not fetch five from the memory.
26SIC Programming Example (Fig. 1.3a)
BETA lt- (ALPHA INCR - 1) DELTA lt- (GAMMA
INCR - 1)
27SIC/XE Programming Example (Fig. 1.3b)
This program will execute faster because it need
not load INCR from memory each time when INCR is
needed.
28SIC Programming Example (Fig. 1.4a)
- Looping and indexing copy one string to another
29SIC/XE Programming Example (Fig. 1.4b)
This program will execute faster because TIXR
need not compare the index value to a memory
variable.
30SIC Programming Example (Fig. 1.5a)
Gamma lt- Alpha Beta
31SIC/XE Programming Example (Fig. 1.5b)
This program will execute faster because it uses
register-to-register add to reduce memory
accesses.
32Input and Output Example
33SIC Programming Example (Fig. 1.7a)
Read 100 words into the record buffer
34SIC/XE Programming Example (Fig. 1.7b)
Use TIXR makes this program run faster
35Reduced Instruction Set Computer (RISC) Machines
- RISC system
- Instruction
- Standard, fixed instruction format
- Single-cycle execution of most instructions
- Memory access is available only for load and
store instruction - Other instructions are register-to-register
operations - A small number of machine instructions, and
instruction format - A large number of general-purpose registers
- A small number of addressing modes
36Some RISC machines
- SPARC family
- PowerPC family
- Cray T3E
- ARM
- MIPS
37Traditional (CISC) Machines
- Complex Instruction Set Computers (CISC)
- Complicated instruction set
- Different instruction formats and lengths
- Many different addressing modes
- Examples
- VAX
- Intel x86 Processors