Ejemplo n.º 1
0
 private void stOpcode(sWord S)
 {
     int val = 0;
     if (fFixed)
     { val = fFixed_switch(S.getInt()); }
     else { val = S.getInt(); }
     switch (RegBank.get_word(11))
     {
         case 0:
             if (val > 6 | PB.getId()!=0 | PB.isErasable()==false)
             {
                 TC(val + index);
                 Console.WriteLine("TC {0:X4}", val + index);
             }
             else
             {
                 switch (val)
                 {
                     case 0:
                         Console.WriteLine("XXALQ");
                         break;
                     case 1:
                         Console.WriteLine("XLQ");
                         break;
                     case 2:
                         Console.WriteLine("RETURN");
                         break;
                     case 3:
                         Console.WriteLine("RELINT");
                         break;
                     case 4:
                         Console.WriteLine("INHINT");
                         break;
                     case 5:
                         TC(val + index);
                         Console.WriteLine("TC {0:X4}", val + index);
                         break;
                     case 6:
                         extra = true;
                         Console.WriteLine("EXTEND");
                         break;
                 }
             }
             index = 0;
             break;
         case 1:
             if (QC == 0)
             {
                 Console.WriteLine("CCS {0:X4}", val+index);
                 index = 0;
                 break;
             }
             else
             {
                 Console.WriteLine("TCF {0:X4}", val + index);
                 index = 0;
                 break;
             }
         case 2:
             switch (QC)
             {
                 case 0:
                     if (val == 0)
                     {
                         Console.WriteLine("DDOUBL");
                         break;
                     }
                         Console.WriteLine("DAS {0:X4}", val + index);
                         break;
                 case 1:
                     if(val==6)
                     {
                         Console.WriteLine("ZL");
                         break;
                     }
                     Console.WriteLine("LXCH {0:X4}", val + index);
                     break;
                 case 2:
                     Console.WriteLine("INCR {0:X4}", val + index);
                     INCR(val + index);
                     break;
                 case 3:
                     Console.WriteLine("ADS {0:X4}", val + index);
                     break;
             }
             index = 0;
             break;
         case 3:
             Console.WriteLine("CA {0:X4}", val + index);
             CA(val + index);
             index = 0;
             break;
         case 4:
             if(val==0)
             {
                 Console.WriteLine("COM");
                 break;
             }
             Console.WriteLine("CS {0:X4}", val + index);
             index = 0;
             break;
         case 5:
             switch (QC)
             {
                 case 0:
                     if(val==17)
                     {
                         Console.WriteLine("RESUME");
                     }
                     Console.WriteLine("INDEX {0:X4}", val + index);
                     index = PB.get_word((short)(val + index));
                     break;
                 case 1:
                     switch(val)
                     {
                         case 4:
                             Console.WriteLine("DTCF");
                             break;
                         case 5:
                             Console.WriteLine("DTCB");
                             break;
                         default:
                             Console.WriteLine("DXCH {0:X4}", val + index);
                             break;
                     }
                     index = 0;
                     break;
                 case 2:
                     switch (val)
                     {
                         case 4:
                             Console.WriteLine("OVSK");
                             break;
                         case 5:
                             Console.WriteLine("TCAA");
                             break;
                         default:
                            Console.WriteLine("TS {0:X4}", val + index);
                             TS(val+index);
                             break;
                     }
                     Console.WriteLine("TS {0:X4}", val + index);
                     TS(val+index);
                     index = 0;
                     break;
                 case 3:
                     Console.WriteLine("XCH {0:X4}", val + index);
                     index = 0;
                     break;
             }
             break;
         case 6:
             if (val != 0)
             {
                 Console.WriteLine("AD {0:X4}", val + index);
                 AD(val + index);
             }
             else
             {
                 Console.WriteLine("DOUBLE");
             }
             index = 0;
             break;
         case 7:
             if (fFixed)
             { val = fFixed_switch(S.getInt()); }
             else { val = S.getInt(); }
             Console.WriteLine("MASK {0:X4}", val + index);
             running = false;
             index = 0;
             break;
     }
 }
Ejemplo n.º 2
0
 private void extraCodes(sWord S)
 {
     int val = 0;
     if (fFixed)
     { val = fFixed_switch(S.getInt()); }
     else { val = S.getInt(); }
     switch (RegBank.get_word(11))
     {
         case 0:
             val = S.getVal(0, 8);
             switch(PC)
             {
                 case 0:
                     Console.WriteLine("READ {0:X4}", val+index);
                     break;
                 case 1:
                     Console.WriteLine("WRITE {0:X4}", val+index);
                     write_chan(val, RegBank.get_word(0));
                     break;
                 case 2:
                     Console.WriteLine("RAND {0:X4}", val+index);
                     break;
                 case 3:
                     Console.WriteLine("WAND {0:X4}", val+index);
                     break;
                 case 4:
                     Console.WriteLine("ROR {0:X4}", val+index);
                     break;
                 case 5:
                     Console.WriteLine("WOR {0:X4}", val+index);
                     break;
                 case 6:
                     Console.WriteLine("RXOR {0:X4}", val+index);
                     break;
                 case 7:
                     Console.WriteLine("WXOR {0:X4}", val+index);
                     break;
             }
             index = 0;
             extra = false;
             break;
         case 1:
             if(QC==0)
             {
                 Console.WriteLine("DV {0:X4}", val + index);
             }
             else
             {
                 Console.WriteLine("BZF {0:X4}", val + index);
             }
             index = 0;
             extra = false;
             break;
         case 2:
             switch(QC)
             {
                 case 1:
                     Console.WriteLine("MSU {0:X4}", val + index);
                     break;
                 case 2:
                     if (val == 7)
                     {
                         Console.WriteLine("ZQ");
                     }
                     else
                     {
                         Console.WriteLine("QXCH {0:X4}", val + index);
                     }
                     break;
                 case 3:
                     Console.WriteLine("AUG {0:X4}", val + index);
                     break;
                 case 4:
                     Console.WriteLine("DIM {0:X4}", val + index);
                     break;
             }
             index = 0;
             extra = false;
             break;
         case 3:
             if (val == 0)
             {
                 Console.WriteLine("DCOM");
             }
             else
             {
                 Console.WriteLine("DCA {0:X4}", val + index);
             }
             index = 0;
             extra = false;
             break;
         case 4:
             Console.WriteLine("DCS {0:X4}", val + index);
             index = 0;
             extra = false;
             break;
         case 5:
             Console.WriteLine("INDEX {0:X4}", val + index);
             index = PB.get_word((short)(val + index));
             extra = true;
             break;
         case 6:
             if(QC==0)
             { Console.WriteLine("SU {0:X4}", val + index); }
             else { Console.WriteLine("BZMF {0:X4}", val + index); }
             index = 0;
             extra = false;
             break;
         case 7:
             if (val == 0)
             {
                 Console.WriteLine("SQUARE");
             }
             else
             {
                 Console.WriteLine("MP {0:X4}", val + index);
             }
             index = 0;
             extra = false;
             break;
     }
 }