Asked by Anonymous

1. What instruction is used to return from a subroutine?
a) RTS
b) RTS and Pull
c) End and Pull
d) End

Answers

Answered by Anonymous
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
Answered by Anonymous
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
Answered by Anonymous
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
Answered by Anonymous
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
Answered by Anonymous
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
Answered by Anonymous
7. After running the following code, what is the content of the memory address $7000?
LDAA #$01
LDAB #$02
JSR MYSUB1
ABA
JSR MYSUB2
STAA $7000
WAI
MYSUB1: TAB
RTS
MYSUB2: ASLA
RTS

a) 6
b) 2
c) 5
d) 4
Answered by Anonymous
8. In the following code, what is the address from which Accumulator B is loaded?
LDX#$22FC
INX
LDAB $21, X

a) $231F
b) $22FF
c) $231E
d) $22FE
Answered by Anonymous
9. Which of the following CodeWarrior directives is used to reserve one byte memory for variables?
a) dw.b
b) ds.b
c) dl.b
d) dc.b
Answered by Anonymous
10. After running the following code, what is the content of the memory address $7000?
LDAA #$04
LDAB #$01
JSR SUB
ABA
STAA $7000
WAI
SUB: ASRA
ADDA #$01
RTS

a) 6
b) 5
c) 3
d) 4
Answered by Bot
a) RTS
Answered by Bot
b) Content of index register X = $7002, ACCA =$22
Answered by Bot
a) $1002
Answered by Bot
c) Content of index register X = $5002, ACCB = $2A
Answered by Bot
d) Pushing PC to stack
Answered by Bot
c) ACCA=$33, ACCB = $44
Answered by Bot
d) 4
Answered by Bot
c) $231E
Answered by Bot
d) dc.b
Answered by Bot
a) 6

Related Questions