The MASM Forum

Projects => Rarely Used Projects => Archival JWASM postings => Topic started by: XVilka on November 06, 2015, 12:58:40 AM

Title: JWasm continuation (our try) on GitHub
Post by: XVilka on November 06, 2015, 12:58:40 AM
Good day, ladies and gentlemen!
I see that there is already a continuation of JWasm development.
But we've started already our own fork too.
We've put it on GitHub - https://github.com/JWasm/JWasm (https://github.com/JWasm/JWasm)
We've split the autotests - https://github.com/JWasm/JWasm-regressions (https://github.com/JWasm/JWasm-regressions)

Also we've added the Travis-CI job for gcc, clang and clang for OS X - https://travis-ci.org/JWasm/JWasm (https://travis-ci.org/JWasm/JWasm)
And added the Coverity periodic scan - https://scan.coverity.com/projects/jwasm?tab=overview (https://scan.coverity.com/projects/jwasm?tab=overview)

We're going to setup also the AppVeyor job.
We're going to copy the issues/bugs from the sourceforge project.

Site is http://jwasm.info (site sources are in the https://github.com/JWasm/jwasm.github.io repository (https://github.com/JWasm/jwasm.github.io%20repository))

So, what about merging the development? We can add the access for people who is active in your continuation of the JWasm.
Title: Re: JWasm continuation (our try) on GitHub
Post by: GoneFishing on November 06, 2015, 01:11:52 AM
Hi and Welcome , XVilka !
Nice to hear that JWASM is being under active development in your country  ;)
Here  (https://www.linux.org.ru/forum/development/11811051?cid=11811151) you (I mean you and i82 ) said that you have new "fixed" version of JWLINK .
Do you want to share it with us?
Title: Re: JWasm continuation (our try) on GitHub
Post by: anta40 on November 06, 2015, 01:46:20 AM
Quote from: XVilka on November 06, 2015, 12:58:40 AM
So, what about merging the development? We can add the access for people who is active in your continuation of the JWasm.

habran, maybe?
he's done some work on improving jwasm  :t
Title: Re: JWasm continuation (our try) on GitHub
Post by: jj2007 on November 06, 2015, 02:15:08 AM
Welcome , XVilka :t
You'll have a fan club here - and some competition ;-)
Title: Re: JWasm continuation (our try) on GitHub
Post by: GoneFishing on November 06, 2015, 02:43:36 AM
another JWASM fork on GitHub: https://github.com/tonylazarew/jwasm (https://github.com/tonylazarew/jwasm)
Title: Re: JWasm continuation (our try) on GitHub
Post by: XVilka on November 06, 2015, 03:17:47 AM
Yep, we knew about this fork, already trying to extract useful stuff https://github.com/JWasm/JWasm/issues/3 (https://github.com/JWasm/JWasm/issues/3)

Speaking about JWlink - yes, we'll put this project too - soon (in a few days).

Title: Re: JWasm continuation (our try) on GitHub
Post by: jj2007 on November 06, 2015, 05:20:33 AM
Just to make you aware of the real competition (http://masm32.com/board/index.php?topic=902.msg50742#msg50742) (test with a 17,300 lines source):

*** Assemble using mlv615 /nologo /c /coff  /Fl /Sn /Fo "RichMasm" ***
*** Assembling and linking took 1170 milliseconds ***

*** Assemble using asmc /nologo /c /coff  /Fl /Sn /Fo "RichMasm" ***
*** Assembling and linking took 592 milliseconds ***

;)
Title: Re: JWasm continuation (our try) on GitHub
Post by: ACP on November 10, 2015, 02:49:09 AM
Aren't you guys afraid of too many JWASM forks? I meant this used to be single man operation by Japeth.

Now is this repository somehow related to HJWasm or is it a separate one? Because if it is another one that on one single forum you already have at least 3 different repositories not counting the original one.
Title: Re: JWasm continuation (our try) on GitHub
Post by: jj2007 on November 10, 2015, 03:01:36 AM
Welcome to the forum, ACP :icon14:

Your point is valid, of course. We risk having three incomplete and non-perfect forks, instead of one that works properly.
For building my library, I use Nidud's AsmC fork nowadays, it's really easy to get used to its speed :P
Title: Re: JWasm continuation (our try) on GitHub
Post by: johnsa on November 10, 2015, 03:45:00 AM
Hi,

I would definitely prefer to see a single fork/continuation of Jwasm personally. I know Habran has been working very hard on the AVX512 support in HJWASM, I've staged some changes which I will give through to him once he is done to allow for proper AVX handling of PROC frame setup. At the moment the FRAME is generated using sse opcodes like movaps, which if you planning on using vmov..(any avx style) opcode inside the proc causes major performance penalties. I have proposed that we add a new decoration to the PROC declaration to allow for this on a PROC by PROC basis, so you would have:

MyProc PROC AVXFRAME USES a,b,c arg0:TYPE, arg1:TYPE ... etc

I have plenty of hosting space available which I think we should (and I would be happy to use) to host the project officially apart from the github repo and possibly include all the legacy copies/site history for posterity.

Title: Re: JWasm continuation (our try) on GitHub
Post by: johnsa on November 10, 2015, 03:47:39 AM
On another note.. out of respect to Japheth I would hope that he would provide some guidance on his wishes, even if he has no time to work on this project, so that at some point he can either take ownership again, or at least join back in the active dev and see what work has been done in his absence.

I know we all had suspected that something had happened to him, however I see Vortex mentioned that there was a 100% busy with real life comment from him in 2014.. I'm not sure if this is still the case.
Title: Re: JWasm continuation (our try) on GitHub
Post by: GoneFishing on November 10, 2015, 04:20:00 AM
no GitHub activity since January 2014 is big enough pause to suspect anything
Notice  that Japheth's account was deleted  , look at his posts and see his "guest" status
Maybe Hutch or Habran could tell us anything about  Where's Japheth ? ...
or somebody from Germany  could take his phone number and call him ? 

Title: Re: JWasm continuation (our try) on GitHub
Post by: ACP on November 10, 2015, 09:00:09 AM
Guys - thanks for warm welcome :)

