mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-11-29 11:51:14 +00:00
Added 'use_origin' flag to let disassembler know that it has a real origin in memory so that labels are meaningful
This commit is contained in:
parent
e7f0b49c34
commit
491589d686
@ -578,7 +578,7 @@ class Dos33DiskImage(DiskImageBase):
|
|||||||
addr = dirent.get_binary_start_address(self) - 4 # factor in 4 byte header
|
addr = dirent.get_binary_start_address(self) - 4 # factor in 4 byte header
|
||||||
else:
|
else:
|
||||||
addr = 0
|
addr = 0
|
||||||
segment = DefaultSegment(raw, start_addr=addr, name=name, verbose_name=verbose_name)
|
segment = ObjSegment(raw, 0, 0, start_addr=addr, name=name, verbose_name=verbose_name)
|
||||||
if addr > 0:
|
if addr > 0:
|
||||||
style = segment.get_style_bits(data=True)
|
style = segment.get_style_bits(data=True)
|
||||||
segment.style[0:4] = style
|
segment.style[0:4] = style
|
||||||
|
@ -312,6 +312,10 @@ class DefaultSegment(object):
|
|||||||
self.map_width = 40
|
self.map_width = 40
|
||||||
self.uuid = str(uuid.uuid4())
|
self.uuid = str(uuid.uuid4())
|
||||||
|
|
||||||
|
# Some segments may not have a standard place in memory, so this flag
|
||||||
|
# can be used to skip the memory map lookup when displaying disassembly
|
||||||
|
self.use_origin = False
|
||||||
|
|
||||||
def set_raw(self, rawdata):
|
def set_raw(self, rawdata):
|
||||||
self.rawdata = rawdata
|
self.rawdata = rawdata
|
||||||
self.data = rawdata.get_data()
|
self.data = rawdata.get_data()
|
||||||
@ -895,6 +899,7 @@ class ObjSegment(DefaultSegment):
|
|||||||
DefaultSegment.__init__(self, rawdata, start_addr, name, **kwargs)
|
DefaultSegment.__init__(self, rawdata, start_addr, name, **kwargs)
|
||||||
self.metadata_start = metadata_start
|
self.metadata_start = metadata_start
|
||||||
self.data_start = data_start
|
self.data_start = data_start
|
||||||
|
self.use_origin = True
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
count = len(self)
|
count = len(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user