Question: kindly write the following assembly code for 8051 micro processer with as many comments as possible 4. (8 points) Write a procedure, called ADD BCD,
kindly write the following assembly code for 8051 micro processer with as many comments as possible

4. (8 points) Write a procedure, called ADD BCD, that will add two 8-bit packed BCD numbers and store the result in memory location 30H. Assume the original numbers are stored in R1 and R2 before calling the procedure. Your program should NOT use the DA (decimal adjust) instruction. For example, assume R1 and R2 have values 29H and 27H, the result should be 56H. Assume that the resulting BCD number can be correctly represented in a single byte (i.e. 2 BCD digits only). Below is the exact operation of the DA instruction for your reference. IF (A3-0 > 9) OR (AC = 1) A= A +6 IF (A -4> 9) OR (C = 1) A = A + 60h
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
