Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Interpret the below assembly program (14 marks) .begin Id [joy_x], %r7 Id [joy_y], %r8 Id [flash], %r9 ! ! loop: Id %r7,%r1 Id %r8,

image text in transcribed

2. Interpret the below assembly program (14 marks) .begin Id [joy_x], %r7 Id [joy_y], %r8 Id [flash], %r9 ! ! loop: Id %r7,%r1 Id %r8, %r2 Id [old_x], %r3 Id [old_y], %r4 orncc %r3, %ro, %r3 addcc%r3, 1, %r3. addcc%r1, %r3, %r3 be x_not_moved ba moved ! ! ! ! ! ! ! ! ! X_not_moved: orncc %r 4, %ro, %r4 addcc %r 4, 1, %r 4 addcc%r2, %r 4, %r 4 be loop ! ! ! ! ! moved: addcc %ro, 1, %r5 st %r5, %r9 st%r1, [old_x] st %r2, [old_y] ba loop flash: #FFFFEC! Location of flash register joy_x: #FFFFFO ! Location of joystick x register joy_y: #FFFFF4 ! Location of joystick y register old_x: 0 ! Previous x position old_y: 0 ! Previous y position .end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

What are five kinds of nonproductive roles in teams?

Answered: 1 week ago