I don't intend to be a smart-ass - at least not in first few posts ;) - but looking at number of people who can actually help and devote their time into something that doesn't make your CV cool for headhunters (and developing x86/x64 assembler is definitively one of those things) I would suggest to better coordinate different initiatives I see on this site. github or any other similar site provide enough tools for  supporting community effort, but in the long run it should a single effort. There are already enough x86/x64 assemblers with incompatible syntax and output around. The one thing I wouldn't like to see one day is to have few different versions of JWasm not compatible with each other.

BTW: I like to idea of using Coverity for the project. Even assembler deserves to be secure app.
BTW2: is there anyone who care to pickup HX Dos Extender development.
Just my 2 cents.
Title: Re: JWasm continuation (our try) on GitHub
Post by: milabs on November 10, 2015, 06:43:33 PM
Hello,

Single point of developing and distributing is the best solution for the project like JWasm. I see no reasons of why it shouldn't be github. It has all things needed for the collaboration.

We made source code splitting and now we have JWasm and JWasm-regressions. Travis and Coverity integration already done. SourceForge tickets (bugs & features) also imported.

So, why not to merge all the forks :-)
Title: Re: JWasm continuation (our try) on GitHub
Post by: Vortex on November 11, 2015, 05:41:20 AM
Hi GoneFishing,

Japheth reregistered with a new account :

http://masm32.com/board/index.php?topic=4575.0 (http://masm32.com/board/index.php?topic=4575.0)

Title: Re: JWasm continuation (our try) on GitHub
Post by: GoneFishing on November 11, 2015, 06:19:33 AM
Hi Vortex,
Yes , I know . I read that thread and got a strong feeling that it was not Andreas but a trickster .
Lexicon and formatting of words  made me think so.
Though maybe I'm wrong and  my intuition plays tricks to me...

One more argument proving my wild guess  - his avatar image named Britney_Spears  !
Google image search for this picture shows that it's taken  from the standart avatar set for forums . Who has such packages? Serious programmers like Andreas? Unlikely .
Goal?
Advertisement.


