Computer Science > Research Paper > University of California, RiversideCS 110lab5_s20_template (All)

University of California, RiversideCS 110lab5_s20_template

Document Content and Description Below

#Spring20 Lab5 Template File # Macro that stores the value in %reg on the stack # and moves the stack pointer. .macro push(%reg) subi $sp $sp 4 sw %reg 0($sp) .end_macro # Macro takes the value... on the top of the stack and # loads it into %reg then moves the stack pointer. .macro pop(%reg) lw %reg 0($sp) addi $sp $sp 4 .end_macro # Macro that takes as input coordinates in the format # (0x00XX00YY) and returns 0x000000XX in %x and # returns 0x000000YY in %y .macro getCoordinates(%input %x %y) push(%input) andi %y, %input, 0x000000FF andi %x, %input, 0x00FF0000 srl %x, %input, 16 pop(%input) .end_macro # Macro that takes Coordinates in (%x,%y) where # %x = 0x000000XX and %y= 0x000000YY and # returns %output = (0x00XX00YY) .macro formatCoordinates(%output %x %y) push(%x) push(%y) sll %x, %x, 16 add %output, %x, %y pop(%y) pop(%x) .end_macro .data originAddress: .word 0xFFFF0000 .text j done done: nop li $v0 10 syscall [Show More]

Last updated: 1 year ago

Preview 1 out of 7 pages

Reviews( 0 )

$11.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
45
0

Document information


Connected school, study & course


About the document


Uploaded On

Jun 11, 2021

Number of pages

7

Written in

Seller


seller-icon
Muchiri

Member since 3 years

208 Documents Sold


Additional information

This document has been written for:

Uploaded

Jun 11, 2021

Downloads

 0

Views

 45

Document Keyword Tags

Recommended For You


$11.00
What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·