how can we use matrix in win32asm ? does anybody simple example like matrix addition and print the result to window maybe ?
Posted on 2001-03-08 22:29:00 by newbies
if you mean maths matrices such as the followin 1 0 0 0 1 0 0 0 1 which is a 3*3 identity matrix then of course its possible in asm, unfortunatly it would have to be represented by a 1d array ie 1,0,0,0,1,0,0,0,1 as for code here a 4*4 multiply matrix procedure MulMatrix Proc pMatrix1:DWORD, pMatrix2:DWORD mov edi, pMatrix1 mov esi, pMatrix2 mov ebx, 4 NxtCol: mov ecx, 4 NxtRow: fld real4 ptr fmul real4 ptr fld real4 ptr [16] fmul real4 ptr [4] fadd fld real4 ptr [32] fmul real4 ptr [8] fadd fld real4 ptr [48] fmul real4 ptr [12] fadd add edi, 16 dec ecx jnz NxtRow fstp real4 ptr [48] fstp real4 ptr [32] fstp real4 ptr [16] fstp real4 ptr sub edi, 64 add esi, 4 dec ebx jnz NxtCol ret MulMatrix EndP it uses the openGL layout for the elements. For more infor reand the first matrix tutorial at the following site snw.cjb.net Sorry if you were actually on about something else
Posted on 2001-03-09 19:58:00 by Zadkiel
how do we print the result(matriks element) in easy way for checking ? can we use WsPrintf ?
Posted on 2001-03-11 23:52:00 by newbies