static void Main(string[] args) { if (args.Length != 1) { Console.Error.WriteLine("Sim704 Version 0.1"); Console.Error.WriteLine("Usage: Sim704 config.xml"); return; } Bootdev boot = Io704.Init(args[0]); AppDomain.CurrentDomain.ProcessExit += new EventHandler(Io704.OnProcessExit); switch (boot) { case Bootdev.CRD: CPU704.LoadCrd(); break; case Bootdev.DR: CPU704.LoadDrm(); break; case Bootdev.MT: CPU704.LoadTape(); break; } }
public void RDS() /* Read Select*/ { if (f == null) { eof = true; } else { int r = f.ReadRecord(out bool binary, out byte[] mrecord); if (r < 1) { eof = true; if (cardwasread) { if (Io704.Config.LogIO != null) { Io704.LogIO.WriteLine("Card Reader empty"); } Io704.Flush(); Console.Error.WriteLine("Card Reader empty"); CPU704.halt = true; CPU704.repeat = true; cardwasread = false; } } else { if (Io704.Config.LogIO != null) { Io704.LogIO.WriteLine("Card {0} read", f.NumOfRecords()); } cardwasread = true; if (!binary || mrecord.Length != 160) { throw new InvalidDataException("invalid cbn record on Card Reader"); } CBNConverter.FromCBN(mrecord, out RRecord); eof = false; } } ReadActive = true; PosInRecord = 0; }