The MASM Forum Archive 2004 to 2012

Specialised Projects => Assembler/Compiler Technology => Topic started by: cman on October 29, 2009, 07:47:25 PM

Title: JWASM?
Post by: cman on October 29, 2009, 07:47:25 PM
Is JWASM a total open source replacement for Masm currently? I've been looking though the source code recently trying to figure out how the whole thing works ( I wish they would have used Allman style indenting rather than K & R  :bg ). Can I move seamlessly from Masm to Jwasm? Whats the history of JWASM? Thanks for any info......
Title: Re: JWASM?
Post by: Jimg on October 29, 2009, 08:00:15 PM
Yes, I only have one small thing that isn't working in JWasm.
(Personally, I wish it was written in assembly)
Title: Re: JWASM?
Post by: Vortex on October 29, 2009, 08:23:08 PM
Hi cman,

Quote
JWasm is a fork of Open Watcom's Wasm and is intended to be a Masm v6 compatible assembler. It's released under the Sybase Open Watcom Public License 1.0. JWasm can be used for virtually any purpose, unlike Microsoft's free download of Masm v8, which is for non-commercial use only.

http://japheth.de/JWasm.html
Title: Re: JWASM?
Post by: japheth on October 30, 2009, 07:31:17 AM

JWasm v2.0 virtually covers Masm v8: instructions up to SSSE3 and x86-64.
What's missing is symbolic debugging info in Codeview v8 format, but that's relevant for 64bit only.

> I've been looking though the source code recently trying to figure out how the whole thing works

Good! However, it's a 50,000 lines project by now, so you'll probably have to invest a few hours more...  :toothy
Title: Re: JWASM?
Post by: ecube on October 30, 2009, 08:28:44 AM
think I found a bug, I typically break up my code into different source files and jwasm seems to be erroring about not being able to include some source files. Which Masm reads fine, here's how its broke down


main.asm
include functions.asm

functions.asm
include kingdom\animals.inc

animals.inc

include carnivores\existing\bear.asm



the error
  functions.asm(140): Included by
   main.asm(126): Main line code
animals.Inc(153) : Error A2105: Cannot open include file 'carnivores\existing\bear.asm'

all folders and files exist

Also another error is this function

testfunction proc
.if eax == 0

.elseif

.if
    .if

    .endif 
  .elseif
    .if
      .if
     
      .endif 
    .else
     
    .endif
  .endif 
.endif

ret

testfunction endp


Says "Syntax error in control-flow directive"

ugh I can't compile most my sources, hopefully jwasm gets better.
Title: Re: JWASM?
Post by: Farabi on October 30, 2009, 09:08:46 AM
MASM created by a team, JWASM created by a single fighter, bug should be expected.

Japhet:
It would be good if you find another person who really understand about this sophiscated tech. There should be a man who sophiscticated among your fans.
Title: Re: JWASM?
Post by: japheth on October 30, 2009, 09:44:46 AM

JWasm bug reports here in a Campus thread is off-topic and not allowed, please read the forum rules!

> MASM created by a team, JWASM created by a single fighter, bug should be expected.

I disagree, but please don't discuss this in this thread!

Title: Re: JWASM?
Post by: BlackVortex on October 30, 2009, 09:45:44 AM
Most of the code samples that don't work on Jwasm are either weird masm syntax intricacies, uber-weird macros from masm hell or specific syntax juggling to *make* assembling fail.

Japheth is a one-man army by the way !
Title: Re: JWASM?
Post by: hutch-- on October 30, 2009, 09:46:32 AM
Cube,

Try this, you had .IF statements without conditions to test.


testfunction proc

    .if eax == 0
    .elseif
      .if eax == 1
        .if eax == 2
        .endif
      .elseif
        .if eax == 3
          .if eax == 4
          .endif
        .else
        .endif
      .endif
    .endif

    ret

testfunction endp
Title: Re: JWASM?
Post by: Farabi on October 30, 2009, 10:04:04 AM
Quote from: japheth on October 30, 2009, 09:44:46 AM

