Give the bit pattern for the instruction LDWX 0x0124,x (pep9)
First 8 bits for LDA instruction will be 1100 raaa.
from
them,
First 4 bits,
Instruction specifier for LDA instruction is
1100.
For
5th bit,
if it is accumulator then 1 and if index register then 0.
Here index register X is used. So, r = 1 means 5th bit will be
1.
Other 3 bits(6, 7 and 8) represents addressing mode. x from given
instruction specifies Indexed addressing mode.
For index addressing aaa = 101.
Thus,
Fisrt 8 bits will be 1100 1101
Here hexadecimal constant is 0124. Thus other bits are 0000 0001 0010 0100.
Thus,
final bit pattern for LDWX 0x0124, x will be
1100 1101 0000 0001
0010 0100.
Get Answers For Free
Most questions answered within 1 hours.