SYMCHAR.C
上传用户:hlzzc88
上传日期:2007-01-06
资源大小:220k
文件大小:8k
源码类别:

编译器/解释器

开发平台:

Others

  1. /*
  2.  * 68K/386 32-bit C compiler.
  3.  *
  4.  * copyright (c) 1997, David Lindauer
  5.  * 
  6.  * This compiler is intended for educational use.  It may not be used
  7.  * for profit without the express written consent of the author.
  8.  *
  9.  * It may be freely redistributed, as long as this notice remains intact
  10.  * and either the original sources or derived sources 
  11.  * are distributed along with any executables derived from the originals.
  12.  *
  13.  * The author is not responsible for any damages that may arise from use
  14.  * of this software, either idirect or consequential.
  15.  *
  16.  * v1.35 March 1997
  17.  * David Lindauer, gclind01@starbase.spd.louisville.edu
  18.  *
  19.  * Credits to Mathew Brandt for original K&R C compiler
  20.  *
  21.  */
  22. /* 
  23.  * This is a mapping for CTYPE type functions to work with phitext
  24.  */
  25. #include <stdio.h>
  26. #include "utype.h"
  27. #include "interp.h"
  28. BYTE startchars[256] ={
  29. /* Bank 0 */
  30. 0x00,0x00,0x00,0x00,
  31. 0x08,0x00,0x00,0x00,
  32. 0x7f,0xff,0xff,0xe1,
  33. 0x7f,0xff,0xff,0xe0,
  34. /* Bank 1 */
  35. 0x00,0x00,0x00,0x00,
  36. 0x00,0x00,0x00,0x00,
  37. 0x00,0x7e,0x11,0x00,
  38. 0x00,0x00,0x00,0x00,
  39. /* Bank 2 */
  40. 0x00,0x00,0x00,0x00,
  41. 0x00,0x00,0xff,0xff,
  42. 0xff,0xff,0xff,0xff,
  43. 0xff,0xff,0xff,0xff,
  44. /* Bank 3 */
  45. 0x00,0x00,0x00,0x00,
  46. 0x00,0x00,0x00,0x00,
  47. 0xff,0xff,0xff,0xff,
  48. 0xff,0xfc,0x00,0x00,
  49. /* Bank 4*/
  50. 0x00,0x00,0x00,0x00,
  51. 0x00,0x00,0x00,0x00,
  52. 0xff,0xff,0xff,0x00,
  53. 0xff,0xff,0xff,0x00,
  54. /* Bank 5*/
  55. 0x00,0x00,0x00,0x00,
  56. 0x00,0x00,0x00,0x00,
  57. 0xff,0xff,0xf8,0x00,
  58. 0xff,0xff,0xff,0xf0,
  59. /* Bank 6 */
  60. 0x00,0x00,0x00,0x00,
  61. 0x00,0x00,0x00,0x00,
  62. 0x00,0x00,0x00,0x00,
  63. 0x00,0x00,0x00,0x00,
  64. /* Bank 7 */
  65. 0x00,0x00,0x00,0x00,
  66. 0x00,0x00,0x00,0x00,
  67. 0x00,0x00,0x00,0x00,
  68. 0x00,0x00,0x00,0x00,
  69. /* Bank 8 */
  70. 0x00,0x00,0x00,0x00,
  71. 0x00,0x00,0x00,0x00,
  72. 0x00,0x00,0x00,0x00,
  73. 0x00,0x00,0x00,0x00,
  74. /* Bank 9 */
  75. 0x00,0x00,0x00,0x00,
  76. 0x00,0x00,0x00,0x00,
  77. 0x00,0x00,0x00,0x00,
  78. 0x00,0x00,0x00,0x00,
  79. /* Bank 10 */
  80. 0x00,0x00,0x00,0x00,
  81. 0x00,0x00,0x00,0x00,
  82. 0x00,0x00,0x00,0x00,
  83. 0x00,0x00,0x00,0x00,
  84. /* Bank 11 */
  85. 0x00,0x00,0x00,0x00,
  86. 0x00,0x00,0x00,0x00,
  87. 0x00,0x00,0x00,0x00,
  88. 0x00,0x00,0x00,0x00,
  89. /* Bank 12 */
  90. 0x00,0x00,0x00,0x00,
  91. 0x00,0x00,0x00,0x00,
  92. 0x00,0x00,0x00,0x00,
  93. 0x00,0x00,0x00,0x00,
  94. /* Bank 13 */
  95. 0x00,0x00,0x00,0x00,
  96. 0x00,0x00,0x00,0x00,
  97. 0x00,0x00,0x00,0x00,
  98. 0x00,0x00,0x00,0x00,
  99. /* Bank 14 */
  100. 0x00,0x00,0x00,0x00,
  101. 0x00,0x00,0x00,0x00,
  102. 0x00,0x00,0x00,0x00,
  103. 0x00,0x00,0x00,0x00,
  104. /* Bank 15 */
  105. 0x00,0x00,0x00,0x00,
  106. 0x00,0x00,0x00,0x00,
  107. 0x00,0x00,0x00,0x00,
  108. 0x00,0x00,0x00,0x00
  109. };
  110. BYTE symchars[256] ={
  111. /* Bank 0 */
  112. 0x00,0x00,0x00,0x00,
  113. 0x08,0x00,0xff,0xc0,
  114. 0x7f,0xff,0xff,0xe1,
  115. 0x7f,0xff,0xff,0xe0,
  116. /* Bank 1 */
  117. 0x00,0x00,0x00,0x00,
  118. 0x00,0x00,0x00,0x00,
  119. 0x00,0x7e,0x11,0x00,
  120. 0x00,0x00,0x00,0x00,
  121. /* Bank 2 */
  122. 0x00,0x00,0x00,0x00,
  123. 0x00,0x00,0xff,0xff,
  124. 0xff,0xff,0xff,0xff,
  125. 0xff,0xff,0xff,0xff,
  126. /* Bank 3 */
  127. 0x00,0x00,0x00,0x00,
  128. 0x00,0x00,0x00,0x00,
  129. 0xff,0xff,0xff,0xff,
  130. 0xff,0xfc,0x00,0x00,
  131. /* Bank 4*/
  132. 0x00,0x00,0x00,0x00,
  133. 0x00,0x00,0x00,0x00,
  134. 0xff,0xff,0xff,0x00,
  135. 0xff,0xff,0xff,0x00,
  136. /* Bank 5*/
  137. 0x00,0x00,0x00,0x00,
  138. 0x00,0x00,0x00,0x00,
  139. 0xff,0xff,0xf8,0x00,
  140. 0xff,0xff,0xff,0xf0,
  141. /* Bank 6 */
  142. 0x00,0x00,0x00,0x00,
  143. 0x00,0x00,0x00,0x00,
  144. 0x00,0x00,0x00,0x00,
  145. 0x00,0x00,0x00,0x00,
  146. /* Bank 7 */
  147. 0x00,0x00,0x00,0x00,
  148. 0x00,0x00,0x00,0x00,
  149. 0x00,0x00,0x00,0x00,
  150. 0x00,0x00,0x00,0x00,
  151. /* Bank 8 */
  152. 0x00,0x00,0x00,0x00,
  153. 0x00,0x00,0x00,0x00,
  154. 0x00,0x00,0x00,0x00,
  155. 0x00,0x00,0x00,0x00,
  156. /* Bank 9 */
  157. 0x00,0x00,0x00,0x00,
  158. 0x00,0x00,0x00,0x00,
  159. 0x00,0x00,0x00,0x00,
  160. 0x00,0x00,0x00,0x00,
  161. /* Bank 10 */
  162. 0x00,0x00,0x00,0x00,
  163. 0x00,0x00,0x00,0x00,
  164. 0x00,0x00,0x00,0x00,
  165. 0x00,0x00,0x00,0x00,
  166. /* Bank 11 */
  167. 0x00,0x00,0x00,0x00,
  168. 0x00,0x00,0x00,0x00,
  169. 0x00,0x00,0x00,0x00,
  170. 0x00,0x00,0x00,0x00,
  171. /* Bank 12 */
  172. 0x00,0x00,0x00,0x00,
  173. 0x00,0x00,0x00,0x00,
  174. 0x00,0x00,0x00,0x00,
  175. 0x00,0x00,0x00,0x00,
  176. /* Bank 13 */
  177. 0x00,0x00,0x00,0x00,
  178. 0x00,0x00,0x00,0x00,
  179. 0x00,0x00,0x00,0x00,
  180. 0x00,0x00,0x00,0x00,
  181. /* Bank 14 */
  182. 0x00,0x00,0x00,0x00,
  183. 0x00,0x00,0x00,0x00,
  184. 0x00,0x00,0x00,0x00,
  185. 0x00,0x00,0x00,0x00,
  186. /* Bank 15 */
  187. 0x00,0x00,0x00,0x00,
  188. 0x00,0x00,0x00,0x00,
  189. 0x00,0x00,0x00,0x00,
  190. 0x00,0x00,0x00,0x00
  191. };
  192. BYTE whitespacechars[256] ={
  193. /* Bank 0 */
  194. 0x00,0x68,0x00,0x00,
  195. 0x80,0x00,0x00,0x00,
  196. 0x00,0x00,0x00,0x00,
  197. 0x00,0x00,0x00,0x01,
  198. /* Bank 1 */
  199. 0x00,0x00,0x00,0x00,
  200. 0x00,0x00,0x00,0x00,
  201. 0x00,0x00,0x00,0x00,
  202. 0x00,0x00,0x00,0x00,
  203. /* Bank 2 */
  204. 0x00,0x00,0x00,0x00,
  205. 0x00,0x00,0x00,0x00,
  206. 0x00,0x00,0x00,0x00,
  207. 0x00,0x00,0x00,0x00,
  208. /* Bank 3 */
  209. 0x00,0x00,0x00,0x00,
  210. 0x00,0x00,0x00,0x00,
  211. 0x00,0x00,0x00,0x00,
  212. 0x00,0x00,0x00,0x00,
  213. /* Bank 4*/
  214. 0x00,0x00,0x00,0x00,
  215. 0x00,0x00,0x00,0x00,
  216. 0x00,0x00,0x00,0x00,
  217. 0x00,0x00,0x00,0x00,
  218. /* Bank 5*/
  219. 0x00,0x00,0x00,0x00,
  220. 0x00,0x00,0x00,0x00,
  221. 0x00,0x00,0x00,0x00,
  222. 0x00,0x00,0x00,0x00,
  223. /* Bank 6 */
  224. 0x00,0x00,0x00,0x00,
  225. 0x00,0x00,0x00,0x00,
  226. 0x00,0x00,0x00,0x00,
  227. 0x00,0x00,0x00,0x00,
  228. /* Bank 7 */
  229. 0x00,0x00,0x00,0x00,
  230. 0x2a,0xa8,0xb1,0xd8,
  231. 0x80,0x76,0x3b,0x10,
  232. 0x08,0x04,0x02,0x01,
  233. /* Bank 8 */
  234. 0x00,0x00,0x00,0x00,
  235. 0x00,0x00,0x00,0x00,
  236. 0x00,0x00,0x00,0x00,
  237. 0x00,0x00,0x00,0x00,
  238. /* Bank 9 */
  239. 0x00,0x00,0x00,0x00,
  240. 0x00,0x00,0x00,0x00,
  241. 0x00,0x00,0x00,0x00,
  242. 0x00,0x00,0x00,0x00,
  243. /* Bank 10 */
  244. 0x00,0x00,0x00,0x00,
  245. 0x00,0x00,0x00,0x00,
  246. 0x00,0x00,0x00,0x00,
  247. 0x00,0x00,0x00,0x00,
  248. /* Bank 11 */
  249. 0x00,0x00,0x00,0x00,
  250. 0x00,0x00,0x00,0x00,
  251. 0x00,0x00,0x00,0x00,
  252. 0x00,0x00,0x00,0x00,
  253. /* Bank 12 */
  254. 0x00,0x00,0x00,0x00,
  255. 0x00,0x00,0x00,0x00,
  256. 0x00,0x00,0x00,0x00,
  257. 0x00,0x00,0x00,0x00,
  258. /* Bank 13 */
  259. 0x00,0x00,0x00,0x00,
  260. 0x00,0x00,0x00,0x00,
  261. 0x00,0x00,0x00,0x00,
  262. 0x00,0x00,0x00,0x00,
  263. /* Bank 14 */
  264. 0x00,0x00,0x00,0x00,
  265. 0x00,0x00,0x00,0x00,
  266. 0x00,0x00,0x00,0x00,
  267. 0x00,0x00,0x00,0x00,
  268. /* Bank 15 */
  269. 0x00,0x00,0x00,0x00,
  270. 0xff,0x00,0x00,0x00,
  271. 0x00,0x00,0x00,0x00,
  272. 0x00,0x00,0x00,0x00
  273. };
  274. BYTE commentchars[256] ={
  275. /* Bank 0 */
  276. 0x00,0x00,0x00,0x00,
  277. 0x00,0x00,0x00,0x00,
  278. 0x00,0x00,0x00,0x00,
  279. 0x00,0x00,0x00,0x00,
  280. /* Bank 1 */
  281. 0x00,0x00,0x00,0x00,
  282. 0x00,0x00,0x00,0x00,
  283. 0x00,0x00,0x00,0x00,
  284. 0x00,0x00,0x00,0x00,
  285. /* Bank 2 */
  286. 0x00,0x00,0x00,0x00,
  287. 0x00,0x00,0x00,0x00,
  288. 0x00,0x00,0x00,0x00,
  289. 0x00,0x00,0x00,0x00,
  290. /* Bank 3 */
  291. 0x00,0x00,0x00,0x00,
  292. 0x00,0x00,0x00,0x00,
  293. 0x00,0x00,0x00,0x00,
  294. 0x00,0x00,0x00,0x00,
  295. /* Bank 4*/
  296. 0x00,0x00,0x00,0x00,
  297. 0x00,0x00,0x00,0x00,
  298. 0x00,0x00,0x00,0x00,
  299. 0x00,0x00,0x00,0x00,
  300. /* Bank 5*/
  301. 0x00,0x00,0x00,0x00,
  302. 0x00,0x00,0x00,0x00,
  303. 0x00,0x00,0x00,0x00,
  304. 0x00,0x00,0x00,0x00,
  305. /* Bank 6 */
  306. 0x00,0x00,0x00,0x00,
  307. 0x00,0x00,0x00,0x00,
  308. 0x00,0x00,0x00,0x00,
  309. 0x00,0x00,0x00,0x00,
  310. /* Bank 7 */
  311. 0x00,0x00,0x00,0x00,
  312. 0xd5,0x54,0x4e,0x27,
  313. 0x7f,0x99,0xc4,0xef,
  314. 0xf7,0xfb,0xfd,0xfe,
  315. /* Bank 8 */
  316. 0x00,0x00,0x00,0x00,
  317. 0x00,0x00,0x00,0x00,
  318. 0x00,0x00,0x00,0x00,
  319. 0x00,0x00,0x00,0x00,
  320. /* Bank 9 */
  321. 0x00,0x00,0x00,0x00,
  322. 0x00,0x00,0x00,0x00,
  323. 0x00,0x00,0x00,0x00,
  324. 0x00,0x00,0x00,0x00,
  325. /* Bank 10 */
  326. 0x00,0x00,0x00,0x00,
  327. 0x00,0x00,0x00,0x00,
  328. 0x00,0x00,0x00,0x00,
  329. 0x00,0x00,0x00,0x00,
  330. /* Bank 11 */
  331. 0x00,0x00,0x00,0x00,
  332. 0x00,0x00,0x00,0x00,
  333. 0x00,0x00,0x00,0x00,
  334. 0x00,0x00,0x00,0x00,
  335. /* Bank 12 */
  336. 0x00,0x00,0x00,0x00,
  337. 0x00,0x00,0x00,0x00,
  338. 0x00,0x00,0x00,0x00,
  339. 0x00,0x00,0x00,0x00,
  340. /* Bank 13 */
  341. 0x00,0x00,0x00,0x00,
  342. 0x00,0x00,0x00,0x00,
  343. 0x00,0x00,0x00,0x00,
  344. 0x00,0x00,0x00,0x00,
  345. /* Bank 14 */
  346. 0x00,0x00,0x00,0x00,
  347. 0x00,0x00,0x00,0x00,
  348. 0x00,0x00,0x00,0x00,
  349. 0x00,0x00,0x00,0x00,
  350. /* Bank 15 */
  351. 0x00,0x00,0x00,0x00,
  352. 0x00,0xff,0x00,0x00,
  353. 0x00,0x00,0x00,0x00,
  354. 0x00,0x00,0x00,0x00
  355. };