Question

In: Computer Science

1. Write a program that does the following. Write in Assembly Language program Loads your student...

1. Write a program that does the following. Write in Assembly Language program

Loads your student ID number into memory starting at location 0x2000 0100 a. DO NOT do any conversion on your ID number. If my ID number is 123456789, I should be able to read your ID in memory as 123456789 2. Loads the first six characters of your name, in ASSIC, in to memory right after your student ID. Total of 6 bytes. a. This means that you should NOT over write anything that you have already entered. 3. Load from memory location 0x0000 0000 into the registers a. R0 and R1 hold the 64 bits starting at 0x0000 0000 (Total of 2 Words, each of 32 bits) b. R2 holds the next byte (8 bits) data c. R3 holds the next half word (16 bits) d. R4 holds the next word (32 bits) 4. Use the debugger to test your program to make sure that it does what you think it does. Use Lab 1 to help you get started with this

Solutions

Expert Solution

Assembly Language program:

Loads your student ID number into memory starting at location 0x2000 0100 a. DO NOT do any conversion on your ID number. If my ID number is 123456789, I should be able to read your ID in memory as 123456789

2. Loads the first six characters of your name, in ASSIC, in to memory right after your student ID. Total of 6 bytes. a. This means that you should NOT over write anything that you have already entered.

3. Load from memory location 0x0000 0000 into the registers

a. R0 and R1 hold the 64 bits starting at 0x0000 0000 (Total of 2 Words, each of 32 bits)

b. R2 holds the next byte (8 bits) data

c. R3 holds the next half word (16 bits)

d. R4 holds the next word (32 bits)

push r0 ;Save r0 and r1
push r1 ; on the stack
mov r0, -1 ;Assign test values
mov r1, -2
mov r2, 0
mov r3, 0
push r0 ;Push r0 onto stack
push r1 ;Push r1 onto stack
pop r2 ;Pop r2 from stack
pop r3 ;Pop r3 from stack
pop r1 ;Restore saved r0 and r1
pop r0 ; Return values from stack


Related Solutions

Write a program named subtract.asm that does the following using LC3 assembly language: Print a prompt...
Write a program named subtract.asm that does the following using LC3 assembly language: Print a prompt "PRESS TWO KEYS: " Note that the prompt MUST LOOK EXACTLY like the above, with a colon and a space after the word KEYS with no newline. Get a two key press from the user. Subtract the second characters ASCII code from the first characters ASCII code. If the result is positive, print the word POSITIVE. Turn in subtract.asm to the appropriate submission point...
Q1: A. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO EXCHANGE 16-BIT NUMBERS B. WRITE AN ASSEMBLY LANGUAGE...
Q1: A. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO EXCHANGE 16-BIT NUMBERS B. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO SOLVE THE EQUATION Z=A+B-(C/D)+E please write the answer separately part A its own code and part B its own code this is microprocessor the ASSEMBLY LANGUAGE emu8086 should be written like this EX: mov ax,100h mov bx,200h etc
Write an assembly language program that will print out the message of your choosing #NOTE #write...
Write an assembly language program that will print out the message of your choosing #NOTE #write in a simple way, so that i can execute it from command window using masm
Write a program in MIPS assembly language to perform the calculation of the following equation and...
Write a program in MIPS assembly language to perform the calculation of the following equation and save the result accordingly:    f = 5x + 3y + z Assumptions: - Registers can be used to represent variables x, y, z, and f - Initialize x, y, and z to values of your choice. f can be initialized to zero. - Use comments to specify your register usage and explain your logic
Write an assembly language program to input a string from the user. Your program should do...
Write an assembly language program to input a string from the user. Your program should do these two things: ***** I AM POSTING THIS QUESTION FOR THE THIRD TIME NOW,I WANT IT DONE USING INCLUDE IRVINE32.INC***** 1. count and display the number of words in the user input string. 2. Flip the case of each character from upper to lower or lower to upper. For example if the user types in:   "Hello thEre. How aRe yOu?" Your output should be:...
Assembly Language Coding Using MARS (MIPS) 1)Write a program that prints your name in a Triangle....
Assembly Language Coding Using MARS (MIPS) 1)Write a program that prints your name in a Triangle. (NAME = John Doe) 2)Write a Program that intializes X to 10, Y to 20 and Z to -50, adds X and Y and Z and prints the following the value of each variable, for example value of x is 10 as well as the result of the addition.
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.
In MPLAB write and compile (using the simulator) an assembly language program with the following functionality:...
In MPLAB write and compile (using the simulator) an assembly language program with the following functionality: Configures pin RA2 of the PIC24to be an output to control an attached LED. Configures pin RB13 of the PIC24 to be an input to read the value on an attached switch (this switch will connect to ground when pressed). Configures pin RB13 to use the internal pull-up resistor. After configuration, the LED will be "off" when the push-button is pressed, and "on" when...
Write a RARS assembly language program to solve the following: For a set of integers stored...
Write a RARS assembly language program to solve the following: For a set of integers stored in an array, calculate the sum of the positive numbers and the sum of the negative numbers, storing the results into memory. In the data segment of the program, define an array consisting of 25 integers (words) that are a mix of positive and negative values. You can select any values you wish but try to create a balance of positive and negative numbers....
Write a MIPS assembly language program to solve the following problem: For a set of integers...
Write a MIPS assembly language program to solve the following problem: For a set of integers stored in an array, calculate the sum of the even numbers and the sum of the odd numbers. The program should store these numbers in memory variables: evenSum and oddSum. Numbers should be read from the array one at a time with a zero value (0) being used to signal the end of data in the array.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT