def optimizedWithContext(self, ctx): bank = self.bank.optimizedWithContext(ctx) addr = self.addr.optimizedWithContext(ctx) if hasattr(addr, 'value') and addr.value is not None and hasattr(bank, 'value') and bank.value is not None: return ProcAddress(address.fromVirtualAndBank(addr.value, bank.value)) return ComputedProcAddress(bank, addr)
def getLimit(proj, addr): if addr.inPhysicalMem(): bank_limit = address.fromVirtualAndBank(0x4000, addr.bank() + 1) else: bank_limit = address.fromVirtual(0xFFFF) next_owned = proj.database.getNextOwnedAddress(addr) if not next_owned or bank_limit < next_owned: return bank_limit else: return next_owned
def getLimit(proj, addr): if addr.inPhysicalMem(): bank_limit = address.fromVirtualAndBank(0x4000, addr.bank()+1) else: bank_limit = address.fromVirtual(0xFFFF) next_owned = proj.database.getNextOwnedAddress(addr) if not next_owned or bank_limit < next_owned: return bank_limit else: return next_owned