Documente Academic
Documente Profesional
Documente Cultură
Chapter 1
Lecture 2,3
The Simplified Instructional Computer
(SIC)
SIC is a hypothetical computer that includes the
hardware features most often found on real
machines
Why SIC?
Not to get embroiled in the idiosyncrasies of any
particular machine.
Understand system software at a generic level.
Two versions of SIC
standard model
SIC/XE version
Addressing Modes
M ode Indication Targe t addre ss calculation
Direct x=0 TA=address
Indexed x=1 TA=address+(X)
SIC Machine Architecture
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,
busy.
Read Data (RD)
Input/Output
SIO, TIO, HIO: start, test, halt the operation of I/O
device
The following Figure 1.2 move 3-byte
word into a register then move 1-byte
(contains character) only
SIC Programming Examples (Fig 1.2)
The following figure 1.3 compute
(alpha+incr -1) and store it in beta using
SIC and SIC/XE
SIC Programming Example (Fig 1.3)
The following fig 1.4 writes an assembly
program to copy 11-byte character string
to another.
SIC Programming Example (Fig 1.4)
You have arrays ALPHA, BETA, and
GAMMA, each one consists of 100 words.
Add the corresponding elements of ALPHA
and BETA and store the result in GAMMA. (
The solution is in following figure 1.5
SIC Programming Example (Fig 1.5)
Write a simple program that demonstrate
a simple example of input and output on
SIC and on SIC/XE. The solution is in Fig
1.6
Write a program that call a subroutine
that reads a 100-byte record from an
input device into memory.