Title: Re: JWasm continuation (our try) on GitHub
Post by: xanatose on November 27, 2015, 05:54:40 PM
Could it be possible to add
-nologo

or

-quiet

to suppress any output unless there is an error?
Title: Re: JWasm continuation (our try) on GitHub
Post by: milabs on December 03, 2015, 06:38:27 PM
xanatose, sure. Just add the issue to https://github.com/JWasm/JWasm/issues (https://github.com/JWasm/JWasm/issues)
Title: Re: JWasm continuation (our try) on GitHub
Post by: hutch-- on December 06, 2015, 03:38:24 PM
I guess my cynicism is showing but there was a good reason why I posted Japheth's version at the top of the page, its so folks know where the development started and stopped. While I have no doubt that various folks have done work on the source code after Japheth abandoned the project, with multiple versions you end up with a "Forked fork of a forked fork" (all puns intended).
Title: Re: JWasm continuation (our try) on GitHub
Post by: ACP on December 11, 2015, 04:08:03 AM
Exactly my thoughts from few posts earlier. Anyway I wish you guys luck. Seems like putting the project on github, splitting regression tests and enabling ticket tracking is a good start, but you guys still need to somehow invite others from separate forks to cooperate. Otherwise we really may end up with a number of JWASM based assemblers with different syntax. I guess we have already large enough base of different syntaxes for x86/x64 so creating new set on already well established assembler will not help anyone in long turn.
Title: Re: JWasm continuation (our try) on GitHub
Post by: bugthis on October 25, 2022, 08:32:40 AM
Could one of you GitHub account members that are working on JWASM improve the JWASM manual?

There should be especially a MASM compatibility chapter that shows what does work and what should be substituted by JWASM specific ways of solving things.

I'm reading an old assembler book written for MASM and DOS. And i ran into a bunch of problems while trying to adapt the code to JWASM.

Especially the Conditional Assembly (IF, ELSE etc.) with MACROs was a problem.

MASM code:

; MASM way
IF (parameter1 EQ BL) ; BL = BL register

didn't work and had to be substituted with:

; JWASM way
IFIDNI <parameter1>, <BL>

for JWASM

The same applies to all other operators of MASM's if:

EQ = equal 
NE = not equal
LT = less than
LE = less or equal
GT = greater
GE = greather or equal


Other incompatibility issues or things that had to be handled in a JWASM way were:

Linking:

; MASM way
; Creating object code + linking in one go
ML code1.asm code2.asm lib.bib


; JWASM + WLINK way
; Creating object code
jwasmr code1.asm code2.asm
; linking it with wlink (part of Open Watcom C Compiler)
; where
; prog = name of the executable
; name = cmd parameter of wlink
; file = cmd parameter of wlink
; code1 and code2 = oject files without extension
; lib.bib = library WITH extension
wlink name prog file code1, code2, lib.bib


When creating subroutines:

; MASM way
.MODEL SMALL
...
.CODE
TESTFUNC  PROC FAR USES AX, BX ; Where TESTFUNC is our routine name
[code]
[code]
;JWASM way
.MODEL SMALL, C  ; JWASM requests a language to use as calling convention here. C will do fine in most cases.
...
.CODE
TESTFUNC PROC FAR USES AX, BX


And when calling them in another file, for example main.asm

; MASM way
PUBLIC TESTFUNC
.MODEL SMALL
.CODE
....
CALL TESTFUNC
...


;JWASM way
PUBLIC _TESTFUNC ; JWASM expects a leading "_"
.MODEL SMALL C ; JWASM expects the corresponding calling convention
.CODE
....
CALL _TESTFUNC  ; JWASM expects a leading "_" again
...


I don't have a github account, thus i can't add that myself to the issues page.
Github does require too much contract text to accept just to register an account.

But you can use all the stuff i mentioned here if you need so. I put this comment under public domain.
Title: Re: JWasm continuation (our try) on GitHub
Post by: jj2007 on October 25, 2022, 08:44:19 AM
Quote from: bugthis on October 25, 2022, 08:32:40 AMMASM code:

