News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Re: Printing floating point not working.

Started by jj2007, August 17, 2017, 08:47:58 AM

Previous topic - Next topic

jj2007

I use Olly only if deb is not enough, i.e. rarely. There is nothing better than console output while the program does its job. But a Watch macro might be a good idea:include \masm32\include\masm32rt.inc

usewatch=1
Watch macro args:VARARG
Local isL, isR, wIf$
  if usewatch
isR INSTR 2, <args>, <#>
wIf$ SUBSTR <args>, 2, isR-2
.if wIf$
wCom$ SUBSTR <args>, isR+1
wCom$
.endif
  endif
ENDM

.code
start:
  xor ebx, ebx
  m2m eax, 10
  .Repeat
inc ebx
lea eax, [ebx*4+100]
mul ebx
Watch #ebx!!<=5 && ebx!!!!=3 || ebx==50 || ebx!!>96# <print str$(ebx), 9, "test", 13, 10>
  .Until ebx>=100
  inkey "watch your step..."
  exit
end start


Output:1       test
2       test
4       test
5       test
50      test
97      test
98      test
99      test
100     test
watch your step...


The MASM author who picked ! and <> as reserved characters should be hanged IMHO. If he is still alive 8)

habran

Surf internet, maybe he hanged himself already :lol:
IMAO, he should have committed SEPPUKU (hara-kiri) , hanging is to light punishment for such a crime ;)
Cod-Father

hutch--

 :biggrin:

> The MASM author who picked ! and <> as reserved characters should be hanged IMHO.

Why, you are the one who complained about Vasily's {}.  :shock:

I wonder if some folks hate MASM so much have a reason to imitate MASM, why aren't they designing their own instead of making MASM compatible assemblers ?  :P

habran

You know the answer why we liked masm, however, masm32 is obsolete.
If you use Vasily's {} how in your opinion could we write this kind of EVEX instructions:
Quote
  vscatterqpd [+zmm31]{ k1 }, zmm0
  vsubps zmm30,zmm29,DWORD PTR [rdx+1fch]{ 1to16 }
  vsubsd xmm30{z}, xmm29,[rax+r14*8+0x123]
  vsubsd xmm30,xmm29,xmm28,{rn-sae}
  vsubsd xmm30{k7},xmm29,xmm28,{ru-sae}
BTW, we have already some people who use UASM to write Intel® Xeon Phi™ Processor, not only on Windows but the several other systems
I am almost certain that even ML64 will soon introduce EVEX instructions and they will for sure use the same syntax as above, so than any code written with Vasily's {} will be doomed.
Even now in masm32 library you have some constants like SOMECONSTANT {0,0,0,0,0,0}, how to handle that?
Cod-Father

hutch--

I imagine they will find a notation for it, just as they have done with AVX.