Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STRUCTURE MatrixFloatRow4,0
- FLOAT r_col0
- FLOAT r_col1
- FLOAT r_col2
- FLOAT r_col3
- LABEL MatrixFloatRow4_SIZEOF
- STRUCTURE MatrixFloat44,0
- STRUCT mat_row0,MatrixFloatRow4_SIZEOF
- STRUCT mat_row1,MatrixFloatRow4_SIZEOF
- STRUCT mat_row2,MatrixFloatRow4_SIZEOF
- STRUCT mat_row3,MatrixFloatRow4_SIZEOF
- LABEL MatrixFloat44_SIZEOF
- _AddMatrix44:
- PRESERVE
- ;a0 = ptr to left matrix
- ;a1 = ptr to right matrix
- ;results will be stored in MatrixBufferResult
- move.l mathieeesingbas_base,a6
- ;Move these so they don't get clobbered.
- move.l a0,a2
- move.l a1,a3
- lea MatrixBufferResult,a4
- move.l mat_row0,d4
- move.w #3,d3 ;loop counter
- .addNextRow
- ;Add a row.
- move.l (r_col0,a2,d4),d0 ; matrix_left[d4/sizeof(row)][0]
- move.l (r_col0,a3,d4),d1 ;matrix_right[d4/sizeof(row)][0]
- jsr IEEESPAdd(a6)
- move.l d0,(r_col0,a4,d4)
- move.l (r_col1,a2,d4),d0 ; matrix_left[d4/sizeof(row)][1]
- move.l (r_col1,a3,d4),d1 ;matrix_right[d4/sizeof(row)][1]
- jsr IEEESPAdd(a6)
- move.l d0,(r_col1,a4,d4)
- move.l (r_col2,a2,d4),d0 ; matrix_left[d4/sizeof(row)][2]
- move.l (r_col2,a3,d4),d1 ;matrix_right[d4/sizeof(row)][2]
- jsr IEEESPAdd(a6)
- move.l d0,(r_col2,a4,d4)
- move.l (r_col3,a2,d4),d0 ; matrix_left[d4/sizeof(row)][3]
- move.l (r_col3,a3,d4),d1 ;matrix_right[d4/sizeof(row)][3]
- jsr IEEESPAdd(a6)
- move.l d0,(r_col3,a4,d4)
- add.l MatrixFloatRow4_SIZEOF,d4 ;advance to next row
- dbra d3,.addNextRow
- RESTORE
- RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement