{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Program4 - Matrix Manipulation Data Size Options

# Program4 - Matrix Manipulation Data Size Options -...

This preview shows page 1. Sign up to view the full content.

CSC 322 Program 4 – Matrix Manipulation Due Friday October 21, 2011 This program should function exactly like Program 3 with this same name, except for the following enhancements: The data type of the array can be byte, word, or dword, You calculate each rowsum within a procedure passed the needed information *, You calculate each colsum within a procedure passed the needed information *, You calculate the total sum within a procedure passed the needed information *. You use a helper procedure, Times which is passed two doubles and returns their product calculated through summing within a loop. * The needed information for each of these procedure calls should be passed in via registers, the sum returned via a register, and the input parameters should include: Which row/col to sum, Dimensions of the matrix, Data size of the elements in the matrix. Print out the values in RowSums, ColSums, and Sum, along with labels, before exiting (our
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: author’s library WriteString on page 148 will come in handy). ;;;;;;;;;;;;;;;;;;;;;;;; TEST CASE 1 ;;;;;;;;;;;;;;;;;;;;;;;;; ROWS EQU 2 ; defines a constant ROWS set to 2. COLS EQU 3 ; defines a constant COLS set to 3. .data MyMatrix dd 1, 2, 3 dd 4, 5, 6 RowSums dd ROWS dup (0) ColSums dd COLS dup (0) Sum dd ;;;;;;;;;;;;;;;;;;;;;;;; TEST CASE 2 ;;;;;;;;;;;;;;;;;;;;;;;;; ROWS EQU 5 ; defines a constant ROWS set to 5. COLS EQU 7 ; defines a constant COLS set to 7. .data MyMatrix dd 1, 2, 3, 4, 5, 6, 7 dw 8, 9, 10, 11, 12, 13, 14 dw 15, 16, 17, 18, 19, 20, 21 dw 22, 23, 24, 25, 26, 27, 28 dw 29, 30, 31, 32, 33, 34, 35 RowSums dw ROWS dup (0) ColSums dw COLS dup (0) Sum dw Your program should use comments effectively and should play nice with registers and parameter passing. Email your .asm file to [email protected] by the due date. Enjoy!!...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online