Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started