Week 6 - 4.4 - Introduction to Addressing Modes Flashcards

1
Q

How many modes can an instruction operand be specified by?

A

12 addressing modes.

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

What does an addressing mode do?

A

An addressing mode tells the CPU how to locate the data or address needed by instruction.

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

What is the actual register for a register operand?

A

The effective address of the operand.

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

How many addressing modes are available on the MC68020/30/40 processors?

A

18 addressing modes

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

What is the syntax for Absolute Long mode?

A

<address>
The operand is a 32 bit-unsigned number that represents the effective address of the operand. The address is a constant , a label, or an expression.
</address>

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

How many extension words containing the address as a long word does Absolute Long mode need?

A

two extension words containing the address as a long word.

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

What happens in Absolute Short Mode?

A

The memory address is accessed as a 16 bit word and is then sign-extended to 24 bits to give the effective address of the operand. The address is stored in a single extension word.

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

Syntax for Immediate Mode

A

N - the number must be given in decimal, hex, or any other permitted number system. This mode is restricted to source operands.

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

Data Register Direct Mode syntax?

A

Dn (0 <= 7)
The operand is a data register. An instruction directly accesses the data in the register, and no extension word is required.

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

What is the operand in Address Register Direct Mode?

A

The operand is an address register.

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

What is the address of a memory location in Address Register Direct Mode?

A

The content of an address register is the address of a memory location. The address register can be viewed as a pointer to a memory location.

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

What is the syntax for the MOVE instruction?

A

MOVE. ,

The contents of the source are copied to the destination.

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

For instruction MOVE the destination cannot be:

A

an address register
an immediate operand
or any of hte PC-relative modes.

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

What is the syntax for ADD/SUB (add/subtract)?

A
ADD.     ,Dn
ADD.     Dn, 
ADDI.     #N,
SUB.      ,Dn
SUB.      Dn,
SUBI.       #N,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does ADD/SUB do?

A

Executes the corresponding arithmetic operation for fixed-length binary numbers of the given size.

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

What does MOVEA. ,An do?

A

The instructions allow the user to write data into an address register. The contents of the source operand are stored in the address register An. If word data is noted, it is sign-extended before being placed in the register.

17
Q

What are the requirements for MOVEA .?

A

The destination operand must be an Address register
all addressing modes are permitted for the source operand.
The size parameter is restricted to word or long word.

18
Q

What is the syntax for ADDA/SUBA ?

A

ADDA. ,An

SUBA. ,An

19
Q

What does ADDA/SUBA do?

A

The contents of the source operand are added/subtracted from the contents of the ADDRESS REGISTER. If word data is specified, the 16 bit contents from the source operand is sign-extended first and then operation is performed.

20
Q

What are the requirements for ADDA/SUBA?

A

Destination must be an address register (A0-A6)

Any addressing mode can be used for the source operand.

21
Q

What does this do?

ADDA.L #100,A0

A

adds 100 to the value of A0 in hexadecimal.
100 base 10 = 64 base 16
A0 += 64;

22
Q

What does this do?
SUBA.W ALPHA,A1
when ALPHA is $8C07
A1 is 0000 A04B

A

since we’re using w, 16-bit contents of ALPHA are sign-extended to long word. This value is subtracted from the value in the address register
A1 -= FFFF8C07 = 00011444;

23
Q

What is LEA?

A

Load Effective Address

24
Q

What is the syntax for LEA?

A

LEA ,An

25
Q

What does LEA do?

A

The effective address of the source operand is loaded into the specified register.

26
Q

What are the requirements for LEA?

A

The address of the source operand is loaded into the register. THE ADDRESS.
NOT THE CONTENTS.

No size specification is used.

27
Q

Can you do LEA #ALPHA,A3?

A
No, it's an illegal instruction.
#ALPHA is a constant, and does not represent an effective address.
28
Q

What is Address Register Indirect Mode?

A

An
The operand specifies the contents of the memory location whose address is contained in An. (An) indicates indirect reference.

29
Q

What is the syntax for CLR and what does it do?

A

CLR.
The contents at the given effective address are initialized to 0. The operand may be either a data register or memory location.

30
Q

If D3 = 8C07 2A4F

CLR.B D3 results in?

A

8C07 2A00

D3