News:

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

Main Menu

HJWasm Releases

Started by johnsa, January 16, 2016, 08:24:52 AM

Previous topic - Next topic

johnsa

Quote from: ToutEnMasm on January 28, 2016, 02:46:37 AM

64 bits version on http://www.terraspace.co.uk/hjwasm.html

Quote
----------------------------- option win64 : 11;4;7;3,7,11 ;<<<<<<<<<<< ligne 17, 11=B -----------------------
H:\sdkrc81\shared\sdk64.inc(17) : Error A2235: Constant value too large: Bh
H:\sdkrc81\shared\sdk64.inc(17): Included by

It's an old version,2.12

I've just double checked the package and it's definitely the latest 2.13.64bit ?

johnsa

Quote from: nidud on January 28, 2016, 02:59:03 AM
A simple makefile for building HJWASM using Open Watcom


SRC = \HJWASM\SRC
INC = $(SRC)\h
OW  = \WATCOM
CC  = $(OW)\binnt\wcc386 -q -bt=nt -bc -zc -I$(OW)\h;$(OW)\h\nt;$(INC) -3r -obmilrt -s -DNDEBUG

hjwasm.exe:
for %%q in ($(SRC)\*.c) do $(CC) %%q
$(OW)\binnt\wlink N $@ OP q, m System nt file { *.obj }
@del *.obj


This failed, but after a few changes to the source:

- Added proto for Tokenize() in hll.c
- Moved 'comprdsp' in codegen.c to top of function output_opc(C-style)
- Changed 'intptr_t' to 'long' in main.c
- Removed GetResWName() from parser.c(1644)

and lots of warnings from instruct.h:


\HJWASM\SRC\h\instruct.h(165): Warning! W106: Constant out of range - truncated
\HJWASM\SRC\h\instruct.h(187): Warning! W106: Constant out of range - truncated
\HJWASM\SRC\h\instruct.h(188): Warning! W106: Constant out of range - truncated
\HJWASM\SRC\h\instruct.h(745): Warning! W106: Constant out of range - truncated
\HJWASM\SRC\h\instruct.h(745): Warning! W106: Constant out of range - truncated
\HJWASM\SRC\h\instruct.h(745): Warning! W106: Constant out of range - truncated
\HJWASM\SRC\h\instruct.h(745): Warning! W106: Constant out of range - truncated
...


I manage to build a 32-version:

HJWasm v2.13.32bit., Jan 27 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.


I fixed math problem and did a speed test:

m32lib:

ClockTicks: 4188 ASMC 2.17
ClockTicks: 4265 ASMC 2.16
ClockTicks: 5547 HJWASM 2.13
ClockTicks: 5563 JWASM 2.12
ClockTicks: 16016 ML-6
ClockTicks: 18265 ML-9


math:

ClockTicks: 6484 ASMC 2.17
ClockTicks: 6813 ASMC 2.16
ClockTicks: 8688 HJWASM 2.13
ClockTicks: 8844 JWASM 2.12
ClockTicks: 10812 ML-9


I then added __JWASM__ to symbols.c

