Пример #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;
            }
        }
Пример #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());
Пример #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());
Пример #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());
Пример #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());
Пример #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);
        }
Пример #7
0
 private static void JumpWriter(OpcodeInfo o, VirtualMachine.SegmentInfo si, ushort jtab, IndentedTextWriter w) => w.Write(" 0x{0:X4}", OpcodeInfo.ParseJump(jtab));