Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

.def .def .def A 12 .def Br3 .def zero r4 .def oloop r17 .def iloop r18 .org $0000 [25 pts] 4- Consider the AVR

image text in transcribed

.def .def .def A 12 .def Br3 .def zero r4 .def oloop r17 .def iloop r18 .org $0000 [25 pts] 4- Consider the AVR assembly code in Problem # 3 with its equivalent (partially completed) address and binaries shown on the right. Determine the values for (a) kkkk kkkk kkkk (@address $0000) (b) rd dddd rrrr (@address $0054) (c) KKKK dddd KKKK (@ address $0057) (d) d dddd (@address $005D) (e) rd dddd rrrr (@address $005F) (f) kk kkkk k (@address $006B) (g) KKdd KKKK (@ address $006C) (h) kkkk kkkk kkkk (@address $0070) .include "m128def.inc" rlo - ro rhirl Include definition file ; Low byte of MUL result High byte of MUL result ; An operand Another operand ; Zero register Outer Loop Counter ; Inner Loop Counter Binary rimp INIT Address 0000: 1100 kkkk kkkk kkkk .org $0054 INIT: MAIN: clr zero 0054: ldi YL, low (addrB) 0055: ldi YH, high (addrB) 0056: 1110 KKKK 0010 01rd dddd rrrr 1110 KKKK dddd KKKK dddd KKKK ldi ZL, low (LAddrP) 0057: 1110 KKKK dddd KKKK ldi ZH, high (LAddrP) 0058: 1110 KKKK dddd KKKK ldi oloop, 2 0059: 1110 MUL16 OLOOP: ldi XL, low (addrA) 005A: ldi XH, high (addrA) 005B: ldi iloop, 2 005C: KKKK dddd 1110 KKKK 1110 KKKK 1110 KKKK KKKK dddd KKKK dddd KKKK MUL16 ILOOP: ld A, X+ 005D: 1001 000d ld B, Y 005E: 1000 000d dddd KKKK dddd 1101 dddd 1000 mul A, B 005F: 1001 11rd ld A, 2+ 0060: ld B, 2+ 0061: add rlo, A 0062: adc rhi, B 0063: ld A, Z 0064: adc A, zero 0065: st 2, A 0066: st -2, rhi 0067: st -2, rlo 0068: 0001 11rd 1000 001d 1001 001d 1001 001d dddd rrrr 1001 000d dddd 0001 1001 000d dddd 0001 0000 11rd dddd rrrr 0001 11rd dddd rrrr 1000 000d dddd 0000 dddd dddd 0000 rrrr dddd dddd 0010 0010 adiw ZH: ZL, 1 0069: 1001 0110 KKdd KKKK dec iloop 006A: 1001 010d brne MUL16_ILOOP 006B: sbiw ZH: ZL, 1 006C: 1111 01kk 1001 0111 KKdd dddd 1010 kkkk k001 KKKK adiw YH: YL, 1 006D: dec oloop 006E: 1001 0111 1001 010d KKdd KKKK dddd 1010 brne MUL16_OLOOP 006F: 1111 01kk kkkk k001 Done: rjmp Done 0070: 1100 kkkk kkkk kkkk .dseg .org $0100 addrA: .byte 2 addrB: .byte 2 LAddrP: .byte 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To complete the missing binary values for each specified address follow these steps a kkkk kkkk ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions