You are on page 1of 6

Section 2

Simplified Instructional Computer (SIC)


 A hypothetical computer that includes the hardware features most
often found on real machines
 Two version of SIC:
(i). Standard model
(ii). XE version
SIC machine architecture
 Memory
 215

 Registers
 Each register is 24 bits
 Data formats (1 byte  8bits)
 Characters  8-bit ASCII codes
 Integers  24-bit binary numbers
 No floating-point numbers (exist in SIC/XE)

 Instruction formats

 24 bits format

 Note that the memory size of SIC is 215bytes.


 X is to indicate index-address mode.

 Addressing modes

 Instruction set
 Load and store instruction

 Arithmetic instruction
 Comparison instruction

 Conditional jump instructions

 Subroutine linkage instructions


 Translate (by hand) the following assembly program to SIC object code.
Which contains H record, T record, and E record.

A.

0000 Prog1 Start 0000


0000 LDA FIVE
0003 STA ALPHA
0006 LDCH CHARZ
0009 STCH C1
000C ALPHA RESW 1
000F FIVE WORD 5
0012 CHARZ BYTE C’z’
0013 C1 RESB 1
0014 End Prog1

symbol address
ALPHA 000C
FIVE 000F
CHARZ 0012
C1 0013
B.

0000 Prog1 Start 0000


0000 LDA ZERO 000150
0003 STA INDEX 0C0021
0006 LOOP LDX INDEX 040021
0009 LDA ZERO 000150
000C STA ALPHA, X 0C8024
000F LDA INDEX 000021
0012 ADD THREE 180156
0015 STA INDEX 0C0021
0018 COMP K300 280153
001B TIX TWENTY 2C0159
001E JLT LOOP 380006
0021 INDEX RESW 1 No obj. code
0024 ALPHA RESW 100 No obj. code
0150 ZERO WORD 0 000000
0153 K300 WORD 100 000064
0156 THREE WORD 3 000003
0159 TWENTY WORD 20 000014
015C End Prog1
015C-0000=015C
Symbol address
HTE: LOOP 0006
INDEX 0021
H.prog1x.000000.00015C ALPHA 0024
T.000000. 21. 000150. 0C0021. 040021. 000150. ZERO 0150
0C8024. 000021. 180156. 0C0021. 280153. 2C0159. K300 0153
380006 THREE 0156
T.000150.0C. 000000. 000064. 000003. 000014 TWENTY 0159

E.000000
LDA ZERO

00 0150
0000 0000 0 000 0001 0101 0000
000150

STA INDEX
0C 0021
0000 1100 0 000 0000 0010 0001
0C0021

STA ALPHA, X

0C 0024
0000 1100 1 000 0000 0010 0100
0C8024

You might also like