News:

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

Main Menu

UASM 2.51

Started by johnsa, March 01, 2021, 01:14:16 AM

Previous topic - Next topic

johnsa

Hi all,

I've updated the git repo, new branch v2.51 and the binaries are on the site for Windows 32bit and 64bit.

Not too much change this release, just rolling up what should have been in 2.50 +
1. Removed option zerolocals totally, it's silly and wasn't implemented fully.
2. Added a warning if win64 options automatically change the stackbase from rbp to rsp (that had caught me out once or twice)
3. Moved some more instructions into codegen v2
4. Some more cleanup and refactoring
5. A data declaration in a proc is now generated AFTER the prologue.. for some reason before hand due to the parser ordering it would put it before the prologue (This was at the request of Vid512).
6. The biggest one, with huge thanks to Nidud for his input, I've added in CV5 / CV8 debug support and followed Nidud's lead.. cmd line switches -Zi5 or -Zi8

I still have very little time for Uasm these days, but am trying to keep it from rotting.. If anyone has the time/will to contribute it would be hugely appreciated.

Thanks!
John

TouEnMasm

 :thumbsup:
Trying to compile the source with VS 2019 I get
Quote\UASM-master\x86macros.c(317,41): error C2065: 'LANG_REGCALL' : identificateur not declared
Any help ?
Fa is a musical note to play with CL

jimg

When I try to download 2.51 from the link on the site, it gives me http://www.terraspace.co.uk/uasm249_x64.zip, you have to manually change the link to http://www.terraspace.co.uk/uasm251_x64.zip

jj2007

#3
Thanks, John - so far it works fine with my fat sources, with one minor hickup in 22+42=64kLines of code:
include \masm32\include\masm32rt.inc

buffersize=4000
.data
somedd1 dd 3839
somedd2 dd 3840

.code
start:
  cls
  movsx eax, sbyte ptr somedd1[1]
  print str$(eax), " for sbyte ptr somedd1[1]", 13, 10
  print str$(buffersize/256-255), " for buffersize/256-255", 13, 10
  .if sbyte ptr somedd1[1]<buffersize/256-255
print "dd1 ok", 13, 10
  .else
print "dd1 too big", 13, 10
  .endif
  .if sbyte ptr somedd2[1]<buffersize/256-255
print "dd2 ok", 13, 10
  .else
print "dd2 too big", 13, 10
  .endif
  exit

end start


This assembles fine with the June 2019 version (and Masm, AsmC) but throws an error in UAsm 2.51. I guess it should throw an error, given that buffersize/256-255 = -240 (which gets translated to +16 by Masm, so it most probably means I had a little bug in my code for the last 3 years or so - I expected a positive number). There might be scenarios where -240 is ok for a comparison.

Btw UAsm has become a little bit faster - congrats :thup:

johnsa

Doh... link fixed .. it's been so long since I did an update I've forgotten how haha ;)

hutch--

Come on guys, John has done great work with UASM but he needs some support in keeping UASM going. If you don't want UASM to fade away, assist with source, write some decent libraries and help out with the support files and you will ensure that it remains available for the many people who need an alternative to Microsoft.

LiaoMi

Hi johnsa,

old bug still exists  :arrow_down:

OPTION FLAT:1

includelib c:\masm32\lib\msvcrt.lib
printf proto C :ptr, :vararg

.data
msg32 db "Hello from 32 bit!", 10,0

.code

mainCRTStartup proc C
push eax
push edx
push offset msg32
call printf
add esp, 12
ret
mainCRTStartup endp

end


UASM v2.51, Feb 27 2021, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

mywindow2Bug.asm : Error A2197: Unknown fixup type: 9 at .debug$S.19D
mywindow2Bug.asm : Error A2197: Unknown fixup type: 9 at .debug$S.1FE
mywindow2Bug.asm: 28 lines, 2 passes, 2 ms, 0 warnings, 2 errors


Starting pass 1
mywindow2Bug.obj : fatal error LNK1190: invalid fixup found, type 0x0001


QuoteI still have very little time for Uasm these days, but am trying to keep it from rotting.. If anyone has the time/will to contribute it would be hugely appreciated.
To contribute, we need to know exactly where to start, it would be nice to have a small tutorial, which describes how to transfer instructions into codegen v2.

Thank you John for your hard work! Thanks Nidud for the updated debug format CV8!

jj2007

Quote from: LiaoMi on March 04, 2021, 07:26:50 AMThank you John for your hard work! Thanks Nidud for the updated debug format CV8!

I echo that :thumbsup:

It would be even better if Hutch' precious efforts could be used with UAsm and AsmC :cool:

Quote from: hutch-- on September 18, 2016, 08:52:21 AM
I would be interested to see if Japheth's JWASM could be used with the libraries and includes that I already have using the macros I have done but it would still require some of Vasily's macros and I gather that JWASM may not run them properly.

Quote from: jj2007 on September 18, 2016, 10:02:01 AM
Quote from: hutch-- on September 18, 2016, 08:52:21 AMit would still require some of Vasily's macros

It would require disabling the .if, invoke etc macros with e.g. IFIDNI @Assembler, <ML> then .if macro ...

Perhaps like this:
IFIDNI @Assembler, <ML>
  include VasilysMacros4ML64.inc   ; invoke, if else endif, repeat ... until, while ... wend, switch .. case .. endsw
ENDIF
include Macros4allAssemblers.inc

hutch--

JJ,