; MASM way
IF (parameter1 EQ BL) ; BL = BL register

Hi bugthis,

That doesn't work even with my oldest MASM version, 6.14. It has always been ifidni <parameter1>, <bl>

If you don't agree, post a complete program. Which MASM version are you using?

I have a medium sized library with over 600 macros, and all of them work fine with MASM, UAsm and AsmC alike. I haven't tested them with JWasm recently, but I would be surprised if they were any problems.

P.S.: Just tested it with my editor, 24,000 lines, 160 macros, plus the 500+ of the library. No compatibility problem with JWasm (but assembly is a factor 3 slower than with UAsm).
Title: Re: JWasm continuation (our try) on GitHub
Post by: bugthis on October 25, 2022, 09:37:36 AM
Quote from: jj2007 on October 25, 2022, 08:44:19 AM
Quote from: bugthis on October 25, 2022, 08:32:40 AMMASM code:

; MASM way
IF (parameter1 EQ BL) ; BL = BL register

Hi bugthis,

That doesn't work even with my oldest MASM version, 6.14. It has always been ifidni <parameter1>, <bl>

If you don't agree, post a complete program.
Well, that's what my book says.

Example slightly modified to get rid of some other macros: (The IF ELSE part is not modified)

filename: lib.bib

INPUT_X  MACRO Reg                                                             
         IF (Reg EQ AL) OR (Reg EQ AH)                                         
           PUSH DX                                                             
           PUSH AX                                                             
           MOV AH, 08h                                                         
           INT 21h                                                             
           MOV DL, AL                                                           
           POP AX                                                               
           MOV Reg, DL                                                         
           POP DX                                                               
         ELSE                                                                   
           PUSH AX                                                             
           MOV AH, 08h                                                         
           INT 21h                                                             
           MOV Reg, AL                                                         
           POP AX                                                               
         ENDIF                                                                 
         ENDM                                                                   


filename: main.asm

; Example                                                                       
INCLUDE lib.bib                                                         
.MODEL SMALL                                                                   
.STACK 256                                                                     
                                                                               
.CODE                                                                           
                                                                               
START:                                                                         
       MOV AL, 30h                                                             
       INPUT_X AL                                                               
                                                                               
       MOV DL, AL                                                               
       MOV AH, 02H                                                             
       INT 21h                                                                 
                                                                               
       MOV AH, 4Ch                                                             
       INT 21h                                                                 
       END START 


Quote
Which MASM version are you using?
I don't have MASM, thus i am using JWASM or in other words have to use JWASM.

The book gives a small hint about the MASM 6 version but the code and most of the book could also be written for older MASM versions.
The code is x86 Real Mode only for MS-DOS. And the newest CPU mentioned in the book is the Pentium (from 1993).

Quote
I have a medium sized library with over 600 macros, and all of them work fine with MASM, UAsm and AsmC alike. I haven't tested them with JWasm recently, but I would be surprised if they were any problems.
The above code will not work with JWASM without some modifications.
Especially the IF...ELSE statement will not work and throw an error because of the IF...ELSE part.

JWASM: Error A2189: Constant or relocatable label expected
Title: Re: JWasm continuation (our try) on GitHub
Post by: zedd151 on October 25, 2022, 09:41:30 AM
Since this thread is seven years old, possibly the work on github has been abandoned?? In any case, no posts here from the thread author since 2015. Doubtful if they even check here.
Title: Re: JWasm continuation (our try) on GitHub
Post by: jj2007 on October 25, 2022, 11:19:51 AM
Quote from: bugthis on October 25, 2022, 09:37:36 AM
QuoteIf you don't agree, post a complete program.
Well, that's what my book says.

You didn't post a complete program as requested, but out of curiosity I used your INPUT_X macro in a 16-bit template:

OPT_Assembler JWasm ; Error A2189: Constant or relocatable label expected
OPT_Assembler mlv614 ; Error A2095: Constant or relocatable label expected
OPT_Assembler UAsm64 ; Error A2190: Constant or relocatable label expected


