public override string ToString() { var result = new StringBuilder(); TvcBasicRows.ForEach(s => result.AppendLine(s.RowText)); return(result.ToString()); }
/// <summary> /// Generates the basic loader for the assembled program. /// A 'TvcBasicException' is thrown if the generating process is failed! /// </summary> public bool GenerateBasicLoader() { try { GenerateBasicDataRows(); foreach (ProgramSection programSection in m_AssembledProgram.ProgramSections) { GenerateBasicRow($"FORI={programSection.ProgramStartAddress:D}TO{programSection.ProgramStartAddress + (programSection.SectionLength - 1):D}:READB:POKE I,B:NEXTI"); } if (m_SubRoutineStartAddress > 0) { GenerateBasicRow($"S=USR({m_SubRoutineStartAddress:D})"); } TvcBasicRows.ForEach(bsRow => BasicLoaderProgramBytes.AddRange(bsRow.TokenizedBytes)); BasicLoaderProgramBytes.Add(0x00); //The TVC basic program must be closed with zero byte } catch (TvcBasicException exception) { m_StatusMessage.AppendLine(exception.Message); return(false); } return(true); }