def ascii_listing2program_dump(self, basic_program_ascii, program_start=None):
        """
        convert a ASCII BASIC program listing into tokens.
        This tokens list can be used to insert it into the
        Emulator RAM.
        """
        if program_start is None:
            program_start = self.DEFAULT_PROGRAM_START

        basic_lines = self.ascii_listing2basic_lines(basic_program_ascii, program_start)

        program_dump=self.listing.basic_lines2program_dump(basic_lines, program_start)
        assert isinstance(program_dump, bytearray), (
            "is type: %s and not bytearray: %s" % (type(program_dump), repr(program_dump))
        )
        return program_dump
def ascii_listing2program_dump ( self , basic_program_ascii , program_start = None ) : if program_start is None : program_start = self . DEFAULT_PROGRAM_START basic_lines = self . ascii_listing2basic_lines ( basic_program_ascii , program_start ) program_dump = self . listing . basic_lines2program_dump ( basic_lines , program_start ) assert isinstance ( program_dump , bytearray ) , ( "is type: %s and not bytearray: %s" % ( type ( program_dump ) , repr ( program_dump ) ) ) return program_dump
convert a ASCII BASIC program listing into tokens.
        This tokens list can be used to insert it into the
        Emulator RAM.