/* table of predefined numeric equates */
static const struct eqitem eqtab[] = {
    { "__HJWASM__", _HJWASM_VERSION_INT_, NULL, NULL },
    { "__JWASM__", 212, NULL, NULL },


and run the regression test: There are now 33 errors.

AVX1 BIN
AVX4 BIN
AVX641 BIN
EXPANS37 BIN
EXPANS40 BIN
INOUT BIN
INVOK644 BIN
INVOK646 BIN
INVOK649 BIN
INVOK64A BIN
MEMANY BIN
MOVDQ16 BIN
MOVDQ32 BIN
MOVDQ64 BIN
RTCOND3 BIN
STRING2 BIN
STRING3 BIN
STRING64 BIN
VARAR642 BIN
VARARG64 BIN
ALIGN3   err
ASMC104  err
AVX2     err
AVX3     err
CALL3    err
DATA7    err
INDIR1   err
MOV645   err
MOVSP16  err
MOVSPEC  err
MOVSPEC2 err
PROC641  err
SHLD err
STRUCT29 err
STRUCT37 err
STRUCT41 err
DBGCV obj
STRUCT29 obj


Would you be able to get an x64 build going as well?
I think from the list of changes you've made they seem fairly innocuous, so we should be able to apply them to the code-base in general (applicable to all build targets) ?

johnsa


main.c    //fixed by ToutEnMasm intptr_t instead of long
It appears this was already changed from long to intptr_t ?

It seems to me that GetResWName is still valid in this block and shouldn't be removed? (parser.c 1644)


     if ( (GetRegNo( index ) == 4) && (GetResWName( index, NULL ) <= T_RBP )) { /* [E|R]SP? */


The other three changes I've committed to the source as they're harmless:
Added proto for Tokenize() in hll.c (included tokenize.h in hll.c)
Moved 'comprdsp' in codegen.c to top of function output_opc(C-style)
Added  { "__JWASM__", 212, NULL, NULL },


GoneFishing

#108
@JOHNSA:
Great ! Thank you

That's strange ".32bit" part when executable is x64:
Quote./hjwasm: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=be0168512cdb2cd5bd43581e4db931d6f43547a6, stripped

Logo:
QuoteHJWasm v2.13.32bit., Jan 27 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

usage: HJWasm [ options ] filelist [@env_var]
Run "HJWasm -?" or "HJWasm -h" for more info

x64 Linux binary (GCC 4.8.4) atached
Today I'll try Open Watcom and TCC builds on Linux .
I'm ready to help you with Linux  / Linux binaries as much as I can

@NIDUD
   Thank you for guidelines 

[EDIT]: attachment was removed

TouEnMasm

The source code in GitHub compiled perfect with VC2015 in 64 bits.
I get just warnings.
But defaut with frame is the same

1>bin.c(229): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>expreval.c(2424): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>expreval.c(2430): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>parser.c(1644): warning C4047: '<=' : les niveaux d'indirection de 'char *' et de 'int' sont différents
1>proc.c(2570): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>proc.c(2716): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>types.c(442): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>types.c(694): warning C4146: opérateur moins unaire appliqué à un type non signé, le résultat sera non signé
1>  Génération de code en cours...
1>  HJWasm.vcxproj -> H:\HJWasm-master\Win32\Release\HJWasm.exe
========== Génération : 1 a réussi, 0 a échoué, 0 mis à jour, 0 a été ignoré ==========
Fa is a musical note to play with CL

johnsa

Quote from: GoneFishing on January 28, 2016, 03:48:59 AM
@JOHNSA:
Great ! Thank you

That's strange ".32bit" part when executable is x64:
Quote./hjwasm: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=be0168512cdb2cd5bd43581e4db931d6f43547a6, stripped

Logo:
QuoteHJWasm v2.13.32bit., Jan 27 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

usage: HJWasm [ options ] filelist [@env_var]
Run "HJWasm -?" or "HJWasm -h" for more info

x64 Linux binary (GCC 4.8.4) atached
Today I'll try Open Watcom and TCC builds on Linux .
I'm ready to help you with Linux  / Linux binaries as much as I can

@NIDUD
   Thank you for guidelines

I guess for a LINUX build it makes sense due to code in globals.h :)


/* HJWasm version info */
#ifdef _WIN64
#define _HJWASM_VERSION_STR_ "2.13.64bit."
#else
#define _HJWASM_VERSION_STR_ "2.13.32bit."
#endif


Clearly _WIN64 isn't defined, I've tried using __LP32__ and __x86_64__  neither of which work for me under Windows, any suggestions?

johnsa

I guess you could just define _WIN64 for the Linux X64 build from the make file?

GoneFishing

Now it really makes sense, thanks
I'll be quiet for the rest of the day or evening (as it's here)
Don't work too hard :-)

fearless

