Assembly Language Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are all the Assembly Language Mnemonics?

A

INP (Input)- Inputs a value and stores it in the accumulator
OUT (Output)- Displays the contents of the accumulator
STA - Transfers a number from the accumulator to the RAM
LDA- Transfers a number from the RAM to the accumulator
ADD- Adds the contents of the accumulator to the contents of a RAM address
SUB- Subtracts the contents of the accumulator from the contents of the RAM address
BRA- Jumps to the RAM location specified- used for loops
HLT- Stops the processor
DAT- Defines variables

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

What does the INP mnemonic do with example?

A

Inputs a value and stores it in the accumulator e.g.

INP //Allows user to input something

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

What does the OUT mnemonic do with example?

A

Displays the contents of the accumulator:

OUT //Outputs number in accumulator

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

What does the STA mnemonic do with example?

A

Transfers a number from the accumulator to the RAM:

STA 1A //Stores number in memory location 1A

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

What does the LDA mnemonic do with example?

A

Transfers a number from the RAM to the accumulator:

LDR 1A //loads contents of address 1A to the accumulator

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

What does the ADD mnemonic do with example?

A

Adds the contents of the accumulator to the contents of a specified RAM address:
ADD 1A //Adds accumulator to location 1A

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

What does the SUB mnemonic do with example?

A

Subtracts the contents of the accumulator to the contents of a specified RAM address:
SUB 1A //Subtracts accumulator to location 1A

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

What does the BRA mnemonic do with example?

A

Jumps to the RAM location specified (Used for loops):

BRA 1 //Loops to RAM location 1

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

What does the HLT mnemonic do with example?

A

Stops the processor:

HLT //Stop

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

What does the DAT mnemonic do with example?

A

Defines a variable :

first DAT //declares ‘first’ as a variable.

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