1. What instruction is used to return from a subroutine?

a) RTS
b) RTS and Pull
c) End and Pull
d) End

a) RTS

2. Suppose that the data in memory locations $7000 - $7005 are as follows:

$24, $3A, $E5, $22, $08, $41
After running the following code, specify the contents of index register x and accumulator A (ACCA).
LDX #$7002
INX
LDAA 2, X
INX
WAI

a) Content of index register X = $7004, ACCA = $41
b) Content of index register X = $7002, ACCA =$22
c) Content of index register X = $7006, ACCA =$41
d) Content of index register X = $7005, ACCA =$08

b) Content of index register X = $7002, ACCA =$22

3. After running the following program, what is the content of SP register?

LDS #$1000
PSHB
PULA
INCB
PSHB
INCA
PSHB

a) $1002
b) $00FFE
c) $1000
d) $0FFF

a) $1002

4. After running the following assembly code, what is the content of index register X and accumulator B (ACCB)?

ORG $5000
BUFFER: dc.b $12, $77, $4C, $3E, $2A, $55
LDX #BUFFER
INX
INX
LDAB 2, X
WAI

a) Content of index register X = $5004, ACCB = $5C
b) Content of index register X = $5002, ACCB = $3E
c) Content of index register X = $5002, ACCB = $2A
d) Content of index register X = $5004, ACCB = $2A

c) Content of index register X = $5002, ACCB = $2A

5. Which of the following happens when call JSR?

a) Pushing PC to stack and then incrementing PC
b) Pulling PC from the stack and then decrementing PC
c) Pulling PC from the stack
d) Pushing PC to stack

d) Pushing PC to stack

6. What are the contents of the accumulator A and accumulator B after this program?

ORG $6000
ARRAY: dc.b $11,$22, $33,$44,$55,$66
LDX #ARRAY
LDAA 2,X
PSHA
LDAA 3,X
PSHA
PULA
PULB
WAI

a) ACCA=$44, ACCB = $33
b) ACCA=$55, ACCB = $44
c) ACCA=$33, ACCB = $44
d) ACCA=$44, ACCB = $55