Assembly Language Flashcards
What are all the Assembly Language Mnemonics?
INP (Input)- Inputs a value and stores it in the accumulator
OUT (Output)- Displays the contents of the accumulator
STA - Transfers a number from the accumulator to the RAM
LDA- Transfers a number from the RAM to the accumulator
ADD- Adds the contents of the accumulator to the contents of a RAM address
SUB- Subtracts the contents of the accumulator from the contents of the RAM address
BRA- Jumps to the RAM location specified- used for loops
HLT- Stops the processor
DAT- Defines variables
What does the INP mnemonic do with example?
Inputs a value and stores it in the accumulator e.g.
INP //Allows user to input something
What does the OUT mnemonic do with example?
Displays the contents of the accumulator:
OUT //Outputs number in accumulator
What does the STA mnemonic do with example?
Transfers a number from the accumulator to the RAM:
STA 1A //Stores number in memory location 1A
What does the LDA mnemonic do with example?
Transfers a number from the RAM to the accumulator:
LDR 1A //loads contents of address 1A to the accumulator
What does the ADD mnemonic do with example?
Adds the contents of the accumulator to the contents of a specified RAM address:
ADD 1A //Adds accumulator to location 1A
What does the SUB mnemonic do with example?
Subtracts the contents of the accumulator to the contents of a specified RAM address:
SUB 1A //Subtracts accumulator to location 1A
What does the BRA mnemonic do with example?
Jumps to the RAM location specified (Used for loops):
BRA 1 //Loops to RAM location 1
What does the HLT mnemonic do with example?
Stops the processor:
HLT //Stop
What does the DAT mnemonic do with example?
Defines a variable :
first DAT //declares ‘first’ as a variable.