Question

In: Computer Science

Task 1 Write a program that adds the three numbers stored in data registers at 0x20,...

Task 1

Write a program that adds the three numbers stored in data registers at 0x20, 0x30, and 0x40 and places the sum in data register at 0x50

task 4

Modify the program in Task1, so the program will run in infinite loop by using these following functions:

  1. GOTO function
  2. BRA function
  3. CALL function

Simulate your program in PIC18 IDE Simulator and attach a screenshot of your simulation while the program is running.

Solutions

Expert Solution


Related Solutions

Using the Python program: a/ Write a program that adds all numbers from 1 to 100...
Using the Python program: a/ Write a program that adds all numbers from 1 to 100 to a list (in order). Then remove the multiples of 3 from the list. Print the remaining values. b/ Write a program that initializes a list with ten random integers from 1 to 100. Then remove the multiples of 3 and 5 from the list. Print the remaining values. Please show your work and explain. Thanks
Task 2 (1 mark) Transformation of data stored in the relational tables into data stored in...
Task 2 (1 mark) Transformation of data stored in the relational tables into data stored in BSON collection.
Write a program to add 10 bytes of data and store the result in registers R30...
Write a program to add 10 bytes of data and store the result in registers R30 and R31. The bytes are stored in the Program memory starting at $200. The data would look as follows: MYDATA: .DB 92,34,84,129,... ;pick your own data.
Write an assembly program In MASM assembler to calculate the sum of odd numbers only stored...
Write an assembly program In MASM assembler to calculate the sum of odd numbers only stored in a 16-bit integers array. The size of the array is provided in a separate variable. Use the following design: Sum = 0 FOR i = 0 TO SizeOfArray - 1     IF Arr[i] % 2 = 1           Sum = Sum + Arr[i]     END IF END FOR
Write an Intel 8085 assembly program to find the largest of N numbers stored in memory...
Write an Intel 8085 assembly program to find the largest of N numbers stored in memory using the algorithm below. Hand trace (execute) the program showing the changes made to all affected registers and memory locations. Max = a(1) For i = n to N If max < a(i) then max = a(i) Next i
Task 3      Write a program that pushes the first 10 natural numbers to the stack,...
Task 3      Write a program that pushes the first 10 natural numbers to the stack, then pops those numbers. Use the debugger to view how the stack changes after each instruction. Once all the data has been pushed to the stack, take a screenshot of the stack in memory. Task 4     Write a subroutine called “Area” that calculates the area of a rectangle. Use accumulator A and B to pass the length and the width to the function....
Write a Python program stored in a file q3.py that: Gets single-digit numbers from the user...
Write a Python program stored in a file q3.py that: Gets single-digit numbers from the user on one line (digits are separated by white space) and adds them to a list. The first digit and the last digit should not be a zero. If the user provides an invalid entry, the program should prompt for a new value. Converts every entry in the list to an integer and prints the list. The digits in the list represent a non-negative integer....
1. Write a Java program that prompts the user to enter three integer numbers. Calculate and...
1. Write a Java program that prompts the user to enter three integer numbers. Calculate and print the average of the numbers. 2. Write a Java program that uses a for loop to print the odd numbers from 1 to 20. Print one number per line in the command line window. 3. Write a program which asks the user to input the size of potatoe fries she would like to purchase, and based on the size, it will tell her...
1. Write a program that prints a set of sqaures based on the widths stored in...
1. Write a program that prints a set of sqaures based on the widths stored in an array. Below are the specifications:  Ask the user for the number of sqaures to be printed  Create an array (based on the number of sqaures) to hold the widths  Ask the user for widths and store in the array  Print the sqaures (using any character (e.g. asterisk)) based on the widths stored in the array. (Java language)
There will be 10 numbers stored contiguously in the computer at location x7000 . Write a...
There will be 10 numbers stored contiguously in the computer at location x7000 . Write a complete LC-3 program, starting at location x3000, that will find the location of the smallest number and swap its location with the number in location x7000. For example, Suppose the following numbers are stored at location x7000: x7000 123F                                                                            x7000 0042 x7001 6534                                                                            x7001 6534 x7002 300F                                                                            x7002 300F x7003 4005                after the program is run, memory       x7003 4005 x7004 3F19                would look like----à                         ...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT