Machine Language
Abdi Isai Bochub
2018118785
Pointers in
HOW?
Pointers are used for constructing data structures.
How are they handled in machine language?
Suppose one wants to
load a register with the contents of the memory cell that contains the entry on
top of the stack.
MACHINE LANGUAGE FOR LOADING REGISTERS:
WHY NOT USE OPCODES 1 & 2?
1
It is unknown what the contents will be.
2
It is not known what the address will be.
3
The address of the top of the stack will vary as the program is executed.
the address of the stack pointer (Data one wants to load).
KNOWN:
EXPANDING THE MACHINE LANGUAGE TO TAKE ADVANTAGE OF POINTERS
LOADING A REGISTER FROM A MEMORY CELL THAT IS LOCATED BY MEANS OF A POINTER STORED IN A REGISTER
ADDRESSING TECHNIQUES
IMMEDIATE ADDRESSING
The operand field contains the data involved explicitly.
DIRECT ADDRESSING
The operand fields contain the address of the data involved.
INDIRECT ADDRESSING
The operand fields of these instructions contain the address of the address of the data.
Thank You for Watching!
CREDITS: