(self, args)
BLOAD: Load a file into a block of memory.
BLOAD: Load a file into a block of memory.
BLOAD : Load a file into a block of memory .
def bload_(self, args):
        """BLOAD: Load a file into a block of memory."""
        if self._memory.program.protected and not self.interpreter.run_mode:
            raise error.BASICError(error.IFC)
        name = values.next_string(args)
        offset = next(args)
        if offset is not None:
            offset = values.to_int(offset, unsigned=True)
        list(args)
        with self._files.open(0, name, filetype=b'M', mode=b'I') as g:
            # size gets ignored; even the \x1a at the end gets dumped onto the screen.
            seg = g.seg
            if offset is None:
                offset = g.offset
            buf = bytearray(g.read())
            # remove any EOF marker at end
            if buf and buf[-1] == 0x1a:
                buf = buf[:-1]
            # Tandys repeat the header at the end of the file
            if self._syntax == 'tandy':
                buf = buf[:-7]
            addr = seg * 0x10 + offset
            self._set_memory_block(addr, buf)
def bload_ ( self , args ) : if self . _memory . program . protected and not self . interpreter . run_mode : raise error . BASICError ( error . IFC ) name = values . next_string ( args ) offset = next ( args ) if offset is not None : offset = values . to_int ( offset , unsigned = True ) list ( args ) with self . _files . open ( 0 , name , filetype = b'M' , mode = b'I' ) as g : # size gets ignored; even the \x1a at the end gets dumped onto the screen. seg = g . seg if offset is None : offset = g . offset buf = bytearray ( g . read ( ) ) # remove any EOF marker at end if buf and buf [ - 1 ] == 0x1a : buf = buf [ : - 1 ] # Tandys repeat the header at the end of the file if self . _syntax == 'tandy' : buf = buf [ : - 7 ] addr = seg * 0x10 + offset self . _set_memory_block ( addr , buf )