Your cart is currently empty!
Objective: In this lab you will familiarize the basics of MIPS assembly programming using the QtSpim simulator. Problem: Illustrate the following using QtSpim: (1) Data transfer operations: a) Load all the temporary registers t0 to t9 with 4-bit hex value 0xF and saved registers s0 to s7 with the 4 bit hex…
Objective:
In this lab you will familiarize the basics of MIPS assembly programming using the QtSpim simulator.
Problem:
Illustrate the following using QtSpim:
(1) Data transfer operations:
(2) Storage of data in the data segment using ascii/asciiz:
Store 4 strings as indicated below. Load the address of each string into registers t0, t1, t2, t3 respectively. Run step by step and note how each string is getting stored and explain the changes occuring in the data segment:
str1: .ascii “123456789abcedef” str2: .ascii “123456789ABCDEF” str3: .asciiz “123456789abcedef” str4: .asciiz “123456789ABCDEF”
(3) Load and store a word, a half word and a byte:
Store the strings as indicated below: str1: .ascii “123456789abcedef” str2: .ascii “123456789ABCDEF”
(4) Illustrate the use of syscall codes for the following operations:
My roll number is : <Your roll number>
(5) Reading and printing an integer and string:
Read your name and roll number during run time and then display the same on the Console. There should be prompts for entering the name and roll number. i.e. The display should be like:
Please enter your name: <Enter your name>
Please enter your roll no.: <Enter your roll number> Your name is : <Your name should be displayed here>
Your roll number is : < Your roll number should be displayed here>
Indicate the changes that you see in in data segment.
(6) Reading and printing a floating point number
Read a floating point number during run time and then display the same on the
Console. i.e. The display should be like:
Please enter a floating point number : <Enter the number> You have entered : <The number should be displayed here>
Post-lab:
Submit a post-lab report with your verified outputs. The report should include your well commented code snippets, snapshots of the changes observed in the registers, data segments with proper explanation. Your submissions should be clear and concise.