(self, addr)
Retrieve data from data memory.
Retrieve data from data memory.
Retrieve data from data memory .
def get_memory(self, addr):
        """Retrieve data from data memory."""
        addr -= self.data_segment*0x10
        if addr >= self.var_start():
            # variable memory
            return max(0, self._get_var_memory(addr))
        elif addr >= self.code_start:
            # code memory
            return max(0, self.program.get_memory(addr))
        elif addr >= self._field_mem_start:
            # file & FIELD memory
            return max(0, self._get_field_memory(addr))
        else:
            # other BASIC data memory
            return max(0, self._get_basic_memory(addr))
def get_memory ( self , addr ) : addr -= self . data_segment * 0x10 if addr >= self . var_start ( ) : # variable memory return max ( 0 , self . _get_var_memory ( addr ) ) elif addr >= self . code_start : # code memory return max ( 0 , self . program . get_memory ( addr ) ) elif addr >= self . _field_mem_start : # file & FIELD memory return max ( 0 , self . _get_field_memory ( addr ) ) else : # other BASIC data memory return max ( 0 , self . _get_basic_memory ( addr ) )