Instead of reading the book and complaining about inexistent problems, you should start coding.
Title: Re: JWasm continuation (our try) on GitHub
Post by: bugthis on October 25, 2022, 12:55:57 PM
Quote from: jj2007 on October 25, 2022, 11:19:51 AM
Quote from: bugthis on October 25, 2022, 09:37:36 AM
QuoteIf you don't agree, post a complete program.
Well, that's what my book says.

You didn't post a complete program as requested, but out of curiosity I used your INPUT_X macro in a 16-bit template:
I did. The code is a complete program.

With the help of
https://www.pcjs.org/software/pcx86/sys/dos/microsoft/6.20/ (https://www.pcjs.org/software/pcx86/sys/dos/microsoft/6.20/)

i could even test it with MASM 5.
And it assembled like a charm and it run without problems.

I couldn't test it with MASM 6.11.
MASM 6.11 requires a 386 CPU and running ml.exe inside PCJS emulator with the compaq 386 model seems to trigger a bug inside the emulator.
ML quits with error message, thus an inevitable emulator error:
phar lab fatal sys error 10025: Unexpected processor exception occured.


OPT_Assembler JWasm        ; Error A2189: Constant or relocatable label expected
I already told you that. Didn't you read what i have written above?

OPT_Assembler mlv614        ; Error A2095: Constant or relocatable label expected
It works in MASM 5.00

QuoteInstead of reading the book and complaining about inexistent problems, you should start coding.
Instead of writing nonsense like this, maybe you should read what I wrote. In addition, you can see here now that it works in MASM 5.00 and you used an incompatible assembler.
See the screenshot.zip file of PCJS emulator as proof.

The MASM 6.11 files of the PCJS website seem to give a clue about changes from MASM 5.1 to 6.x. But i have to read that first. Didn't had the time.

Title: Re: JWasm continuation (our try) on GitHub
Post by: bugthis on October 25, 2022, 01:42:39 PM
Quote from: jj2007 on October 25, 2022, 11:19:51 AMOPT_Assembler mlv614        ; Error A2095: Constant or relocatable label expected
Instead of reading the book and complaining about inexistent problems, you should start coding.

Ok, i think i found something.
You didn't use your MASM 6 assembler correctly.

You have to apply the /Zm option to MASM 6.x.
QuoteIn many cases, MASM 5.1 code will assemble without modification under MASM
6.0. However, MASM 6.0 provides a new OPTION directive that lets you
selectively modify the assembly process. In particular, you can use the M510
argument with OPTION or the /Zm command-line option to set most features to
be compatible with version 5.1 code.

See Appendix A, "Differences between MASM 6.0 and 5.1," for information
about obsolete features that will not assemble correctly under MASM 6.0.

And in Appendix A i found this:
English isn't my native language, but this could describe the problem i found with JWASM and you hade with MASM 6 without MASM 5 compatibility mode.
QuoteComparing Types Using EQ and NE with OPTION M510 - With OPTION M510, types     
are converted to a constant value equal to the size of the data type before   
comparisons with EQ and NE. Code types are converted to 0FFFFh  (near) and     
0FFFEh  (far). If OPTION M510 is not enabled, types are converted to           
constants only when comparing them with constants; two types are equal only   
if they are equivalent qualified types.

See here for further reading:
https://www.pcjs.org/documents/books/mspl13/masm/mpguide/ (https://www.pcjs.org/documents/books/mspl13/masm/mpguide/)

Title: Re: JWasm continuation (our try) on GitHub
Post by: jj2007 on October 25, 2022, 07:08:32 PM
Quote from: bugthis on October 25, 2022, 01:42:39 PM
You didn't use your MASM 6 assembler correctly.

You are a joker, but I like you :tongue:

Version 6.0 was released in 1992, so you are talking about a software that is more than 30 years old :cool:

QuoteThe last freestanding commercial version of the Mirosoft assembler was version 6.11d released in 1993

