Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. For each of the following instructions, give, the effective address of the op

ID: 3887352 • Letter: 2

Question

2. For each of the following instructions, give, the effective address of the operand (where is the final piece of data coming from), and the value of the operand (what is the value of the data being operated on). Use Table 1. (10 points) i. #$081F 1. Address: 2. Value: LDD ii. LDD $081F 1. Address: 2. Value iii. LDAB 1,Y 1. Address: 2. Value: iv. LDAB #$175 1. Address: 2. Value: Table 1. Snapshot of 68HC12 registers and memory (from $0800-$083F). All values are in hex. D FA11 C1 X 0815 V-1 0800: 00 OA 00 08 14 FE 00 01 00 00 0214 00 00 CE OA Y 080E Z-0 0810: 06 EO 00 01 10 | 00 32 1226 8E OD46 37 AA AB CD +0 +12+3 +4+5 +6 +7+8 +9 +A+B+C +DE+F SP 0820 N-0 0820: 08 04 BE BE EB AD 01 00 FF FF FF F1 00 0100 10 PC 0800 0830: FF FF 00 01 00 00 02 14 00 7F BA 02 10 08 05 16

Explanation / Answer

2.

i. LDD #$081F

Address: It is immediate addresing mode which doesn't require address location

Value: D= $081F

Explanation: LDD instruction store the double value in D register, Here the operand is immediate value which is $081F. Therefore D register contains the double value $081F

ii. LDD $081F

Address: $081F ~ $0820

Value: D= $CD08

Explanation: LDD instruction store the double value in D register, Here the operand is meemory location which is $081F. Therefore D register fetches the values fro 081F and the next memory location which is $0820. The value is $CD08

iii. LDAB 1,Y

Address: $080F

Value: D= $0A

Explanation: Load B with data from memory location pointed to by Y + dd (indexed addressing), Here Y= 080E, Therefore Address is 080F(080E + 1) and the value in 080F ia 0A.

iv. LDAB #$175

Address: It is immediate addresing mode which doesn't require address location.

Value: B= $75

Explanation: Load B with immediate data, Here the operand is #$175 which is more than 8 bit. So the carry flag is activated and the value B = lower 8 bits from the operand which is 75.

Please Rate it if you find the answer is helpful....Thanks...:)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote