Author Topic: Having a look to asmc  (Read 397 times)

Vortex

  • Member
  • *****
  • Posts: 1850
Re: Having a look to asmc
« Reply #15 on: September 17, 2018, 04:27:06 AM »
Hi nidud,

I downloaded the latest asmc release. I get the following error messages using your batch file above :

Code: [Select]
\asmc-master\bin\asmc64 -I\asmc-master\include test.asm
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm

\asmc-master\bin\linkw sys con_64 file test
LINKW Version 2.0
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
Warning! W1107: undefined system name: con_64
loading object files
searching libraries
Warning! W1008: cannot open directxmath.lib : No such file or directory
Error! E2028: printf is an undefined reference
Error! E2028: XMConvertVectorFloatToInt@@24 is an undefined reference
Warning! W1023: no starting address found, using 00401000
creating a 64-bit PE executable
file test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24
file test.obj(test.asm): undefined symbol printf

nidud

  • Member
  • *****
  • Posts: 1614
    • https://github.com/nidud/asmc
Re: Having a look to asmc
« Reply #16 on: September 17, 2018, 06:32:11 AM »
I downloaded and tested the batch file and it seems to work just fine. From the output the linkw.lnk file appear to be missing.

Vortex

  • Member
  • *****
  • Posts: 1850
Re: Having a look to asmc
« Reply #17 on: September 17, 2018, 06:49:18 AM »
Hi nidud,

I have the file \asmc-master\bin\linkw.lnk but still I get the error messages.

The batch file :

Code: [Select]
SET ASMCDIR=\asmc-master

\asmc-master\bin\asmc64 -I\asmc-master\include test.asm
\asmc-master\bin\linkw sys con_64 file test

nidud

  • Member
  • *****
  • Posts: 1614
    • https://github.com/nidud/asmc
Re: Having a look to asmc
« Reply #18 on: September 17, 2018, 07:14:01 AM »
I tried using CMD instead of DZ and ended up with the same result. It appears the linkw.lnk file needs to be in the %PATH% for LINKW to find it. The following batch worked:
Code: [Select]
SET PATH=D:\asmc-master\bin
SET ASMCDIR=\asmc-master

asmc64 -I\asmc-master\include test.asm
linkw sys con_64 file test

nidud

  • Member
  • *****
  • Posts: 1614
    • https://github.com/nidud/asmc
Re: Having a look to asmc
« Reply #19 on: September 17, 2018, 09:25:30 AM »
I upgraded LINKW to v2.01 by adding a search for linkw.lnk in the directory where LINKW is located if SearchPath() failes.

Vortex

  • Member
  • *****
  • Posts: 1850
Re: Having a look to asmc
« Reply #20 on: September 18, 2018, 03:23:29 AM »
Hi nidud,

Thanks for the update. Here is my report. I received the similar error messages both with the batch file and the makefile executed by DosZip :

Code: [Select]
D:\asmc-master\test>path
PATH=C:\Program Files (x86)\Sent;C:\app\Administrator\product\11.2.0\client_1;C:
\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Window
sPowerShell\v1.0\

D:\asmc-master\test>Build.bat

D:\asmc-master\test>SET PATH=\asmc-master\bin

D:\asmc-master\test>SET ASMCDIR=\asmc-master

D:\asmc-master\test>asmc64 -I\asmc-master\include test.asm
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm

D:\asmc-master\test>linkw sys con_64 file test
Warning! W1008: cannot open directxmath.lib : No such file or directory
Warning! W1008: cannot open uuid.lib : No such file or directory
Error! E2028: XMConvertVectorFloatToInt@@24 is an undefined reference
file test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24

D:\asmc-master\test>path
PATH=\asmc-master\bin

Checking the environment variable PATH, I see that it's modified to reflect only the path of asmc. I should be like the following
PATH = %PATH%;\asmc-master\bin

DosZip :

Code: [Select]
Asmc Make Version 1.6 Copyright (c) 2017 GNU General Public License

test.exe:
        asmc64 test.asm
        linkw sys con_64 file test
        test.exe
        pause
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm
Warning! W1008: cannot open directxmath.lib : No such file or directory
Warning! W1008: cannot open uuid.lib : No such file or directory
Error! E2028: XMConvertVectorFloatToInt@@24 is an undefined reference
file test.obj(test.asm): undefined symbol XMConvertVectorFloatToInt@@24

OS : Windows 7 Sp1 64-bit Professional with the latest updates
Path of asmc : D:\asmc-master
Location of the test project : D:\asmc-master\test

nidud

  • Member
  • *****
  • Posts: 1614
    • https://github.com/nidud/asmc
Re: Having a look to asmc
« Reply #21 on: September 18, 2018, 04:17:12 AM »
Well, the import + libc libraries appear to exist (no missing printf) but directxmath.lib and uuid.lib is missing. Try building the missing libraries and remove the includelib stuff from the source. The include files take care of all that.

To build the missing libraries using DZ, go to ./source/directx and hit enter on the makefile. Same with uuid. This should probably be added to the install.bat file thought.

Vortex

  • Member
  • *****
  • Posts: 1850
Re: Having a look to asmc
« Reply #22 on: September 18, 2018, 04:29:43 AM »
Hello nidud,

Thanks, building the missing libraries solved the problem.

This should probably be added to the install.bat file thought.

Exactly.

Here is my report :
Code: [Select]
C:\asmc-master\test>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\obw\Mingw32\bin;
C:\Program Files\OpenVPN\bin;

C:\asmc-master\test>Build.bat

C:\asmc-master\test>SET PATH=\asmc-master\bin

C:\asmc-master\test>SET ASMCDIR=\asmc-master

C:\asmc-master\test>asmc64 -I\asmc-master\include test.asm
Asmc Macro Assembler (x64) Version 2.28.08
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: test.asm

C:\asmc-master\test>linkw sys con_64 file test

C:\asmc-master\test>path
PATH=\asmc-master\bin

C:\asmc-master\test>notepad
'notepad' is not recognized as an internal or external command,
operable program or batch file.

There is only one problem, the environment variable %PATH% should preserve the original value followed by the path to asmc.

Code: [Select]
PATH = %PATH%;\asmc-master\bin
As you can see in my report, I cannot execute notepad or other tools since %PATH% points only the asmc installation.

nidud, thanks for the update. Keep up the nice work :t

nidud

  • Member
  • *****
  • Posts: 1614
    • https://github.com/nidud/asmc
Re: Having a look to asmc
« Reply #23 on: September 18, 2018, 07:13:06 AM »
Some more updates.

I added the two directories to install.bat.

The latest version of LINKW do not need the PATH statement in the batch file so only the root directory (ASMCDIR) needs to be set (or remove it by edit the linkw.lnk file).

However, the shell (DZ) holds the environment for the current source so it's recommended to use this instead of CMD. Note also that the environment is local (mistake I did when testing) to the source tree. If you copy one instance of DZ.EXE to \masm32\bin and execute it, use Ctrl-K, Ctrl-X, and Ctrl-O to emulate CMD, and issue the following commands:

D:\masm32\bin>PATH
PATH=D:\masm32\bin;C:\Windows;...

D:\masm32\bin>echo %INCLUDE%
D:\masm32\include

D:\masm32\bin>echo %ASMCDIR%
D:\masm32


So it adapts to the directory where it is located. The default setting is as follows (dz.ini):

[Environ]
0=INCLUDE=%ASMCDIR%\include

[Path]
0=%DZ%
1=%PATH%


Vortex

  • Member
  • *****
  • Posts: 1850
Re: Having a look to asmc
« Reply #24 on: September 19, 2018, 06:22:33 AM »
Hi nidud,

Very nice work :t Thanks.