GRQRY.LST 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442
  1. Listing:
  2. 1 (******************************************************************************)
  3. 2 (* GRQUERY.MOD - Procedure to Qualify "GrafixCard and "CommPort" *)
  4. 3 (* *)
  5. 4 (* Taken from GRQUERY.C by Metagraphics Software Corporation *)
  6. 5 (* Translated to TopSpeed Modula-2 v3.00. *)
  7. 6 (* *)
  8. 7 (* PSW 10/31/90 01:49am *)
  9. 8 (******************************************************************************)
  10. 9
  11. 10 IMPLEMENTATION MODULE GrQry;
  12. 11 (*
  13. 12 * Graphix
  14. 13 * Release 3.7
  15. 14 * (c) Copyright 1986-1992 PMI
  16. 15 * Green Bay, Wisconsin
  17. 16 * (414) 468-6040
  18. 17 * All rights reserved
  19. 18 *
  20. 19 *)
  21. 20
  22. 21 (******************************************************************************)
  23. 22 (* This procedure, in conjunction with QueryGrafix and QueryComm, is used to *)
  24. 23 (* dynamically determine and set the graphics hardware configuration for *)
  25. 24 (* MetaWINDOW use. *)
  26. 25 (* *)
  27. 26 (* In certain configurations it is possible to have multiple display adaptors *)
  28. 27 (* installed in one PC, or in some cases one display adaptor supports multiple*)
  29. 28 (* operating modes. For these cases the response from QueryGrafix() and *)
  30. 29 (* QueryComm() cannot be used directly for the InitGrafix() or InitMouse() *)
  31. 30 (* calls. Procedure GrQuery() qualifies the QueryGrafix() and QueryComm() *)
  32. 31 (* responses to select the initial graphics card and comm port for MetaWINDOW *)
  33. 32 (* use. *)
  34. 33 (* *)
  35. 34 (* A secondary function of this routine is to allow the operator to specify *)
  36. 35 (* overriding graphic card and mouse settings from the program startup command*)
  37. 36 (* line. This is useful to cover situations when working with "compatible" *)
  38. 37 (* graphics cards which are not fully recognized by the MetaWINDOW routines. *)
  39. 38 (* IF the hardware design of a "compatible" adaptor is not exactly the same *)
  40. 39 (* as one of the MetaWINDOW supported cards, QueryGrafix may not return the *)
  41. 40 (* proper expected results (this usually occurs if the adaptor supports *)
  42. 41 (* special "extended" features, or in multiple monitor systems). Also the *)
  43. 42 (* operator may choose to override the default mouse comm port. Selections may*)
  44. 43 (* be made from the command line, or from the environment variable called *)
  45. 44 (* METAPARM The logic is: *)
  46. 45 (* *)
  47. 46 (* Commmand line option ? *)
  48. 47 (* | | *)
  49. 48 (* yes no, check for environment var *)
  50. 49 (* | | *)
  51. 50 (* | Env var METAPARM set ? *)
  52. 51 (* | | | *)
  53. 52 (* | yes no, Do Queryfunctions *)
  54. 53 (* | | | *)
  55. 54 (* +------+--------+ *)
  56. 55 (* | *)
  57. 56 (* Parse result *)
  58. 57 (* | *)
  59. 58 (* Is a ";" present ? (ie, no wait option) *)
  60. 59 (* | | *)
  61. 60 (* yes no, Invoke Confirm screen, *)
  62. 61 (* | | *)
  63. 62 (* | D or I entered before time out ? *)
  64. 63 (* | | | *)
  65. 64 (* | no yes, Do menus *)
  66. 65 (* | | | *)
  67. 66 (* | |-----------+ *)
  68. 67 (* | | *)
  69. 68 (* Continue with application *)
  70. 69 (* | *)
  71. 70 (* v *)
  72. 71 (* *)
  73. 72 (* GrQuery should be included (or linked) within the code module of your *)
  74. 73 (* main program. Variables are passed as VAR parameters to GrQuery(). *)
  75. 74 (* *)
  76. 75 (* VAR *)
  77. 76 (* GrafixCard, CommPort: INTEGER; *)
  78. 77 (* *)
  79. 78 (* BEGIN *)
  80. 79 (* : *)
  81. 80 (* GrQuery(GrafixCard, CommPort); *)
  82. 81 (* Meta.InitGrafix(-GrafixCard); *)
  83. 82 (* Meta.InitMouse(CommPort); *)
  84. 83 (* : *)
  85. 84 (* END *)
  86. 85 (* *)
  87. 86 (******************************************************************************)
  88. 87
  89. 88 IMPORT Meta;
  90. 89 IMPORT GrConst;
  91. 90 IMPORT Lib;
  92. 91 IMPORT Str;
  93. 92 IMPORT IO;
  94. 93
  95. 94 CONST
  96. 95 (*** Set GRQtrim = TRUE to remove menu selection code ***)
  97. 96 GRQtrim = FALSE;
  98. 97
  99. 98 (*** Set DOSDISP = TRUE to use very simple text output code ***)
  100. 99 (*** Ensure that GRQtrim is TRUE if DOSDISP is TRUE. ***)
  101. 100 DOSDISP = FALSE;
  102. 101
  103. 102 (*** Set SMALLMENU = TRUE to use the smaller selection of devices available ***)
  104. 103 (*** with MetaWINDOW 3.7c, FALSE for MetaWINDOW/Plus. ***)
  105. 104 SMALLMENU = FALSE;
  106. 105
  107. 106 THORZLINE = '-'; (* ASCII Terminal box characters *)
  108. 107 TVERTLINE = '|';
  109. 108 TLEFTTCORN = '*';
  110. 109 TRIGHTTCORN = '*';
  111. 110 TLEFTBCORN = '*';
  112. 111 TRIGHTBCORN = '*';
  113. 112 TLEFTTEE = '*';
  114. 113 TRIGHTTEE = '*';
  115. 114
  116. 115 HORZLINE = 205; (* Extended ansi box characters *)
  117. 116 VERTLINE = 186;
  118. 117 LEFTTCORN = 201;
  119. 118 RIGHTTCORN = 187;
  120. 119 LEFTBCORN = 200;
  121. 120 RIGHTBCORN = 188;
  122. 121 LEFTTEE = 204;
  123. 122 RIGHTTEE = 185;
  124. 123
  125. 124 (* Menu selection title string *)
  126. 125 GRQTITLE = 'Confirm Graphic Devices';
  127. ***** ^ not supported yet
  128. 126
  129. 127 (* Terminated or exit message *)
  130. 128 GRQQUITSTR = 'MetaWINDOW terminated.';
  131. ***** ^ not supported yet
  132. 129
  133. 130 (* The menu header. Insert your own message here. *)
  134. 131 GRQHDRSTR = 'MetaWINDOW for TopSpeed Modula-2';
  135. ***** ^ not supported yet
  136. 132
  137. 133 GRQDELAY = 180; (* Time out delay in system clock *)
  138. 134 (* ticks (18.2 per sec), 0 = forever *)
  139. 135
  140. 136 GrQLines = 25; (* Maximum number of lines on the *)
  141. 137 (* screen, when GRQtrim TRUE *)
  142. 138
  143. 139 CNORMAL = 1700H; (* Attribute values for set_attr - *)
  144. 140 CINVERSE = 7000H; (* color display. *)
  145. 141 CHILITE = 1F00H;
  146. 142
  147. 143 MNORMAL = 0700H; (* Attribute values for set_attr - *)
  148. 144 MINVERSE = 7000H; (* mono display. *)
  149. 145 MHILITE = 0F00H;
  150. 146
  151. 147 kESC = 1BH; (* Key codes. *)
  152. 148 kCR = 0DH;
  153. 149 Home = 71;
  154. 150 End = 79;
  155. 151 PgDn = 81;
  156. 152 PgUp = 73;
  157. 153 UP_arr = 72;
  158. 154 LF_arr = 75;
  159. 155 DN_arr = 80;
  160. 156 RT_arr = 77;
  161. 157
  162. 158 TOP = -2; (* Miscellaneous. *)
  163. 159 BOT = -3;
  164. 160 SUP = 06H;
  165. 161 SDOWN = 07H;
  166. 162 GRQMAXLEN = 127;
  167. 163 GRQLINLEN = 80;
  168. 164
  169. 165
  170. 166 TYPE
  171. 167 txAttr = RECORD (* Text attribute values for text *)
  172. 168 normal: WORD; (* color vs mono screens. *)
  173. ***** ^ undeclared identifier
  174. 169 inverse: WORD;
  175. ***** ^ undeclared identifier
  176. 170 hilite: WORD;
  177. ***** ^ undeclared identifier
  178. 171 END;
  179. ***** ^ not supported yet
  180. 172
  181. 173 device = RECORD (* Device information. *)
  182. 174 devslash: ARRAY[0..3] OF CHAR;
  183. ***** ^ not supported yet
  184. ***** ^ not supported yet
  185. 175 devnum: INTEGER;
  186. 176 devdesc: ARRAY[0..34] OF CHAR;
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. 177 devhres: CARDINAL;
  190. 178 devvres: CARDINAL;
  191. 179 devcolors:INTEGER;
  192. 180 END;
  193. ***** ^ not supported yet
  194. 181
  195. 182 iDevTab = ARRAY[0..6] OF device; (* Input device table. *)
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. 183
  199. 184 (*%T SMALLMENU *)
  200. 185
  201. 186 TYPE
  202. 187 oDevTab = ARRAY[0..18] OF device; (* Output device table. *)
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. 188
  206. 189 CONST
  207. 190 oDev = oDevTab (
  208. 191 device("w:1", GrConst.WYS640x400, " Amdek 1280", 640, 400, 0),
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 192 device("a:1", GrConst.ATT640x400, " Compaq Plasma & AT&T ", 640, 400, 0),
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. 193 device("g", GrConst.GEN640x480, " Genoa, SuperEGA 4880", 640, 480, 16),
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. ***** ^ not supported yet
  224. ***** ^ not supported yet
  225. 194 device("h", GrConst.HER720x348, " Hercules, Monographics", 720, 348, 0),
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. 195 device("c:1", GrConst.CGA640x200, " IBM, CGA", 640, 200, 2),
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. 196 device("c:2", GrConst.CGA320x200, " IBM, CGA", 320, 200, 4),
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. 197 device("e:1", GrConst.EGAMono, " IBM, EGA", 640, 350, 0),
  243. ***** ^ not supported yet
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. 198 device("e:2", GrConst.EGA320x200, " IBM, EGA", 320, 200, 16),
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. 199 device("e:3", GrConst.EGA640x200, " IBM, EGA", 640, 200, 16),
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. 200 device("e:4", GrConst.EGA640x350, " IBM, EGA", 640, 350, 16),
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. 201 device("e:5", GrConst.MGA640x480, " IBM, MCGA", 640, 480, 2),
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. 202 device("e:6", GrConst.MGA640x350, " IBM, EGA", 640, 350, 2),
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. 203 device("e:7", GrConst.EGA640x480, " IBM, VGA", 640, 480, 16),
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. 204 device("l:2", GrConst.PAR640x480, " Paradise, Autoswitch EGA/480", 640, 480, 16),
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. 205 device("o", GrConst.TOS640x400, " Toshiba, 3100", 640, 400, 0),
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. 206 device("l:1", GrConst.EVA640x480, " Tseng Labs, EVA-480", 640, 480, 16),
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. 207 device("u:1", GrConst.VGA640x480, " Video Seven, VEGA/Deluxe", 640, 480, 16),
  302. ***** ^ not supported yet
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. 208 device("w:1", GrConst.WYS640x400, " Wyse, WY-700", 640, 400, 0),
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. 209 device("", 0, "** No Graphics Device Located **", 0, 0, 0)
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 210 );
  317. 211 (*%E SMALLMENU *)
  318. 212 (*%F SMALLMENU *)
  319. 213
  320. 214 TYPE
  321. 215 oDevTab = ARRAY[0..142] OF device; (* Output device table. *)
  322. 216
  323. 217 CONST
  324. 218 oDev = oDevTab (
  325. 219 device("w:1", GrConst.WYS640x400, " Amdek 1280", 640, 400, 0),
  326. 220 device("w:2", GrConst.WYS1280x400, "+ Amdek 1280", 1280, 400, 0),
  327. 221 device("w:3", GrConst.WYS1280x800, "+ Amdek 1280", 1280, 800, 0),
  328. 222 device("a:4", GrConst.ATI800x600, "+ ATI, VGA Wonder", 800, 600, 16),
  329. 223 device("a:5", GrConst.ATI1024x768F, "+ ATI, VGA Wonder", 1024, 768, 16),
  330. 224 device("a:6", GrConst.ATI640x480X, "+ ATI, VGA Wonder", 640, 480, 256),
  331. 225 device("a:2", GrConst.DEB640x200, "+ AT&T, DEB Graphics", 640, 200, 16),
  332. 226 device("a:3", GrConst.DEB640x400, "+ AT&T, DEB Graphics", 640, 400, 16),
  333. 227 device("c:3", GrConst.CT640x480X, "+ CHIPS and Tech 82C45x", 640, 480, 256),
  334. 228 device("e:9", GrConst.VESA800x600, "+ VESA standard", 800,600, 16),
  335. 229 device("c:4", GrConst.CT1024x768, "+ CHIPS and Tech 82C45x", 1024, 768, 16),
  336. 230 device("a:1", GrConst.ATT640x400, " Compaq Plasma & AT&T ", 640, 400, 0),
  337. 231 device("b:1", GrConst.COR1600x1280V, "+ Cornerstone, Vista 1600", 1600, 1280, 0),
  338. 232 device("b:2", GrConst.COR1600x1280VA, "+ Cornerstone, Vista 1600/alt", 1600, 1280, 0),
  339. 233 device("b:3", GrConst.COR1600x1280DP, "+ Cornerstone, DualPage", 1600, 1280, 0),
  340. 234 device("b:4", GrConst.COR1600x1280DPA, "+ Cornerstone, DualPage/noJP1", 1600, 1280, 0),
  341. 235 device("b:5", GrConst.COR1600x1280MCA, "+ Cornerstone, DualPage-PS2", 1600, 1280, 0),
  342. 236 device("b:6", GrConst.SP768x1008, "+ Cornerstone, SinglePage", 768, 1008, 0),
  343. 237 device("b:7", GrConst.SP768x1008A, "+ Cornerstone, Single/noJP1", 768, 1008, 0),
  344. 238 device("b:8", GrConst.COR1280x960, "+ Cornerstone, PC1280", 1280, 960, 0),
  345. 239 device("b:9", GrConst.COR1280x960A, "+ Cornerstone, PC1280/noJP1", 1280, 960, 0),
  346. 240 device("b:10", GrConst.COR1280x1024, "+ Cornerstone, PC1280", 1280, 1024, 0),
  347. 241 device("b:11", GrConst.COR1280x1024A, "+ Cornerstone, PC1280/noJP1", 1280, 1024, 0),
  348. 242 device("z:0", GrConst.PAR800x600, "+ Eizo, MD-B07", 800, 600, 16),
  349. 243 device("z:1", GrConst.STB640x350X, "+ Eizo, MD-B10", 640, 350, 256),
  350. 244 device("z:2", GrConst.STB640x480X, "+ Eizo, MD-B10", 640, 480, 256),
  351. 245 device("z:3", GrConst.STB800x600, "+ Eizo, MD-B10", 800, 600, 16),
  352. 246 device("z:4", GrConst.STB1024x768, "+ Eizo, MD-B10", 1024, 768, 16),
  353. 247 device("v:1", GrConst.EVR640x200, "+ Everex, Graphics Edge", 640, 200, 16),
  354. 248 device("v:2", GrConst.EVR640x400, "+ Everex, Graphics Edge", 640, 400, 16),
  355. 249 device("v:3", GrConst.EVX800x600, "+ Everex, EVGA EV-673", 800,600, 16),
  356. 250 device("f:7", GrConst.FKY1120x750m, "+ Fujitsu, FMRxx, 24 dot",1120,750, 0),
  357. 251 device("f:8", GrConst.FKY1120x750, "+ Fujitsu, FMRxx, 24 dot",1120,750, 16),
  358. 252 device("f:9", GrConst.FKY640x400, "+ Fujitsu, FMRxx, 16 dot", 640,400, 16),
  359. 253 device("g", GrConst.GEN640x480, " Genoa, SuperEGA 4880", 640, 480, 16),
  360. 254 device("g:1", GrConst.GEN800x600, "+ Genoa, SuperEGA 4880", 800, 600, 16),
  361. 255 device("g:2", GrConst.GEN640x350X, "+ Genoa, SuperVGA 5000", 640, 350, 256),
  362. 256 device("g:3", GrConst.GEN640x480X, "+ Genoa, SuperVGA 5000", 640, 480, 256),
  363. 257 device("g:4", GrConst.GEN800x600, "+ Genoa, SuperVGA 5000", 800, 600, 16),
  364. 258 device("g:5", GrConst.GEN1024x768, "+ Genoa, SuperVGA 5000",1024, 768, 16),
  365. 259 device("g:7", GrConst.GEN640x480S, "+ Genoa, SuperVGA 6000", 640, 480, 256),
  366. 260 device("g:8", GrConst.GEN1024x768S, "+ Genoa, SuperVGA 6000",1024, 768, 16),
  367. 261 device("e:9", GrConst.VESA800x600, "+ Genoa, VESA standard", 800,600, 16),
  368. 262 device("h", GrConst.HER720x348, " Hercules, Monographics", 720, 348, 0),
  369. 263 device("x:4", GrConst.EXPL320x200, "+ HeadStart Explorer", 320, 200, 16),
  370. 264 device("c:1", GrConst.CGA640x200, " IBM, CGA", 640, 200, 2),
  371. 265 device("c:2", GrConst.CGA320x200, " IBM, CGA", 320, 200, 4),
  372. 266 device("e:1", GrConst.EGAMono, " IBM, EGA", 640, 350, 0),
  373. 267 device("e:2", GrConst.EGA320x200, " IBM, EGA", 320, 200, 16),
  374. 268 device("e:3", GrConst.EGA640x200, " IBM, EGA", 640, 200, 16),
  375. 269 device("e:4", GrConst.EGA640x350, " IBM, EGA", 640, 350, 16),
  376. 270 device("e:5", GrConst.MGA640x480, " IBM, MCGA", 640, 480, 2),
  377. 271 device("e:6", GrConst.MGA640x350, " IBM, EGA", 640, 350, 2),
  378. 272 device("e:7", GrConst.EGA640x480, " IBM, VGA", 640, 480, 16),
  379. 273 device("e:8", GrConst.VGA320x200, "+ IBM, VGA (analog)", 320, 200, 256),
  380. 274 device("f:4", GrConst.EGA640x350MP, "+ IBM, EGA (planar mode)", 640,350, 16),
  381. 275 device("f", GrConst.JRT320x200, "+ IBM, PCjr", 320, 200, 16),
  382. 276 device("x:1", GrConst.TTS720x350, "+ IBM, 3270", 720, 350, 2),
  383. 277 device("x:2", GrConst.TTS360x350, "+ IBM, 3270", 360, 350, 4),
  384. 278 device("m", GrConst.MDS736x1008, "+ MDS, Genius", 736, 1008, 0),
  385. 279 device("j:1", GrConst.NEC640x400, "+ NEC, PC-9800/VM", 640, 400, 16),
  386. 280 device("j:2", GrConst.MEC640x400, "+ NEC, PC-9800/VM", 640, 400, 2),
  387. 281 device("l:6", GrConst.NSI800x600, "+ NSI, Smart EGA/Plus", 800, 600, 16),
  388. 282 device("i", GrConst.NNR512x512, "+ Number 9, Revolution", 512, 485, 256),
  389. 283 device("i:1", GrConst.OAK800x600, "+ Oak, OTI-067 VGA", 800, 600, 16),
  390. 284 device("i:2", GrConst.OAK1024x768, "+ Oak, OTI-067 VGA", 1024, 768, 16),
  391. 285 device("i:3", GrConst.OAK640x480X, "+ Oak, OTI-067 VGA", 640, 480, 256),
  392. 286 device("k:1", GrConst.OCD640x350X, "+ Orchid, Designer VGA", 640, 350, 256),
  393. 287 device("k:2", GrConst.OCD640x480X, "+ Orchid, Designer VGA", 640, 480, 256),
  394. 288 device("k:3", GrConst.OCD800x600, "+ Orchid, Designer VGA", 800, 600, 16),
  395. 289 device("k:4", GrConst.OCD1024x768, "+ Orchid, Designer VGA", 1024, 768, 16),
  396. 290 device("l:2", GrConst.PAR640x480, " Paradise, Autoswitch EGA/480", 640, 480, 16),
  397. 291 device("l:3", GrConst.PAR800x600, "+ Paradise, VGA ", 800, 600, 16),
  398. 292 device("l:4", GrConst.PAR640x480x, "+ Paradise, VGA Professional", 640, 480, 256),
  399. 293 device("l:5", GrConst.PAR1024x768, "+ Paradise, VGA Professional", 1024, 768, 16),
  400. 294 device("q:1", GrConst.STB640x350X, "+ Quadram, QuadVGA Spectra", 640, 350, 256),
  401. 295 device("q:2", GrConst.STB640x480X, "+ Quadram, QuadVGA Spectra", 640, 480, 256),
  402. 296 device("q:3", GrConst.STB800x600, "+ Quadram, QuadVGA Spectra", 800, 600, 16),
  403. 297 device("q:4", GrConst.STB1024x768, "+ Quadram, QuadVGA Spectra", 1024, 768, 16),
  404. 298 device("d:1", GrConst.SIG640x400, "+ Sigma Design, Color-400", 640, 400, 16),
  405. 299 device("d:2", GrConst.SIG1664x1200, "+ Sigma Design, L*View", 1664, 1200, 0),
  406. 300 device("d:3", GrConst.SIG1664x1200A, "+ Sigma Design, L*View (A000)", 1664, 1200, 0),
  407. 301 device("d:4", GrConst.SIG1664x1200MCA, "+ Sigma Design, L*View (PS/2)", 1664, 1200, 0),
  408. 302 device("s:1", GrConst.STB640x352, "+ STB, Graphics Plus-II", 640, 352, 0),
  409. 303 device("s:2", GrConst.STB320x200, "+ STB, Graphics Plus-II", 320, 200, 16),
  410. 304 device("s:3", GrConst.STB640x200, "+ STB, Graphics Plus-II", 640, 200, 4),
  411. 305 device("s:4", GrConst.STB640x400, "+ STB, Graphics Plus-III", 640, 400, 0),
  412. 306 device("s:5", GrConst.STB640x350X, "+ STB, VGA Extra/EM", 640, 350, 256),
  413. 307 device("s:6", GrConst.STB640x480X, "+ STB, VGA Extra/EM", 640, 480, 256),
  414. 308 device("s:7", GrConst.STB800x600, "+ STB, VGA Extra/EM", 800, 600, 16),
  415. 309 device("s:8", GrConst.STB1024x768, "+ STB, VGA Extra/EM", 1024, 768, 16),
  416. 310 device("o:1", GrConst.TS4640x350x, "+ STB, VGA EM-PLUS", 640, 350, 256),
  417. 311 device("o:2", GrConst.TS4640x480x, "+ STB, VGA EM-PLUS", 640, 480, 256),
  418. 312 device("o:3", GrConst.STB800x600, "+ STB, VGA EM-PLUS", 800, 600, 16),
  419. 313 device("o:4", GrConst.TS4800x600x, "+ STB, VGA EM-PLUS", 800, 600, 256),
  420. 314 device("o:5", GrConst.TS41024x768x, "+ STB, VGA EM-PLUS", 1024, 768, 256),
  421. 315 device("f", GrConst.JRT320x200, "+ Tandy, 1000 EX", 320, 200, 16),
  422. 316 device("t:1", GrConst.TEC720x352, "+ Tecmar, Graphics Master", 720, 352, 0),
  423. 317 device("t:2", GrConst.TEC720x704, "+ Tecmar, Graphics Master", 720, 704, 0),
  424. 318 device("t:3", GrConst.TEC640x200, "+ Tecmar, Graphics Master", 640, 200, 16),
  425. 319 device("t:4", GrConst.TEC640x400, "+ Tecmar, Graphics Master", 640, 400, 16),
  426. 320 device("t:5", GrConst.TEC320x200, "+ Tecmar, Graphics Master", 320, 200, 16),
  427. 321 device("t:6", GrConst.TEC640x350X, "+ Tecmar, VGA/AD", 640, 350, 256),
  428. 322 device("t:7", GrConst.TEC640x480X, "+ Tecmar, VGA/AD", 640, 480, 256),
  429. 323 device("t:9", GrConst.TEC800x600, "+ Tecmar, VGA/AD", 800, 600, 16),
  430. 324 device("t:10", GrConst.TEC1024x768, "+ Tecmar, VGA/AD", 1024, 768, 16),
  431. 325 device("o", GrConst.TOS640x400, " Toshiba, 3100", 640, 400, 0),
  432. 326 device("r:1", GrConst.TRI800x600, "+ Trident Impact", 800, 600, 16),
  433. 327 device("r:2", GrConst.TRI1024x768, "+ Trident Impact", 1024, 768, 16),
  434. 328 device("r:3", GrConst.TRI640x480x, "+ Trident Impact", 640, 480, 256),
  435. 329 device("r:4", GrConst.TRI800x600x, "+ Trident Impact", 800, 600, 256),
  436. 330 device("r:5", GrConst.TRI1024x768x, "+ Trident Impact", 1024, 768, 256),
  437. 331 device("f:5", GrConst.TARG512x482, "+ Truevision, Targa M8", 512,482,256),
  438. 332 device("l:1", GrConst.EVA640x480, " Tseng Labs, EVA-480", 640, 480, 16),
  439. 333 device("s:5", GrConst.STB640x350X, "+ Tseng Labs 3000 chip", 640, 350, 256),
  440. 334 device("s:6", GrConst.STB640x480X, "+ Tseng Labs 3000 chip", 640, 480, 256),
  441. 335 device("s:7", GrConst.STB800x600, "+ Tseng Labs 3000 chip", 800, 600, 16),
  442. 336 device("s:8", GrConst.STB1024x768, "+ Tseng Labs 3000 chip", 1024, 768, 16),
  443. 337 device("o:1", GrConst.TS4640x350x, "+ Tseng Labs 4000 chip", 640, 350, 256),
  444. 338 device("o:2", GrConst.TS4640x480x, "+ Tseng Labs 4000 chip", 640, 480, 256),
  445. 339 device("o:3", GrConst.STB800x600, "+ Tseng Labs 4000 chip", 800, 600, 16),
  446. 340 device("o:4", GrConst.TS4800x600x, "+ Tseng Labs 4000 chip", 800, 600, 256),
  447. 341 device("o:5", GrConst.TS41024x768x, "+ Tseng Labs 4000 chip", 1024, 768, 256),
  448. 342 device("e:9", GrConst.VESA800x600, "+ VESA, VGA", 800,600, 16),
  449. 343 device("u:3", GrConst.VGA720x540, "+ Video Seven, FastWrite VGA", 720, 540, 16),
  450. 344 device("u:4", GrConst.VGA800x600, "+ Video Seven, FastWrite VGA", 800, 600, 16),
  451. 345 device("u:5", GrConst.VGA640x480X, "+ Video Seven, FastWrite VGA", 640, 480,256),
  452. 346 device("u:1", GrConst.VGA640x480, " Video Seven, VEGA/Deluxe", 640, 480, 16),
  453. 347 device("u:2", GrConst.VGA752x410, "+ Video Seven, VEGA/Deluxe", 752, 410, 16),
  454. 348 device("u:3", GrConst.VGA720x540, "+ Video Seven, VEGA VGA", 720, 540, 16),
  455. 349 device("u:4", GrConst.VGA800x600, "+ Video Seven, VEGA VGA", 800, 600, 16),
  456. 350 device("u:5", GrConst.VGA640x480X, "+ Video Seven, VGA 1024i", 640, 480, 256),
  457. 351 device("u:3", GrConst.VGA720x540, "+ Video Seven, VGA 1024i", 720, 540, 16),
  458. 352 device("u:4", GrConst.VGA800x600, "+ Video Seven, VGA 1024i", 800, 600, 16),
  459. 353 device("u:7", GrConst.VGA1024x768, "+ Video Seven, VGA 1024i", 1024, 768, 16),
  460. 354 device("u:5", GrConst.VGA640x480X, "+ Video Seven, VRAM VGA", 640, 480,256),
  461. 355 device("u:3", GrConst.VGA720x540, "+ Video Seven, VRAM VGA", 720, 540, 16),
  462. 356 device("u:4", GrConst.VGA800x600, "+ Video Seven, VRAM VGA", 800, 600, 16),
  463. 357 device("u:6", GrConst.VGA1024x768x2, "+ Video Seven, VRAM VGA", 1024, 768, 2),
  464. 358 device("w:1", GrConst.WYS640x400, " Wyse, WY-700", 640, 400, 0),
  465. 359 device("w:2", GrConst.WYS1280x400, "+ Wyse, WY-700", 1280, 400, 0),
  466. 360 device("w:3", GrConst.WYS1280x800, "+ Wyse, WY-700", 1280, 800, 0),
  467. 361 device("", 0, "** No Graphics Device Located **", 0, 0, 0)
  468. 362 );
  469. 363 (*%E SMALLMENU *)
  470. 364
  471. 365 iDev = iDevTab (
  472. 366 (* ("m:b", MsMouse, "Microsoft bus mouse", 0, 0, -1), *)
  473. 367 device("m:d", GrConst.MsDriver, "MS DOS mouse driver", 0, 0, -1),
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. ***** ^ not supported yet
  479. 368 device("m:1", GrConst.MsCOM1, "Microsoft mouse, COM1", 0, 0, -1),
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. 369 device("m:2", GrConst.MsCOM2, "Microsoft mouse, COM2", 0, 0, -1),
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. ***** ^ not supported yet
  491. 370 device("1", 1, "Logitech/Mouse Systems mouse, COM1", 0, 0, -1),
  492. ***** ^ not supported yet
  493. ***** ^ not supported yet
  494. 371 device("2", 2, "Logitech/Mouse Systems mouse, COM2", 0, 0, -1),
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 372 device("m:f", GrConst.FKYMsDriver, "Fujitsu DOS mouse driver", 0, 0, -1),
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. 373 device("", 0, "** No Input Device Located **", 0, 0, 0)
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. 374 );
  507. 375
  508. 376 VAR
  509. 377 line: ARRAY[0..GRQMAXLEN] OF CHAR;
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. 378 str, buf: ARRAY[0..GRQLINLEN] OF CHAR;
  513. ***** ^ not supported yet
  514. ***** ^ not supported yet
  515. 379 txtAttrVal: txAttr;
  516. ***** ^ not supported yet
  517. 380
  518. 381
  519. 382 PROCEDURE GrQuit(Msg: ARRAY OF CHAR; Val: SHORTCARD);
  520. ***** ^ not supported yet
  521. 383 VAR
  522. 384 i: INTEGER;
  523. 385 BEGIN
  524. 386 i := Meta.QueryError();
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. 387
  529. 388 Meta.StopMouse();
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. 389 Meta.StopEvent();
  534. ***** ^ not supported yet
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. 390 Meta.SetDisplay(GrConst.TextPg0);
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. 391 Meta.ClearText();
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. ***** ^ not supported yet
  546. 392
  547. 393 IF (i # 0) THEN
  548. 394 IO.WrStr('QueryError = ');
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. 395 IO.WrInt(i DIV 128, 3);
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. 396 IO.WrStr('/');
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. ***** ^ not supported yet
  560. 397 IO.WrInt(i MOD 128, 3);
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. 398 IO.WrLn();
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. ***** ^ not supported yet
  568. 399 END;
  569. 400
  570. 401 IF Msg[0] = CHR(0) THEN
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ undeclared identifier
  574. ***** ^ not supported yet
  575. 402 IO.WrStr('Normal end of program.');
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. 403 ELSE
  580. 404 IO.WrStr(Msg);
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. 405 END;
  585. 406
  586. 407 Lib.SetReturnCode(Val);
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. 408 IO.WrLn();
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. 409 HALT
  595. ***** ^ undeclared identifier
  596. 410 END GrQuit;
  597. ***** ^ not supported yet
  598. 411
  599. 412 (*%F GRQtrim *)
  600. 413
  601. 414 (******************************************************************************)
  602. 415 (* PC direct BIOS calls. These routines implement the standard text *)
  603. 416 (* functions for GotoXY, setting Attributes, scrolling text, and outputing a *)
  604. 417 (* character. A typical 80x25 text screen has coordinates of 0, 0 (min) *)
  605. 418 (* to 79, 24 (max). *)
  606. 419 (******************************************************************************)
  607. 420
  608. 421 (*#save,
  609. 422 call(reg_param=>(ax, bx, cx, dx)
  610. 423 reg_saved=>(ax, bx, cx, dx, si, di, es, ds, st1, st2),
  611. 424 inline=>on)
  612. 425 *)
  613. 426
  614. 427 TYPE
  615. 428 DoScrollCODE = ARRAY[0..1] OF SHORTCARD;
  616. 429
  617. 430 PROCEDURE doScroll(ax, bx, cx, dx: CARDINAL) =
  618. 431 DoScrollCODE(
  619. 432 0CDH, 010H (* int 10H *)
  620. 433 );
  621. 434
  622. 435 (*#restore *)
  623. 436
  624. 437 PROCEDURE txtScroll(dir, sx, sy, ex, ey, dist: CARDINAL);
  625. 438 (*** PC-BIOS scroll routine. Moves a block of text up or down. ***)
  626. 439 BEGIN
  627. 440 doScroll((dir << 8) + dist, txtAttrVal.normal, (sy << 8) + sy, (ey << 8) + ex);
  628. 441 END txtScroll;
  629. 442
  630. 443 (*#save,
  631. 444 call(reg_param=>()
  632. 445 reg_saved=>(bx, cx, dx, si, di, es, ds, st1, st2),
  633. 446 reg_return=>(ax),
  634. 447 near_call=>on)
  635. 448 *)
  636. 449
  637. 450 TYPE
  638. 451 TxtMonoCODE = ARRAY[0..12] OF SHORTCARD;
  639. 452
  640. 453 PROCEDURE txtMono(): BOOLEAN =
  641. 454 TxtMonoCODE(
  642. 455 0CDH, 011H, (* int 11H *)
  643. 456 025H, 030H, 00H, (* and ax, 30H *)
  644. 457 0A9H, 030H, 00H, (* test ax, 30H *)
  645. 458 074H, 002H, (* je true *)
  646. 459 033H, 0C0H, (* xor ax, ax *)
  647. 460 0C3H (* true: ret 0 *)
  648. 461 );
  649. 462
  650. 463 (*#restore *)
  651. 464
  652. 465 (*#save,
  653. 466 call(reg_param=>(bx, cx, ax, dx)
  654. 467 reg_saved=>(bx, si, di, es, ds, st1, st2),
  655. 468 near_call=>on)
  656. 469 *)
  657. 470
  658. 471 TYPE
  659. 472 TxtAttrCODE = ARRAY[0..10] OF SHORTCARD;
  660. 473
  661. 474 PROCEDURE txtAttr(attrib, sx, sy, ex: CARDINAL) =
  662. 475 TxtAttrCODE(
  663. 476 08AH, 0E8H, (* mov ch, al *)
  664. 477 08AH, 0F0H, (* mov dh, al *)
  665. 478 033H, 0C0H, (* xor ax, ax *)
  666. 479 0B4H, 006H, (* mov ah, 6H *)
  667. 480 0CDH, 010H, (* int 10H *)
  668. 481 0C3H (* ret *)
  669. 482 );
  670. 483
  671. 484 (*#restore *)
  672. 485
  673. 486 (*#save,
  674. 487 call(reg_param=>(ax),
  675. 488 reg_saved=>(cx, dx, si, di, es, ds, st1, st2),
  676. 489 near_call=>on)
  677. 490 *)
  678. 491
  679. 492 TYPE
  680. 493 TxtChoutCODE = ARRAY[0..6] OF SHORTCARD;
  681. 494
  682. 495 PROCEDURE txtChOut(ch: BYTE) =
  683. 496 TxtChoutCODE(
  684. 497 0B4H, 00EH, (* mov ah, 0EH *)
  685. 498 032H, 0FFH, (* xor bh, bh *)
  686. 499 0CDH, 010H, (* int 10H *)
  687. 500 0C3H (* ret *)
  688. 501 );
  689. 502
  690. 503 (*#restore *)
  691. 504
  692. 505
  693. 506 (*#save,
  694. 507 call(reg_param=>(dx, ax),
  695. 508 reg_saved=>(cx, si, di, es, ds, st1, st2),
  696. 509 near_call=>on)
  697. 510 *)
  698. 511
  699. 512 TYPE TxtXYCODE = ARRAY[0..8] OF SHORTCARD;
  700. 513
  701. 514 PROCEDURE txtXY(x, y: CARDINAL) =
  702. 515 TxtXYCODE(
  703. 516 08AH, 0F0H, (* mov dh, al *)
  704. 517 0B4H, 002H, (* mov ah, 2H *)
  705. 518 032H, 0FFH, (* xor bh, bh *)
  706. 519 0CDH, 010H, (* int 10H *)
  707. 520 0C3H (* ret *)
  708. 521 );
  709. 522 (*#restore *)
  710. 523
  711. 524 (*#save,
  712. 525 call(reg_param=>(),
  713. 526 reg_saved=>(bx, si, di, es, ds, st1, st2),
  714. 527 reg_return=>(dx),
  715. 528 near_call=>on)
  716. 529 *)
  717. 530 TYPE
  718. 531 Time55CODE = ARRAY[0..4] OF SHORTCARD;
  719. 532
  720. 533 PROCEDURE time55(): CARDINAL =
  721. 534 Time55CODE(
  722. 535 033H, 0C0H, (* xor ax, ax *)
  723. 536 0CDH, 01AH, (* int 1AH *)
  724. 537 0C3H (* ret *)
  725. 538 );
  726. 539 (*#restore *)
  727. 540
  728. 541
  729. 542 PROCEDURE txtFrame(sx, sy, ex, ey: CARDINAL);
  730. 543 (*** Draw a text frame. ***)
  731. 544 VAR
  732. 545 i: CARDINAL;
  733. 546 BEGIN
  734. 547 (*** Draw horizontal lines. ***)
  735. 548 FOR i := sx + 1 TO ex DO
  736. 549 txtXY(i, sy);
  737. 550 txtChOut(HORZLINE);
  738. 551 txtXY(i, ey);
  739. 552 txtChOut(HORZLINE)
  740. 553 END;
  741. 554
  742. 555 (*** Draw vertical lines. ***)
  743. 556 FOR i := sy + 1 TO ey DO
  744. 557 txtXY(sx, i);
  745. 558 txtChOut(VERTLINE);
  746. 559 txtXY(ex, i);
  747. 560 txtChOut(VERTLINE)
  748. 561 END;
  749. 562
  750. 563 (*** Place corners. ***)
  751. 564 txtXY(sx, sy);
  752. 565 txtChOut(LEFTTCORN);
  753. 566
  754. 567 txtXY(ex, sy);
  755. 568 txtChOut(RIGHTTCORN);
  756. 569
  757. 570 txtXY(sx, ey);
  758. 571 txtChOut(LEFTBCORN);
  759. 572
  760. 573 txtXY(ex, ey);
  761. 574 txtChOut(RIGHTBCORN)
  762. 575 END txtFrame;
  763. 576
  764. 577
  765. 578 PROCEDURE txtBar(sx, sy, ex: CARDINAL);
  766. 579 (*** Draw a horizontal bar with T connectors on each end. ***)
  767. 580 VAR
  768. 581 i: CARDINAL;
  769. 582 BEGIN
  770. 583
  771. 584 FOR i := sx + 1 TO ex DO
  772. 585 txtXY(i, sy);
  773. 586 txtChOut(HORZLINE)
  774. 587 END;
  775. 588
  776. 589 txtXY(sx, sy);
  777. 590 txtChOut(LEFTTEE);
  778. 591 txtXY(ex, sy);
  779. 592 txtChOut(RIGHTTEE)
  780. 593 END txtBar;
  781. 594
  782. 595
  783. 596 PROCEDURE bPrint(msg: ARRAY OF CHAR);
  784. 597 (*** Print a string of text, bypassing DOS. ***)
  785. 598 VAR
  786. 599 i: CARDINAL;
  787. 600 BEGIN
  788. 601 i := 0;
  789. 602
  790. 603 WHILE (msg[i] # CHR(0)) DO
  791. 604 txtChOut(msg[i]);
  792. 605 INC(i)
  793. 606 END
  794. 607 END bPrint;
  795. 608
  796. 609
  797. 610 PROCEDURE txtTitle(msg: ARRAY OF CHAR; y: CARDINAL);
  798. 611 (*** Print msg - centered and hilite. ***)
  799. 612 VAR
  800. 613 i, x: CARDINAL;
  801. 614 BEGIN
  802. 615 i := Str.Length(msg);
  803. 616 x := (GRQLINLEN - i) DIV 2;
  804. 617 txtAttr(txtAttrVal.hilite, x, y, x + i - 1);
  805. 618 txtXY(x, y);
  806. 619 bPrint(msg)
  807. 620 END txtTitle;
  808. 621
  809. 622
  810. 623 PROCEDURE getKey(VAR s, a: CHAR);
  811. 624 (*** Get extended keys - returns scancode and ascii value in passed ***)
  812. 625 (*** parameters. Sets the first value with the scan code, the second ***)
  813. 626 (*** with the ASCII code. ***)
  814. 627 BEGIN
  815. 628 a := IO.RdKey();
  816. 629
  817. 630 IF (a # CHR(0)) THEN
  818. 631 (*** if ASCII, null scan code ***)
  819. 632 s := CHR(0)
  820. 633 ELSE
  821. 634 (*** If first code is null, there is a scan code waiting. ***)
  822. 635 s := IO.RdKey()
  823. 636 END
  824. 637 END getKey;
  825. 638
  826. 639
  827. 640 PROCEDURE Qbeep();
  828. 641 (*** Ring da bell. ***)
  829. 642 BEGIN
  830. 643 IO.WrChar(CHR(7H))
  831. 644 END Qbeep;
  832. 645
  833. 646
  834. 647 PROCEDURE dispItem(devptr: ARRAY OF device; item, max_item: CARDINAL; line: ARRAY OF CHAR; dosout: BOOLEAN);
  835. 648 (*** Display device line item. dosout is a flag to use dos or bypass it ***)
  836. 649 (*** for the BIOS call. ***)
  837. 650 VAR
  838. 651 OK : BOOLEAN;
  839. 652 i, j: CARDINAL;
  840. 653 dev: device;
  841. 654 BEGIN
  842. 655
  843. 656 IF (item > max_item) OR (item < 0) THEN
  844. 657 (*** Don't go off the end of the list. ***)
  845. 658 RETURN
  846. 659 END;
  847. 660
  848. 661 dev := devptr[item];
  849. 662
  850. 663 FOR i := 0 TO GRQLINLEN DO
  851. 664 line[i] := ' '
  852. 665 END;
  853. 666
  854. 667 (* see if its a graphics card *)
  855. 668 IF (dev.devcolors > -1) THEN
  856. 669 Str.Insert(line, '-', 1);
  857. 670 Str.Insert(line, dev.devslash, 2);
  858. 671 Str.Insert(line, dev.devdesc, 11);
  859. 672 Str.IntToStr(LONGINT(dev.devhres), buf, 10, OK);
  860. 673 Str.Insert(line, buf, 45);
  861. 674 Str.Insert(line, ' x ', 50);
  862. 675 Str.IntToStr(LONGINT(dev.devvres), buf, 10, OK);
  863. 676 Str.Insert(line, buf, 53);
  864. 677 IF (dev.devcolors = 0) THEN
  865. 678 Str.Insert(line, 'monochrome', 60)
  866. 679 ELSE
  867. 680 Str.IntToStr(LONGINT(dev.devcolors), buf, 10, OK);
  868. 681 Str.Insert(line, buf, 60)
  869. 682 END;
  870. 683 line[71] := CHR(0)
  871. 684 ELSE
  872. 685 (*** Input device. ***)
  873. 686 Str.Insert(line, '-', 1);
  874. 687 Str.Insert(line, dev.devslash, 2);
  875. 688 Str.Insert(line, dev.devdesc, 11);
  876. 689 line[50] := CHR(0)
  877. 690 END;
  878. 691
  879. 692 IF (dosout) THEN
  880. 693 IO.WrStr(line)
  881. 694 ELSE
  882. 695 bPrint(line)
  883. 696 END;
  884. 697
  885. 698 END dispItem;
  886. 699
  887. 700
  888. 701 PROCEDURE viewList(devptr: ARRAY OF device; curDev: CARDINAL; mouse: BOOLEAN): CARDINAL;
  889. 702 (*** Menu device selection - uses cursor keys to select. ***)
  890. 703 VAR
  891. 704 choosing, refrsh: BOOLEAN;
  892. 705 x, y,
  893. 706 page_head, (* top of page *)
  894. 707 page_len, (* number of lines on page *)
  895. 708 cur_select, (* the initial selection number *)
  896. 709 tail_sel, (* how many selections are there *)
  897. 710 cy, (* the cursor position *)
  898. 711 ex: CARDINAL; (* the length of the bar (calculated) *)
  899. 712 s, a: CHAR;
  900. 713 i: CARDINAL;
  901. 714 BEGIN
  902. 715 page_head := 0;
  903. 716 page_len := GrQLines - 6;
  904. 717
  905. 718 (*** Set menu x, y position. ***)
  906. 719
  907. 720 y := 4;
  908. 721
  909. 722 IF (mouse) THEN
  910. 723 x := 10;
  911. 724 ELSE
  912. 725 x := 5;
  913. 726 END;
  914. 727
  915. 728 (*** Clear screen. ***)
  916. 729
  917. 730 txtScroll(SUP, 0, 0, 79, 24, 0);
  918. 731
  919. 732 (*** Make menu screen. ***)
  920. 733
  921. 734 txtFrame(1, 1, 78, GrQLines - 2);
  922. 735 txtBar(1, 3, 78);
  923. 736
  924. 737 txtAttr(txtAttrVal.hilite, 9, GrQLines - 1, 68);
  925. 738 txtXY(9, GrQLines - 1);
  926. 739 bPrint('Cursor keys [] -> move, [Ù] -> select, [Esc] -> Abort');
  927. 740
  928. 741 IF (mouse) THEN
  929. 742 txtTitle('Select Input Device', 0);
  930. 743 txtXY(x - 2, y - 2);
  931. 744 bPrint('Cmd Line Pointing Device ');
  932. 745 (*** Set line length. ***)
  933. 746 ex := 54
  934. 747 ELSE
  935. 748 txtTitle('Select Display Device/Mode', 0);
  936. 749 txtXY(x - 2, y - 2);
  937. 750 bPrint('Cmd Line Graphics Device Resolution Colors ');
  938. 751 ex := 74
  939. 752 END;
  940. 753
  941. 754 (*** Find the number of entries in menu. ***)
  942. 755
  943. 756 tail_sel := HIGH(devptr);
  944. 757
  945. 758 (*** Set max page length - fewer items will simply shrink 'page'. ***)
  946. 759
  947. 760 IF tail_sel < page_len THEN
  948. 761 page_len := tail_sel + 1
  949. 762 END;
  950. 763
  951. 764 (*** Set current selection, ie default entry. ***)
  952. 765
  953. 766 IF curDev > tail_sel THEN
  954. 767 cur_select := 0
  955. 768 ELSE
  956. 769 cur_select := curDev
  957. 770 END;
  958. 771
  959. 772 (*** Set the select bar position. ***)
  960. 773
  961. 774 cy := y;
  962. 775
  963. 776 IF (cur_select # 0) THEN
  964. 777 IF (cur_select > (page_len DIV 2)) THEN
  965. 778 (*** Position cursor in the middle. ***)
  966. 779 INC(cy, (page_len DIV 2));
  967. 780 page_head := cur_select - (page_len DIV 2)
  968. 781 ELSE
  969. 782 INC(cy, cur_select)
  970. 783 END
  971. 784 END;
  972. 785
  973. 786 choosing := TRUE;
  974. 787 refrsh := TRUE;
  975. 788
  976. 789 WHILE (choosing) DO
  977. 790 (*** Where the bar is on the page. ***)
  978. 791
  979. 792 IF (NOT refrsh) THEN
  980. 793 txtAttr(txtAttrVal.inverse, x, cy, ex)
  981. 794 END;
  982. 795
  983. 796 (*** Rewrite entire page. ***)
  984. 797
  985. 798 IF (refrsh) THEN
  986. 799 FOR i := 0 TO page_len - 1 DO
  987. 800 txtXY(x, y + i);
  988. 801 IF (y + i = cy) THEN
  989. 802 txtAttr(txtAttrVal.inverse, x, cy, ex)
  990. 803 END;
  991. 804 dispItem(devptr, page_head + i, tail_sel, str, FALSE)
  992. 805 END;
  993. 806 refrsh := FALSE;
  994. 807 ELSE
  995. 808 (*** Just moved bar. ***)
  996. 809 txtXY(x, cy);
  997. 810 dispItem(devptr, cur_select, tail_sel, str, FALSE)
  998. 811 END;
  999. 812
  1000. 813 (*** Get cursor out of way. ***)
  1001. 814
  1002. 815 txtXY(0, GrQLines - 1);
  1003. 816 getKey(s, a);
  1004. 817
  1005. 818 (*** Escape. ***)
  1006. 819
  1007. 820 IF (a = CHR(kESC)) THEN
  1008. 821 GrQuit(GRQQUITSTR, 9)
  1009. 822 END;
  1010. 823
  1011. 824 (*** Made a choice. ***)
  1012. 825
  1013. 826 IF (a = CHR(kCR)) THEN
  1014. 827 RETURN cur_select
  1015. 828 END;
  1016. 829
  1017. 830 txtAttr(txtAttrVal.normal, x, cy, ex);
  1018. 831 txtXY(x, cy);
  1019. 832 dispItem(devptr, cur_select, tail_sel, str, FALSE);
  1020. 833
  1021. 834 CASE s OF
  1022. 835 | CHR(UP_arr), CHR(LF_arr):
  1023. 836 IF (cur_select > 0) THEN
  1024. 837 DEC(cur_select);
  1025. 838 IF (cy > y) THEN
  1026. 839 DEC(cy)
  1027. 840 ELSE
  1028. 841 (*** Top of page; move up one line. ***)
  1029. 842 IF (page_head > 0) THEN
  1030. 843 DEC(page_head);
  1031. 844 txtScroll(SDOWN, x, y, ex, y + page_len - 1, 1)
  1032. 845 END
  1033. 846 END
  1034. 847 END;
  1035. 848 | CHR(DN_arr), CHR(RT_arr):
  1036. 849 IF (cur_select < tail_sel) THEN
  1037. 850 INC(cur_select);
  1038. 851 IF (cy < (page_len + y - 1)) THEN
  1039. 852 INC(cy)
  1040. 853 ELSE
  1041. 854 (*** Bottom of page; move down one line. ***)
  1042. 855 IF (page_head < tail_sel) THEN
  1043. 856 INC(page_head);
  1044. 857 txtScroll(SUP, x, y, ex, y+page_len-1, 1)
  1045. 858 END
  1046. 859 END
  1047. 860 END;
  1048. 861 | CHR(Home):
  1049. 862 IF (cur_select > 0) THEN
  1050. 863 (*** Set page, select, to 0 and set cursor bar. ***)
  1051. 864 page_head := 0;
  1052. 865 cur_select := 0;
  1053. 866 cy := y;
  1054. 867 refrsh := TRUE
  1055. 868 END;
  1056. 869 | CHR(End):
  1057. 870 IF (cur_select < tail_sel) THEN
  1058. 871 (*** Set page, select, and set cursor bar. ***)
  1059. 872 page_head := tail_sel - page_len + 1;
  1060. 873 cur_select := tail_sel;
  1061. 874 cy := page_len + y - 1;
  1062. 875 refrsh := TRUE
  1063. 876 END;
  1064. 877 | CHR(PgDn):
  1065. 878 IF (cur_select < tail_sel) THEN
  1066. 879 INC(page_head, page_len);
  1067. 880 INC(cur_select, page_len);
  1068. 881 IF (page_head + page_len > tail_sel + 1) OR (cur_select > tail_sel) THEN
  1069. 882 page_head := tail_sel + 1 - page_len;
  1070. 883 cur_select := tail_sel;
  1071. 884 cy := page_len + y - 1;
  1072. 885 END;
  1073. 886 refrsh := TRUE
  1074. 887 END;
  1075. 888 | CHR(PgUp):
  1076. 889 IF (cur_select > 0) THEN
  1077. 890 IF (page_head < page_len) OR (cur_select < page_len) THEN
  1078. 891 page_head := 0;
  1079. 892 cy := y;
  1080. 893 cur_select:= 0
  1081. 894 ELSE
  1082. 895 DEC(page_head, page_len);
  1083. 896 DEC(cur_select, page_len);
  1084. 897 END;
  1085. 898 refrsh := TRUE
  1086. 899 END
  1087. 900 ELSE
  1088. 901 Qbeep()
  1089. 902 END
  1090. 903 END;
  1091. 904 RETURN 0
  1092. 905 END viewList;
  1093. 906
  1094. 907
  1095. 908 PROCEDURE grQMenu(VAR GrafixCard, CommPort: INTEGER);
  1096. 909 (*** Allow menu selection of desired devices. ***)
  1097. 910 VAR
  1098. 911 i, inum, onum, x, y: CARDINAL;
  1099. 912 ktime: CARDINAL;
  1100. 913 z, w: CHAR;
  1101. 914 OK: BOOLEAN;
  1102. 915 BEGIN
  1103. 916 LOOP
  1104. 917
  1105. 918 (*** Find display adapter info. ***)
  1106. 919
  1107. 920 onum := 0;
  1108. 921
  1109. 922 WHILE (oDev[onum].devnum # 0) AND (oDev[onum].devnum # GrafixCard) DO
  1110. 923 INC(onum)
  1111. 924 END;
  1112. 925
  1113. 926 (*** Find input device info. ***)
  1114. 927
  1115. 928 inum := 0;
  1116. 929
  1117. 930 WHILE (iDev[inum].devnum # 0) AND (iDev[inum].devnum # CommPort) DO
  1118. 931 INC(inum)
  1119. 932 END;
  1120. 933
  1121. 934 (*** Clear screen. ***)
  1122. 935
  1123. 936 txtScroll(SUP, 0, 0, 79, 24, 0);
  1124. 937
  1125. 938 txtFrame(1, 1, 78, GrQLines - 2);
  1126. 939 txtBar(1, 3, 78);
  1127. 940
  1128. 941 y := 0;
  1129. 942 txtTitle(GRQHDRSTR, y);
  1130. 943
  1131. 944 INC(y, 2);
  1132. 945 txtTitle(GRQTITLE, y);
  1133. 946
  1134. 947 (*** Print MetaWINDOW version. ***)
  1135. 948
  1136. 949 Str.Copy(line, '-[ ');
  1137. 950 Meta.MetaVersion(buf);
  1138. 951 Str.Append(line, buf);
  1139. 952 Str.Append(line, ' ]-');
  1140. 953 txtTitle(line, GrQLines - 1);
  1141. 954
  1142. 955 x := 4;
  1143. 956 y := 5;
  1144. 957
  1145. 958 txtXY(x, y);
  1146. 959
  1147. 960 (*** Display graphics device. ***)
  1148. 961
  1149. 962 FOR i := 0 TO GRQLINLEN DO
  1150. 963 line[i] := ' '
  1151. 964 END;
  1152. 965
  1153. 966 IF (GrafixCard # 0) THEN
  1154. 967 bPrint('Display Device / Mode:');
  1155. 968 Str.Copy(line, oDev[onum].devdesc);
  1156. 969 Str.IntToStr(LONGINT(oDev[onum].devhres), buf, 10, OK);
  1157. 970 Str.Append(line, ', ');
  1158. 971 Str.Append(line, buf);
  1159. 972 Str.Append(line, 'x');
  1160. 973 Str.IntToStr(LONGINT(oDev[onum].devvres), buf, 10, OK);
  1161. 974 Str.Append(line, buf);
  1162. 975 IF (oDev[onum].devcolors = 0) THEN
  1163. 976 Str.Append(line, ' monochrome')
  1164. 977 ELSE
  1165. 978 Str.Append(line, ' ');
  1166. 979 Str.IntToStr(LONGINT(oDev[onum].devcolors), buf, 10, OK);
  1167. 980 Str.Append(line, buf);
  1168. 981 Str.Append(line, ' color')
  1169. 982 END;
  1170. 983
  1171. 984 txtAttr(txtAttrVal.hilite, x + 23, y, Str.Length(line) + x + 25);
  1172. 985 txtXY(x + 23, y);
  1173. 986 bPrint(line)
  1174. 987 ELSE
  1175. 988 txtAttr(txtAttrVal.hilite, x, y, Str.Length(oDev[onum].devdesc) + x);
  1176. 989 bPrint(oDev[onum].devdesc)
  1177. 990 END;
  1178. 991
  1179. 992 (*** Display input device. ***)
  1180. 993
  1181. 994 INC(y, 2);
  1182. 995 txtXY(x, y);
  1183. 996 bPrint('Input Device or Mouse:');
  1184. 997
  1185. 998 txtAttr(txtAttrVal.hilite, x + 23, y, Str.Length(iDev[inum].devdesc) + x + 25);
  1186. 999 txtXY(x + 23, y);
  1187. 1000 bPrint(iDev[inum].devdesc);
  1188. 1001
  1189. 1002 INC(y, 3);
  1190. 1003 txtXY(x, y);
  1191. 1004 txtAttr(txtAttrVal.hilite, x, y, x + 3);
  1192. 1005 bPrint('[D] -> choose an alternate Display.');
  1193. 1006
  1194. 1007 INC(y, 2);
  1195. 1008 txtXY(x, y);
  1196. 1009 txtAttr(txtAttrVal.hilite, x, y, x + 3);
  1197. 1010 bPrint('[I] -> choose an alternate Input device or mouse.');
  1198. 1011
  1199. 1012 INC(y, 2);
  1200. 1013 txtXY(x, y);
  1201. 1014 txtAttr(txtAttrVal.hilite, x, y, x + 5);
  1202. 1015 bPrint('[Esc] -> Escape to DOS.');
  1203. 1016
  1204. 1017 INC(y, 2);
  1205. 1018 txtXY(x, y);
  1206. 1019 txtAttr(txtAttrVal.hilite, x, y, x + 7);
  1207. 1020 bPrint('[other] -> accept defaults');
  1208. 1021
  1209. 1022 INC(y, 3);
  1210. 1023 txtXY(x, y);
  1211. 1024 bPrint('Choice ? [ ]');
  1212. 1025 txtXY(x + 12, y);
  1213. 1026
  1214. 1027 (*** Wait for a key or timeout. ***)
  1215. 1028
  1216. 1029 ktime := time55();
  1217. 1030
  1218. 1031 LOOP
  1219. 1032 IF (time55() > ktime + GRQDELAY) THEN
  1220. 1033 Meta.ClearText();
  1221. 1034 txtXY(0, 0);
  1222. 1035 RETURN
  1223. 1036 END;
  1224. 1037 IF (IO.KeyPressed()) THEN
  1225. 1038 EXIT
  1226. 1039 END
  1227. 1040 END;
  1228. 1041
  1229. 1042 (*** Get a key and process. ***)
  1230. 1043
  1231. 1044 getKey(z, w);
  1232. 1045
  1233. 1046 CASE w OF
  1234. 1047 | CHR(kESC):
  1235. 1048 (*** Escape key. ***)
  1236. 1049 GrQuit(GRQQUITSTR, 9)
  1237. 1050 | 'D', 'd':
  1238. 1051 i := viewList(oDev, onum, FALSE);
  1239. 1052 GrafixCard := oDev[i].devnum
  1240. 1053 | 'I', 'i':
  1241. 1054 i := viewList(iDev, inum, TRUE);
  1242. 1055 CommPort := iDev[i].devnum
  1243. 1056 ELSE
  1244. 1057 (*** Any other key accepts choice. ***)
  1245. 1058 Meta.ClearText();
  1246. 1059 txtXY(0, 0);
  1247. 1060 RETURN
  1248. 1061 END
  1249. 1062 END
  1250. 1063 END grQMenu;
  1251. 1064 (*%E GRQtrim = FALSE *)
  1252. 1065
  1253. 1066 (*%T GRQtrim *)
  1254. 1067
  1255. 1068 PROCEDURE dumpList();
  1256. 1069 (*** Print the entire device list. ***)
  1257. 1070 VAR
  1258. 1071 i, j: CARDINAL;
  1259. 1072 OK : BOOLEAN;
  1260. 1073 BEGIN
  1261. 1074
  1262. 1075 Meta.MetaVersion(line);
  1263. ***** ^ not supported yet
  1264. ***** ^ not supported yet
  1265. ***** ^ not supported yet
  1266. 1076
  1267. 1077 IO.WrLn();
  1268. ***** ^ not supported yet
  1269. ***** ^ not supported yet
  1270. ***** ^ not supported yet
  1271. 1078 IO.WrStr(line);
  1272. ***** ^ not supported yet
  1273. ***** ^ not supported yet
  1274. ***** ^ not supported yet
  1275. 1079
  1276. 1080 IO.WrLn(); IO.WrLn();
  1277. ***** ^ not supported yet
  1278. ***** ^ not supported yet
  1279. ***** ^ not supported yet
  1280. ***** ^ not supported yet
  1281. ***** ^ not supported yet
  1282. ***** ^ not supported yet
  1283. 1081 IO.WrStr(' Output Devices (Displays)');
  1284. ***** ^ not supported yet
  1285. ***** ^ not supported yet
  1286. ***** ^ not supported yet
  1287. 1082 IO.WrLn(); IO.WrLn();
  1288. ***** ^ not supported yet
  1289. ***** ^ not supported yet
  1290. ***** ^ not supported yet
  1291. ***** ^ not supported yet
  1292. ***** ^ not supported yet
  1293. ***** ^ not supported yet
  1294. 1083
  1295. 1084 IO.WrStr('Cmd Line Graphics Device Resolution Colors ');
  1296. ***** ^ not supported yet
  1297. ***** ^ not supported yet
  1298. ***** ^ not supported yet
  1299. 1085 IO.WrLn();
  1300. ***** ^ not supported yet
  1301. ***** ^ not supported yet
  1302. ***** ^ not supported yet
  1303. 1086 IO.WrStr('======================================================================');
  1304. ***** ^ not supported yet
  1305. ***** ^ not supported yet
  1306. ***** ^ not supported yet
  1307. 1087 IO.WrLn();
  1308. ***** ^ not supported yet
  1309. ***** ^ not supported yet
  1310. ***** ^ not supported yet
  1311. 1088
  1312. 1089 FOR i := 0 TO HIGH(oDev) DO
  1313. ***** ^ undeclared identifier
  1314. ***** ^ not supported yet
  1315. 1090 FOR j := 0 TO GRQLINLEN DO
  1316. 1091 line[j] := ' '
  1317. ***** ^ not supported yet
  1318. ***** ^ not supported yet
  1319. 1092 END;
  1320. 1093
  1321. 1094 Str.Insert(line, '-', 1);
  1322. ***** ^ not supported yet
  1323. ***** ^ not supported yet
  1324. ***** ^ not supported yet
  1325. ***** ^ not supported yet
  1326. 1095 Str.Insert(line, oDev[i].devslash, 2);
  1327. ***** ^ not supported yet
  1328. ***** ^ not supported yet
  1329. ***** ^ not supported yet
  1330. ***** ^ not supported yet
  1331. ***** ^ not supported yet
  1332. ***** ^ not supported yet
  1333. 1096 Str.Insert(line, oDev[i].devdesc, 11);
  1334. ***** ^ not supported yet
  1335. ***** ^ not supported yet
  1336. ***** ^ not supported yet
  1337. ***** ^ not supported yet
  1338. ***** ^ not supported yet
  1339. ***** ^ not supported yet
  1340. 1097 Str.IntToStr(LONGINT(oDev[i].devhres), buf, 10, OK);
  1341. ***** ^ not supported yet
  1342. ***** ^ not supported yet
  1343. ***** ^ not supported yet
  1344. ***** ^ not supported yet
  1345. ***** ^ not supported yet
  1346. ***** ^ not supported yet
  1347. 1098 Str.Insert(line, buf, 45);
  1348. ***** ^ not supported yet
  1349. ***** ^ not supported yet
  1350. ***** ^ not supported yet
  1351. ***** ^ not supported yet
  1352. ***** ^ not supported yet
  1353. 1099 Str.Insert(line, ' x ', 50);
  1354. ***** ^ not supported yet
  1355. ***** ^ not supported yet
  1356. ***** ^ not supported yet
  1357. ***** ^ not supported yet
  1358. ***** ^ not supported yet
  1359. 1100 Str.IntToStr(LONGINT(oDev[i].devvres), buf, 10, OK);
  1360. ***** ^ not supported yet
  1361. ***** ^ not supported yet
  1362. ***** ^ not supported yet
  1363. ***** ^ not supported yet
  1364. ***** ^ not supported yet
  1365. ***** ^ not supported yet
  1366. 1101 Str.Insert(line, buf, 53);
  1367. ***** ^ not supported yet
  1368. ***** ^ not supported yet
  1369. ***** ^ not supported yet
  1370. ***** ^ not supported yet
  1371. ***** ^ not supported yet
  1372. 1102 IF (oDev[i].devcolors = 0) THEN
  1373. ***** ^ not supported yet
  1374. ***** ^ not supported yet
  1375. 1103 Str.Insert(line, 'monochrome', 60);
  1376. ***** ^ not supported yet
  1377. ***** ^ not supported yet
  1378. ***** ^ not supported yet
  1379. ***** ^ not supported yet
  1380. ***** ^ not supported yet
  1381. 1104 ELSE
  1382. 1105 Str.IntToStr(LONGINT(oDev[i].devcolors), buf, 10, OK);
  1383. ***** ^ not supported yet
  1384. ***** ^ not supported yet
  1385. ***** ^ not supported yet
  1386. ***** ^ not supported yet
  1387. ***** ^ not supported yet
  1388. ***** ^ not supported yet
  1389. 1106 Str.Insert(line, buf, 60);
  1390. ***** ^ not supported yet
  1391. ***** ^ not supported yet
  1392. ***** ^ not supported yet
  1393. ***** ^ not supported yet
  1394. ***** ^ not supported yet
  1395. 1107 END;
  1396. 1108
  1397. 1109 line[70] := CHR(0);
  1398. ***** ^ not supported yet
  1399. ***** ^ not supported yet
  1400. ***** ^ undeclared identifier
  1401. ***** ^ not supported yet
  1402. 1110
  1403. 1111 IO.WrStr(line);
  1404. ***** ^ not supported yet
  1405. ***** ^ not supported yet
  1406. ***** ^ not supported yet
  1407. 1112 IO.WrLn();
  1408. ***** ^ not supported yet
  1409. ***** ^ not supported yet
  1410. ***** ^ not supported yet
  1411. 1113 END;
  1412. 1114
  1413. 1115 IO.WrLn();
  1414. ***** ^ not supported yet
  1415. ***** ^ not supported yet
  1416. ***** ^ not supported yet
  1417. 1116 IO.WrStr(' Input Devices (Mouse)');
  1418. ***** ^ not supported yet
  1419. ***** ^ not supported yet
  1420. ***** ^ not supported yet
  1421. 1117 IO.WrLn(); IO.WrLn();
  1422. ***** ^ not supported yet
  1423. ***** ^ not supported yet
  1424. ***** ^ not supported yet
  1425. ***** ^ not supported yet
  1426. ***** ^ not supported yet
  1427. ***** ^ not supported yet
  1428. 1118 IO.WrStr('Cmd Line Pointing Device ');
  1429. ***** ^ not supported yet
  1430. ***** ^ not supported yet
  1431. ***** ^ not supported yet
  1432. 1119 IO.WrLn();
  1433. ***** ^ not supported yet
  1434. ***** ^ not supported yet
  1435. ***** ^ not supported yet
  1436. 1120 IO.WrStr('======================================================================');
  1437. ***** ^ not supported yet
  1438. ***** ^ not supported yet
  1439. ***** ^ not supported yet
  1440. 1121 IO.WrLn();
  1441. ***** ^ not supported yet
  1442. ***** ^ not supported yet
  1443. ***** ^ not supported yet
  1444. 1122
  1445. 1123 FOR i := 0 TO HIGH(iDev) DO
  1446. ***** ^ undeclared identifier
  1447. ***** ^ not supported yet
  1448. 1124 FOR j := 0 TO GRQLINLEN DO
  1449. 1125 line[j] := ' '
  1450. ***** ^ not supported yet
  1451. ***** ^ not supported yet
  1452. 1126 END;
  1453. 1127
  1454. 1128 Str.Insert(line, '-', 1);
  1455. ***** ^ not supported yet
  1456. ***** ^ not supported yet
  1457. ***** ^ not supported yet
  1458. ***** ^ not supported yet
  1459. 1129 Str.Insert(line, iDev[i].devslash, 2);
  1460. ***** ^ not supported yet
  1461. ***** ^ not supported yet
  1462. ***** ^ not supported yet
  1463. ***** ^ not supported yet
  1464. ***** ^ not supported yet
  1465. ***** ^ not supported yet
  1466. 1130 Str.Insert(line, iDev[i].devdesc, 11);
  1467. ***** ^ not supported yet
  1468. ***** ^ not supported yet
  1469. ***** ^ not supported yet
  1470. ***** ^ not supported yet
  1471. ***** ^ not supported yet
  1472. ***** ^ not supported yet
  1473. 1131 line[50] := CHR(0);
  1474. ***** ^ not supported yet
  1475. ***** ^ not supported yet
  1476. ***** ^ undeclared identifier
  1477. ***** ^ not supported yet
  1478. 1132 IO.WrStr(line);
  1479. ***** ^ not supported yet
  1480. ***** ^ not supported yet
  1481. ***** ^ not supported yet
  1482. 1133 IO.WrLn();
  1483. ***** ^ not supported yet
  1484. ***** ^ not supported yet
  1485. ***** ^ not supported yet
  1486. 1134 END;
  1487. 1135
  1488. 1136 Lib.SetReturnCode(0);
  1489. ***** ^ not supported yet
  1490. ***** ^ not supported yet
  1491. ***** ^ not supported yet
  1492. 1137 HALT
  1493. ***** ^ undeclared identifier
  1494. 1138 END dumpList;
  1495. ***** ^ not supported yet
  1496. 1139
  1497. 1140 (*%E GRQtrim = TRUE *)
  1498. 1141
  1499. 1142 PROCEDURE grQParse(VAR GrafixCard, CommPort: INTEGER): BOOLEAN;
  1500. 1143 (*** Parse the command line or METAPARM environment variable for options. ***)
  1501. 1144 (*** Sets global GrafixCard and CommPort to selection if any. ***)
  1502. 1145 (*** Returns True if the /; option present, else returns False ***)
  1503. 1146 VAR
  1504. 1147 pass: BOOLEAN;
  1505. 1148 i, dev: CARDINAL;
  1506. 1149 choice: BOOLEAN;
  1507. 1150 j, k: CARDINAL;
  1508. 1151 BEGIN
  1509. 1152 line[0] := CHR(0);
  1510. ***** ^ not supported yet
  1511. ***** ^ not supported yet
  1512. ***** ^ undeclared identifier
  1513. ***** ^ not supported yet
  1514. 1153
  1515. 1154 Meta.GetCmdLine(line);
  1516. ***** ^ not supported yet
  1517. ***** ^ not supported yet
  1518. ***** ^ not supported yet
  1519. 1155
  1520. 1156 (*** Is there a command line choice? ***)
  1521. 1157
  1522. 1158 choice := FALSE;
  1523. 1159
  1524. 1160 i := 0;
  1525. 1161
  1526. 1162 LOOP
  1527. 1163 IF (line[i] = CHR(0)) THEN
  1528. ***** ^ not supported yet
  1529. ***** ^ not supported yet
  1530. ***** ^ undeclared identifier
  1531. ***** ^ not supported yet
  1532. 1164 EXIT
  1533. 1165 END;
  1534. 1166 IF ((line[i] = '-') OR (line[i] = '/')) THEN
  1535. ***** ^ not supported yet
  1536. ***** ^ not supported yet
  1537. ***** ^ not supported yet
  1538. ***** ^ not supported yet
  1539. 1167 choice := TRUE;
  1540. 1168 EXIT
  1541. 1169 END;
  1542. 1170 INC(i)
  1543. ***** ^ undeclared identifier
  1544. ***** ^ not supported yet
  1545. 1171 END;
  1546. 1172
  1547. 1173 (*** NULL terminate line. ***)
  1548. 1174
  1549. 1175 line[GRQMAXLEN] := CHR(0);
  1550. ***** ^ not supported yet
  1551. ***** ^ not supported yet
  1552. ***** ^ undeclared identifier
  1553. ***** ^ not supported yet
  1554. 1176
  1555. 1177 (*** If no cmd line, is there an environment var? ***)
  1556. 1178
  1557. 1179 IF (NOT choice) THEN
  1558. 1180 Lib.EnvironmentFind("METAPARM", line)
  1559. ***** ^ not supported yet
  1560. ***** ^ not supported yet
  1561. ***** ^ not supported yet
  1562. ***** ^ not supported yet
  1563. 1181 END;
  1564. 1182
  1565. 1183 (*** Force to upper case, remove spaces. ***)
  1566. 1184
  1567. 1185 Str.Lows(line);
  1568. ***** ^ not supported yet
  1569. ***** ^ not supported yet
  1570. ***** ^ not supported yet
  1571. 1186
  1572. 1187 (*** Process each option on the line. ***)
  1573. 1188
  1574. 1189 (*** Set bypass menu to FALSE. ***)
  1575. 1190
  1576. 1191 pass := FALSE;
  1577. 1192
  1578. 1193 i := 0;
  1579. 1194
  1580. 1195 LOOP
  1581. 1196 WHILE (line[i] # CHR(0)) AND (line[i] # '/') AND (line[i] # '-') DO
  1582. ***** ^ not supported yet
  1583. ***** ^ not supported yet
  1584. ***** ^ undeclared identifier
  1585. ***** ^ not supported yet
  1586. ***** ^ not supported yet
  1587. ***** ^ not supported yet
  1588. ***** ^ not supported yet
  1589. ***** ^ not supported yet
  1590. 1197 INC(i)
  1591. ***** ^ undeclared identifier
  1592. ***** ^ not supported yet
  1593. 1198 END;
  1594. 1199
  1595. 1200 IF (line[i] = CHR(0)) THEN
  1596. ***** ^ not supported yet
  1597. ***** ^ not supported yet
  1598. ***** ^ undeclared identifier
  1599. ***** ^ not supported yet
  1600. 1201 EXIT
  1601. 1202 END;
  1602. 1203
  1603. 1204 INC(i);
  1604. ***** ^ undeclared identifier
  1605. ***** ^ not supported yet
  1606. 1205
  1607. 1206 (*%T GRQtrim *)
  1608. 1207 IF line[i] = '?' THEN
  1609. ***** ^ not supported yet
  1610. ***** ^ not supported yet
  1611. 1208 dumpList()
  1612. ***** ^ not supported yet
  1613. ***** ^ not supported yet
  1614. 1209 END;
  1615. 1210 (*%E GRQtrim = TRUE *)
  1616. 1211
  1617. 1212 IF line[i] = ';' THEN
  1618. ***** ^ not supported yet
  1619. ***** ^ not supported yet
  1620. 1213 pass := TRUE
  1621. 1214 END;
  1622. 1215
  1623. 1216 (*** Table look up for each output device. ***)
  1624. 1217
  1625. 1218 dev := 0;
  1626. 1219
  1627. 1220 WHILE (GrafixCard = 0) AND (dev <= HIGH(oDev)) DO
  1628. ***** ^ undeclared identifier
  1629. ***** ^ not supported yet
  1630. 1221 j := 0;
  1631. 1222 WITH oDev[dev] DO
  1632. ***** ^ not supported yet
  1633. 1223 WHILE (devslash[j] = line[i+j]) AND (devslash[j] # CHR(0)) DO
  1634. ***** ^ undeclared identifier
  1635. ***** ^ not supported yet
  1636. ***** ^ not supported yet
  1637. ***** ^ not supported yet
  1638. ***** ^ undeclared identifier
  1639. ***** ^ not supported yet
  1640. ***** ^ undeclared identifier
  1641. ***** ^ not supported yet
  1642. 1224 INC(j)
  1643. ***** ^ undeclared identifier
  1644. ***** ^ not supported yet
  1645. 1225 END;
  1646. 1226
  1647. 1227 IF (devslash[j] = CHR(0)) AND (line[i+j] # ':') THEN
  1648. ***** ^ undeclared identifier
  1649. ***** ^ not supported yet
  1650. ***** ^ undeclared identifier
  1651. ***** ^ not supported yet
  1652. ***** ^ not supported yet
  1653. ***** ^ not supported yet
  1654. 1228 GrafixCard := devnum;
  1655. ***** ^ undeclared identifier
  1656. 1229 INC(i, j);
  1657. ***** ^ undeclared identifier
  1658. ***** ^ not supported yet
  1659. 1230 END;
  1660. 1231 END;
  1661. ***** ^ not supported yet
  1662. 1232 INC(dev)
  1663. ***** ^ undeclared identifier
  1664. ***** ^ undeclared identifier
  1665. 1233 END;
  1666. 1234
  1667. 1235 (*** Table look up for each input device. ***)
  1668. 1236
  1669. 1237 dev := 0;
  1670. ***** ^ undeclared identifier
  1671. 1238
  1672. 1239 WHILE (CommPort = 0) AND (dev <= HIGH(iDev)) DO
  1673. ***** ^ undeclared identifier
  1674. ***** ^ undeclared identifier
  1675. ***** ^ undeclared identifier
  1676. ***** ^ not supported yet
  1677. 1240 j := 0;
  1678. ***** ^ undeclared identifier
  1679. 1241 WITH iDev[dev] DO
  1680. ***** ^ undeclared identifier
  1681. 1242 WHILE (devslash[j] = line[i+j]) AND (devslash[j] # CHR(0)) DO
  1682. ***** ^ undeclared identifier
  1683. ***** ^ undeclared identifier
  1684. ***** ^ not supported yet
  1685. ***** ^ undeclared identifier
  1686. ***** ^ undeclared identifier
  1687. ***** ^ undeclared identifier
  1688. ***** ^ undeclared identifier
  1689. ***** ^ undeclared identifier
  1690. ***** ^ not supported yet
  1691. 1243 INC(j)
  1692. ***** ^ undeclared identifier
  1693. ***** ^ undeclared identifier
  1694. 1244 END;
  1695. 1245
  1696. 1246 IF (devslash[j] = CHR(0)) AND (line[i+j] # ':') THEN
  1697. ***** ^ undeclared identifier
  1698. ***** ^ undeclared identifier
  1699. ***** ^ undeclared identifier
  1700. ***** ^ not supported yet
  1701. ***** ^ not supported yet
  1702. ***** ^ undeclared identifier
  1703. ***** ^ undeclared identifier
  1704. 1247 CommPort := devnum;
  1705. ***** ^ undeclared identifier
  1706. ***** ^ undeclared identifier
  1707. 1248 INC(i, j);
  1708. ***** ^ undeclared identifier
  1709. ***** ^ undeclared identifier
  1710. ***** ^ undeclared identifier
  1711. 1249 END;
  1712. 1250 END;
  1713. ***** ^ not supported yet
  1714. 1251 INC(dev)
  1715. ***** ^ undeclared identifier
  1716. ***** ^ undeclared identifier
  1717. 1252 END;
  1718. 1253 END;
  1719. 1254 RETURN pass
  1720. ***** ^ undeclared identifier
  1721. 1255 END grQParse;
  1722. ***** ^ not supported yet
  1723. 1256
  1724. 1257
  1725. 1258 PROCEDURE bitAnd(A1, A2: CARDINAL) : CARDINAL;
  1726. 1259 (*** Return the bitwise and of the two parameters. ***)
  1727. 1260 BEGIN
  1728. 1261 RETURN CARDINAL(BITSET(A1) * BITSET(A2))
  1729. ***** ^ undeclared identifier
  1730. ***** ^ not supported yet
  1731. ***** ^ undeclared identifier
  1732. ***** ^ not supported yet
  1733. 1262 END bitAnd;
  1734. ***** ^ not supported yet
  1735. 1263
  1736. 1264
  1737. 1265 PROCEDURE GrInit(VAR GrafixCard, CommPort: INTEGER);
  1738. 1266 (*** Use QueryGrafix() and QueryCom() to try and determine the devices ***)
  1739. 1267 (*** currently in use. As a safety measure GrafixCard and CommPort are ***)
  1740. 1268 (*** initialised to 0. ***)
  1741. 1269 VAR qGraf, qComm: INTEGER;
  1742. 1270 BEGIN
  1743. 1271 (*** Initialise GrafixCard and CommPort to 0. ***)
  1744. 1272
  1745. 1273 GrafixCard := 0;
  1746. 1274 CommPort := 0;
  1747. 1275
  1748. 1276 (*** Is the driver loaded ? ***)
  1749. 1277
  1750. 1278 qComm := Meta.QueryComm();
  1751. ***** ^ not supported yet
  1752. ***** ^ not supported yet
  1753. ***** ^ not supported yet
  1754. 1279
  1755. 1280 IF (qComm < 0) THEN
  1756. 1281 GrInitErr(GrafixCard, CommPort, qComm)
  1757. ***** ^ undeclared identifier
  1758. ***** ^ not supported yet
  1759. 1282 END;
  1760. 1283
  1761. 1284 (*** Use QueryGrafix() to determine GrafixCard. ***)
  1762. 1285
  1763. 1286 qGraf := Meta.QueryGrafix();
  1764. ***** ^ not supported yet
  1765. ***** ^ not supported yet
  1766. ***** ^ not supported yet
  1767. 1287
  1768. 1288 CASE qGraf OF
  1769. 1289 GrConst.EXPL320x200,
  1770. ***** ^ not supported yet
  1771. ***** ^ not supported yet
  1772. 1290 GrConst.SP768x1008,
  1773. ***** ^ not supported yet
  1774. ***** ^ not supported yet
  1775. 1291 GrConst.SP768x1008A,
  1776. ***** ^ not supported yet
  1777. ***** ^ not supported yet
  1778. 1292 GrConst.COR1280x960,
  1779. ***** ^ not supported yet
  1780. ***** ^ not supported yet
  1781. 1293 GrConst.COR1280x960A,
  1782. ***** ^ not supported yet
  1783. ***** ^ not supported yet
  1784. 1294 GrConst.COR1280x1024,
  1785. ***** ^ not supported yet
  1786. ***** ^ not supported yet
  1787. 1295 GrConst.COR1280x1024A,
  1788. ***** ^ not supported yet
  1789. ***** ^ not supported yet
  1790. 1296 GrConst.COR1600x1280DP,
  1791. ***** ^ not supported yet
  1792. ***** ^ not supported yet
  1793. 1297 GrConst.COR1600x1280DPA,
  1794. ***** ^ not supported yet
  1795. ***** ^ not supported yet
  1796. 1298 GrConst.COR1600x1280MCA,
  1797. ***** ^ not supported yet
  1798. ***** ^ not supported yet
  1799. 1299 GrConst.SIG1664x1200MCA,
  1800. ***** ^ not supported yet
  1801. ***** ^ not supported yet
  1802. 1300 GrConst.FKY1120x750,
  1803. ***** ^ not supported yet
  1804. ***** ^ not supported yet
  1805. 1301 GrConst.FKY640x400,
  1806. ***** ^ not supported yet
  1807. ***** ^ not supported yet
  1808. 1302 GrConst.NDI640x480x4D,
  1809. ***** ^ not supported yet
  1810. ***** ^ not supported yet
  1811. 1303 GrConst.HP1024x768x4,
  1812. ***** ^ not supported yet
  1813. ***** ^ not supported yet
  1814. 1304 GrConst.GRX1024x768x4A,
  1815. ***** ^ not supported yet
  1816. ***** ^ not supported yet
  1817. 1305 GrConst.NEC640x400: GrafixCard := qGraf
  1818. ***** ^ not supported yet
  1819. ***** ^ not supported yet
  1820. 1306 ELSE
  1821. 1307 IF (bitAnd(qGraf, GrConst.VGA640x480) = GrConst.VGA640x480) THEN
  1822. ***** ^ not supported yet
  1823. ***** ^ not supported yet
  1824. ***** ^ not supported yet
  1825. ***** ^ not supported yet
  1826. ***** ^ not supported yet
  1827. 1308 (*** Vega Deluxe. ***)
  1828. 1309 IF (bitAnd(qGraf, 0030H) = 0010H) THEN
  1829. ***** ^ not supported yet
  1830. ***** ^ not supported yet
  1831. 1310 GrafixCard := GrConst.EGAMono
  1832. ***** ^ not supported yet
  1833. ***** ^ not supported yet
  1834. 1311 ELSE
  1835. 1312 GrafixCard := GrConst.EGA640x350
  1836. ***** ^ not supported yet
  1837. ***** ^ not supported yet
  1838. 1313 END
  1839. 1314 ELSIF (bitAnd(qGraf, GrConst.EVA640x480) = GrConst.EVA640x480) THEN
  1840. ***** ^ not supported yet
  1841. ***** ^ not supported yet
  1842. ***** ^ not supported yet
  1843. ***** ^ not supported yet
  1844. ***** ^ not supported yet
  1845. 1315 (*** Tseng Labs EVA/480. ***)
  1846. 1316 IF (bitAnd(qGraf, 0030H) = 0010H) THEN
  1847. ***** ^ not supported yet
  1848. ***** ^ not supported yet
  1849. 1317 GrafixCard := GrConst.EGAMono
  1850. ***** ^ not supported yet
  1851. ***** ^ not supported yet
  1852. 1318 ELSE
  1853. 1319 GrafixCard := GrConst.EGA640x350
  1854. ***** ^ not supported yet
  1855. ***** ^ not supported yet
  1856. 1320 END
  1857. 1321 ELSIF bitAnd(qGraf, GrConst.EGAMono) # 0 THEN
  1858. ***** ^ not supported yet
  1859. ***** ^ not supported yet
  1860. ***** ^ not supported yet
  1861. 1322 IF bitAnd(qGraf, 0100H) # 0 THEN
  1862. ***** ^ not supported yet
  1863. ***** ^ not supported yet
  1864. 1323 (*** IBM PS/2 ***)
  1865. 1324 IF bitAnd(qGraf, 10H) # 0 THEN
  1866. ***** ^ not supported yet
  1867. ***** ^ not supported yet
  1868. 1325 GrafixCard := GrConst.MGA640x480
  1869. ***** ^ not supported yet
  1870. ***** ^ not supported yet
  1871. 1326 ELSE
  1872. 1327 GrafixCard := GrConst.EGA640x480
  1873. ***** ^ not supported yet
  1874. ***** ^ not supported yet
  1875. 1328 END
  1876. 1329 ELSIF (bitAnd(qGraf, 0030H) = 0010H) THEN
  1877. ***** ^ not supported yet
  1878. ***** ^ not supported yet
  1879. 1330 (*** IBM EGA ***)
  1880. 1331 GrafixCard := GrConst.EGAMono
  1881. ***** ^ not supported yet
  1882. ***** ^ not supported yet
  1883. 1332 ELSIF ((bitAnd(qGraf, 0030H) = 0030H) AND (bitAnd(qGraf, 0C0H) # 0)) THEN
  1884. ***** ^ not supported yet
  1885. ***** ^ not supported yet
  1886. ***** ^ not supported yet
  1887. ***** ^ not supported yet
  1888. 1333 GrafixCard := GrConst.EGA640x350
  1889. ***** ^ not supported yet
  1890. ***** ^ not supported yet
  1891. 1334 ELSE
  1892. 1335 GrafixCard := GrConst.EGA640x200
  1893. ***** ^ not supported yet
  1894. ***** ^ not supported yet
  1895. 1336 END
  1896. 1337 ELSIF bitAnd(qGraf, GrConst.ATT640x400) # 0 THEN
  1897. ***** ^ not supported yet
  1898. ***** ^ not supported yet
  1899. ***** ^ not supported yet
  1900. 1338 IF bitAnd(qGraf, 1) # 0 THEN
  1901. ***** ^ not supported yet
  1902. ***** ^ not supported yet
  1903. 1339 GrafixCard := GrConst.DEB640x400
  1904. ***** ^ not supported yet
  1905. ***** ^ not supported yet
  1906. 1340 ELSE
  1907. 1341 GrafixCard := GrConst.ATT640x400
  1908. ***** ^ not supported yet
  1909. ***** ^ not supported yet
  1910. 1342 END
  1911. 1343 ELSIF bitAnd(qGraf, GrConst.TOS640x400) # 0 THEN
  1912. ***** ^ not supported yet
  1913. ***** ^ not supported yet
  1914. ***** ^ not supported yet
  1915. 1344 GrafixCard := GrConst.TOS640x400
  1916. ***** ^ not supported yet
  1917. ***** ^ not supported yet
  1918. 1345 ELSIF bitAnd(qGraf, GrConst.CGA320x200) # 0 THEN
  1919. ***** ^ not supported yet
  1920. ***** ^ not supported yet
  1921. ***** ^ not supported yet
  1922. 1346 GrafixCard := GrConst.CGA640x200
  1923. ***** ^ not supported yet
  1924. ***** ^ not supported yet
  1925. 1347 ELSIF bitAnd(qGraf, GrConst.HER720x348) # 0 THEN
  1926. ***** ^ not supported yet
  1927. ***** ^ not supported yet
  1928. ***** ^ not supported yet
  1929. 1348 GrafixCard := GrConst.HER720x348
  1930. ***** ^ not supported yet
  1931. ***** ^ not supported yet
  1932. 1349 ELSIF bitAnd(qGraf, GrConst.TEC720x352) # 0 THEN
  1933. ***** ^ not supported yet
  1934. ***** ^ not supported yet
  1935. ***** ^ not supported yet
  1936. 1350 IF bitAnd(qGraf, 2) # 0 THEN
  1937. ***** ^ not supported yet
  1938. ***** ^ not supported yet
  1939. 1351 GrafixCard := GrConst.TEC640x200
  1940. ***** ^ not supported yet
  1941. ***** ^ not supported yet
  1942. 1352 ELSE
  1943. 1353 GrafixCard := GrConst.TEC720x352
  1944. ***** ^ not supported yet
  1945. ***** ^ not supported yet
  1946. 1354 END
  1947. 1355 ELSIF bitAnd(qGraf, GrConst.EVR640x200) # 0 THEN
  1948. ***** ^ not supported yet
  1949. ***** ^ not supported yet
  1950. ***** ^ not supported yet
  1951. 1356 GrafixCard := GrConst.EVR640x200
  1952. ***** ^ not supported yet
  1953. ***** ^ not supported yet
  1954. 1357 ELSIF bitAnd(qGraf, GrConst.STB640x352) # 0 THEN
  1955. ***** ^ not supported yet
  1956. ***** ^ not supported yet
  1957. ***** ^ not supported yet
  1958. 1358 GrafixCard := GrConst.STB640x352
  1959. ***** ^ not supported yet
  1960. ***** ^ not supported yet
  1961. 1359 ELSIF bitAnd(qGraf, GrConst.TTS720x350) # 0 THEN
  1962. ***** ^ not supported yet
  1963. ***** ^ not supported yet
  1964. ***** ^ not supported yet
  1965. 1360 IF bitAnd(qGraf, 1) # 0 THEN
  1966. ***** ^ not supported yet
  1967. ***** ^ not supported yet
  1968. 1361 GrafixCard := GrConst.TTS360x350
  1969. ***** ^ not supported yet
  1970. ***** ^ not supported yet
  1971. 1362 ELSE
  1972. 1363 GrafixCard := GrConst.TTS720x350
  1973. ***** ^ not supported yet
  1974. ***** ^ not supported yet
  1975. 1364 END
  1976. 1365 ELSIF bitAnd(qGraf, GrConst.SIG640x400) # 0 THEN
  1977. ***** ^ not supported yet
  1978. ***** ^ not supported yet
  1979. ***** ^ not supported yet
  1980. 1366 GrafixCard := GrConst.SIG640x400
  1981. ***** ^ not supported yet
  1982. ***** ^ not supported yet
  1983. 1367 ELSIF bitAnd(qGraf, GrConst.TOS640x400) # 0 THEN
  1984. ***** ^ not supported yet
  1985. ***** ^ not supported yet
  1986. ***** ^ not supported yet
  1987. 1368 GrafixCard := GrConst.TOS640x400
  1988. ***** ^ not supported yet
  1989. ***** ^ not supported yet
  1990. 1369 ELSIF bitAnd(qGraf, GrConst.WYS640x400) # 0 THEN
  1991. ***** ^ not supported yet
  1992. ***** ^ not supported yet
  1993. ***** ^ not supported yet
  1994. 1370 GrafixCard := GrConst.WYS640x400
  1995. ***** ^ not supported yet
  1996. ***** ^ not supported yet
  1997. 1371 ELSIF bitAnd(qGraf, GrConst.MDS736x1008) # 0 THEN
  1998. ***** ^ not supported yet
  1999. ***** ^ not supported yet
  2000. ***** ^ not supported yet
  2001. 1372 GrafixCard := GrConst.MDS736x1008
  2002. ***** ^ not supported yet
  2003. ***** ^ not supported yet
  2004. 1373 END
  2005. 1374 END;
  2006. 1375
  2007. 1376 (*** Use the result from QueryCom() to determine CommPort. ***)
  2008. 1377
  2009. 1378 IF bitAnd(qComm, GrConst.FKYMsDriver) # 0 THEN
  2010. ***** ^ not supported yet
  2011. ***** ^ not supported yet
  2012. ***** ^ not supported yet
  2013. 1379 CommPort := GrConst.FKYMsDriver
  2014. ***** ^ not supported yet
  2015. ***** ^ not supported yet
  2016. 1380 ELSIF bitAnd(qComm, GrConst.MsDriver) # 0 THEN
  2017. ***** ^ not supported yet
  2018. ***** ^ not supported yet
  2019. ***** ^ not supported yet
  2020. 1381 CommPort := GrConst.MsDriver
  2021. ***** ^ not supported yet
  2022. ***** ^ not supported yet
  2023. 1382 (***
  2024. 1383 ELSIF bitAnd(qComm, GrConst.MsMouse) # 0 THEN
  2025. 1384 CommPort := GrConst.MsMouse
  2026. 1385 ***)
  2027. 1386 ELSIF bitAnd(qComm, 2) # 0 THEN
  2028. ***** ^ not supported yet
  2029. ***** ^ not supported yet
  2030. 1387 CommPort := GrConst.MsCOM2
  2031. ***** ^ not supported yet
  2032. ***** ^ not supported yet
  2033. 1388 ELSIF bitAnd(qComm, 1) # 0 THEN
  2034. ***** ^ not supported yet
  2035. ***** ^ not supported yet
  2036. 1389 CommPort := GrConst.MsCOM1
  2037. ***** ^ not supported yet
  2038. ***** ^ not supported yet
  2039. 1390 END
  2040. 1391 END GrInit;
  2041. ***** ^ not supported yet
  2042. 1392
  2043. 1393
  2044. 1394 PROCEDURE GrInitErr(GrafixCard, CommPort, val: INTEGER);
  2045. 1395 (*** Print an initialisation error message. ***)
  2046. 1396 VAR i: CARDINAL;
  2047. 1397 BEGIN
  2048. 1398 IO.WrLn();
  2049. ***** ^ not supported yet
  2050. ***** ^ not supported yet
  2051. ***** ^ not supported yet
  2052. 1399 IO.WrStr('MetaWINDOW SYSTEM ERROR: ');
  2053. ***** ^ not supported yet
  2054. ***** ^ not supported yet
  2055. ***** ^ not supported yet
  2056. 1400
  2057. 1401 IF (val = -1) THEN
  2058. 1402 IO.WrLn(); IO.WrLn();
  2059. ***** ^ not supported yet
  2060. ***** ^ not supported yet
  2061. ***** ^ not supported yet
  2062. ***** ^ not supported yet
  2063. ***** ^ not supported yet
  2064. ***** ^ not supported yet
  2065. 1403 IO.WrStr('The Metagraphics Driver (METASHEL.EXE) is not installed.');
  2066. ***** ^ not supported yet
  2067. ***** ^ not supported yet
  2068. ***** ^ not supported yet
  2069. 1404 IO.WrLn()
  2070. ***** ^ not supported yet
  2071. ***** ^ not supported yet
  2072. ***** ^ not supported yet
  2073. 1405 ELSIF (val = -2) THEN
  2074. 1406 IO.WrStr('The InitGrafix(');
  2075. ***** ^ not supported yet
  2076. ***** ^ not supported yet
  2077. ***** ^ not supported yet
  2078. 1407 IO.WrInt(GrafixCard, 6);
  2079. ***** ^ not supported yet
  2080. ***** ^ not supported yet
  2081. ***** ^ not supported yet
  2082. 1408 IO.WrStr(') call is invalid.');
  2083. ***** ^ not supported yet
  2084. ***** ^ not supported yet
  2085. ***** ^ not supported yet
  2086. 1409 IO.WrLn(); IO.WrLn();
  2087. ***** ^ not supported yet
  2088. ***** ^ not supported yet
  2089. ***** ^ not supported yet
  2090. ***** ^ not supported yet
  2091. ***** ^ not supported yet
  2092. ***** ^ not supported yet
  2093. 1410 IO.WrStr('REASON: ');
  2094. ***** ^ not supported yet
  2095. ***** ^ not supported yet
  2096. ***** ^ not supported yet
  2097. 1411
  2098. 1412 IF (GrafixCard = 0) THEN
  2099. 1413 IO.WrStr('MetaWINDOW was unable to find a default adaptor, ');
  2100. ***** ^ not supported yet
  2101. ***** ^ not supported yet
  2102. ***** ^ not supported yet
  2103. 1414 IO.WrLn();
  2104. ***** ^ not supported yet
  2105. ***** ^ not supported yet
  2106. ***** ^ not supported yet
  2107. 1415 IO.WrStr(' and you did not select one.')
  2108. ***** ^ not supported yet
  2109. ***** ^ not supported yet
  2110. ***** ^ not supported yet
  2111. 1416 ELSE
  2112. 1417
  2113. 1418 i := 0;
  2114. 1419
  2115. 1420 WHILE (GrafixCard # oDev[i].devnum) AND (i # HIGH(oDev)) DO
  2116. ***** ^ not supported yet
  2117. ***** ^ not supported yet
  2118. ***** ^ undeclared identifier
  2119. ***** ^ not supported yet
  2120. 1421 INC(i)
  2121. ***** ^ undeclared identifier
  2122. ***** ^ not supported yet
  2123. 1422 END;
  2124. 1423
  2125. 1424 IF (GrafixCard = oDev[i].devnum) THEN
  2126. ***** ^ not supported yet
  2127. ***** ^ not supported yet
  2128. 1425 Str.Copy(buf, oDev[i].devdesc);
  2129. ***** ^ not supported yet
  2130. ***** ^ not supported yet
  2131. ***** ^ not supported yet
  2132. ***** ^ not supported yet
  2133. ***** ^ not supported yet
  2134. 1426 ELSE
  2135. 1427 Str.Copy(buf, '*** No graphics adaptor ***');
  2136. ***** ^ not supported yet
  2137. ***** ^ not supported yet
  2138. ***** ^ not supported yet
  2139. ***** ^ not supported yet
  2140. 1428 END;
  2141. 1429
  2142. 1430 IF (buf[0] = '+') THEN
  2143. ***** ^ not supported yet
  2144. ***** ^ not supported yet
  2145. 1431 (*** MetaWINDOW Plus device. ***)
  2146. 1432 buf[0] := ' ';
  2147. ***** ^ not supported yet
  2148. ***** ^ not supported yet
  2149. 1433 IO.WrStr('The');
  2150. ***** ^ not supported yet
  2151. ***** ^ not supported yet
  2152. ***** ^ not supported yet
  2153. 1434 IO.WrStr(buf);
  2154. ***** ^ not supported yet
  2155. ***** ^ not supported yet
  2156. ***** ^ not supported yet
  2157. 1435 IO.WrStr(' system is supported in');
  2158. ***** ^ not supported yet
  2159. ***** ^ not supported yet
  2160. ***** ^ not supported yet
  2161. 1436 IO.WrLn();
  2162. ***** ^ not supported yet
  2163. ***** ^ not supported yet
  2164. ***** ^ not supported yet
  2165. 1437 IO.WrStr(' MetaWINDOW/PLUS and MetaWINDOW/Premium only.');
  2166. ***** ^ not supported yet
  2167. ***** ^ not supported yet
  2168. ***** ^ not supported yet
  2169. 1438 IO.WrLn()
  2170. ***** ^ not supported yet
  2171. ***** ^ not supported yet
  2172. ***** ^ not supported yet
  2173. 1439 ELSIF (buf[0] = '*') THEN
  2174. ***** ^ not supported yet
  2175. ***** ^ not supported yet
  2176. 1440 (*** MetaWINDOW Premium device. ***)
  2177. 1441 buf[0] := ' ';
  2178. ***** ^ not supported yet
  2179. ***** ^ not supported yet
  2180. 1442 IO.WrStr('The');
  2181. ***** ^ not supported yet
  2182. ***** ^ not supported yet
  2183. ***** ^ not supported yet
  2184. 1443 IO.WrStr(buf);
  2185. ***** ^ not supported yet
  2186. ***** ^ not supported yet
  2187. ***** ^ not supported yet
  2188. 1444 IO.WrStr(' system is supported in');
  2189. ***** ^ not supported yet
  2190. ***** ^ not supported yet
  2191. ***** ^ not supported yet
  2192. 1445 IO.WrLn();
  2193. ***** ^ not supported yet
  2194. ***** ^ not supported yet
  2195. ***** ^ not supported yet
  2196. 1446 IO.WrStr(' MetaWINDOW/Premium only.');
  2197. ***** ^ not supported yet
  2198. ***** ^ not supported yet
  2199. ***** ^ not supported yet
  2200. 1447 IO.WrLn()
  2201. ***** ^ not supported yet
  2202. ***** ^ not supported yet
  2203. ***** ^ not supported yet
  2204. 1448 ELSE
  2205. 1449 buf[0] := ' ';
  2206. ***** ^ not supported yet
  2207. ***** ^ not supported yet
  2208. 1450 IO.WrStr('Device');
  2209. ***** ^ not supported yet
  2210. ***** ^ not supported yet
  2211. ***** ^ not supported yet
  2212. 1451 IO.WrStr(buf);
  2213. ***** ^ not supported yet
  2214. ***** ^ not supported yet
  2215. ***** ^ not supported yet
  2216. 1452 IO.WrStr(' is not');
  2217. ***** ^ not supported yet
  2218. ***** ^ not supported yet
  2219. ***** ^ not supported yet
  2220. 1453 IO.WrLn();
  2221. ***** ^ not supported yet
  2222. ***** ^ not supported yet
  2223. ***** ^ not supported yet
  2224. 1454 Meta.MetaVersion(buf);
  2225. ***** ^ not supported yet
  2226. ***** ^ not supported yet
  2227. ***** ^ not supported yet
  2228. 1455 IO.WrStr(' supported in ');
  2229. ***** ^ not supported yet
  2230. ***** ^ not supported yet
  2231. ***** ^ not supported yet
  2232. 1456 IO.WrStr(buf);
  2233. ***** ^ not supported yet
  2234. ***** ^ not supported yet
  2235. ***** ^ not supported yet
  2236. 1457 IO.WrLn()
  2237. ***** ^ not supported yet
  2238. ***** ^ not supported yet
  2239. ***** ^ not supported yet
  2240. 1458 END
  2241. 1459 END
  2242. 1460 END;
  2243. 1461 Lib.SetReturnCode(1);
  2244. ***** ^ not supported yet
  2245. ***** ^ not supported yet
  2246. ***** ^ not supported yet
  2247. 1462 HALT
  2248. ***** ^ undeclared identifier
  2249. 1463 END GrInitErr;
  2250. ***** ^ not supported yet
  2251. 1464
  2252. 1465
  2253. 1466 PROCEDURE GrQuery(VAR GrafixCard, CommPort: INTEGER);
  2254. 1467 (*** Determine which devices are available. ***)
  2255. 1468 VAR
  2256. 1469 i: INTEGER;
  2257. 1470 pass: BOOLEAN;
  2258. 1471 c: CHAR;
  2259. 1472 BEGIN
  2260. 1473 (*** Initialise GrafixCard and CommPort from QueryGrafix() and ***)
  2261. 1474 (*** QueryComm(). These settings can be changed by grQParse(). ***)
  2262. 1475
  2263. 1476 GrInit(GrafixCard, CommPort);
  2264. ***** ^ not supported yet
  2265. ***** ^ not supported yet
  2266. 1477
  2267. 1478 (*** Parse out the command line or environment variable, if any. ***)
  2268. 1479
  2269. 1480 pass := grQParse(GrafixCard, CommPort);
  2270. ***** ^ not supported yet
  2271. ***** ^ not supported yet
  2272. 1481
  2273. 1482 (*** If the /; option was present, don't do anything more. ***)
  2274. 1483
  2275. 1484 IF (pass) THEN
  2276. 1485 RETURN
  2277. 1486 END;
  2278. 1487
  2279. 1488 (*%F GRQtrim *)
  2280. 1489 (*** Test to see if mono or color display installed and set vals into ***)
  2281. 1490 (*** global structure. ***)
  2282. 1491
  2283. 1492 IF txtMono() THEN
  2284. 1493 (* on a monochrome system *)
  2285. 1494 txtAttrVal.normal := MNORMAL;
  2286. 1495 txtAttrVal.inverse := MINVERSE;
  2287. 1496 txtAttrVal.hilite := MHILITE
  2288. 1497 ELSE (* color system *)
  2289. 1498 txtAttrVal.normal := CNORMAL;
  2290. 1499 txtAttrVal.inverse := CINVERSE;
  2291. 1500 txtAttrVal.hilite := CHILITE
  2292. 1501 END;
  2293. 1502
  2294. 1503 (*** Allow text screen menu selection. ***)
  2295. 1504 grQMenu(GrafixCard, CommPort);
  2296. 1505 (*%E GRQtrim *)
  2297. 1506
  2298. 1507 (*%T DOSDISP *)
  2299. 1508 Meta.MetaVersion(line);
  2300. ***** ^ not supported yet
  2301. ***** ^ not supported yet
  2302. ***** ^ not supported yet
  2303. 1509 IO.WrLn();
  2304. ***** ^ not supported yet
  2305. ***** ^ not supported yet
  2306. ***** ^ not supported yet
  2307. 1510 IO.WrStr('-[ ');
  2308. ***** ^ not supported yet
  2309. ***** ^ not supported yet
  2310. ***** ^ not supported yet
  2311. 1511 IO.WrStr(line);
  2312. ***** ^ not supported yet
  2313. ***** ^ not supported yet
  2314. ***** ^ not supported yet
  2315. 1512 IO.WrStr(' ]-');
  2316. ***** ^ not supported yet
  2317. ***** ^ not supported yet
  2318. ***** ^ not supported yet
  2319. 1513 IO.WrLn();
  2320. ***** ^ not supported yet
  2321. ***** ^ not supported yet
  2322. ***** ^ not supported yet
  2323. 1514
  2324. 1515 (* find display adapter info *)
  2325. 1516
  2326. 1517 i := 0;
  2327. 1518
  2328. 1519 WHILE (oDev[i].devnum # 0) AND (oDev[i].devnum # GrafixCard) DO
  2329. ***** ^ not supported yet
  2330. ***** ^ not supported yet
  2331. ***** ^ not supported yet
  2332. ***** ^ not supported yet
  2333. 1520 INC(i)
  2334. ***** ^ undeclared identifier
  2335. ***** ^ not supported yet
  2336. 1521 END;
  2337. 1522
  2338. 1523 IO.WrLn();
  2339. ***** ^ not supported yet
  2340. ***** ^ not supported yet
  2341. ***** ^ not supported yet
  2342. 1524 IO.WrStr('DISPLAY: -');
  2343. ***** ^ not supported yet
  2344. ***** ^ not supported yet
  2345. ***** ^ not supported yet
  2346. 1525 IO.WrStr(oDev[i].devslash);
  2347. ***** ^ not supported yet
  2348. ***** ^ not supported yet
  2349. ***** ^ not supported yet
  2350. ***** ^ not supported yet
  2351. 1526 IO.WrStr(' -> ');
  2352. ***** ^ not supported yet
  2353. ***** ^ not supported yet
  2354. ***** ^ not supported yet
  2355. 1527 IO.WrStr(oDev[i].devdesc);
  2356. ***** ^ not supported yet
  2357. ***** ^ not supported yet
  2358. ***** ^ not supported yet
  2359. ***** ^ not supported yet
  2360. 1528 IO.WrStr(', ');
  2361. ***** ^ not supported yet
  2362. ***** ^ not supported yet
  2363. ***** ^ not supported yet
  2364. 1529 IO.WrInt(oDev[i].devhres, 4);
  2365. ***** ^ not supported yet
  2366. ***** ^ not supported yet
  2367. ***** ^ not supported yet
  2368. ***** ^ not supported yet
  2369. ***** ^ not supported yet
  2370. 1530 IO.WrStr(' x ');
  2371. ***** ^ not supported yet
  2372. ***** ^ not supported yet
  2373. ***** ^ not supported yet
  2374. 1531 IO.WrInt(oDev[i].devvres, 4);
  2375. ***** ^ not supported yet
  2376. ***** ^ not supported yet
  2377. ***** ^ not supported yet
  2378. ***** ^ not supported yet
  2379. ***** ^ not supported yet
  2380. 1532 IO.WrLn();
  2381. ***** ^ not supported yet
  2382. ***** ^ not supported yet
  2383. ***** ^ not supported yet
  2384. 1533
  2385. 1534 (* find input device info *)
  2386. 1535
  2387. 1536 i := 0;
  2388. 1537
  2389. 1538 WHILE (iDev[i].devnum # 0) AND (iDev[i].devnum # CommPort) DO
  2390. ***** ^ not supported yet
  2391. ***** ^ not supported yet
  2392. ***** ^ not supported yet
  2393. ***** ^ not supported yet
  2394. 1539 INC(i)
  2395. ***** ^ undeclared identifier
  2396. ***** ^ not supported yet
  2397. 1540 END;
  2398. 1541
  2399. 1542 IO.WrStr(' MOUSE: -');
  2400. ***** ^ not supported yet
  2401. ***** ^ not supported yet
  2402. ***** ^ not supported yet
  2403. 1543 IO.WrStr(iDev[i].devslash);
  2404. ***** ^ not supported yet
  2405. ***** ^ not supported yet
  2406. ***** ^ not supported yet
  2407. ***** ^ not supported yet
  2408. 1544 IO.WrStr(' -> ');
  2409. ***** ^ not supported yet
  2410. ***** ^ not supported yet
  2411. ***** ^ not supported yet
  2412. 1545 IO.WrStr(iDev[i].devdesc);
  2413. ***** ^ not supported yet
  2414. ***** ^ not supported yet
  2415. ***** ^ not supported yet
  2416. ***** ^ not supported yet
  2417. 1546 IO.WrLn();
  2418. ***** ^ not supported yet
  2419. ***** ^ not supported yet
  2420. ***** ^ not supported yet
  2421. 1547
  2422. 1548 c := IO.RdKey();
  2423. ***** ^ not supported yet
  2424. ***** ^ not supported yet
  2425. ***** ^ not supported yet
  2426. 1549 (*%E DOSDISP *)
  2427. 1550
  2428. 1551 (*** GrafixCard and CommPort are now set with valid InitGrafix and ***)
  2429. 1552 (*** InitMouse values (or are equal to zero if no devices were found ***)
  2430. 1553 (*** or specified). ***)
  2431. 1554 END GrQuery;
  2432. ***** ^ not supported yet
  2433. 1555
  2434. 1556 BEGIN
  2435. 1557
  2436. 1558 END GrQry.
  2437. ***** ^ not supported yet
  2438. 878 errors