0% found this document useful (0 votes)
18 views1 page

Assembly Language and Memory Addressing

Assembly language uses mnemonics and is translated into machine code via an assembler, with the Little Man Computer (LMC) serving as an educational tool for understanding basic programming concepts. Memory addressing methods include immediate, direct, indexed, and indirect, each with distinct mechanisms for accessing data. Immediate addressing uses the operand's actual value, direct addressing references a memory location, indirect addressing points to another address, and indexed addressing facilitates operations on arrays using an index register.

Uploaded by

parkkhushi95
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Assembly Language and Memory Addressing

Assembly language uses mnemonics and is translated into machine code via an assembler, with the Little Man Computer (LMC) serving as an educational tool for understanding basic programming concepts. Memory addressing methods include immediate, direct, indexed, and indirect, each with distinct mechanisms for accessing data. Immediate addressing uses the operand's actual value, direct addressing references a memory location, indirect addressing points to another address, and indexed addressing facilitates operations on arrays using an index register.

Uploaded by

parkkhushi95
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

ASSEMBLY LANGUAGE AND LMC LANGUAGE:

assembly language uses mnemonic and is translated into machine code using an
assembler

little man computer = a conceptual computer often used in education theory to help
students learn, test and understand the basics of the language

- assemblers in LMC allow us to name addresses known as labels


- each line of code consists of 3 parts: label, mnemonic, data it applies to

ADDRESSING MEMORY:

addressing methods:immediate, direct, indexed, indirect

IMMEDIATE:operand holds actual value


- instruction must be split into opcode and operand to form 8-bit machine
instruction
- the value in the address part of the instruction is the value to be used, so the
memory does not need to be searched to find the required value
e.g: ADD 10 means "add 10" not "at 10 to the address in location 10"

DIRECT:
- the value in the address part is a reference to the address in memory were the
reuired value is located
e.g: ADD 10 means "find the data in memory address location 10 and add to the
accumulator"

INDIRECT:
- value in address part is a reference to a memory location that contains the
address in memory where the value is located
e.g: ADD 10 = "find memory location 10, find another address, go to the address and
add the number that it finds to accumulator"

INDEXED:
- locations can be in an array
- if all 100 items were to be added together, the same instruction is used 100
times
- more efficient to use INDEX REGISTER (IR)
- it is set to 0 in the format: 10+0, and increments
- array must be stored in contiguous memory locations

You might also like