Assembly Flashcards

1
Q

Define INP

A

Inputs a value and stores it in the accumulator

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

Define OUT

A

Displays the contents of the accumulator

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

Define STA …

A

Moves the contents of the accumulator to a specified RAM address

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

Define LDA …

A

Moves the contents of a specified RAM address to the accumulator (LoaD Accumulator)

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

Define ADD …

A

Adds the contents of the accumulator to the contents of the specified RAM address

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

Define SUB …

A

Subtracts the contents of the accumulator from the contents of a specified RAM address

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

Define BRA

A

Jumps to a specified part of the code- used to
loop continuously (BRanch Always)

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

Define … DAT

A

Defines variables previously used in the code e.g the RAM addresses in the STA command. Always at the end of the code

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

Define HLT

A

Stops the processor

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

Code to add two numbers

A

INP
STA a
INP
ADD a
OUT
HLT
a DAT

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

Code to subtract a from b

A

INP
STA a
INP
STA b
LDA a
SUB b
OUT
HLT
a DAT
b DAT

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

3 benefits of assembly language

A

Less memory and execution time
Interacts directly with hardware
Suitable for time critical processes

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