Assembly Language Flashcards

1
Q

What is assembly?

A

A programming language which uses mnemonics to represent binary instructions, has a 1 - 1 mapping with machine code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the instruction ADD do?

A

Adds the contents of the memory address given to the contents of the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the instruction SUB do?

A

Subtracts the contents of the memory address given to the contents of the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the instruction STA do?

A

Stores the current value in the accumulator in the memory address given.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the instruction LDA do?

A

Loads the value at the memory location given into the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the instruction BRA do?

A

Always branches, PC value becomes the value given so that the next line is read from the memory address of the value given.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the instruction BRZ do?

A

Branches if the value in the accumulator is zero.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the instruction BRP do?

A

Branches if the value in the accumulator is positive or zero.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the instruction INP do?

A

Takes an input and stores it in the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the instruction OUT do?

A

Outputs contents of the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the instruction HLT do?

A

Halts the current program (stops execution).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the instruction DAT do?

A

Used to indicate a location which stores data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How are the bits in each bit split up?

A

Usually half is the operand containing the address or data, the other half is the opcode storing the operation and the addressing mode in the final two bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the different types of addressing mode?

A

Immediate addressing, direct addressing, indirect addressing and indexed addressing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is immediate addressing?

A

Where the operand is the actual value to be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is direct addressing?

A

Where the operand holds the memory address of the value to be used. This is usually the default addressing mode.

17
Q

What is indirect addressing?

A

Where the operand is the location (often a register) of the address of the data needed, this gives a larger range of addressable locations.

18
Q

What is indexed addressing?

A

Operand contains the position of an index register and the position in the array wanted, the index register contains the start position of an array which has the position of the array added to it.