Assembly Language Flashcards
What is assembly?
A programming language which uses mnemonics to represent binary instructions, has a 1 - 1 mapping with machine code.
What does the instruction ADD do?
Adds the contents of the memory address given to the contents of the accumulator.
What does the instruction SUB do?
Subtracts the contents of the memory address given to the contents of the accumulator.
What does the instruction STA do?
Stores the current value in the accumulator in the memory address given.
What does the instruction LDA do?
Loads the value at the memory location given into the accumulator.
What does the instruction BRA do?
Always branches, PC value becomes the value given so that the next line is read from the memory address of the value given.
What does the instruction BRZ do?
Branches if the value in the accumulator is zero.
What does the instruction BRP do?
Branches if the value in the accumulator is positive or zero.
What does the instruction INP do?
Takes an input and stores it in the accumulator.
What does the instruction OUT do?
Outputs contents of the accumulator.
What does the instruction HLT do?
Halts the current program (stops execution).
What does the instruction DAT do?
Used to indicate a location which stores data.
How are the bits in each bit split up?
Usually half is the operand containing the address or data, the other half is the opcode storing the operation and the addressing mode in the final two bits.
What are the different types of addressing mode?
Immediate addressing, direct addressing, indirect addressing and indexed addressing.
What is immediate addressing?
Where the operand is the actual value to be used.