Computer Systems Programming: Dr. Eyas El-Qawasmeh
Computer Systems Programming: Dr. Eyas El-Qawasmeh
Computer Systems Programming: Dr. Eyas El-Qawasmeh
Applications Programming:
Banking, Engineering, Education, GIS, …
Systems Programming:
Assemblers, Loaders, Compilers, Device Drivers, OS, …
Fundamentals – The Big Question
01010101
Utilities & 11111001
End-User Applications Systems
Analysis 01001000
Fundamentals – Purpose of Study
You are more than a mere user of computer systems. You know
the inner functioning!!!
The programs are complex, and there are some beautiful techniques used (data structures,
algorithms, formal models). These you will treasure throughout your professional life.
code
e.g. compilers must generate machine language code
Addressing Modes
Mode Indication Target address 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
Input/Output
SIO, TIO, HIO: start, test, halt the operation of I/O device
HOME READING/WORK
The following Figure F.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)
HOME READING/WORK
The following fig 1.4 writes an assembly
program to copy 11-byte character string to
another.
SIC Programming Example (Fig 1.4)
HOME READING/WORK
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)
HOME READING/WORK
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 in the text
book which I already copied it and distribute it
in the class
Write a program that call a subroutine that
reads a 100-byte record from an input device
into memory. The solution is in the text Figure
1.7. I already distribute the solution in the class
Computer Architecture Review
Basic computer components
Monitor
Bus
Structure of a large Pentium system
We will skip the material from the beginning of
section 1.4 to the end of chapter 1. We might
come back for it later. However, you must solve
all the questions at the end of chapter 1
Home Work No. 1
• Due date is July 22 hardcopy.
• Solve one question only using the assembler
which I will inform you about it.
• The question is as follows :No mod 10.
• However, if you get 1 then solve 11
• If you get 2 then solve 12.
• If you get 3 then solve 13.
• If you get 0 then solve 10
Assembler resources
• The following URL contains assembler of
the SIC
• http://cis.csuohio.edu/~somos/cis335
• Please visit the above address and
download the assembler.
• It contains readme file
Q1 page 40
• Write a sequence of instructions for SIC to
set ALPHA equal to the product of BETA
and GAMMA. Assume that ALPHA,
BETA and GAMMA are defined as in Fig
1.3 a
LDA BETA
MUL GAMMA
STA ALPHA
BETA RESW 1
GAMMA RESW 1
ALPHA RESW 1
Q2 page 40