static public DynarecResult JP_addr(DynarecContextChip8 Context, ushort Address) { return ast.Statements( #if NATIVE_JUMPS ast.Statement(ast.CallTail(ast.CallDelegate(Context.GetCallForAddress(Address + Context.GetRegister(0)), Context.GetCpuContext()))), #else ast.Statements(ast.Assign(Context.GetPC(), Address + Context.GetRegister(0))), #endif ast.Return() ); }
static public DynarecResult CALL(DynarecContextChip8 Context, ushort Address) { return ast.Statements( #if NATIVE_CALLS ast.Statement(ast.CallDelegate(Context.GetCallForAddress(Address), Context.GetCpuContext())) #else ast.Statement(ast.CallInstance(Context.GetCallStack(), (Action<uint>)((new Stack<uint>()).Push), Context.EndPC)), ast.Statements(ast.Assign(Context.GetPC(), Address)), ast.Return() #endif ); }
//static public DynarecResult SYS(DynarecContext DynarecContext, ushort Address) //{ // return ast.Statement(); //} static public DynarecResult CLS(DynarecContextChip8 Context) { return ast.Statement(ast.CallStatic((Action<CpuContext>)Chip8InterpreterImplementation.CLS, Context.GetCpuContext())); }
static public DynarecResult LD_vx_Iptr(DynarecContextChip8 Context, byte X) { return ast.Statement(ast.CallStatic((Action<CpuContext, byte>)Chip8InterpreterImplementation.LD_vx_Iptr, Context.GetCpuContext(), X)); }
static public DynarecResult DRW(DynarecContextChip8 Context, byte X, byte Y, byte Nibble) { return ast.Statement(ast.CallStatic((Action<CpuContext, byte, byte, byte>)Chip8InterpreterImplementation.DRW, Context.GetCpuContext(), X, Y, Nibble)); }
static public DynarecResult RND(DynarecContextChip8 Context, byte X, byte Byte) { return ast.Statement(ast.CallStatic((Action<CpuContext, byte, byte>)Chip8InterpreterImplementation.RND, Context.GetCpuContext(), X, Byte)); }