1.2.4c LMC Flashcards

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

What does the ADD instruction do in LMC?

A

Adds the value at the given memory address to the accumulator.

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

What does the SUB instruction do in LMC?

A

Subtracts the value in the given memory address from the accumulator.

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

What does the STA instruction do in LMC?

A

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

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

What does the LDA instruction do in LMC?

A

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

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

What does the INP instruction do in LMC?

A

Allows the user to enter a value which will be held in the accumulator.

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

What does the OUT instruction do in LMC?

A

Prints the value currently held in the accumulator.

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

What does the HLT instruction do in LMC?

A

Stops the program at that line, preventing the rest of the code from executing.

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

What does the DAT instruction do in LMC?

A

Creates a flag with a label at which data is stored.

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

What does the BRZ instruction do in LMC?

A

Branches to a given address if the value in the accumulator is 0.

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

What does the BRP instruction do in LMC?

A

Branches to a given address if the value in the accumulator is positive (or 0).

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

What does the BRA instruction do in LMC?

A

Branches to a given address regardless of what the value in the accumulator is.

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