Question
You are required to write assembly language programs for each of the following tasks. For each program you must submit this deliverable: The actual assembly
You are required to write assembly language programs for each of the following tasks. For each program you must submit this deliverable:
The actual assembly language program for each task
You can use the "Simple Machine" and pseudoinstructions for your programs.
You may want to print status messages (eg. "locked", "invalid", etc) to the console so that it's more user-friendly.
Explain the use of the registers in your program.
Comment the header of your program with your name and the task.
Comment every line of your program to explain what it does. You should do this as you write the program.
The following tasks describe the programs that you must produce.
Task 1: Write a MIPS assembly language program for a simple door access device. The door status should be stored in a register with a default of 1 (locked). When a switch is pressed (by typing any key on the keyboard), the door status is set to 0 (unlocked). After two clock cycles, the door status should be reset to 1. This should loop indefinitely.
Task 2: Write version 2 of your program so that the door can only be unlocked with a master code (use the last four digits of your studentID), so that the door status is set to unlocked (0) only if the master code is entered. The master code should be stored in a register.
Task 3: Write version 3 of your program to store an array of five studentIDs in memory so that the door can be unlocked if any one of the studentIDs is entered. (It can still be unlocked using the master code).
Task 4: Write version 4 of your program to count how many times a particular student has unlocked the door. The data should be stored in memory. You should organize your program using functions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started