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
|
||||
else:
|
||||
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:
|
||||
style = segment.get_style_bits(data=True)
|
||||
segment.style[0:4] = style
|
||||
|
@ -311,6 +311,10 @@ class DefaultSegment(object):
|
||||
self.page_size = -1
|
||||
self.map_width = 40
|
||||
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):
|
||||
self.rawdata = rawdata
|
||||
@ -895,6 +899,7 @@ class ObjSegment(DefaultSegment):
|
||||
DefaultSegment.__init__(self, rawdata, start_addr, name, **kwargs)
|
||||
self.metadata_start = metadata_start
|
||||
self.data_start = data_start
|
||||
self.use_origin = True
|
||||
|
||||
def __str__(self):
|
||||
count = len(self)
|
||||
|
Loading…
Reference in New Issue
Block a user