MCPcopy Create free account
hub / github.com/TASEmulators/fceux / getValue

Function getValue

src/debug.cpp:108–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106// Returns the value of a given type or register
107
108int getValue(int type)
109{
110 switch (type)
111 {
112 case 'A': return _A;
113 case 'X': return _X;
114 case 'Y': return _Y;
115 case 'N': return _P & N_FLAG ? 1 : 0;
116 case 'V': return _P & V_FLAG ? 1 : 0;
117 case 'U': return _P & U_FLAG ? 1 : 0;
118 case 'B': return _P & B_FLAG ? 1 : 0;
119 case 'D': return _P & D_FLAG ? 1 : 0;
120 case 'I': return _P & I_FLAG ? 1 : 0;
121 case 'Z': return _P & Z_FLAG ? 1 : 0;
122 case 'C': return _P & C_FLAG ? 1 : 0;
123 case 'P': return _PC;
124 case 'S': return _S;
125 }
126
127 return 0;
128}
129
130
131/**

Callers 1

evaluateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected