LMC + addressing Flashcards

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

ADD xx

A

Add the number at location xx to the accumulator

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

SUB xx

A

Subtract number at location xx from accumulator

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

STA xx

A

Store the number in the accumulator in location xx

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

LDA xx

A

load the number in location xx to the accumulator

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

BRA xx

A

BRANCH: Jump the PC to the new memory location

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

BRZ xx

A

Branch if the number in the accumulator is zero

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

BRP xx

A

Branch if the number in the accumulator is positive

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

INPUT

A

Move data from INPUT into the accumulator

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

OUTPUT

A

Move data from the accumulator into OUTPUT

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

HLT

A

HALT stop the program

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

DAT xx is not a command what does it mean?

A

DAT tells you that the location is holding data not instructions

The programmer must make sure the program halts or jumps over any data

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

Explain how named locations can be used in LMC programs

A

alternate to numbered memory locations

any location can be given a short name

the names can be used instead of location numbers in the program. this makes it easier to write.

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

immediate addressing

A

the data itself

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

direct addressing

A

memory location

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

indirect addressing

A

location holds a pointer to somwhere else in RAM

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

indexed addressing

A

an array reference