News:

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

Main Menu

cant I just replace ml with uasm?

Started by daydreamer, February 06, 2020, 08:00:25 PM

Previous topic - Next topic

daydreamer

isnt it possible to just replace ml with uasm?
I took a look at uasm and its packed with features and latest opcodes
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

johnsa

By and large yes..

There are a few caveats here and there, but you should expect 99% compatibility between the two.

daydreamer

it works beside link error,cant find
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
project2020.exe : fatal error LNK1120: 1 unresolved externals
_
tried polink too, it reports error '.obj' file not found

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

LiaoMi

Quote from: johnsa on February 06, 2020, 08:26:57 PM
By and large yes..

There are a few caveats here and there, but you should expect 99% compatibility between the two.

Hi johnsa,

there was a major update on github, should we test the last master ?!

jj2007

I build everything with UAsm by default, and occasionally check if it's still working with MASM and AsmC.  Beware of recent MASM versions, they tend to be buggy and crippled.

daydreamer

Quote from: jj2007 on February 06, 2020, 10:43:53 PM
I build everything with UAsm by default, and occasionally check if it's still working with MASM and AsmC.  Beware of recent MASM versions, they tend to be buggy and crippled.
thats why I go latest uasm,instead of latest masm probably break code,lacking some macros
also likes lots of SSE/avx macros and other things too
also want access to latest SIMD to try to make a faster version of simple scalar version

maybe I should start with a main uasm .asm windows program instead and include my several .inc files into that instead?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

LiaoMi

Quote from: daydreamer on February 06, 2020, 09:10:59 PM
it works beside link error,cant find
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
project2020.exe : fatal error LNK1120: 1 unresolved externals
_
tried polink too, it reports error '.obj' file not found

Hi daydreamer,

you use /SUBSYSTEM:WINDOWS, how is your main procedure and entry point defined?

daydreamer

Quote from: LiaoMi on February 06, 2020, 11:53:26 PM
Quote from: daydreamer on February 06, 2020, 09:10:59 PM
it works beside link error,cant find
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
project2020.exe : fatal error LNK1120: 1 unresolved externals
_
tried polink too, it reports error '.obj' file not found

Hi daydreamer,

you use /SUBSYSTEM:WINDOWS, how is your main procedure and entry point defined?
its a masm32 program that worked before,newbie when it comes to uasm,maybe its just "main proc" thats the problem?
or incompatible linker?
start:
after that
call Main
invoke exitprocess,eax

Proc main calls some initializing and calls getmessage/translatemessage/dispatchmessage
end start
lack some Cruntime?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

LiaoMi

Quote from: daydreamer on February 07, 2020, 03:56:48 AM
Quote from: LiaoMi on February 06, 2020, 11:53:26 PM
Quote from: daydreamer on February 06, 2020, 09:10:59 PM
it works beside link error,cant find
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
project2020.exe : fatal error LNK1120: 1 unresolved externals
_
tried polink too, it reports error '.obj' file not found

Hi daydreamer,

you use /SUBSYSTEM:WINDOWS, how is your main procedure and entry point defined?
its a masm32 program that worked before,newbie when it comes to uasm,maybe its just "main proc" thats the problem?
or incompatible linker?
start:
after that
call Main
invoke exitprocess,eax

Proc main calls some initializing and calls getmessage/translatemessage/dispatchmessage
end start
lack some Cruntime?

link /entry:start  :rolleyes: should work

Vortex

Hi daydreamer,

Could you post the source code?

morgot

for masm I use .bat files as example
Build gui win32
SET PATH=C:\Masm32\bin

cd $(CURRENT_DIRECTORY)
$(PATH)\ML /nologo -c -coff "$(FULL_CURRENT_PATH)"

$(PATH)\LINK /nologo "$(CURRENT_DIRECTORY)\$(NAME_PART).obj" /SUBSYSTEM:WINDOWS
cmd /c del "$(CURRENT_DIRECTORY)\$(NAME_PART).obj"


and run it from notepad++

Can anybody write such to Uasm?  Just to open in notepad and compile.
Sorry for the bad English

daydreamer

Quote from: Vortex on February 07, 2020, 04:37:18 AM
Hi daydreamer,

Could you post the source code?
I have researched uasm example win32 program uses protos for wndproc and winmain,its old masm32 program,which I run .inc files from
I rather want to start with a fresh uasm win32 main program to include them into,than wrestle differences between masm32 includes,libs and ways vs uasm style

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

jj2007

Magnus,

There are no significant differences between UAsm and MASM that would require other includes or libraries. They are fully compatible (with rare glitches, mostly because of old MASM bugs).

If you want to test it, just rename ML.EXE to CrappyOldMasm.exe, and UAsm.exe to ML.exe. Then use your IDE or whatever as if nothing happened, and tell us here about the results of your endeavour. Including your source code, of course.

daydreamer

Quote from: jj2007 on February 07, 2020, 05:34:18 AM
Magnus,

There are no significant differences between UAsm and MASM that would require other includes or libraries. They are fully compatible (with rare glitches, mostly because of old MASM bugs).

If you want to test it, just rename ML.EXE to CrappyOldMasm.exe, and UAsm.exe to ML.exe. Then use your IDE or whatever as if nothing happened, and tell us here about the results of your endeavour. Including your source code, of course.

I have found the problem in one of the include files I included,that was originally a program,so I had to remove "end" in this file,this was included before main proc,so now it works,thanks
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

daydreamer

got trouble with load or use memory variables when using movapd and when using addpd
movapd xmm0,comp1
addpd xmm3,compa

variables look like this
.data
align 16
compa real8 1.0,1.0,1.0,1.0
comp1 real8 2.0,3.0,4.0,5.0

I have read pdf file,so it seems I need to get habit to use macros for loading xmm registers instead and maybe need to use 128bit types instead

funny it works with movaps instead
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding