LMC Flashcards
What does the LDA instruction do?
Load the contents of address xx onto the accumulator
Note - the contents of the address are not changed
What does the STA instruction do?
Store the contents of the accumulator to address xx.
Note - the contents of the address are not changed
What does the ADD instruction do?
Adds the contents of address xx to the accumulator
Note - the contents of the address are not changed and the total cannot exceed 999.
What does the SUB instruction do?
Subtract the contents of address xx from the accumulator.
Note - the contents of the address are not changed. Also if a subtract instruction causes negative results then a negative flag will be set so that BRP can be used properly
What does the INP instruction do?
Copy the value from the “in box” onto the accumulator
What does the OUT instruction do?
Copy the value of the accumulator to the “out box”
What does the HLT instruction do?
Stop the LMC simulator executing the program
What does the BRA instruction do?
Set the program counter to address xx
What does the BRZ instruction do?
If the contents of the accumulator are zero set the program counter to address xx
What does the BRP instruction do?
If the contents of the accumulator are greater than or equal to zero set the program counter to address xx
What does the DAT instruction do?
Reserve as data the memory address reached when this instruction is compiled.