UNIT 1; ASSEMBLY LANGUAGE Flashcards
STO/STA
Store the contents of the accumulator to the given memory address.
For example:
INP
STA 90
This means to store the input from the user in 90 (90 is a memory address)
LDA
Load the contents of the given memory address onto the accumulator (calculator).
For example:
LDA 90
This means load the contents of memory address 90 onto the accumulator.
ADD
Add the contents of a given memory address onto the accumulator.
For example:
ADD 90
This means add the contents from the memory address 90 onto the accumulator.
SUB
Subtract the contents of a given memory address from the accumulator.
For example:
SUB 91
This means subtract the value in the memory address 91 from the accumulator.
INP
Copy the value from the Input Box into the accumulator.
For example:
INP
This means the user has to give an input.
OUT
Copy the value from the accumulator to the Output Box (Note: this does not change the contents of the accumulator).
For example:
OUT
This outputs the contents of the accumulator into the Output Box.
BEP
Makes the computer produce a “beep” sound.
HLT
Causes the Little Man Computer to stop executing your program.
BRA
Set the PC (Program Counter) to a given address.
BRP
If the contents of the accumulator are 000 or positive, (i.e. the negative flag is not set) the PC (Program Counter) will be set to the given address.
BRZ
If the contents of the accumulator (calculator) are 000, the PC (Program Counter) will be set to the given address.
DAT
Data location.
- When compiled, the program converts each instruction into a three digit code. These codes are placed in sequential memory addresses.
OTC
Output character.
- Copy the value from the accumulator to the Output Box and display a character based on the ASCII code. Note: the contents of the accumulator are not changed.