When i was playing round with Jwasm 64 and radasm i used the /D switch to define the _WIN64 like so:

3,O,$B\JWASM64.EXE /c -win64 -Zp8 /Zi /win64 /D_WIN64 /Cp /nologo /W2 /Zi /Zd /nologo /I"$I",2

nidud

#114
deleted

TouEnMasm

There is to jwasm in the http://www.terraspace.co.uk/hjwasm.html
corrected but
Quote
JWASM  listview.asm
H:\tut64_partiel\tute31
HJWasm v2.13.64bit., Jan 27 2016, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

listview.asm(64) : Error A2224: Not supported with current output format: frame
listview.asm(65) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(66) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(67) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(102) : Error A2142: Unmatched block nesting: WinMain
listview.asm(104) : Error A2224: Not supported with current output format: frame
listview.asm(105) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(121) : Error A2142: Unmatched block nesting: InsertColumn
listview.asm(123) : Error A2224: Not supported with current output format: frame
listview.asm(124) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(125) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(175) : Error A2142: Unmatched block nesting: ShowFileInfo
listview.asm(177) : Error A2224: Not supported with current output format: frame
listview.asm(178) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(179) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(188) : Error A2159: INVOKE requires prototype for procedure
listview.asm(196) : Error A2142: Unmatched block nesting: FillFileInfo
listview.asm(198) : Error A2224: Not supported with current output format: frame
listview.asm(199) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(225) : Error A2142: Unmatched block nesting: String2Dword
listview.asm(227) : Error A2224: Not supported with current output format: frame
listview.asm(228) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(229) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(230) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(240) : Error A2159: INVOKE requires prototype for procedure
listview.asm(245) : Error A2159: INVOKE requires prototype for procedure
listview.asm(251) : Error A2159: INVOKE requires prototype for procedure
listview.asm(254) : Error A2159: INVOKE requires prototype for procedure
listview.asm(270) : Error A2142: Unmatched block nesting: CompareFunc
listview.asm(272) : Error A2224: Not supported with current output format: frame
listview.asm(273) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(289) : Error A2142: Unmatched block nesting: UpdatelParam
listview.asm(291) : Error A2224: Not supported with current output format: frame
listview.asm(292) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(293) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(305) : Error A2142: Unmatched block nesting: ShowCurrentFocus
listview.asm(309) : Error A2224: Not supported with current output format: frame
listview.asm(310) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(311) : Error A2092: PROC, MACRO or macro loop directive must precede LOCAL
listview.asm(321) : Error A2159: INVOKE requires prototype for procedure
listview.asm(322) : Error A2159: INVOKE requires prototype for procedure
listview.asm(364) : Error A2159: INVOKE requires prototype for procedure
listview.asm(368) : Error A2159: INVOKE requires prototype for procedure
listview.asm(374) : Error A2159: INVOKE requires prototype for procedure
listview.asm(378) : Error A2159: INVOKE requires prototype for procedure
listview.asm(383) : Error A2159: INVOKE requires prototype for procedure
listview.asm(397) : Error A2142: Unmatched block nesting: WndProc
listview.asm(411) : Error A2159: INVOKE requires prototype for procedure
listview.asm: 414 lines, 1 passes, 431 ms, 0 warnings, 48 errors


????????????????????????????????????????????????


Fa is a musical note to play with CL

fearless

@ToutEnMasm, what happens if you specify some flags when compiling?, like so:
JWASM /c -win64 -Zp8 /Zi /win64 /D_WIN64 /Cp /W2 /Zi /Zd listview.asm

nidud

#117
deleted

johnsa

Hi,

Good spotting, didn't see that.

I've updated hll.c to just a prototype without the include and made the other changes in main.c and parser.c
It's all building and testing out fine my side.

Updated source is in the Github repo.

Hopefully we can get some Nix builds! :)

johnsa

ToutEnMasm, could you post your test source and command line?
So we can narrow down the issue to either a switch or possibly usage of .option etc ?

Thanks!