Suppose Pep/9 contains the following four hexadecimal values: A: 18BA X: ED20 Mem[001F]: FD03 Mem[0021]: 1A3C If these statements execute continuously, What are the four hexadecimal values after each statement executes ?
(a) C90021
(b) F1001F
(c) 61001F
(d) 990021
Greetings!!
Given machine code represents the following instructions:
(a) C90021 - LDWX 0X0021,D [C9 represent LDWraaa where r=1 represent register X and aaa = 001 represent direct addressing mode. Similarly for all other instructions. Please use manual for getting the opcodes and the corresponding instructions]
(b) F1001F - STBA 0X001F,D
(c) 61001F - ADDA 0X001F,D
(d) 990021 - ORX 0X0021,D
What the instructions do:
LDWX 0X0021,D ;LOAD 0X1A3C WHICH IS STORED AT MEMORY 0Z0021 IS LOADED INTO REGISTER X
STBA 0X001F,D ;STORE THE LOWER BYTE XBA FROM REGISTER A TO THE MEMORY ADDRESS 0X001F
ADDA 0X001F,D ;ADD ACCUMULATOR CONTENT 0X18BA AND MEMORY CONTENT 0XBA03 ie D2BD IN A
ORX 0X0021,D ;OR WITH 0X1A3C AND 0X1A3C ie 0X1A3C IN REGISTER X
After the execution:
A:0XDABD
X:0X1A3C
MEM[001F]:0XBA03
MEM[0021]:0X1A3C
Hope this helps
Get Answers For Free
Most questions answered within 1 hours.