1What opcode
tells the CPU the job that needs to be done. eg adding or substracting
2what operand
specifies the data that needs to be acted on.
3what is immediate addressing
the value in operand is actually the value to be used
4what is direct addressing
The value in operand references the address in memory where the value is located.
5what is indirect addressing
operand gives the address of a register which holds the address of where the value needed is at
6what is indexed addressing
An index register is used, which stores a certain value. The register which we need to go to is determined by operand + index register.
7Input two numbers, The smaller number is subtracted from the larger and then the result is output.
inp
sta x
inp
sta y
sub x
brp oki
lda x
sub y
oki out
x dat
y dat
hlt
8how to call upon a branch?
-------brp name
name out
9A program that takes two inputs and subtracts the second from the first
inp
sta x
inp
sta y
LDA x
sub y
out
x dat
y dat