1 of 9

Machine Language

Abdi Isai Bochub

2018118785

Pointers in

2 of 9

HOW?

Pointers are used for constructing data structures.

How are they handled in machine language?

3 of 9

Suppose one wants to

load a register with the contents of the memory cell that contains the entry on

top of the stack.

4 of 9

MACHINE LANGUAGE FOR LOADING REGISTERS:

  • 1 R XY - the operand field contains the address of the data to be loaded.
  • 2 RXY - the operand field contains the data to be loaded.

5 of 9

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:

6 of 9

EXPANDING THE MACHINE LANGUAGE TO TAKE ADVANTAGE OF POINTERS

7 of 9

LOADING A REGISTER FROM A MEMORY CELL THAT IS LOCATED BY MEANS OF A POINTER STORED IN A REGISTER

8 of 9

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.

9 of 9

Thank You for Watching!

CREDITS:

  • Computer Science: An Overview 11th Ed. J Glenn Brookshear
  • Presentation template by Slidesgo