News:

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

Main Menu

HJWasm Releases

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

Previous topic - Next topic

dedndave

Quote from: Grincheux on January 20, 2016, 02:44:37 AM
mov Byte Ptr [1234h],cl

QuoteError A2049: Invalid instruction operands

But this one
Quotemov cl,Byte Ptr [1234h]
is OK!

I don't understand why?

standard MASM syntax would be to add a segment override operator

    mov     ds:[1234h],cl

johnsa

I'm testing on an x64 Windows 7 machine. I will try setup a 32bit vm and test there. I'm also trying to get the "download warning" removed.. somehow without paying a fortune to sign the archive.

johnsa

Quote from: jj2007 on January 20, 2016, 01:24:20 AM
Same as before with version 19 January.

Quote from: jj2007 on January 16, 2016, 09:58:25 PM
Builds fine with (almost) all assemblers ;)

include \masm32\include\masm32rt.inc ; plain Masm32 for the fans of pure assembler

.code
minput MOUSEINPUT <>

start: print "Hello World"
exit

end start


The problem is here, and it's a known problem. Of course, it's not a problem if you can convince several hundred forum members to modify their Windows.inc, and adjust their existing sources (4,000+ in my case) accordingly  ;)

line 12948:
MOUSEINPUT STRUCT
   _dx                    DWORD ?
   dy                     DWORD ?
   mouseData              DWORD ?
   dwFlags                DWORD ?
   time                   DWORD ?
   dwExtraInfo            DWORD ?
MOUSEINPUT ENDS

line 19062:
NMLVSCROLL STRUCT
   hdr                    NMHDR <>
   _dx                    DWORD ?
   dy                     DWORD ?
NMLVSCROLL ENDS


Just re-tested this using the standard windows.inc file from masm32 package (which has DY in) and it assembles fine for me, no warnings about the use of DY.
What error do you get ?

Grincheux

Quotestandard MASM syntax would be to add a segment override operator

Yes but CS, DS and ES = 0 so it is not obliged. The processor ignores these overides.
The only overides that are not 0 are FS and GS.

In the other sens I don't need a segment overide!
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

jj2007

\masm32\include\windows.inc(12948) : Error A2209: Syntax error:
\masm32\include\windows.inc(12948): Included by
  \masm32\include\masm32rt.inc(38): Included by
   Tmp_File.asm(1): Main line code
\masm32\include\windows.inc(19062) : Error A2209: Syntax error:
\masm32\include\windows.inc(19062): Included by
  \masm32\include\masm32rt.inc(38): Included by
   Tmp_File.asm(1): Main line code
Tmp_File.asm(4) : Error A2209: Syntax error:


JWasm, asmc and the ML family have no problems.

dedndave

Quote from: Grincheux on January 20, 2016, 04:44:12 AM
Quotestandard MASM syntax would be to add a segment override operator

Yes but CS, DS and ES = 0 so it is not obliged. The processor ignores these overides.
The only overides that are not 0 are FS and GS.

In the other sens I don't need a segment overide!

it must be explicit when an absolute address is given
the DS: override is not coded, but the assembler requires it
try it   :P

dedndave

another way is to create a label

    ORG     1234h

SomeLabel LABEL BYTE

;
;
;

    mov     SomeLabel,cl

qWord

johnsa, habran,

it looks like that you are currently focusing on adding new feature, however, I'm curious what are your plans on the open bug reports found at sourceforge?
I've also noted that HJwasm comes with an old build of JWASM: will be there any development on JWASM, means HJWASM as branch of JWASM?

regards
MREAL macros - when you need floating point arithmetic while assembling!

habran

Hi :biggrin:
>Grincheux, Dave is correct, this is not a bug, just an inappropriate usage of the assembler.
>jj2007, I don't know why you have that problem because I tested examples from masm32 with original windows.inc and they built flawlessly.
>nidud, I will build 32 binaries with MingW and post it here for you to test
>qWord, we are not going to work on JWasm any more, therefore we are not going to fix bugs on it.
HJWasm is from now our concern and soon we will upload the source on the Teraspace. I will discus with Johnsa how we will organize bug reports

Cheers!
 
Cod-Father

habran

#24
Here is a CodeBlock 32 bit build
I have replaced it with VS13 build because it was not working as expected
Cod-Father

nidud

#25
deleted

jj2007

Quote from: habran on January 20, 2016, 08:45:49 AM
>jj2007, I don't know why you have that problem because I tested examples from masm32 with original windows.inc and they built flawlessly.

With HJWasm /nologo /c /coff  /Fl /Sn for a hello world, I get these errors.
- Windows.inc is 977412 bytes of 10.01.2012 00:21:10
- HJWasm is 459776 bytes of 17.01.2016 06:19:26

Do you use a specific command line switch? Anybody else able to build this hello world with HJWasm?
include \masm32\include\masm32rt.inc

.code
start:
  inkey "Hello World"
  exit

end start

HSE

Hi!

A lot of time compiling only console little programs and little pieces from forum discussions, and what I found now it's that more complex code (but a simple ObjAsm32 object) only work with JWasm 2.11 or ML .

Obviously I erase or change something because 4 month ago JWasm 2.13 work fine, but now JWam 2.13 or HJWasm32 don't work! 

A couple of hours later I remember the collision with the ".for" macro in ObjAsm32 (that need to be commented or uncommented, depends on compiler). 

I'm expecting the source for to change the leng of lines and max nested macros  :t.

Regards.
Equations in Assembly: SmplMath

HSE

Hi Jochen!!


\foro\jj\hjw>hjwasm32 -c -coff hello.asm
HJWasm v2.13.32bit., Jan 17 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.

***********
ASCII build
***********
hello.asm: 8 lines, 2 passes, 296 ms, 0 warnings, 0 errors

\foro\jj\hjw>link /subsystem:console hello.obj
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

\foro\jj\hjw>hello
Hello World


HJWasm is 64 bit.
Equations in Assembly: SmplMath

habran

Thanks HSE :t

>jj2007, are you sure that you are using the newest HJWasm, please check command outpt

>nidud, can you please post me the sources you have tested

>HSE if you are using .for - .endfor please pay attention, in HJWasm we changed a delimeter to ':' instead of '¦' from before, that is because in debugger mode isspace() was stumbling on '¦'
HJWasm must use '()' brackets otherwise will not work, also, '++' or '--' must come after the variable not before,so
eax++ works, eax-- works but ++eax or --eax doesn't
so, here is one example:

  .for (:WORD PTR[rcx]:rcx+=2,rdx+=2)
    mov ax,[rcx]
    .if (ax !=  WORD PTR[rdx])
       .if (ax > WORD PTR[rdx])
          mov eax,1
       .else
          mov eax,-1
       .endif
      jmp aexit       
    .endif
  .endfor


another one:

    .for (::)
      .if (WPTR[rax] == 0)
        .break .if (WPTR[rax+2] == 0)   ;//break if the last char
        inc r8d                                      ;//increase the counter
      .endif
      add rax,2                                    ;//word character = 2 bytes
    .endfor

and  one more:

      .for (ebp=0:ebp<ebx:ebp++)
      movsxd rax,ci.nCharInLine
      mov rcx,ci.lpLine
      mov rcx,[rcx].SOMEDATA.wLine
        .if (WPTR[rcx+rax*2] == 9)
        mov eax,r13d
        cdq
        idiv nTabStop
        mov eax,nTabStop
        sub eax,edx
        add r13d,eax
        .else
          inc r13d
        .endif
        .break .if (!qwinvoke(NextChar,ADDR ci))
      .endfor

Cod-Father