News:

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

Main Menu

Pointing to an embeded object ¿?

Started by HSE, February 07, 2021, 10:21:23 AM

Previous topic - Next topic

HSE

Hi Biterider!

I have this little problem pointing to an embedded object:
Quoteerror A2006: undefined symbol : naranjas
.if xsi
assume xsi: ptr $Obj(BibTextMaster)
mov xbx, [xsi].naranjas.SDLL_SENTINEL.pFirstItem       <<<<<  error
.if xbx
.repeat
assume xbx:ptr $Obj(BibString)
mov xcx, [xbx].defname
invoke StrICompA, ini, xcx
.if xax == 0
ret
.endif
mov xbx, [xbx].cadena.SDLL_ITEM.pNextItem
assume xbx:nothing                       
.until xax == 0
.endif
assume xsi:nothing
.endif


There is no problem with BibString because is a Dinamyc object. The problem is with BibTexMaster wich is an Embeded object.

Thanks in advance, HSE.

Equations in Assembly: SmplMath

Biterider

Hi HSE
Without seeing the object definition it is a little difficult to say, but assuming a scenario like this:
Object TestMe,, Streamable
  Embed TestObj, Primer
ObjectEnd


You can access the embedded object this way
assume xsi:$ObjPtr(Primer)  <-- object type
DbgHex [xsi].dErrorCode

If I'm wrong, please send me the file...

Side note: check the return value of StrICompA, it is always a DWORD.

Regards, Biterider

HSE

#2
Hi biterider!

Quote from: Biterider on February 07, 2021, 06:45:24 PM
If I'm wrong, please send me the file...
I think you are right, just don't work. Then the problem is not that obvious thing, must be another obvious thing   :biggrin: :biggrin:

Quote from: Biterider on February 07, 2021, 06:45:24 PM
Side note: check the return value of StrICompA, it is always a DWORD.
:thumbsup:

I wil try a little more (meanwhile I will prepare the file  :biggrin:)

Thanks, HSE

LATER: Apparently Assembler don't check errors in "assume". That was   :eusa_snooty: 
Equations in Assembly: SmplMath