function luaP.GET_OPCODE(Q,Y)return Q.ROpCode[Y.OP]end function luaP.SET_OPCODE(c,Y,Q)Y.OP=c.OpCode[Q]end function luaP.GETARG_A(Q,Y)return Y.A end function luaP.SETARG_A(c,Y,Q)Y.A=Q end function luaP.GETARG_B(Q,Y)return Y.B end function luaP.SETARG_B(c,Y,Q)Y.B=Q end function luaP.GETARG_C(Q,Y)return Y.C end function luaP.SETARG_C(c,Y,Q)Y.C=Q end function luaP.GETARG_Bx(Q,Y)return Y.Bx end function luaP.SETARG_Bx(c,Y,Q)Y.Bx=Q end function luaP.GETARG_sBx(Q,Y)return Y.Bx-Q.MAXARG_sBx end function luaP.SETARG_sBx(c,Y,Q)Y.Bx=Q+c.MAXARG_sBx end function luaP.CREATE_ABC(M,Y,Q,c,T)return{OP=M.OpCode[Y],A=Q;B=c,C=T}end function luaP.CREATE_ABx(T,Y,Q,c)return{OP=T.OpCode[Y];A=Q,Bx=c}end

function luaP:GET_OPCODE(i) return self.ROpCode[i.OP] end
function luaP:SET_OPCODE(i, o) i.OP = self.OpCode[o] end

function luaP:GETARG_A(i) return i.A end
function luaP:SETARG_A(i, u) i.A = u end

function luaP:GETARG_B(i) return i.B end
function luaP:SETARG_B(i, b) i.B = b end

function luaP:GETARG_C(i) return i.C end
function luaP:SETARG_C(i, b) i.C = b end

function luaP:GETARG_Bx(i) return i.Bx end
function luaP:SETARG_Bx(i, b) i.Bx = b end

function luaP:GETARG_sBx(i) return i.Bx - self.MAXARG_sBx end
function luaP:SETARG_sBx(i, b) i.Bx = b + self.MAXARG_sBx end

function luaP:CREATE_ABC(o,a,b,c)
  return {OP = self.OpCode[o], A = a, B = b, C = c}
end

function luaP:CREATE_ABx(o,a,bc)
  return {OP = self.OpCode[o], A = a, Bx = bc}
end
