News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

JWASM is updated.

Started by Ficy, June 25, 2012, 02:14:38 AM

Previous topic - Next topic

jj2007

No progress...

Quoteinclude \masm32\include\masm32rt.inc

chr$ MACRO TheArgs:VARARG
LOCAL NewString, arg, TheString
   arg equ <TheArgs>
   TheString CATSTR arg
  .DATA
   NewString db TheString, 0
  .CODE
   EXITM <OFFSET NewString>
ENDM

right MACRO
   EXITM <wrong()>
ENDM

.code
start:
   inkey chr$("right()")        ; ML output: right(), Jwasm output: wrong()
   exit

end start

TouEnMasm

#16
Hello,
I have made a test with my own headers.

Quote
   .486
   .model flat,stdcall
   option casemap:none   ; case sensitive
   include translate.inc
   include windows.sdk
   includelib kernel32.lib
        ;.data       -------> not accepted
   DATA SEGMENT    ;------> accepted
   
   titre db "Adresse Email trouvĂ©",0

   .code

   start:
   invoke ExitProcess,0
There is more defines in the windows.sdk than in the windows.inc.
The replacement of ".data" by "DATA SEGMENT" allow a correct compilation.
Quote
JWasm v2.08rc3, Aug  9 2012, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License


Fa is a musical note to play with CL

jj2007

By the way, the bug mentioned above has been fixed some time ago. Thanks Japheth :t

TouEnMasm


Some times ago ?
My post is on the
Quote
JWasm v2.08rc3, Aug  9 2012, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License
Not so old
Fa is a musical note to play with CL

jj2007

I meant "my" bug, Yves. Yours seems to be related to Windows.sdk - where did you get that file? Which error messages do you get?

TouEnMasm


To JJ2007,
That file is part of the "ready to use sdk",here:
http://luce.yves.pagesperso-orange.fr/header.htm
clic on the SDK link
More details on the subject:
Quote
JWasm v2.08rc3, Aug  9 2012, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

test_jwasm.asm(11) : Error A2069: Segment, group or segment register expected
Need to modify ".data" by "DATA SEGMENT" and all is ok in this code
Quote
   .486
   .model flat,stdcall
   option casemap:none   ; case sensitive
   include translate.inc
   include windows.sdk
   includelib kernel32.lib
        .data       ;-------> not accepted
   ;DATA SEGMENT    ;------> accepted
   
   titre db "Adresse Email trouvĂ©",0

   .code

   start:
   invoke ExitProcess,0
;-----------------------------------------------------------------------------------


;################################################################   
end start      
The build environment is this one:
Quote
   @echo off
   CLS
   call C:\PROGRA~1\MICROS~1.0\Common7\Tools\vsvars32.bat
   SET INCLUDE=\SDKRC7
   SET PATH=%PATH%;E:\jwasm
   
   SET FILE=test_jwasm
   : -------------------------------
   : if resources exist, build them
   : -------------------------------
   
   if exist %1.obj del %FILE%.obj
   if exist %1.exe del %FILE%.exe
   
   : -----------------------------------------
   : assemble Appender.asm into an OBJ file
   : -----------------------------------------
   jwasm -coff %FILE%.asm > jwasm.txt
   if errorlevel 1 goto errasm
   if not exist rsrc.rc goto nores
   Rc.exe /v rsrc.rc
   Cvtres.exe /machine:ix86 rsrc.res
   
   if not exist rsrc.obj goto nores
   ECHO ----------------------------           
   ECHO ******* avec RESSOURCE ******
   ECHO -----------------------------                 
   : --------------------------------------------------
   : link the main OBJ file with the resource OBJ file
   : --------------------------------------------------
   Link  /SUBSYSTEM:WINDOWS %FILE%.obj rsrc.obj
   if errorlevel 1 goto errlink
   GOTO FINLINK
   
   :nores
   ECHO ---------------------------                   
   ECHO ***** SANS ressource ******
   ECHO ------------------------------                   
   Link.exe /SUBSYSTEM:WINDOWS %FILE%.obj
   
   :FINLINK
   
   dir %FILE%.*
   
   goto TheEnd
   
   :errlink
   : ----------------------------------------------------
   : display message if there is an error during linking
   : ----------------------------------------------------
   echo.
   echo There has been an error while linking this project.
   echo.
   goto TheEnd
   
   :errasm
   : -----------------------------------------------------
   : display message if there is an error during assembly
   : -----------------------------------------------------
   echo.
   echo There has been an error while assembling this project.
   echo.
   goto TheEnd
   
   :TheEnd
   pause
