Unit - I: System Software
Unit - I: System Software
System Software
Basic Assembler
Functions
Fundamental functions of Assembler:
Translating mnemonic code to machine
language.
Assigning machine address.
What is mnemonic Instructions?
Load, Move,add,sub,Etc..
Additional Instructions
START: Specify name and starting address for
program.
END: End of source program and (Optionally )next
executable program.
BYTE: Generate character or hexadecimal constant,
occupying as many bytes as needed to represent the
constant.
WORD: Generate one word integer constant.
RESB: (Bytes) Reserve the indicated number of bytes
for a data area.
RESW: (Word) Reserve the indicated number of words
for a data area.
program.
Reading input from F1(Input Device).
Copies them to an output device.
It has two subroutine.
SUB-1: RDREC(Read record into a buffer)
SUB-2: WRREC (Write record from buffer to
output device.)
transferred at a time.
Each end of record marked with null
character (00 hexadecimal) .
If end of record is detected, the program
writes EOF.
Forward reference
Forward reference:
If the symbolic constant comes in more than
one time is called as forward reference.
The symbolic constant will have address by
later.
So two pass is required.
1st pass assigning address space for symbolic
constant.
2nd pass remaining process.
Assembler Directive
First statement to be processed is called
assembler directives.
Assembler directive provide instruction to
assembler itself.
START specifies the starting memory address
End
Header:
Program name, Starting address and Length.
Header Record:
Col. 1
H // column is nothing but byte.
Col. 2-7
Program Name
Col. 8-13
Object program starting address(In
hexadecimal).
Col. 14-19 Length of object program in bytes
(In hexadecimal).
Text:
Machine code and data with indications of address.
Text Header:
Col. 1
T
Col. 2-7
Starting address for object code in this
record(In hexadecimal).
Col. 8-9
Length of the object code in this record
in bytes.
Col. 10-69 Object code in hexadecimal.
End:
Marks end of the program and next starting
address
End Record:
Col. 1
E
Col. 2-7 Address for next executions.
Pass-2:
1. Assemble instructions(translating operation
code and looking up address).
2. Generate data values defined by BYTE,
WORD, etc( value fulfilling 0 into 0000).
3. Processing of assembler directives not done
in pass-1.
4. Write object program and the assembly
listing.
LOCCTR
It is a variable used to help in the
assignment of address.
Initially it has the address of START address.
After each source statement processed, the
length of the assembled instruction or data
area to be generated is added to LOCCTR.
Thus whenever we reach a label in the source
program the current value of LOCCTR gives
the address to be associated with the label.
OPTAB
It has Mnemonic Operation Code and its
SYMTAB
It is used to store values(address) assigned