News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Potential error in JWasm offsprings

Started by _japheth, May 31, 2024, 05:49:01 PM

Previous topic - Next topic

_japheth


This code may cause problems when assembled:

;--- v2.18: problem if the name of struct member matches the name
;--- of a stack variable ( or a procedure ):
;--- if the structured variable isn't defined, the stack variable
;--- becomes "unknown". Worse, if a listing is to be produced, an
;--- infinite loop may be entered.

.386
.MODEL flat
option casemap:none

DDS struct
dwSize dd ?
dwOfs  dd ?
DDS ends

.data

;dds DDS <0,0> ;<--- problem: the variable isn't defined

.code

P1 proc

local dwFirst:dword
local dwSize:dword
local dwThird:dword

mov dwSize, 0
mov dds.dwSize, 0
mov dwSize, 1
mov dds.dwSize, 1
ret

P1 endp

start:
call P1
ret

end start

It may also concern uasm and asmc...
Dummheit, gepaart mit Dreistigkeit - eine furchtbare Macht.

Biterider

Hi Japheth
Thanks for the report.
I was also able to confirm the same behaviour with UASM.
The assembly process went into an infinite loop and I had to shut it down.

Biterider


HSE

Hi _japhet!

Quote from: _japheth on May 31, 2024, 05:49:01 PMIt may also concern uasm and asmc...

Your correction work perfectly in UASM  :thumbsup:

Thanks, HSE
Equations in Assembly: SmplMath