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: 2 years ago

Preview 1 out of 7 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$11.00

Buy Now

We Accept:

We Accept

Instant download

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

111
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 4 years

209 Documents Sold

Reviews Received
19
5
1
1
6
Additional information

This document has been written for:

Uploaded

Jun 11, 2021

Downloads

 0

Views

 111

Document Keyword Tags


$11.00
What is Scholarfriends

In Scholarfriends, 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 © Scholarfriends · High quality services·