OS/2 Museum (https://www.os2museum.com/wp/learn-something-old-every-day-part-iii/) (with a nice description of the two passes, unfortunately not quite correct):
QuoteLearn Something Old Every Day, Part III
Posted on September 8, 2021 by Michal Necasek
As part of a hobby project, I set out to reconstruct assembly source code that should be built with an old version of MASM and exactly match an existing old binary. In the process I learned how old MASM versions worked, and why programmers hated MASM. Note that "old versions" in this context means MASM 5.x and older, i.e. older than MASM 6.0.
Title: Re: JWasm continuation (our try) on GitHub
Post by: _japheth on October 25, 2022, 07:13:41 PM
Hello bugthis,

I'm the author of jwasm. If you don't want a github account, you can post in this forum, but I'd suggest to use the "DOS 16-bit" sub-forum then. I'm perhaps not visiting here on a daily basis, but if I do, I check the DOS forum then.

Generally, jwasm is based on the Masm v6 assembly language style. For programs written in Masm v1⁻v5, it's better to use Masm directly ( for example, jwasm hasn't implemented the "option oldmacros" ).

I have to agree with jj, though: your code snippets are not full programs - that makes it unnecessarily cumbersome to reproduce your issues.

Title: Re: JWasm continuation (our try) on GitHub
Post by: _japheth on October 25, 2022, 10:07:23 PM

Quote
         IF (Reg EQ AL) OR (Reg EQ AH)                                         

I checked that syntax: it's indeed accepted by Masm v5.1 ( although you apparently cannot use any 8-bit register as macro argument!? ).
However, it's not accepted by Masm v6, no matter if the -Zm cmdline option is used or not. So jwasm also isn't supposed to support that syntax.

Title: Re: JWasm continuation (our try) on GitHub
Post by: bugthis on October 27, 2022, 08:06:13 AM
Quote from: jj2007 on October 25, 2022, 07:08:32 PM

OS/2 Museum (https://www.os2museum.com/wp/learn-something-old-every-day-part-iii/) (with a nice description of the two passes, unfortunately not quite correct)

Thanks for the link. That was an interesting reading.
Title: Re: JWasm continuation (our try) on GitHub
Post by: bugthis on October 27, 2022, 08:29:29 AM
Quote from: _japheth on October 25, 2022, 07:13:41 PMHello bugthis,

I'm the author of jwasm.
Thank you for your work on jwasm. I use it on FreeDOS 1.3 inside a QEMU Virtual Machine environment.
FreeDOS 1.3 ships with jwasm on the FreeDOS Bonus CD.
Only jwlink is missing. I use Open Watcom's wlink instead, which also comes with FreeDOS on the Bonus CD.

https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.3/official/report.html https://www.freedos.org/ (https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.3/official/report.html%20https://www.freedos.org/)

QuoteIf you don't want a github account, you can post in this forum, but I'd suggest to use the "DOS 16-bit" sub-forum then. I'm perhaps not visiting here on a daily basis, but if I do, I check the DOS forum then.
Thanks for the hint. That is good to know.

QuoteGenerally, jwasm is based on the Masm v6 assembly language style. For programs written in Masm v1⁻v5, it's better to use Masm directly ( for example, jwasm hasn't implemented the "option oldmacros" ).
Ok, I'll just try to adapt the book's code to MASM v6.

QuoteI have to agree with jj, though: your code snippets are not full programs - that makes it unnecessarily cumbersome to reproduce your issues.

Why aren't they a full program? Could you explain that.
From my point of view, each of the two code snippet represents a file and the filename is given before the code tag. All that is required is, they only have to be saved under the appropriate name and assembled with MASM <= Version 5 and integrated with link.exe in the last step.

Should i have added the files inside a ZIP archive or ship them with the executable or what do you mean by "your code snippets are not full programs"?


Quote from: _japheth on October 25, 2022, 10:07:23 PM
QuoteIF (Reg EQ AL) OR (Reg EQ AH)                                       

I checked that syntax: it's indeed accepted by Masm v5.1 ( although you apparently cannot use any 8-bit register as macro argument!? ).
Thank you for agreeing on that and good to know about the latter.
QuoteHowever, it's not accepted by Masm v6, no matter if the -Zm cmdline option is used or not. So jwasm also isn't supposed to support that syntax.
I will try to make the code MASM v6 compatible.