1.2.4 TYPES OF PROGRAMMIG LANGUAGES

9 flashcardsby Sabs2023
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What opcode
tells the CPU the job that needs to be done. eg adding or substracting
2
what operand
specifies the data that needs to be acted on.
3
what is immediate addressing
the value in operand is actually the value to be used
4
what is direct addressing
The value in operand references the address in memory where the value is located.
5
what is indirect addressing
operand gives the address of a register which holds the address of where the value needed is at
6
what 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.
7
Input 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
8
how to call upon a branch?
-------brp name

name out
9
A 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
Study all 9 cards for free