Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(c) The following PIC16F84A assembly code multiplies two numbers together and stores the result. REGA EQU H'10' REGB EQU H'11' REGC EQU H'12' ORG


 

(c) The following PIC16F84A assembly code multiplies two numbers together and stores the result. REGA EQU H'10' REGB EQU H'11' REGC EQU H'12' ORG H'10' MOVLW D'2' MOVWF REGA MOVLW D'3' MOVWF REGB CALL MULTIPLY MULTIPLY CLRF REGC ; clear REGC LOOP MOVF BTFSC REGB, F STATUS, Z ; test REGB is it zero? GOTO DONE MOVF REGA, W ; Yes, then we are done ; add REGA to REGC ADDWF REGC DECF REGB ; decrement REGB GOTO LOOP DONE RETURN (i) Describe the limitation on the values that can be assigned to REGA and REGB for the multiplication to produce a valid result. (ii) Write down the sequence of hexadecimal values that is stored in the programme counter during the execution of this code. (!!!) Determine the total duration that this code takes to execute, given an instruction cycle of 1 s.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Computer Network questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago