The MASM Forum

General => The Campus => Topic started by: HSE on May 16, 2017, 11:15:28 PM

Title: WASM can't do this..
Post by: HSE on May 16, 2017, 11:15:28 PM
Hi!
Just yesterday I discover ML can to deal with this notation:

    mov eax, [[ecx].NDX_PAGE.Entries[eax]].NDX_ENTRY.dLEPage

where
NDX_ENTRY struc
  dLEPage       DWORD    0    ;00-03: Page containing previous keys
  dRecNo        DWORD    0    ;04-07: Record number matching key
  bKey          BYTE     INDEXKEYMAXSIZE dup (0)
NDX_ENTRY ends
NDX_PAGE struc                ;512 bytes
  wNumEntries   WORD    0     ;00-01: #active entries in this page
  wD0           WORD    0     ;Reserved
  Entries       BYTE    (512 - 2 * sizeof WORD) dup (0)
NDX_PAGE ends
Asmc (2.23) and HJWASM(2.14) don't understand this.
The line is from OA32's dBase 2009 project.

In 2012 Biterider change that, I think because JWASM enter in the scene:mov eax, [ecx + eax].NDX_PAGE.Entries.NDX_ENTRY.dLEPage
Interesting because the expression "full compatible" became false. For sure the practical implications are irrelevant.

Regards. HSE.
Title: Re: WASM can't do this..
Post by: jj2007 on May 16, 2017, 11:40:34 PM
Quote from: HSE on May 16, 2017, 11:15:28 PMInteresting because the expression "full compatible" became false. For sure the practical implications are irrelevant.

There have been numerous little inconsistencies in the past, and workarounds. Overall, compatibility of the AsmC+HJWasm family is extremely good now.
Title: Re: WASM can't do this..
Post by: newrobert on May 17, 2017, 07:49:03 AM
what's abbreviation of wasm, are there some different between wasm and masm?
Title: Re: WASM can't do this..
Post by: jj2007 on May 17, 2017, 08:25:57 AM
Wasm=Watcom Asm (old and obsolete)
JWasm=Japheth's improved Wasm (good but a bit obsolete)
HJWasm=Habran & Johnsa's improved JWasm
Hasm=?? (imho it should be HJAsm, or simply HJWasm to reflect its origins including the Watcom coders...)

From JWasm onwards, they are getting more and more powerful, and more and more compatible with the 32-bit version of Microsoft MASM. All my major sources build just fine with ML 6.15 ... 10.0 and HJWasm.
Title: Re: WASM can't do this..
Post by: newrobert on May 19, 2017, 07:55:27 AM
thank your explain, let me know more about asm language;