News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

How to output 128 bits to the screen?

Started by Mikl__, July 19, 2017, 10:51:33 PM

Previous topic - Next topic

aw27

Quote from: jj2007 on July 24, 2017, 12:52:38 AM
Stupid question: Where am I wrong?include \masm32\include\masm32rt.inc
.data
My4 REAL4 -1.23456789012345678901234567890e0
My8 REAL8 -1.23456789012345678901234567890e0

.code
start:
  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
  exit
end start


Should be 2x0, right?
0       expo R4
41      expo R8


real8 is a qword   :idea:

mov esi, offset My8
mov eax, [esi+4]

FORTRANS

Hi,

   Little-endian, ESI+4?

Regards,

Steve

jj2007