CSPspEmu.Core.Cpu.CpuProcessor.Syscall C# (CSharp) Method

Syscall() public method

public Syscall ( int Code, CpuThreadState CpuThreadState ) : void
Code int
CpuThreadState CpuThreadState
return void
        public void Syscall(int Code, CpuThreadState CpuThreadState)
        {
            Action<CpuThreadState, int> Callback;
            if ((Callback = GetSyscall(Code)) != null)
            {
                Callback(CpuThreadState, Code);
            }
            else
            {
                Console.WriteLine("Undefined syscall: {0:X6} at 0x{1:X8}", Code, CpuThreadState.PC);
            }
        }

Usage Example

コード例 #1
0
ファイル: CpuThreadState.cs プロジェクト: mrcmunir/cspspemu
        /*
         * public void Test()
         * {
         *      GPR[0] = 0;
         * }
         *
         * public uint LoadGPR(int R)
         * {
         *      return (uint)GPR[R];
         * }
         *
         * public void SaveGPR(int R, uint V)
         * {
         *      GPR[R] = (int)V;
         * }
         *
         * static public void TestBranchFlag(Processor Processor)
         * {
         *      Processor.BranchFlag = (Processor.GPR[2] == Processor.GPR[2]);
         * }
         *
         * static public void TestGPR(Processor Processor)
         * {
         *      Processor.GPR[1] = Processor.GPR[2] + Processor.GPR[2];
         * }
         */

        public void Syscall(int Code)
        {
            CpuProcessor.Syscall(Code, this);
        }