You had a forlorn hope there of crippling MASM to fit into the sphere of Watcom derivatives. I posted here because it does not seem that John is getting enough support to keep UASM going and that would be unfortunate as it serves the interests of folks who don't want to use Microsoft tools.

Now surely there must be at least some of the UASM followers that could write library modules, provide some decent documentation, come up with some code designs or even help out with the source code. If a community was to develop, it would share the load around and ensure that the project survived.

jj2007

Quote from: hutch-- on March 04, 2021, 11:08:34 AMYou had a forlorn hope there of crippling MASM

No, I never had the intention to cripple MASM. Actually, my 64-bit code does build with ML64.exe :cool:

hutch--

 :biggrin:

I wonder why you keep trying to change the subject about helping John out when you have been flogging the virtues of UASM for such a long time while having criticised MASM for a very long time. If the faithful who have been waxing lyrical about the virtues of UASM actually formed a community to support UASM, it could become a force to be reckoned with.

TouEnMasm

  old bug steel exists ???
Quote
mainCRTStartup proc C
   push eax
   push edx
   push offset msg32
   call printf
   add esp, 12                                              <<<< here is an epilogue who is not needed with uasm (he do it itself)
   ret
mainCRTStartup endp
Fa is a musical note to play with CL

LiaoMi

Quote from: TouEnMasm on March 05, 2021, 12:52:20 AM
  old bug steel exists ???
Quote
mainCRTStartup proc C
   push eax
   push edx
   push offset msg32
   call printf
   add esp, 12                                              <<<< here is an epilogue who is not needed with uasm (he do it itself)
   ret
mainCRTStartup endp

Hi TouEnMasm,

it doesn't change anything, the code is not going to be built  :sad:
%UASM%\UASM64 /c /coff /Cp -Zp8 /Cu /nologo /W2 -Zi0 -Zi1 -Zi2 -Zi3 -Zi5 -Zi8 /Zd -Zf %appname%.asm >> %appname%_%stamp%.assemblylog.txt

johnsa

Quote from: LiaoMi on March 04, 2021, 07:26:50 AM
Hi johnsa,

old bug still exists  :arrow_down:

OPTION FLAT:1

includelib c:\masm32\lib\msvcrt.lib
printf proto C :ptr, :vararg

.data
msg32 db "Hello from 32 bit!", 10,0

.code

mainCRTStartup proc C
push eax
push edx
push offset msg32
call printf
add esp, 12
ret
mainCRTStartup endp

end


UASM v2.51, Feb 27 2021, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

mywindow2Bug.asm : Error A2197: Unknown fixup type: 9 at .debug$S.19D
mywindow2Bug.asm : Error A2197: Unknown fixup type: 9 at .debug$S.1FE
mywindow2Bug.asm: 28 lines, 2 passes, 2 ms, 0 warnings, 2 errors


Starting pass 1
mywindow2Bug.obj : fatal error LNK1190: invalid fixup found, type 0x0001


QuoteI still have very little time for Uasm these days, but am trying to keep it from rotting.. If anyone has the time/will to contribute it would be hugely appreciated.
To contribute, we need to know exactly where to start, it would be nice to have a small tutorial, which describes how to transfer instructions into codegen v2.

Thank you John for your hard work! Thanks Nidud for the updated debug format CV8!

I don't think the purpose of option flat is understood here, it should only be used with .BIN output not OBJ. It does not write debug info or generate anything linkable. It's for use when you need to write out sections exactly as is in a way compatible with bootloaders etc. What were you expecting OPTION FLAT to do for you and maybe there are better options to set?

LiaoMi

Quote from: johnsa on March 05, 2021, 06:15:28 AM
Quote from: LiaoMi on March 04, 2021, 07:26:50 AM
Hi johnsa,

old bug still exists  :arrow_down:

OPTION FLAT:1

includelib c:\masm32\lib\msvcrt.lib
printf proto C :ptr, :vararg

.data
msg32 db "Hello from 32 bit!", 10,0

.code

mainCRTStartup proc C
push eax
push edx
push offset msg32
call printf
add esp, 12
ret
mainCRTStartup endp

end


UASM v2.51, Feb 27 2021, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

mywindow2Bug.asm : Error A2197: Unknown fixup type: 9 at .debug$S.19D
mywindow2Bug.asm : Error A2197: Unknown fixup type: 9 at .debug$S.1FE
mywindow2Bug.asm: 28 lines, 2 passes, 2 ms, 0 warnings, 2 errors


Starting pass 1
mywindow2Bug.obj : fatal error LNK1190: invalid fixup found, type 0x0001


QuoteI still have very little time for Uasm these days, but am trying to keep it from rotting.. If anyone has the time/will to contribute it would be hugely appreciated.
To contribute, we need to know exactly where to start, it would be nice to have a small tutorial, which describes how to transfer instructions into codegen v2.

Thank you John for your hard work! Thanks Nidud for the updated debug format CV8!

I don't think the purpose of option flat is understood here, it should only be used with .BIN output not OBJ. It does not write debug info or generate anything linkable. It's for use when you need to write out sections exactly as is in a way compatible with bootloaders etc. What were you expecting OPTION FLAT to do for you and maybe there are better options to set?

Thank you, everything is clear, it looks logical. The example is taken from here - http://masm32.com/board/index.php?topic=7900.msg86586#msg86586, the goal was to have debug symbols for mixed mode. But in mixed mode, even the debugger does not always work correctly.