I use only the sdk,ddk and vc++ lib.
It's for that i calles the vsvars32.bat
I hope it's more clear now ?



Fa is a musical note to play with CL

jj2007

Quote from: ToutEnMasm on August 11, 2012, 04:29:11 PM

To JJ2007,
That file is part of the "ready to use sdk",here:
http://luce.yves.pagesperso-orange.fr/header.htm
clic on the SDK link

No download link there, Yves. However, since all my sources (even the huge and complex ones) assemble just fine with JWasm, Masm 6.5, 8.0, 9.0 and 10.0, I am inclined to believe that the problem is somewhere in Windows.sdk

TouEnMasm


Quote
No download link there ???????????
the "SDK" underligned letters in BLUE must be clic that all.
The sample is perfectly compiled by ml (any versions).
The problem isn't in "Windows.sdk".
I will not have posted it,in this case.



Fa is a musical note to play with CL

jj2007

Quote from: ToutEnMasm on August 11, 2012, 09:42:16 PM
Quote
No download link there ???????????
the "SDK" underligned letters in BLUE must be clic that all.

"SDK" underligned letters in BLUE point to http://luce.yves.pagesperso-orange.fr/header.htm#Nouveaut%C3%A9 - and that is clearly not windows.sdk., Yves :(

However, by scrolling one line up, the link becomes visible. Wow, 2339 files in the *.cab :dazzled:
My advice: forget JWasm, stick to Masm :biggrin:

TouEnMasm


If you are afraid with the 1348 files of the SDK and the masm32 samples files:
USE SCRIPT  :biggrin:
Fa is a musical note to play with CL

japheth

Quotetest_jwasm.asm(11) : Error A2069: Segment, group or segment register expected

this error message gives a good hint. jwasm translates .DATA to


          _DATA segment
          assume cs:ERROR


and error A2069 can only occur with the ASSUME. Hence the reason why jwasm doesn't like your code is: there's somewhere in your SDK a text macro ERROR defined.

Workaround: define ERROR as a number, not as text. Then it's not processed by the preprocessor.

TouEnMasm


Thanks to japheth for answer.
I have found two defines for ERROR in the SDK
Quote
adoint.sdk
1062   : Error MACRO  Function:REQ, args:VARARG
This one is an interface,renamed in Ierror
Wingdi.sdk and .h        ERROR equ <0>
I have just put this one in comment
ALL is good now


Fa is a musical note to play with CL

TouEnMasm


This source file (compiled ok with ml) is richedit using OLE (photos)
I get this error
Quote
JWasm v2.08rc3, Aug  9 2012, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

invoke CoInitializeEx ,NULL, COINIT_APARTMENTTHREADED
include shlobj.sdk
richedit.asm(73) : Error A2080: Block nesting error: _TEXT
richedit.asm: 73 lines, 1 passes, 484 ms, 0 warnings, 1 errors
Fa is a musical note to play with CL

jj2007

Quote from: ToutEnMasm on August 12, 2012, 12:44:23 AM
I have just put this one in comment
ALL is good now

No need to comment it out - to solve your namespace pollution problem, you can just call it erreur MACRO  :biggrin:

japheth

Quoteinvoke CoInitializeEx ,NULL, COINIT_APARTMENTTHREADED
include shlobj.sdk
richedit.asm(73) : Error A2080: Block nesting error: _TEXT

Ok, I downloaded your sdk and this sample.

"ready to use sdk" is perhaps a little bit euphemistic, but with some experience in this matter it's no problem at all to make it work.

The "block nesting error" is a bit misleading, because it claims _TEXT to be the segment causing trouble. In fact, it's a few  "DATA SEGMENT" directives that still occur in the source files that cause this error. It's an error, because the segment is opened but never "closed" ( with a DATA ENDS directive ).

Just replace the "DATA SEGMENT" with ".data" and it should work.

Btw., the "ERROR macro" is no problem, because a macro procedure is expanded only if it occurs at position 0 or 2 (after a label, followed by a ':' ).