Question

In: Electrical Engineering

B) Write a program to find the sum of the values ​​A5H, 69H, E2H and CCH....

B) Write a program to find the sum of the values ​​A5H, 69H, E2H and CCH. Put the result in the R2 for high byte and R4 for low byte. What is the result value expected.

Solutions

Expert Solution

Here I am using 8051 Microcontroller programming

ORG 0000H
MOV DPTR ,#90H ## Here give count as 4
MOVX A,@DPTR
MOV R0,A
INC DPTR ## As it increments load the values in #91H,#92H,#93H,#94H
MOVX A,@DPTR
DEC R0
BACK:MOV R1,A
INC DPTR
MOVX A,@DPTR
ADD A,R1
DJNZ R0 , BACK
INC DPTR
MOVX @DPTR,A
INC DPTR
MOV A,#00H
JNC UP
ADD A,#02H
UP:MOVX @DPTR ,A
HERE: SJMP HERE
END

output : 02BCH

please give a positive rating.....


Related Solutions

write a program to find the maximum possible sum such that no two chosen numbers are...
write a program to find the maximum possible sum such that no two chosen numbers are adjacent either vertically, horizontally, or diagonally. code in java
Write a c program that prints the final sum of all values from 1 to n...
Write a c program that prints the final sum of all values from 1 to n only when n is a positive value. The program is to print "Poor!" when the final sum is less than 70, print "Good" when the sum is between 71 and 90. or "Great!" when the sum is 91 or better.
Write an assembly language program for 8051 microcontroller to find the sum of the following series,...
Write an assembly language program for 8051 microcontroller to find the sum of the following series, 1, -2, +3, -4, +5, -6,..., up to 100 terms. Store lower byte in R0 and higher byte in R1.
• Write a C++ program to find the largest umber, smallest number and sum of all...
• Write a C++ program to find the largest umber, smallest number and sum of all the element of a given array of 20 integers • Note − Declare array to 20 numbers − Input values for 20 array elements − Find largest number − Find smallest number − Find sum of all numbers • Display the results
Program – version 1: Sum of Range Algorithm Write a program that will sum the integers...
Program – version 1: Sum of Range Algorithm Write a program that will sum the integers between a given range (limit your range from 0 to 50). For example, if the user want to add the integers between (and including) 1 and 10, then the program should add: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 Algorithm: Program title/description Ask the user to input a start value in the...
Write a C++ program to determine the sum of two 1-D matrices: A = [a b...
Write a C++ program to determine the sum of two 1-D matrices: A = [a b c d] B = [e f g h] The user will provide the values of a to h.
-Write a program in C++: • to find the sum of the series 1! /1+2! /2+3!...
-Write a program in C++: • to find the sum of the series 1! /1+2! /2+3! /3+4! /4+5! /5 using the function1, • to convert decimal number to binary number using the function2, • to check whether a number is a prime number or not using the function3, • to check whether two given strings are an anagram using the function4. important must do in (Multi-Filing) of c++
Write a Java program to find the sum of all integers between 200 to 250 which...
Write a Java program to find the sum of all integers between 200 to 250 which are divisible by 7. Sample Output: Numbers between 200 and 250, divisible by 7: 203 210 217 224 231 238 245 The sum is: 1568
Write a program to find out the maximum value out of a list of ten values...
Write a program to find out the maximum value out of a list of ten values using loop. The maximum finding codes can be in a Sub Routine named MAX (optional). easy68k assembly language
Write a C++ program to read N numbers. Find sum, product, and average of N numbers
Write a C++ program to read N numbers. Find sum, product, and average of N numbers
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT