Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

431 lines
5.0 KiB

  1. #ifndef MONITOR
  2. //
  3. // temp file for Assembler CPU which provides a simple C cpu -> A cpu register
  4. // mapping for MS libraries (DEM/WOW32/XMS) which are linked for ccpu register
  5. // gets & sets. STF.
  6. #include "host_def.h"
  7. #include "insignia.h"
  8. #include "xt.h"
  9. #include CpuH
  10. #ifdef A3CPU
  11. #ifndef CCPU
  12. half_word c_getAL()
  13. {
  14. half_word xal; //pedantic method put in to check compiler correct etc...
  15. xal = a3_getAL();
  16. return(xal);
  17. }
  18. half_word c_getAH()
  19. {
  20. half_word xah;
  21. xah = a3_getAH();
  22. return(xah);
  23. }
  24. word c_getAX()
  25. {
  26. word xax;
  27. xax = a3_getAX();
  28. return(xax);
  29. }
  30. half_word c_getBL()
  31. {
  32. half_word xbl;
  33. xbl = a3_getBL();
  34. return(xbl);
  35. }
  36. half_word c_getBH()
  37. {
  38. half_word xbh;
  39. xbh = a3_getBH();
  40. return(xbh);
  41. }
  42. word c_getBP()
  43. {
  44. word xbp;
  45. xbp = a3_getBP();
  46. return(xbp);
  47. }
  48. word c_getBX()
  49. {
  50. word xbx;
  51. xbx = a3_getBX();
  52. return(xbx);
  53. }
  54. INT c_getCF()
  55. {
  56. INT xcf;
  57. xcf = a3_getCF();
  58. return(xcf);
  59. }
  60. half_word c_getCH()
  61. {
  62. half_word xch;
  63. xch = a3_getCH();
  64. return(xch);
  65. }
  66. half_word c_getCL()
  67. {
  68. half_word xcl;
  69. xcl = a3_getCL();
  70. return(xcl);
  71. }
  72. word c_getCS()
  73. {
  74. word xcs;
  75. xcs = a3_getCS();
  76. return(xcs);
  77. }
  78. word c_getCX()
  79. {
  80. word xcx;
  81. xcx = a3_getCX();
  82. return(xcx);
  83. }
  84. half_word c_getDH()
  85. {
  86. half_word xdh;
  87. xdh = a3_getDH();
  88. return(xdh);
  89. }
  90. word c_getDI()
  91. {
  92. word xdi;
  93. xdi = a3_getDI();
  94. return(xdi);
  95. }
  96. half_word c_getDL()
  97. {
  98. half_word xdl;
  99. xdl = a3_getDL();
  100. return(xdl);
  101. }
  102. word c_getDS()
  103. {
  104. word xds;
  105. xds = a3_getDS();
  106. return(xds);
  107. }
  108. word c_getDX()
  109. {
  110. word xdx;
  111. xdx = a3_getDX();
  112. return(xdx);
  113. }
  114. word c_getES()
  115. {
  116. word xes;
  117. xes = a3_getES();
  118. return(xes);
  119. }
  120. word c_getSI()
  121. {
  122. word xsi;
  123. xsi = a3_getSI();
  124. return(xsi);
  125. }
  126. word c_getSP()
  127. {
  128. word xsp;
  129. xsp = a3_getSP();
  130. return(xsp);
  131. }
  132. word c_getIP()
  133. {
  134. word xip;
  135. xip = a3_getIP();
  136. return(xip);
  137. }
  138. word c_getSS()
  139. {
  140. word xss;
  141. xss = a3_getSS();
  142. return(xss);
  143. }
  144. word c_getGS()
  145. {
  146. #ifndef PROD
  147. printf("NO NO NO NO NO getGS - I'm not a 386\n");
  148. #endif
  149. return(0);
  150. }
  151. word c_getFS()
  152. {
  153. #ifndef PROD
  154. printf("NO NO NO NO NO getFS - I'm not a 386\n");
  155. #endif
  156. return(0);
  157. }
  158. word c_getAF()
  159. {
  160. return(a3_getAF());
  161. }
  162. word c_getDF()
  163. {
  164. return(a3_getDF());
  165. }
  166. word c_getIF()
  167. {
  168. return(a3_getIF());
  169. }
  170. word setMSW()
  171. {
  172. return(a3_p_setMSW());
  173. }
  174. word c_getOF()
  175. {
  176. return(a3_getOF());
  177. }
  178. word c_getPF()
  179. {
  180. return(a3_getPF());
  181. }
  182. word c_getSF()
  183. {
  184. return(a3_getSF());
  185. }
  186. word c_getZF()
  187. {
  188. return(a3_getZF());
  189. }
  190. void c_setAL(val)
  191. half_word val;
  192. {
  193. a3_setAL(val);
  194. }
  195. void c_setAH(val)
  196. half_word val;
  197. {
  198. a3_setAH(val);
  199. }
  200. void c_setAX(val)
  201. word val;
  202. {
  203. a3_setAX(val);
  204. }
  205. void c_setBP(val)
  206. word val;
  207. {
  208. a3_setBP(val);
  209. }
  210. void c_setBL(val)
  211. half_word val;
  212. {
  213. a3_setBL(val);
  214. }
  215. void c_setBH(val)
  216. half_word val;
  217. {
  218. a3_setBH(val);
  219. }
  220. void c_setBX(val)
  221. word val;
  222. {
  223. a3_setBX(val);
  224. }
  225. void c_setCF(val)
  226. INT val;
  227. {
  228. a3_setCF(val);
  229. }
  230. void c_setCH(val)
  231. half_word val;
  232. {
  233. a3_setCH(val);
  234. }
  235. void c_setCL(val)
  236. half_word val;
  237. {
  238. a3_setCL(val);
  239. }
  240. void c_setCX(val)
  241. word val;
  242. {
  243. a3_setCX(val);
  244. }
  245. void c_setDH(val)
  246. half_word val;
  247. {
  248. a3_setDH(val);
  249. }
  250. void c_setDL(val)
  251. half_word val;
  252. {
  253. a3_setDL(val);
  254. }
  255. void c_setDX(val)
  256. word val;
  257. {
  258. a3_setDX(val);
  259. }
  260. void c_setSI(val)
  261. word val;
  262. {
  263. a3_setSI(val);
  264. }
  265. void c_setDI(val)
  266. word val;
  267. {
  268. a3_setDI(val);
  269. }
  270. void c_setAF(word val)
  271. {
  272. a3_setAF(val);
  273. }
  274. void c_setIF(word val)
  275. {
  276. a3_setIF(val);
  277. }
  278. void c_setOF(word val)
  279. {
  280. a3_setOF(val);
  281. }
  282. void c_setPF(word val)
  283. {
  284. a3_setPF(val);
  285. }
  286. void c_setSF(word val)
  287. {
  288. a3_setSF(val);
  289. }
  290. void c_setMSW(word val)
  291. {
  292. a3_p_setMSW(val);
  293. }
  294. void c_setZF(word val)
  295. {
  296. a3_setZF(val);
  297. }
  298. void c_setIP(word val)
  299. {
  300. a3_setIP(val);
  301. }
  302. void c_setDF(word val)
  303. {
  304. a3_setDF(val);
  305. }
  306. void c_setSP(val)
  307. word val;
  308. {
  309. a3_setSP(val);
  310. }
  311. INT c_setSS(val)
  312. word val;
  313. {
  314. return(a3_setSS(val));
  315. }
  316. INT c_setES(val)
  317. word val;
  318. {
  319. return(a3_setES(val));
  320. }
  321. INT c_setDS(val)
  322. word val;
  323. {
  324. return(a3_setDS(val));
  325. }
  326. INT c_setCS(val)
  327. word val;
  328. {
  329. return(a3_setCS(val));
  330. }
  331. INT c_setGS(val)
  332. word val;
  333. {
  334. #ifndef PROD
  335. printf("NO NO NO NO NO setGS - I'm not a 386\n");
  336. #endif
  337. return(0);
  338. }
  339. INT c_setFS(val)
  340. word val;
  341. {
  342. #ifndef PROD
  343. printf("NO NO NO NO NO setFS - I'm not a 386\n");
  344. #endif
  345. return(0);
  346. }
  347. #endif /* CCPU */
  348. // these two crept into WOW - they are x86 monitor'isms
  349. word getEIP()
  350. {
  351. return(a3_getIP());
  352. }
  353. void setEIP(val)
  354. word val;
  355. {
  356. a3_setIP(val);
  357. }
  358. #endif // A3CPU
  359. #endif // !MONITOR