Please enable JavaScript.
Coggle requires JavaScript to display documents.
Programming Tools (Assembler (Program translated using operations table,…
Programming Tools
Assembler
-
-
-
First pass through the program:
- check each instruction for validity
- create symbol table
Computer utility that translates assembly language
program code (source code) line by line,
into binary code (object code)
-
Scanning or parsing:
process of reading each
line of text, searching for
op codes, operands etc
Assembly Language
Superior to simple look up table, where it is
difficult to locate the particular address (of data)
or the target address of a branching instruction,
eg large-scale editing, inserting/deleting a line etc
Names for the symbolic addresses
are chosen by the programmer
- names should have some meaning
Symbolic address:
eg FIRST is equivalent to memory
location 57 - so instead of writing
LDA 57 to represent loading of data
from memory location 57, the programmer
could write LDA FIRST
-
Computer Language that substitutes
simple alphanumeric names or mnemonics
for the op codes & addresses found in
machine language instructions
In LMC, one line of assembly language code
corresponds to exactly one memory location,
since every instruction in the LMC occupies
a single memory location
In the real world, a single instruction may
occupy more than one memory location
Characteristics
-
Input data to an editor is text
from keyboard or a file,
& commands from the keyboard
Output is a data file or program
(eg in Java, or LMC assembly
language)
-
-
-
-
-
Tools include:
-
Assemblers, Interpreters
& Compilers
-
-
Linkers
They create an executable program
by linking a machine language program
with other separately translated
binary program modules & built-in
function libraries
-
-
-
Relocation
Assembler provides for relocation by including an additional table that specifies which locations must be adjusted at the time that the program is actually loaded into memory for execution
The table will stay with executable code & be used by the loader to make the appropriate corrections at load time
Most OS do not assign programs to a particular location
-assume that the program is relocatable & assign it a location that is convenient under the particular circumstances at the load time
Output from the assembler generally assumes a
fixed program starting point, most commonly,
memory location 0
Program Translation
-
Early programs, errors
complex to fix
-