CSC/EEE230 Assignment #3 / Fall2025
Assembly Programming Exercise
(post:9/1) (due:9/12 11:59pm)
Late: 9/13 12:01 am – 9/14 11:59 pm
Game over: after 9/14 11:59pm: 0 point
Individual Report
First Name Last Name
______________________ ______________
Instruction:
To edit, you don't need to "request access", all you need to do: File/Download/Microsoft PowerPoint(.pptx), save to your local drive; then you can edit your local file
File name: Save this file as: 230-assign-03-YourFirstName-LastName
Email report directly to ui.luu@gccaz.edu, (Note: submit this assignment using your "maricopa.edu" email to get direct response for any feedback) (Your personal email address may get filtered into my SPAM folder)
Scores:
_____________________________________
�Progressive Vending machine
Consider a progressive vending machine that has the following Outputs:
Outputs: ($t1)
Bit0: Coffee
Bit1: Beer
Bit2: Dial 911
Bit3: Tequila Sunrise
Q1. (2 points)
# write one line of MIPS assembly code using logical operation to serve coffee (Bit0 = 1) without changing other outputs.
________________________________________________________________
Q2. (2 points)
# write one line of MIPS assembly code using logical operation to turn OFF Beer without changing other outputs:
________________________________________________________________
�Q3-think
(8 points)
# note: most engineering problems requires some thinking, this is one of them
* Note: This is a test of your understanding, MARS Simulation is NOT required
Using MIPS assembly code and fill in the blank based on instructions in comments:
Main:
Addi $s1, $zero, 0x3E
Jal S1X9
Addi $s3, $s2, 0x05 # $s3 = 0x? _________(Hexadecimal) (2 points)
Spin_wheel:
j spin_wheel
S1X9:
# Functional Requirement:
# Input: $s1
# Output: $s2 = 9 x $s1 (using Shift & Addition)
______________________________ # use Shift instruction (2 points)
______________________________ # use Addition (2 points)
______________________________ # return to caller (2 points)