System Software Unit 1
System Software Unit 1
SIC is a hypothetical computer that includes the hardware features most often found on real machines Two versions of SIC
standard
Chap 1
Memory
215
bytes in the computer memory 3 consecutive bytes form a word 8-bit bytes
Registers
Mnemonic Number Special use A 0 Accumulator; used for arithmetic operations X 1 Index register; used for addressing L 2 Linkage register; JSUB PC 8 Program counter SW 9 Status word, including CC
Chap 1
Data Formats
are stored as 24-bit binary numbers; 2s complement representation is used for negative values No floating-point hardware
Integers
Instruction Formats
opcode (8)
address (15)
Addressing Modes
Mode Direct Indexed Indication x=0 x=1 Target address calculation TA=address TA=address+(X)
Chap 1
Instruction Set
load
and store: LDA, LDX, STA, STX, etc. integer arithmetic operations: ADD, SUB, MUL, DIV, etc.
All
arithmetic operations involve register A and a word in memory, with the result being left in the register
comparison:
COMP
COMP
compares the value in register A with a word in memory, this instruction sets a condition code CC to indicate the result
Chap 1
Instruction Set
conditional
these
subroutine
JSUB jumps to the subroutine, placing the return address in register L RSUB returns by jumping to the address contained in register L
Chap 1
and output are performed by transferring 1 byte at a time to or from the rightmost 8 bits of register A The Test Device (TD) instruction tests whether the addressed device is ready to send or receive a byte of data Read Data (RD) Write Data (WD)
Chap 1
Data movement Fig. 1.2 Arithmetic operation Fig. 1.3 Looping and indexing Fig. 1.4, Fig. 1.5 Input and output Fig. 1.6 Subroutine call Fig. 1.7
Chap 1
1-byte:
Storage definition
WORD, RESW BYTE, RESB
All arithmetic operations are performed using register A, with the result being left in register A.
BETA=ALPHA+INCR-ONE DELTA=GAMMA+INCR-ONE
Chap 1
BETA=ALPHA+INCR-ONE DELTA=GAMMA+INCR-ONE
Chap 1
Arithmetic
Arithmetic operations are performed using register A, with the result being left in register A
Looping (TIX)
(X)=(X)+1 compare
with operand
set
CC
Memory
220
More Registers
Mnemonic Number Special use B 3 Base register; used for addressing S 4 General working register T 5 General working register F 6 Floating-point acumulator (48bits)
Chap 1
Data Formats
Floating-point
frac:
fraction (36)
Instruction Formats
Format 1 op(8) Format 2 op(8) r1(4) r2(4)
Format 3 op(6)
Format 4 op(6)
e=0 n I xbp e
e=1 n I xbpe
disp(12)
address (20)
Chap 1
simple addressing
Chap 1
Chap 1
Instruction Set
new
registers: LDB, STB, etc. floating-point arithmetic: ADDF, SUBF, MULF, DIVF register-register arithmetic: ADDR, SUBR, MULR, DIVR supervisor call: SVC
generates
Input/Output
SIO,
TIO, HIO: start, test, halt the operation of I/O device (Chap 6)
Chap 1
#5 ALPHA #90 C1
(b)
data movement
#:
arithmetic
ADDR
Looping (TIXR T)
(X)=(X)+1
compare set
CC
COMPR X,T
Chap 1