nidud / asmc

Masm compatible assembler
GNU General Public License v2.0
50 stars 6 forks source link

Empry line isssue #6

Closed Erol-2022 closed 9 months ago

Erol-2022 commented 10 months ago

Hi Nidud,

Thanks for maintaining Asmc. Testing the latest release with the include files coming with the Masm32 SDK :

G:\asmc-master>bin\asmc.exe /Zi /Zf /Zd Test.asm

Asmc Macro Assembler Version 2.34.39
Copyright (C) The Asmc Contributors. All Rights Reserved.

 Assembling: Test.asm

***********
ASCII build
***********

\masm32\include\winextra.inc(1871) : error A2157: missing right parenthesis
 \masm32\include\winextra.inc(1871): Included by
  \masm32\include\windows.inc(26889): Included by
   Test.asm(5): Main line code
\masm32\include\winextra.inc(1871) : error A2008: syntax error : IS_VALIDSTATEBITS
 \masm32\include\winextra.inc(1871): Included by
  \masm32\include\windows.inc(26889): Included by
   Test.asm(5): Main line code

The empty line in winextra.inc is the offending one :

ELSE
    SHARD_PATH equ SHARD_PATHA
ENDIF
                                                                    <----- Empty line 1871
SHARD_PIDL                       equ 00000001h
SHCDF_UPDATEITEM                 equ 00000001h

The error message is reported in the Masm Forum.

nidud commented 10 months ago

Hi Erol,

I reported this back in 2021 (now deleted) so I assumed the SDK was updated. As one of the key features in Asmc is to span lines within brackets, a missing end bracket may have this consequence.

There was also a tool added for this purpose to detect sloppy code (as Masm doesn't really care).

I downloaded the SDK from here. There may be newer ones but when I run the tool on winextra.inc it report the following:

C:\masm32\include\winextra.inc(1684)

The line:

IS_VALIDSTATEBITS equ (IS_NORMAL or IS_SPLIT or IS_FULLSCREEN or 80000000h or 40000000h

So what happens here is that lines are added from this point (1684) until the end of the IFDEF statement before the error is reported.

In the latest version of Asmc the dynamic line size code is optimized to consume larger data arrays, limited only by available memory.

Erol-2022 commented 10 months ago

Hi Nidud,

Many thanks for your support. Adding the missing parenthesis is solving the problem :

IS_VALIDSTATEBITS equ (IS_NORMAL or IS_SPLIT or IS_FULLSCREEN or 80000000h or 40000000h)