manba
New Member
hi,
i wanna to multiply tow numbers and store the result in a GPR register, but i face problem if the result is bigger than FFh how to solve this problem.![Confused :confused: :confused:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
i wanna to multiply tow numbers and store the result in a GPR register, but i face problem if the result is bigger than FFh how to solve this problem.
Code:
this code is ok if the result > 256
; i have a test if the FIRST_NUM = 0
MULTI:
MOVF RESULT,W
ADDWF SECOND_NUM,F
DECFSZ FIRST_NUM
GOTO MULTI
RETURN
Last edited: