Example #1
0
        private static void TypeWriter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab, IndentedTextWriter w)
        {
            switch (VM.FetchByte())
            {
            case 2:
                w.Write(" REAL");
                return;

            case 4:
                w.Write(" STRING");
                return;

            case 6:
                w.Write(" BOOL");
                return;

            case 8:
                w.Write(" SET");
                return;

            case 10:
                w.Write(" BYTE");
                return;

            case 12:
                w.Write(" WORD");
                return;
            }
        }
Example #2
0
 private static void IntermediateVariableWriter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab,
                                                IndentedTextWriter w) => w.Write(" {0}_PARENT{1:X}_L{2:X}", si.Name, VM.FetchByte(), VM.FetchBig());
Example #3
0
 private static void LocalVariableWriter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab,
                                         IndentedTextWriter w) => w.Write(" {0}_{1:X}_L{2:X}", si.Name, VM.GetProcedureNumber(jtab), VM.FetchBig());
Example #4
0
 private static void GlobalVariableWiter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab,
                                         IndentedTextWriter w) => w.Write(" {0}_G{1:X}", si.Name, VM.FetchBig());
Example #5
0
 private static void ExternalVariableWiter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab,
                                           IndentedTextWriter w) => w.Write(" {0}_G{1:X}", VM.SegmentDictionary[VM.FetchByte()].Name, VM.FetchByte());
Example #6
0
        private static void CallWriter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab, IndentedTextWriter w)
        {
            var id = VM.FetchByte();

            w.Write(" {0}_{1:X}", si.Name, id);
        }
Example #7
0
 private static void JumpWriter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab, IndentedTextWriter w) => w.Write(" 0x{0:X4}", OpcodeInfo.ParseJump(jtab));