MASM32 Downloads
Stupid question: Where am I wrong?Code: [Select]include \masm32\include\masm32rt.inc.dataMy4 REAL4 -1.23456789012345678901234567890e0My8 REAL8 -1.23456789012345678901234567890e0.codestart: mov esi, offset My4 mov eax, [esi] sar eax, 23 and eax, 11111111b ; 8 bits expo sub eax, 127 ; bias print str$(eax), 9, "expo R4", 13, 10 mov esi, offset My8 mov eax, [esi] sar eax, 52-32 and eax, 11111111111b ; 11 bits expo sub eax, 1023 ; bias print str$(eax), 9, "expo R8", 13, 10 exitend startShould be 2x0, right?Code: [Select]0 expo R441 expo R8
include \masm32\include\masm32rt.inc.dataMy4 REAL4 -1.23456789012345678901234567890e0My8 REAL8 -1.23456789012345678901234567890e0.codestart: mov esi, offset My4 mov eax, [esi] sar eax, 23 and eax, 11111111b ; 8 bits expo sub eax, 127 ; bias print str$(eax), 9, "expo R4", 13, 10 mov esi, offset My8 mov eax, [esi] sar eax, 52-32 and eax, 11111111111b ; 11 bits expo sub eax, 1023 ; bias print str$(eax), 9, "expo R8", 13, 10 exitend start
0 expo R441 expo R8