You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I am wondering if it is possible to compress a SegPtr lookup in Reko HL code into just the SegPtr and use that to work out further variable references.
The issue is with 16-Bit segmented memory, all the segptr's need to be in the initial [Data] segment (3EDB for me atm) because that's the assumed ds segment unless otherwise provided. This means that any variable reference outside of the [Data] segment must first do a lookup to a [Data] SegPtr lookup table and then do the rest of the ptr.
This is one of the reasons why the variable EQ and types explode so heavily with 16 bit segmented code, as each segment lookup ptr becomes its own eq_**** rather than compressing into a common segptr eq_*****
Additionally this seems to be a breaking factor in defining user defined variables / structs as it is unable to link all the reference together.
So I am wondering if it is possible to compress a SegPtr lookup in Reko HL code into just the SegPtr and use that to work out further variable references.
The issue is with 16-Bit segmented memory, all the segptr's need to be in the initial [Data] segment (3EDB for me atm) because that's the assumed ds segment unless otherwise provided. This means that any variable reference outside of the [Data] segment must first do a lookup to a [Data] SegPtr lookup table and then do the rest of the ptr.
This is one of the reasons why the variable EQ and types explode so heavily with 16 bit segmented code, as each segment lookup ptr becomes its own eq_**** rather than compressing into a common segptr eq_*****
Additionally this seems to be a breaking factor in defining user defined variables / structs as it is unable to link all the reference together.
Example:
struct Eq_19636 * es_24 = ds->ptr54B8; if ((&es_24->tFFFFC614.b0000)[wLoc04_342 * 0x11] == ~0x00)
which has the reko .inc file of:
es_24 = ds->ptr54B8;
references segptr 0x3092tFFFFC614 is 0xC614 which should be the beginning of the user defined struct.
The struct itself exists in the "3092 global variables" of reko, so the typedef has worked till that point.
Any thoughts on whether this might be possible or any alternative approaches that might be better?
The text was updated successfully, but these errors were encountered: