Write a program to read the following numbers from ROM and place
them in data RAM
starting at address 0x50. Only, the last number in ROM is zero; the
rest, are non-zero. (9 points)
Org 0x600
MYDATA DB 0x12, 0x45, 0x58, ..., 0x00
Solution:
Concept:
ASM CODE:
ORG 0H // START OF PROGRAM
MOV R0,#50H
// POINTER FOR RAM STARTING
FROM 50H
MOV DPTR,#MYDATA
// LOAD THE POINTER OF CODE DATA IN DPTR
AGAIN:
CLR A
// CLEAR ACCUMALAOTR
MOVC A,@A+DPTR
// GET THE
DATA BYTE FROM ROM INTO ACCUMULATOR
JNZ CONT
// IF NOT ZERO, THEN CONTINUE
LJMP STOP1
// IF ZERO THEN WE HAVE REACHED END OF STRING,
STOP THE PROG
CONT:
INC DPTR
// INCREMENT CODE MEMORY POINTER TO POINT THE
NEXT DATA BYTE
MOV @R0,A
// COPY DATA FROM ACCUMULATOR TO RAM ADDRESS
POINTED BY R0
INC R0
// INCREMENT RAM POINTER FOR STORING NEXT DATA
BYTE
SJMP AGAIN
// REPEAT
THE PROCESS
// ROM DATA BYTE STRING....END OF STRING IS MARKED BY 00H
ORG 600H
MYDATA: DB 12H, 45H, 58H, 01H, 02H, 03H, 04, 05H, 06H, 07H, 00H
STOP1:
END // END OF
PROGRAM
SCREEN SHOT:

Write a program to read the following numbers from ROM and place them in data RAM...
Q4. Write an 8051 assembly program (using Keil/edsim) to convert a series of ASCII numbers to packed BCD. Assume that the ASCII data is located in ROM locations starting at 300H. Place the BCD data in RAM locations starting at 60H. Attach snapshot of your work. ORG 300H MYDATA: DB "87675649"
Given following cache: Show the end result after requesting following data: Read data from RAM address 00010 Read data from RAM address 01000 Read data from RAM address 00110 Read data from RAM address 11010 Write data to RAM address 00010 Read data from RAM address 10110 Read data from RAM address 11010 Read data from RAM address 01000 Write data to RAM address 10110 If a read miss request ends up with a RAM load time of 100-ns and...
•Write a java program to read
10 numbers and print them in reverse order. Modify your program to
work for N numbers given by the user Extend your program to find
the average of these numbers Extend your program to find the
smallest number of these numbers Extend your program to find the
largest number of these numbers
•Write a program to read 10 numbers and print them in reverse order. Modify your program to work for N numbers given...
This program is in C++ Write a program that validates charge account numbers read in from the file Charges.txt following this assignment (A23 Data). Use a selection sort function on the array to sort the numbers then use a binary search to validate the account numbers. Print out the sorted list of account numbers so you can see the valid ones. Prompt the user to enter an account number and the validate that number. If the account number entered is...
WRITE A PROGRAM IN C THAT DOES THE FOLLOWING: The numbers are real numbers, read in as double precision floating-point numbers, one number perline, possibly with some white space before or after. Hint: use scanf. There are guaranteed to be no more than one million (that’s 10^6) numbers in the input, and no fewer than two legitimate numbers. Any number that is equal to zero should be ignored (discarded, not stored in the array or counted in any way).
C Programming Write a program that meets the following requirements: • Your program will read three integer values from the keyboard. • Your program will output the following data in this order: 1. The third divided by the first if the first is not zero. 2. The third divided by the second if the first is zero and the second is not zero. 3. The sum of the first, second and third values. • All numbers are integers and only...
write a c++ program: User enter in 5 numbers, stores them in an array then displays them from least -> greatest. Then create a char array the user will enter some letters, it gives a count on every 'a' then it gets replaced by an uppercase 'A'. Display the result. Then display only the last letter.
In C++ This program will read a group of positive numbers from three files ( not all necessarily the same size), and then calculate the average and median values for each file. Each file should have at least 10 scores. The program will then print all the scores in the order that they were input, showing each number and what percentage it is above or below the average for each file. Note: Finding the average doesn’t require an array. Finding...
Write a program in C or a script in bash, called “compare” that takes two numbers on the command line and compares them. The program should print the result of the comparison. Specifically, it should print “<x> is <comparison> <y>”, where <x> is the first number, <y> is the second number and <comparison> is one of “equal to”, “greater than” or “less than”. If the two numbers are equal, the program should have an exit status of zero. The exit...
Write a telephone lookup PYTHON program. Read a data set of names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups. Use the following data set: Bob|555-1234 Joe|555-2345 John|555-3456 Luke|555-4567 Mark|555-5678 Matthew|555-6789 The program should prompt the user as follows: L)ookup Name, Lookup N)umber or Q)uit? Enter the name: Or Enter the Number:...