Author Topic: Re: Printing floating point not working.  (Read 96 times)

jj2007

  • Member
  • *****
  • Posts: 7542
  • Assembler is fun ;-)
    • MasmBasic
Re: Printing floating point not working.
« on: August 17, 2017, 08:47:58 AM »
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:
Code: [Select]
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:
Code: [Select]
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

  • Member
  • *****
  • Posts: 1107
    • uasm
Re: Re: Printing floating point not working.
« Reply #1 on: August 17, 2017, 12:41:52 PM »
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--

  • Administrator
  • Member
  • ******
  • Posts: 4807
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Re: Printing floating point not working.
« Reply #2 on: August 17, 2017, 01:42:43 PM »
 :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
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

habran

  • Member
  • *****
  • Posts: 1107
    • uasm
Re: Printing floating point not working.
« Reply #3 on: August 17, 2017, 06:09:50 PM »
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--

  • Administrator
  • Member
  • ******
  • Posts: 4807
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Printing floating point not working.
« Reply #4 on: August 17, 2017, 06:14:45 PM »
I imagine they will find a notation for it, just as they have done with AVX.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: