The MASM Forum

Projects => ObjAsm => Topic started by: HSE on February 07, 2021, 10:21:23 AM

Title: Pointing to an embeded object ¿?
Post by: HSE on February 07, 2021, 10:21:23 AM
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.

Title: Re: Pointing to an embeded object ¿?
Post by: Biterider on February 07, 2021, 06:45:24 PM
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
Title: Re: Pointing to an embeded object ¿?
Post by: HSE on February 08, 2021, 03:06:22 AM
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: