{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW3 - 0306-250 Assembly Language Programming Fall 2009...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 of 2 0306-250 Assembly Language Programming Fall 2009 Homework Three Solution 1. Write an assembly language subroutine Total according to these specifications. Accepts a pointer to an array of words in register X . Accepts a word value in register Y , which indicates the number of array elements. Returns the sum of the array elements in register D . On return, preserves contents of all registers, other than return result register. (continued on next page)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
0306-250 20091 Homework Three Page 2 of 2 2. For the subroutine specified below, write an assembly language code fragment to set the input parameters for the subroutine, call the subroutine, and retrieve the return parameters. Note: Do not write the subroutine —just setup the call, call it, and process the return. MatrixMult: ;************************************************ ; This subroutine performs matrix multiplication: ; MatrixF = MatrixP * MatrixQ ; Input parameters: ; 6,SP: Address of first element of MatrixP ; 4,SP: Address of first element of MatrixQ ; 2,SP: Address of first element of MatrixF ;
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}