Question: 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,

 2. Interpret the below assembly program (14 marks) .begin Id [joy_x],

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!