Author Topic: Pointing to an embeded object ¿?  (Read 750 times)

HSE

  • Member
  • *****
  • Posts: 1744
  • <AMD>< 7-32>
Pointing to an embeded object ¿?
« on: February 07, 2021, 10:21:23 AM »
Hi Biterider!

I have this little problem pointing to an embedded object:
Quote
error A2006: undefined symbol : naranjas
Code: [Select]
.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.


Biterider

  • Moderator
  • Member
  • *****
  • Posts: 729
  • ObjAsm Developer
    • ObjAsm
Re: Pointing to an embeded object ¿?
« Reply #1 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:
Code: [Select]
Object TestMe,, Streamable
  Embed TestObj, Primer
ObjectEnd

You can access the embedded object this way
Code: [Select]
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

  • Member
  • *****
  • Posts: 1744
  • <AMD>< 7-32>
Re: Pointing to an embeded object ¿?
« Reply #2 on: February 08, 2021, 03:06:22 AM »
Hi biterider!

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:

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: 
« Last Edit: February 08, 2021, 04:58:41 AM by HSE »