The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ic2 on August 05, 2006, 12:39:59 AM

Title: ml.exe & msLINK to POASM and POLINK
Post by: ic2 on August 05, 2006, 12:39:59 AM
Hi everybody

Im converting my masm32 program to PellesC, using  POASM and POLINK to continue my project.  Could someone help me get pass the first two POASM: warning below. 

Up until now, under masm32, everything always has complied a perfect running 100% asm executable.


Microsoft (R) Windows Resource To Object Converter Version 5.00.1736.1
Copyright (C) Microsoft Corp. 1992-1997. All rights reserved.

POASM: warning: Unrecognized option 'c'.
POASM: warning: Unrecognized option 'coff'.

************* more stuff here is error: Redefinition of symbol ... through-out my masm32 (p32) program ... for example:

C:\Project1\P32\Equates.asm(279): error: Redefinition of symbol 'POINT'.

I have to make these corrections as i go.  There are too many to list.   I'm sure I got this much under control but the list of errors below I wonder if they has something to do with POASM window.inc  ... I do have hutch new wininc file and it already solved a few problems if not all ... *****************

C:\Project1\p32\GetAPI.asm(2): error: Invalid use of 'ASSUME'.
C:\Project1\p32\GetAPI.asm(2): error: Invalid use of 'fs'.
C:\Project1\Main.asm(1846): error: Invalid use of '['.
C:\Project1\Main.asm(1908): error: Invalid use of '['.
C:\Project1\Main.asm(5630): error: Invalid use of '{unrecognized token}'.
C:\Project1\Main.asm(5630): error: Invalid use of '{unrecognized token}'.

Thanks in advance

ic2
Title: Re: ml.exe & msLINK to POASM and POLINK
Post by: hutch-- on August 05, 2006, 01:47:59 AM
I can help you with a bit of it. you don't use the "/c" and "/coff" with POASM.


drv:\path\poasm "%1.asm"


With the Windows.inc file, get the latest one posted which is version 1.33 as it has had a number of duplicated removed and about all it squarks on is a structure that POASM does not handle because of the internal ALIGN directive used in MASM.

Get the version posted at URL http://www.masm32.com/board/index.php?topic=5215.15   winc133.zip
Title: Re: ml.exe & msLINK to POASM and POLINK
Post by: ic2 on August 05, 2006, 05:58:56 AM
I changed \masm32\bin\ml /c /coff "%1.asm" to ----
\masm32\bin\POASM drv:\path\poasm "%1.asm"
now i got rid of the two POASM warning listed in the post above... Thank hutch--

I think a little something in these two files may be mix-up .  If im wrong i sure would like to know...

This is what i got with winc133 which is the same that i got before changing windows.inc while trying to use PellesC files

\MASM32\INCLUDE\windows.inc(18328): error: Invalid use of 'align'.
\MASM32\INCLUDE\windows.inc(18328): error: Invalid use of 'dword'.
\MASM32\INCLUDE\windows.inc(29725): error: Redefinition of symbol 'GUID'.


When I got your wininc.zip yesterday it did the trick getting rid of those
three errors and that one worked for sure for whatever reason.  That's why
it was not in the errors listed in my post above.

Most or all of those other errors i sure is the result of my own sloppy coding
and I may have redefined them myself.

My goal back when I was learning and building this project with masm32 (2001 -2002) was not to use macros, libraries, etc and tried to place only parts I was using from the window.inc directly in my Main.asm file but never could eliminate window.inc because i got stuck somewhere trying to eliminate it.  This was my way of seeing where everything was coming from.

I ended up still having to include the file for only a line or two that i never could figure out how to get it out of there.  I think it had something to do with an equate and struct problem with-in one of the older (2001) window.inc file.  I can't remember so i gave up and masm always complied my file anyway. It really does ignore some of our mistakes and that's the reason,  including the unfair, stupit licensing of MS, I'm going  Pelles POASM...

Above all I want to do everything right just for my own piece of mind and I see many here has faith in POASM and what is said and investigated here goes with me until proven difference.

If i got to start from scratch I will.  Maybe now i can finally pin-point  everything once and for all with-in my personal project and learn to code
properly.  It's true, a hard head makes a soft a__ .  I'm back on it after nearly a three year break of doing nothing.

All this to say, i think i screwed up somewhere not just win.inc if any.

Will be back shortly...

Thanks you very very much hutch– and all the good asm people
Title: Re: ml.exe & msLINK to POASM and POLINK
Post by: hutch-- on August 05, 2006, 08:07:04 AM
The two errors in the structure come from POASM handling the structure differently, for POASM you have to modify the structure by removing the ALIGN DWORD and padding the effected members with dummy data so the alignment is correct.

Simply comment out the GUID on line 29725 and the include file should work fine.
Title: Re: ml.exe & msLINK to POASM and POLINK
Post by: ic2 on August 06, 2006, 08:41:15 PM
This code work for MASM but not POASM.  How would line 3 be written so that both assemblers will comply it.


    mov ecx, offset z_BUFFER
    lea edx,[ecx-1]
    lea ecx,[eax][ecx-1]  -------- Error: Invalid use of '['
    mov edi, offset z_BUFFER_128
   
Thanks in advance

Btw, most of those other redefined errors listed was bad coding on my part.  When i continue using window.inc i did not clean my files of duplicates and masm did not give warning but it did comply as usual