Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a 68000 ASSEMBLY program to calculate the square value of an array of hund

ID: 645611 • Letter: W

Question

Write a 68000 ASSEMBLY program to calculate the square value of an array of hundred 8-bit signed numbers, stored at memory location $4000. The squared array should be stored at location $5000. Use the concepte of SUBROUTINE and show how you pass parameters fromt he main program to the SUBROUTINES and how you return values from the subroutines to the main program in ASSEMBLE LANGUAGE plese and show all comments

Write a 68000 ASSEMBLY program to calculate the square value of an array of hundred 8-bit signed numbers, stored at memory location $4000. The squared array should be stored at location $5000. Use the concepte of SUBROUTINE and show how you pass parameters fromt he main program to the SUBROUTINES and how you return values from the subroutines to the main program in ASSEMBLE LANGUAGE plese and show all comments

Explanation / Answer

let us store the array

  org       $20000

boo

            move.l  #boo_return, a6

            move.l  a6, -(a7)                      ; push the return address onto the stack

            jmp      coo                              ; resume execution at coo

boo_return

            move.l #boo_return2, a6

            move.l a6, -(a7)

            jmp doo

boo_return2   

  org       $20000

boo

            move.l  #boo_return, a6

            move.l  a6, -(a7)                      ; push the return address onto the stack

            jmp      coo                              ; resume execution at coo

boo_return

            move.l #boo_return2, a6

            move.l a6, -(a7)

            jmp doo

boo_return2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote