1.2.4c LMC Flashcards
What does the ADD instruction do in LMC?
Adds the value at the given memory address to the accumulator.
What does the SUB instruction do in LMC?
Subtracts the value in the given memory address from the accumulator.
What does the STA instruction do in LMC?
Stores the value in the accumulator at the given memory address.
What does the LDA instruction do in LMC?
Loads the value at the given memory address into the accumulator.
What does the INP instruction do in LMC?
Allows the user to enter a value which will be held in the accumulator.
What does the OUT instruction do in LMC?
Prints the value currently held in the accumulator.
What does the HLT instruction do in LMC?
Stops the program at that line, preventing the rest of the code from executing.
What does the DAT instruction do in LMC?
Creates a flag with a label at which data is stored.
What does the BRZ instruction do in LMC?
Branches to a given address if the value in the accumulator is 0.
What does the BRP instruction do in LMC?
Branches to a given address if the value in the accumulator is positive (or 0).
What does the BRA instruction do in LMC?
Branches to a given address regardless of what the value in the accumulator is.