JWasm bug reports here in a Campus thread is off-topic and not allowed, please read the forum rules!

> MASM created by a team, JWASM created by a single fighter, bug should be expected.

I disagree, but please don't discuss this in this thread!



I dont know if you misunderstood my message, I mean, bug is something common. Did I miss arranging words again? Or you got team?
Title: Re: JWASM?
Post by: japheth on October 30, 2009, 10:37:31 AM
Quote from: Farabi on October 30, 2009, 10:04:04 AM
I dont know if you misunderstood my message, I mean, bug is something common. Did I miss arranging words again? Or you got team?

No, I don't misunderstood, IMO you overestimate the valuie which is added by a "team". Bugs occur in software, regardless of a team or a single person has developed it. As I did mention, the JWasm project has 50,000 lines. This is a quantity which is very well maintainable by one person. However, it's also a quantity which requires an automated test suite ( also called "regression test" ), to ensure a certain level of product quality. The regression test supplied with JWasm v2.0 is still very rudimentary and requires some work (this has high priority).

With a good and well-designed test suite it is very well possible for a single person to maintain a 250,000 lines project.

Title: Re: JWASM?
Post by: jj2007 on October 30, 2009, 12:04:58 PM
Quote from: BlackVortex on October 30, 2009, 09:45:44 AM
Most of the code samples that don't work on Jwasm are either weird masm syntax intricacies, uber-weird macros from masm hell or specific syntax juggling to *make* assembling fail.

I can fully confirm that. JWasm is really stable, and almost everything I throw at it, including my über-weird MasmBasic macros, assembles flawlessly. But of course, rubbish in, garbage out...
Title: Re: JWASM?
Post by: hutch-- on October 30, 2009, 03:11:43 PM
There is always going to be a boundary to compatibility with a product that has been around as long as MASM. The current version started life about 1990 Masm 6.0, was knife and forked about 1996 then patched to 32 bit. Odd bits and pieces fell into disuse, others have been changed, some bits left out and so on. While modern MASM is a good tool that many understand, JWASM has long ago achieved very good compatibility but there must come a time when it is treated as an assembler in its own right and have code developed for it.

What is wrong with developing consistent reliable macros for JWASM in its own right ?
Title: Re: JWASM?
Post by: ecube on November 06, 2009, 10:16:20 AM
Quote from: japheth on October 30, 2009, 09:44:46 AM

JWasm bug reports here in a Campus thread is off-topic and not allowed, please read the forum rules!

> MASM created by a team, JWASM created by a single fighter, bug should be expected.

I disagree, but please don't discuss this in this thread!


This thread is about assemblers, (even ones that abanoned this forum), so we have every right to talk about em. JWASM on linux looks pretty promising.
Title: Re: JWASM?
Post by: japheth on November 06, 2009, 01:43:15 PM
Quote from: E^cube on November 06, 2009, 10:16:20 AM
Quote from: japheth on October 30, 2009, 09:44:46 AM

JWasm bug reports here in a Campus thread is off-topic and not allowed, please read the forum rules!

> MASM created by a team, JWASM created by a single fighter, bug should be expected.

I disagree, but please don't discuss this in this thread!


This thread is about assemblers, (even ones that abanoned this forum), so we have every right to talk about em.

Please feel absolutely free to post whatever you like. Even better if it's off-topic. I always love to read your little  gems.  :U
Title: Re: JWASM?
Post by: GregL on November 08, 2009, 01:22:24 AM
Quote from: FarabiIt would be good if you find another person who really understand about this sophiscated tech. There should be a man who sophiscticated among your fans.

I think japheth is sufficiently sophisticated.

Title: Re: JWASM?
Post by: BlackVortex on November 10, 2009, 02:42:58 AM
Let's just clone japheth !
Title: Re: JWASM?
Post by: oex on November 10, 2009, 10:06:11 AM
*digs out replication macros*

Japheth QWORD 2 dup (?)