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