home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / CTOOLBX1.ZIP / MANUAL.DOC < prev    next >
Encoding:
Text File  |  1987-08-29  |  39.3 KB  |  1,298 lines

  1. .mt 8
  2. .he
  3. .op
  4.  
  5.  
  6. 
  7.                            C Tool Box
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                    A Library of Functions for
  22.                           Turbo C 1.00
  23.  
  24.                    Containing Graphics, Fonts,
  25.                 Windows, Sound, Background Sound
  26.               Mouse, Joystick and Printer Controls
  27.                             and more
  28.  
  29.  
  30.  
  31.  
  32.                          Version 1.00 
  33.                    release date 22 August 1987
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                        Copyright (c) 1987
  45.                                by
  46.                         David A.  Miller
  47.                         Unicorn Software
  48.                         8018 NE 123rd St.
  49.                        Kirkland, WA 98034
  50.                   (206) 823-4656 after 6:30 PM
  51.                         Pacific Time Zone
  52.                     (No collect calls Please)
  53.  
  54. è
  55.  
  56. 
  57.  
  58. Welcomσá t∩ thσ realφ oµ thσ mystica∞ Unicorn«á  I⌠ ha≤á beeεá aε ì
  59. enjoyablσá proces≤ creatinτ thi≤ librar∙ anΣ thσ autho≥ hope≤ yo⌡ ì
  60. find it equally enjoyable to use.
  61. 
  62.  
  63.  
  64.  
  65.                            Disclaimer
  66.  
  67. Thσ autho≥ ha≤ takeε duσ carσ iε thσ preparatioε oµ thi≤ manua∞ ì
  68. anΣ thσ associateΣ program≤ t∩ insurσ tha⌠ al∞ informatioε ì
  69. presenteΣ i≤ correc⌠ anΣ functiona∞ a≤ stated«  N∩ warrant∙ i≤ ì
  70. madσ regardinτ thσ suitabilit∙ oµ thi≤ produc⌠ fo≥ an∙ specifiπ ì
  71. purpose.  Consisten⌠ witΦ thσ requiremen⌠ oµ speeΣ iε mucΦ oµ ì
  72. thσ librar∙ anΣ thσ genera∞ philosoph∙ oµ ├ iε allowinτ thσ ì
  73. programme≥ completσ freedom¼ thσ amoun⌠ oµ erro≥ checkinτ ha≤ ì
  74. beeε helΣ t∩ ß minimum.
  75.  
  76.   Thσ autho≥ hereb∙ grant≤ permissioε t∩ al∞ user≤ t∩ transfe≥ ì
  77. copie≤ oµ thσ librar∙ t∩ thirΣ partie≤ subjec⌠ t∩ thσ condition≤ ì
  78. tha⌠ thσ entirσ librar∙ anΣ al∞ file≤ includinτ copyright≤ bσ ì
  79. transferreΣ iε ful∞ fo≥ n∩ feσ execep⌠ iε thσ casσ oµ user≤ group≤ ì
  80. whicΦ ma∙ chargσ ß copyinτ feσ no⌠ t∩ exceeΣ $7.00.
  81.  
  82.   Whilσ yo⌡ ma∙ usσ thσ librar∙ fo≥ persona∞ program≤ withou⌠ ì
  83. registration¼ thosσ wh∩ creatσ program≤ fo≥ salσ o≥ distributioε ì
  84. arσ requesteΣ t∩ registe≥ thei≥ copy«  Thσ sourcσ codσ ma∙ NO╘ bσ ì
  85. distributeΣ t∩ ß thirΣ part∙ iε an∙ forφ withou⌠ thσ writteε ì
  86. permissioε oµ thσ author.
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. Turb∩ ├ i≤ ß trademarδ oµ BorlanΣ International¼ Microsof⌠ C¼ ì
  94. MAS═ anΣ MSDO╙ arσ trademark≤ oµ Microsof⌠ Corp«  IBM¼ IB═ PC¼ ì
  95. P├ XT¼ AT¼ DO╙ anΣ PCDO╙ arσ trademark≤ oµ Internationa∞ Busines≤ ì
  96. Machine≤ Corp.¼ Epsoε i≤ ß trademarδ oµ Epsoε Corp« Tandy¼ Tand∙ ì
  97. 1000 A and DMP 130 are trademarks of Tandy Corp.ì
  98.  
  99. .pa
  100. è.he C_Tool_Box_______________________________________________Page_#
  101.                            Background
  102. 
  103.  
  104.    Thi≤ librar∙ i≤ thσ successo≥ t∩ thσ origina∞ Unicorε Librar∙ ì
  105. whicΦ ha≤ undergonσ severa∞ revision≤ anΣ essentiall∙ ha≤ becomσ ì
  106. ß ne≈ entity«  Somσ oµ thσ curren⌠ revision≤ concerε simplσ ì
  107. orderinτ oµ thσ parameter≤ iε call≤ t∩ makσ thσ librar∙ morσ ì
  108. consistent«  User≤ oµ thσ Unicorε librar∙ shoulΣ takσ particula≥ ì
  109. notσ oµ thi≤ point«  Function≤ havσ beeε developeΣ fo≥ whicΦ thσ ì
  110. autho≥ ha≤ n∩ specifiπ neeΣ bu⌠ founΣ interestinτ t∩ implement«  ì
  111. Man∙ oµ thσ function≤ arσ ß resul⌠ oµ use≥ suggestion≤ fo≥ whicΦ ì
  112. wσ thanδ thσ user≤ involved«  Thσ autho≥ invite≤ user≤ t∩ makσ ì
  113. furthe≥ suggestions¼ a≤ ß worthwilσ challengσ i≤ alway≤ aε ì
  114. interestinτ learninτ experience.
  115.    
  116.    Thi≤ librar∙ contain≤ function≤ t∩ perforφ ß widσ variet∙ oµ ì
  117. task≤  Thσ function≤ ma∙ bσ divideΣ roughl∙ int∩ thσ followinτ ì
  118. categories:
  119.  
  120. 1«  Genera∞ vide∩ includinτ window≤ anΣ fas⌠ strinτ writes.
  121. 2«  Graphics¼ includinτ ß variet∙ oµ norma∞ anΣ rotateΣ fonts
  122. 3«  SounΣ includinτ backgrounΣ sounΣ function≤ simila≥ t∩ BASIC
  123. 4«  Genera∞ function≤ servinτ ß widσ variet∙ oµ purposes
  124. 5«  Printe≥ control¼ botΦ graphic≤ anΣ dais∙ wheel
  125. 6«  Mousσ control
  126. 7«  Joysticδ control
  127.   
  128.    EacΦ oµ thesσ grouping≤ overlap≤ t∩ somσ exten⌠ bu⌠ iε genera∞ ì
  129. all¼ excep⌠ thσ graphic≤ iε grou≡ 2¼ ma∙ bσ useΣ witΦ ß ì
  130. monochromσ system« Thσ genera∞ librar∙ i≤ designeΣ t∩ bσ useΣ ì
  131. witΦ Turb∩ ├ froφ BorlanΣ anΣ program≤ writteε usinτ thσ smal∞ ì
  132. memor∙ model«  Othe≥ compiler≤ arσ supporteΣ anΣ librarie≤ ma∙ bσ ì
  133. requesteΣ froφ thσ autho≥ upoε registration«  Iε additioε t∩ thi≤ ì
  134. basiπ library¼ thosσ availablσ includσ thσ largσ mode∞ fo≥ Turb∩ ì
  135. ├ anΣ botΦ model≤ fo≥ Microsof⌠ ├ ¿ Curren⌠ versioε )«  Thσ ì
  136. autho≥ wil∞ als∩ makσ ß Latticσ ├ versioε 3.░ librar∙ availablσ ì
  137. iµ therσ arσ enougΦ requests«  Whilσ thesσ arσ thσ basiπ ì
  138. compiler≤ thσ autho≥ ha≤ acces≤ to¼ other≤ ma∙ bσ supporteΣ iµ ì
  139. thσ numbe≥ oµ request≤ warrant.
  140.  
  141.   Thσ entirσ manua∞ i≤ no⌠ supplieΣ witΦ thσ Bulletiε BoarΣ ì
  142. versioε oµ thσ librar∙ duσ t∩ space«  EnougΦ oµ thσ manua∞ i≤ ì
  143. includeΣ t∩ makσ thσ librar∙ usablσ includinτ ß brieµ descriptioε ì
  144. oµ eacΦ functioε anΣ ß cal∞ iε ß forφ simila≥ t∩ functioε ì
  145. prototyping«  Thσ entirσ manua∞ i≤ availablσ oε disδ iε Wordsta≥ ì
  146. o≥ ASCI╔ tex⌠ forma⌠ anΣ wil∞ bσ sen⌠ t∩ al∞ registereΣ owner≤ ì
  147. (pleasσ specif∙ whicΦ format)«  PreprinteΣ manual≤ arσ availablσ ì
  148. fo≥ thosσ wh∩ don'⌠ wisΦ t∩ prin⌠ ove≥ 20░ pages«  Seσ thσ ì
  149. registratioε forφ fo≥ details«  
  150. .pa
  151. è                       First Things First
  152. 
  153.  
  154. Iµ yo⌡ havσ registereΣ you≥ librar∙ anΣ havσ thσ ful∞ sourcσ ì
  155. distributioε disks¼ yo⌡ shoulΣ havσ onσ disδ oµ ├ sourcσ codσ anΣ ì
  156. headers¼ onσ oµ AS═ sourcσ codσ anΣ eithe≥ ß disδ containinτ thσ ì
  157. manua∞ o≥ thσ preprinteΣ manua∞.
  158.  
  159. Checδ you≥ disk≤ t∩ insurσ tha⌠ al∞ file≤ arσ readable«  Therσ ì
  160. shoulΣ bσ 1┤ ├ sourcσ files¼ 1┤ AS═ sourcσ file≤ anΣ │ heade≥ ì
  161. file≤ a≤ oµ thi≤ writing«  Thi≤ amount≤ t∩ ove≥ 500╦ oµ sourcσ ì
  162. code«  
  163.  
  164. Therσ i≤ n∩ particula≥ installatioε proces≤ fo≥ thi≤ library«  I⌠ ì
  165. i≤ read∙ t∩ usσ a≤ is«  Simpl∙ placσ thσ librar∙ iε thσ director∙ ì
  166. with the other libraries you use with your compiler.
  167.  
  168. Man∙ oµ thσ critica∞ function≤ havσ beeε codeΣ iε assemble≥ fo≥ ì
  169. speed«  Somσ oµ thσ presen⌠ function≤ codeΣ iε ├ (thσ font≤ ì
  170. remaininτ iε ├ anΣ rotateΣ font≤ iε particular⌐ wil∞ bσ codeΣ iε ì
  171. assemble≥ iε futurσ revisions«  Therσ arσ ß fe≈ instance≤ wherσ ì
  172. function≤ perforφ simila≥ task≤ bu⌠ arσ codeΣ differently«  Fo≥ ì
  173. example¼ therσ i≤ botΦ aε assemble≥ anΣ ß ├ functioε t∩ se⌠ thσ ì
  174. vide∩ mode«  Somσ oµ thesσ havσ beeε lef⌠ a≤ learninτ tool≤ fo≥ ì
  175. thσ use≥ a≤ the∙ illustratσ botΦ approache≤ t∩ solutioε oµ ß ì
  176. particula≥ task«  Sincσ thi≤ librar∙ wa≤ beguε a≤ ß learninτ ì
  177. project¼ i⌠ i≤ fel⌠ thσ use≥ ma∙ benefi⌠ froφ sucΦ material«  
  178.  
  179. Makσ ß backu≡ cop∙ beforσ yo⌡ d∩ anythinτ else«  Thσ disk≤ arσ ì
  180. no⌠ copy-protectedé iε an∙ manner«  Also¼ i⌠ woulΣ bσ helpfu∞ iµ ì
  181. yo⌡ reaΣ thσ filσ READ.M┼ a≤ i⌠ contain≤ thσ lates⌠ informatioε ì
  182. concerninτ thσ library«  Wherσ thi≤ manua∞ anΣ READ.M┼ conflict¼ ì
  183. pleasσ regarΣ thσ READ.M┼ filσ a≤ beinτ thσ mos⌠ curren⌠ ì
  184. information«  
  185.  
  186. Therσ arσ dem∩ program≤ oε thσ disk¼ thσ larges⌠ beinτ CTDEMO.EX┼ ì
  187. anΣ CTDEMO.C«  Thi≤ wa≤ compileΣ witΦ thσ librar∙ oε thσ ì
  188. distributioε disk≤ anΣ illustrate≤ thσ capabilit∙ oµ thσ librar∙ ì
  189. itselµ althougΦ i⌠ b∙ n∩ mean≤ use≤ o≥ illustrate≤ ever∙ functioε ì
  190. iε thσ library.
  191.  
  192. Thσ library¼ a≤ delivereΣ normally¼ i≤ thσ smal∞ memor∙ mode∞ oµ ì
  193. Turb∩ C¼ anΣ al∞ references¼ unles≤ otherwisσ stated¼ wil∞ refe≥ ì
  194. t∩ tha⌠ configuration.
  195.  
  196. Therσ arσ ove≥ 20░ functionsé containeΣ withiε thσ ├ Too∞ Bo° anΣ ì
  197. therσ i≤ ß shor⌠ referencσ sectioε givinτ ß brieµ samplσ cal∞ anΣ ì
  198. descriptioε oµ eacΦ functioε late≥ iε thσ manual«  Thσ ì
  199. comprehensivσ sectioε followinτ tha⌠ give≤ ß completσ call¼ ì
  200. paramete≥ description¼ samplσ prograφ o≥ codσ fragmen⌠ ìèillustratinτ thσ fuction≤ usage¼ return≤ anΣ an∙ caveat≤ tha⌠ ma∙ ì
  201. occu≥ witΦ tha⌠ function.
  202.  
  203. Al∞ oµ thσ function≤ wil∞ perforφ correctl∙ witΦ IB═ PC'≤ o≥ ì
  204. closσ compatibles¼ bu⌠ bσ awarσ tha⌠ fo≥ severa∞ oµ thσ critica∞ ì
  205. timinτ function≤ direc⌠ screeε writinτ i≤ useΣ t∩ improvσ ì
  206. performance«  Unles≤ you≥ machinσ addresse≤ vide∩ memor∙ iε thσ ì
  207. samσ manne≥ a≤ thσ IBM¼ ß probleφ ma∙ exist«  Thσ librar∙ wa≤ ì
  208. writteε oε ß Tand∙ 100░ ┴  anΣ ha≤ beeε ruε oε severa∞ othe≥ ì
  209. machine≤ witΦ completσ success.
  210.  
  211. Al∞ function≤ beginninτ witΦ d° arσ designeΣ t∩ suppor⌠ ß dais∙ ì
  212. whee∞ printer«  The∙ werσ developeΣ oε ß Epsoε printe≥ tha⌠ i≤ ì
  213. compatiblσ witΦ thσ DW-630«  Al∞ function≤ begininτ witΦ g≥ arσ ì
  214. designeΣ t∩ suppor⌠ thσ IB═ graphic≤ printe≥ o≥ compatible«  ì
  215. Thesσ werσ developeΣ oε ß TAND┘ DM╨ 130«  
  216.  
  217. Thosσ wh∩ arσ registereΣ owner≤ anΣ havσ thσ sourcσ codσ wil∞ ì
  218. finΣ tha⌠ onl∙ fou≥ function≤ neeΣ t∩ bσ altereΣ t∩ suppor⌠ othe≥ ì
  219. graphic≤ systems«  Thesσ arσ thσ tw∩ do⌠ routine≤ (interna∞ anΣ ì
  220. external⌐ anΣ thσ tw∩ function≤ t∩ returε thσ colo≥ oµ ß pixe∞ ì
  221. (interna∞ anΣ external)«  Al∞ othe≥ function≤ arσ baseΣ oε thesσ ì
  222. t∩ makσ conversioε easier«  Thσ autho≥ doe≤ no⌠ havσ acces≤ t∩ ß ì
  223. Hercule≤ systeφ fo≥ thi≤ conversion«  ┴ conversioε t∩ thσ EG┴ i≤ ì
  224. currentl∙ underwa∙ althougΦ acces≤ t∩ aε EG┴ systeφ i≤ ver∙ ì
  225. limiteΣ fo≥ testinτ purposes.
  226.  
  227.  
  228. 
  229.                           Update Policy
  230.  
  231. I⌠ i≤ thσ polic∙ oµ Unicorε Softwarσ t∩ providσ onσ freσ updatσ ì
  232. fo≥ thσ librar∙ itselµ (no⌠ thσ sourcσ codσ whicΦ ma∙ bσ updateΣ ì
  233. fo≥ ß smal∞ fee⌐ anΣ notificatioε oµ onσ updatσ beyonΣ that«  Iµ ì
  234. thσ ne≈ librar∙ i≤ registereΣ fo≥ thσ updatσ fee¼ theε wσ wil∞ ì
  235. star⌠ thσ proces≤ ove≥ agaiε anΣ yo⌡ wil∞ agaiε receivσ onσ freσ ì
  236. updatσ anΣ onσ notificatioε beyonΣ tha⌠ point«  Thi≤ insure≤ ì
  237. user≤ wh∩ registe≥ wil∞ alway≤ havσ acces≤ t∩ thσ lates⌠ versioε ì
  238. oµ thσ Too∞ Box«  Mino≥ release≤ wil∞ bσ placeΣ oε bulletiε ì
  239. board≤, bu⌠ registereΣ user≤ wil∞ no⌠ bσ notifieΣ directl∙ unles≤ ì
  240. the∙ s∩ request« (I⌠ i≤ fel⌠ tha⌠ mos⌠ woulΣ prefe≥ t∩ usσ thσ ì
  241. freσ updatσ fo≥ ß majo≥ release)«  Currentl∙ thσ autho≥ place≤ ì
  242. copie≤ oµ thσ Too∞ Bo° (majo≥ anΣ mino≥ releases⌐ directl∙ oε thσ ì
  243. followinτ board≤ iε thσ Seattlσ area.
  244.  
  245. 1.  Journey to Mars      (RBBS)  206  486-3136
  246. 2.  Night Shift          (RBBS)  206  488-0924
  247. 3.  Planet Claire        (RBBS)  206  783-8037
  248. 4.  PNW IBM user group   (RBBS)  206  343-7843
  249.  
  250. è
  251.  
  252. Thσ autho≥ log≤ oε witΦ thσ namσ 'Davσ Millerº oε eacΦ oµ thesσ ì
  253. boards.
  254.  
  255. Thσ mos⌠ likel∙ spo⌠ t∩ finΣ thσ autho≥ fo≥ feedbacδ woulΣ bσ ì
  256. Journey to Mars or Nightshift.
  257.  
  258.  
  259. 
  260.                         Programming Style
  261. 
  262.  
  263. Thσ sourcσ codσ i≤ writteε iε standarΣ ╦ ª ╥ witΦ onσ deviation«  ì
  264. Thσ autho≥ prefer≤ thσ openinτ anΣ closinτ brace≤ t∩ linσ u≡ s∩ ì
  265. insteaΣ of:
  266.  
  267.                if (i = 2) {
  268.                     printf("I = 2");
  269.                }
  270.  
  271. you will find:
  272.  
  273.                if (i = 2)
  274.                {
  275.                   printf("I = 2");
  276.                }
  277.  
  278. in the source code for the Tool Box.
  279.  
  280. 
  281.                     Declaration of Functions
  282. 
  283.  
  284. Mos⌠ function≤ arσ eithe≥ voiΣ o≥ returε int« I⌠ i≤ no⌠ strictl∙ ì
  285. requireΣ t∩ declarσ theφ prio≥ t∩ use«  I⌠ i≤ GOO─ PROGRAMMIN╟ ì
  286. PRACTICEé t∩ declarσ al∞ function≤ prio≥ t∩ use«  Thi≤ practicσ ì
  287. wil∞ avoiΣ problem≤ witΦ thσ fe≈ function≤ whicΦ d∩ returε ß ì
  288. differen⌠ value¼ sucΦ a≤ ß pointe≥ t∩ ß window«  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295. .pa
  296. è                           Technical
  297. 
  298. Thi≤ librar∙ wa≤ createΣ usinτ thσ followinτ tools.
  299.  
  300.      Turb∩ ├ 1.00
  301.      Microsof⌠ Linδ 3.51
  302.      MAS═ 4.0
  303.      Microsof⌠ Librar∙ Manage≥ 3.02
  304.  
  305.  
  306. Thσ module≤ useΣ anΣ thσ orde≥ the∙ shoulΣ appea≥ iε thσ librar∙ ì
  307. ma∙ bσ founΣ b∙ usinτ LI┬ t∩ creatσ aε LS╘ filσ oµ thσ library«  ì
  308. Iµ yo⌡ registe≥ anΣ wisΦ t∩ recompilσ fo≥ ß differen⌠ memor∙ ì
  309. mode∞ o≥ compile≥, thi≤ orde≥ shoulΣ bσ preserved.
  310.  
  311. A⌠ presen⌠, ß smal∞ buτ exist≤ iε thσ endsounΣ function«  I⌠ wil∞ ì
  312. bσ bes⌠ iµ yo⌡ le⌠ backgrounΣ sounΣ ruε it≤ course¼ anΣ no⌠ ì
  313. attemp⌠ t∩ sto≡ i⌠ witΦ thi≤ command«  Thi≤ wil∞ bσ fixeΣ iε thσ ì
  314. nex⌠ majo≥ releasσ ¿ Jaε 198╕ )«  RegistereΣ owner≤ wil∞ ì
  315. automaticall∙ receivσ thσ ne≈ sourcσ fo≥ thi≤ functioε witΦ thei≥ ì
  316. freσ updatσ disk.
  317.  
  318. Revision≤ arσ possiblσ iε somσ function≤ iε thσ nex⌠ release«  ì
  319. Ever∙ possiblσ effor⌠ wil∞ bσ useΣ t∩ maintaiε FUL╠ ì
  320. compatibility¼ bu⌠ bσ awarσ tha⌠ thσ call≤ t∩ somσ windo≈ ì
  321. function≤ anΣ t∩ thσ backgrounΣ sounΣ function≤ ma∙ bσ altereΣ ì
  322. somewhat«  Wheε usinτ thσ Too∞ Bo° pleasσ kee≡ thi≤ iε minΣ iµ ì
  323. yo⌡ plaε t∩ upgrade«  I⌠ i≤ anticipateΣ thσ change≤ wil∞ no⌠ bσ ì
  324. extensivσ anΣ additiona∞ function≤ wil∞ bσ addeΣ whereve≥ ì
  325. possiblσ rathe≥ thaε alterinτ thσ existinτ functions«  Thσ autho≥ ì
  326. wil∞ preservσ al∞ curren⌠ functioε call≤ intac⌠ iε al∞ release≤ ì
  327. beyonΣ thi≤ point.
  328.  
  329. .pa
  330. è                       Your First Program
  331. 
  332.  
  333.   Usinτ thσ ├ Too∞ Boxé i≤ essentiall∙ quitσ simple«  WitΦ Turb∩ ├ ì
  334. yo⌡ mus⌠ specif∙ an∙ module≤ t∩ bσ linkeΣ iε you≥ projec⌠ file«  ì
  335. Iµ the∙ arσ no⌠ ├ file≤ theε thσ completσ extensioε mus⌠ bσ used«  ì
  336. Fo≥ examplσ supposσ yo⌡ wisΦ t∩ builΣ ß filσ 'mytest.exeº froφ ì
  337. mytest.π anΣ thσ ├ Too∞ Boxé library«  You≥ projec⌠ filσ shoulΣ bσ ì
  338. iε ß forφ simila≥ t∩ thσ below:
  339.  
  340.  
  341.                              mytest
  342.                              CTB100.LIB
  343.  
  344.  
  345. Wheε yo⌡ arσ withiε thσ Turb∩ ├ environmen⌠, simply usσ Al⌠ ╨ t∩ ì
  346. indicatσ thσ projec⌠ filσ namσ anΣ theε Al⌠ ╥ t∩ builΣ anΣ ruε ì
  347. you≥ program«  Yo⌡ ma∙ als∩ builΣ you≥ prograφ froφ thσ commanΣ ì
  348. linσ b∙ typing:
  349.  
  350.                       TC├ mytes⌠ CTB100.lib
  351.  
  352.  
  353. Eithe≥ approacΦ wil∞ builΣ you≥ prograφ anΣ linδ i⌠ witΦ thσ ├ ì
  354. Too∞ Boxé librar∙.
  355.  
  356.  
  357. Thσ dem∩ prograφ wa≤ buil⌠ usinτ thσ command:
  358.  
  359.                      TC├ CTDEM╧ CTB100.LIB
  360.  
  361. Therσ i≤ ß projec⌠ filσ oε thσ disδ iµ yo⌡ prefe≥ t∩ worδ withiε ì
  362. thσ Turb∩ ├ environment«  Thσ dem∩ ma∙ bσ buil⌠ b∙ specifyinτ ì
  363. ctdem∩ a≤ thσ filσ anΣ ctdemo.prΩ a≤ thσ projec⌠ file«  Usσ AL╘ ≥ ì
  364. t∩ ruε thσ prograφ o≥ AL╘ π t∩ compilσ it.
  365.  
  366. .pa
  367. è                           The Future
  368. 
  369.  
  370. Thσ nex⌠ majo≥ releasσ i≤ planneΣ fo≥ Jaε., 1988«  Somσ ì
  371. of the ideas being considered and/or worked on are:
  372.      
  373.      1.  Animation functions
  374.      2.  Data entry functions
  375.      3.  Menu functions (including pulldown)
  376.      4.  Additional window functions
  377.      5«  Additiona∞ sounΣ functions
  378.      6«  Font≤ - rewrittinτ thosσ lef⌠ codeΣ iε ├ iε assemble≥          ì
  379.          fo≥ speeΣ anΣ ß truσ strokσ fon⌠ capability«  Thi≤ wa≤           ì
  380.          containeΣ iε thσ origina∞ Latticσ ├ version╗  Thσ autho≥
  381.          woulΣ likσ t∩ restorσ i⌠ witΦ ful∞ rotation¼ 
  382.          translatioε anΣ scalinτ fo≥ thσ nex⌠ majo≥ release.
  383.  
  384.      
  385. Thσ autho≥ wishe≤ t∩ continuσ providinτ thi≤ librar∙ t∩ user≤ iε ì
  386. thσ forφ oµ sharewarσ consisten⌠ witΦ use≥ support«  I⌠ ha≤ beeε ì
  387. aε enjoyablσ sparσ timσ projec⌠ ove≥ thσ las⌠ yea≥ anΣ ß half« ì
  388. Thσ autho≥ feel≤ sharewarσ i≤ aε importan⌠ elemen⌠ iε today'≤ ì
  389. compute≥ environment.
  390.  
  391. Pleasσ fee∞ freσ t∩ expres≤ you≥ opinioε oε wha⌠ yo⌡ wisΦ t∩ seσ ì
  392. madσ available«  Le⌠ u≤ know!
  393.  
  394. .pa
  395. è                    Interna∞ Globa∞ Variables
  396. 
  397.  
  398.    The librar∙ contains a serie≤ oµ globa∞ variables«  Yo⌡ ì
  399. shoulΣ no⌠ usσ thesσ name≤ iε you≥ program≤ unles≤ yo⌡ ì
  400. specificall∙ wisΦ t∩ referencσ tha⌠ variable«  Fo≥ examplσ usinτ ì
  401. ß variablσ nameΣ bdr▒ iε you≥ prograφ wil∞ resul⌠ iε ß linδ erro≥ ì
  402. a⌠ bes⌠ o≥ failurσ oµ thσ windowinτ function≤ tha⌠ usσ borde≥ ▒ ì
  403. a⌠ worst«  Belo≈ i≤ ß lis⌠ oµ thesσ variable≤ anΣ thei≥ interna∞ ì
  404. meaning≤ t∩ thσ library.
  405.  
  406. int       BLACK          the color black
  407. int       BLUE           the color blue
  408. int       GREEN          the color green
  409. int       CYAN           the color cyan
  410. int       RED            the color red
  411. int       MAGENTA        the color magenta
  412. int       BROWN          the color brown
  413. int       GRAY           the color gray
  414. int       GREY           the color gray
  415. int       WHITE          the color gray
  416. int       DARK_GRAY      the color dark gray
  417. int       DARK_GREY      the color dark gray
  418. int       LTBLUE         the color light blue
  419. int       LTGREEN        the color light green
  420. int       LTCYAN         the color light cyan
  421. int       LTRED          the color light red
  422. int       LTMAGENTA      the colorlight magenta
  423. int       LTBROWN        the color yellow
  424. int       YELLOW         the color yellow
  425. int       LTWHITE        the color light or bright white
  426.  
  427. int       NORMAL         the normal monochrome attribute
  428. int       UNDERLINE      the underline monochrome attribute
  429. int       REVERSE        the reverse video monochrome attribute
  430. int       BRIGHT         the highlighted monochrome attribute
  431. int       BLINK          monochrome blink bit indicator
  432.  
  433. int       v_start        starting address for video memory
  434. int       ct_mode_       current video mode
  435. int       ct_col_        current number of video columns
  436. in⌠       ct_color▀      indicate≤ iµ colo≥ i≤ alloweΣ (1⌐ o≥ no⌠ ì
  437.  
  438. BORDER    bdr1           a single line border for windows
  439. BORDE╥    bdr1▓          ß borde≥ witΦ ß singlσ vertica∞ linσ anΣ 
  440.                          double horizontal lines.
  441. BORDE╥    bdr2▒          ß borde≥ witΦ doublσ vertica∞ line≤ anΣ 
  442.                          a single horizontal line
  443. BORDER    star           a border of "*" characters
  444. BORDER    dot            a border of "." characters
  445. èBORDER    solid          a border of solid blocks ( char 219)
  446. BORDER    heart          a border of heart characters
  447. BORDER    space          a blank border of space characters
  448.  
  449.                          NOTE - The default border is a double
  450.                                 line.
  451.                                 BORDE╥ i≤ ß pointe≥ t∩ ß borde≥. 
  452.                                 WINDOW is a pointer to a box, 
  453.                                 generall∙ indicateΣ b∙ 'bpº iε 
  454.                                 documentation.
  455.             
  456.  
  457. Seσ thσ heade≥ CTB.╚ fo≥ additiona∞ variable≤ anΣ define≤ tha⌠ ì
  458. ma∙ bσ useful.
  459.  
  460.  
  461.                          
  462. .pa
  463. è                        Registration Form
  464. 
  465.    Thi≤ librar∙ i≤ distributeΣ a≤ sharewarσ whicΦ simpl∙ mean≤ ì
  466. yo⌡ arσ freσ t∩ copy¼ usσ anΣ pas≤ copie≤ oε t∩ friend≤ fo≥ ì
  467. evaluation«  Iµ yo⌡ decidσ i⌠ i≤ useful¼ yo⌡ ma∙ registe≥ you≥ ì
  468. cop∙ witΦ thσ author«  Upoε registratioε yo⌡ wil∞ receivσ thσ ì
  469. completσ sourcσ codσ fo≥ thσ librar∙ anΣ ß cop∙ oµ thσ manua∞ oε ì
  470. disk«  Thi≤ wil∞ consis⌠ oµ │ disks«  Iε additioε yo⌡ wil∞ ì
  471. receivσ thσ firs⌠ updatσ disδ freeé anΣ notificatioε oµ an∙ ì
  472. furthe≥ updates«  Majo≥ releasσ update≤ arσ occurinτ abou⌠ │ ì
  473. time≤ ß year.
  474.  
  475. Thσ curren⌠ registratioε feσ i≤ $29.95é   
  476.  
  477.  
  478. Name:             ______________________________________________
  479.  
  480. Computer Type:    ______________________________________________
  481.  
  482. Address:          ______________________________________________
  483.  
  484.                   ______________________________________________
  485.  
  486. City/State/Zip:   _________________________  ____  _____________
  487.  
  488. Library Version:  _CTB_1.00___________________________________
  489.  
  490. Compiler: (check 1)
  491.                   Turbo C ___  Microsoft C ___  other __________
  492.  
  493. Morσ thaε onσ versioε ma∙ bσ requested«  Pleasσ adΣ aε updatσ fee
  494. oµ $12.95 fo≥ eacΦ additiona∞ version.
  495.  
  496. PreprinteΣ manua∞ page≤ suitablσ fo≥ placemen⌠ iε ß threσ rinτ ì
  497. binde≥ wil∞ bσ supplieΣ fo≥ aε additiona∞ $18.00.
  498.  
  499.                          User Statement
  500. 
  501. ╔ realizσ tha⌠ whilσ thσ librar∙ ma∙ bσ freel∙ giveε awa∙ t∩ ì
  502. thirΣ partie≤ thσ sourcσ codσ i≤ no⌠ publiπ domaiε anΣ ╔ agreσ t∩ ì
  503. protect the authors code and not to pass it on to third parties.
  504.  
  505.  
  506. Signed:  ___________________________     Date:  ________________
  507.  
  508.  
  509.  
  510. Comment≤ o≥ additiona∞ informatioε ma∙ bσ placeΣ oε thσ bacδ oµ ì
  511. this page.
  512. .pa
  513. è                      Functioε Descriptions
  514. 
  515. atsay     (row, col, fore, back, *string);
  516.           Print a string in color at row, column
  517.           bacδ i≤ fo≥ graphics. It'≤ ß dumm∙ paramte≥ iε tex⌠ 
  518.           mode.
  519.  
  520. bac16_4   (fore, back)
  521.           Set≤á4░ columε tex⌠ modσ t∩ usσ highlighteΣ backgrounΣ ì
  522.           colors
  523.  
  524. back16_8  (fore, back)
  525.           Set≤ 8░ columε tex⌠ modσ t∩ usσ highlighteΣá backgrounΣ ì
  526.           colors
  527.  
  528. backclr   (color)
  529.           Set the background color
  530.  
  531. backsnd   ()
  532.           Background sound function
  533.  
  534. beepsp    ()
  535.           Beeps the speaker with a tone similar to the DOS beep
  536.  
  537. blink16_4 (fore, back)
  538.           Sets 40 column text mode to normal blink attribute
  539.  
  540. blink16_8 (fore, back)
  541.           Sets 80 column text mode to normal blink attribute
  542.  
  543. boxfill   (x1, y1, x2, y2, color)
  544.           Draws a box and fills it with color (assembler)
  545.  
  546. boxtitle  (bp, position, col, title, fore, back)
  547.           Print a window title in the border
  548.  
  549. burble    (1/pitch, duration)
  550.           Play≤ aε undescribablσ sounΣ iε thσ speaker« Yo⌡ havσ ì
  551.           to try various numbers to see the variety.
  552.  
  553. button    ()
  554.           Returns joy stick button press status
  555.  
  556. circle    (rc, cc, radius, aspect_num, aspect_den, color)
  557.           Draws graphics cicrle with aspect ratio
  558.  
  559. cls       ()
  560.           Clear the screen and return mode and number of columns
  561.  
  562.  
  563. è
  564.  
  565. cls_clr   (fore, back)
  566.           Clear≤ tex⌠ screeε (8░ col)¼ set≤ attribute≤ anΣ place≤ ì
  567.           the cursor in the 'home' position
  568.  
  569. CM_INCH   (cm)
  570.           Convert cm to inches
  571.  
  572. countch   (*string, char)
  573.           Returns # of times a char occurs in a string
  574.  
  575. ct_bkclr  (color)
  576.           Set background color
  577.  
  578. ct_char   (row, col, fore, back, char)
  579.           Write a character directly to the video buffer
  580.  
  581. ctinit    ()
  582.           Initializes video data for the windowing functions
  583.  
  584. ctone     (freq, duration)
  585.           Sounds a tone of given frequency and duration
  586.  
  587. ct_peek   (row, col)
  588.           Returns the WORD at row, col
  589.  
  590. ct_poke   (row, col, char)
  591.           Pokes a WORD at row, col
  592.  
  593. ctposit   (row, col)
  594.           Returns address of video memory byte at row, col
  595.  
  596. ct_sm     (mode)
  597.           Set the video mode
  598.  
  599. ct_str    (row, col, fore, back, *string)
  600.           Write a string directly to video buffer
  601.  
  602. ct_vstr   (row, col, fore, back, *string)
  603.           Write a string vertically directly to video memory
  604.  
  605. ct_wstr   (row, col, fore, back, *string, bp)
  606.           Write a string to video memory in a window
  607.  
  608. ct_wvstr  (row, col, fore, back, *string, bp)
  609.           Write a vertical string to video memory in a window
  610.  
  611. DEG_RAD   (degrees)
  612.           Convert degrees to radians
  613. è
  614.  
  615. delay     (millisecs)
  616.           Delay a number of ms, assumes 4.77 MHz clock
  617.  
  618. drawbox   (bp)
  619.           Draws a predefined box on the screen
  620.  
  621. dwarn2    ()
  622.           Issue a warning & exit if not DOS 2.00 or greater
  623.  
  624. dwarn3    ()
  625.           Issue a warning & exit if not DOS 3.00 or greater
  626.  
  627. dx120bs   ()
  628.           Backspace the DW printer 1/120th inch
  629.  
  630. dxback    ()
  631.           Select backwards printing on the DW printer
  632.  
  633. dxbi      ()
  634.           Select bidirectional printing
  635.  
  636. dxboldst  ()
  637.           Begin bold print
  638.  
  639. dxbs      ()
  640.           Send a backspace
  641.  
  642. dxbsend   ()
  643.           End bold/shadow printing
  644.  
  645. dxchwide  (number)
  646.           Set character width HMI (1/120ths inch)
  647.  
  648. dxclr1tab ()
  649.           Clear 1 tab
  650.  
  651. dxclrtab  ()
  652.           Clear all tabs
  653.  
  654. dxcr      ()
  655.           Send a carriage return
  656.  
  657. dxdefwid  ()
  658.           Set DW printer to default HMI
  659.  
  660. dxeject   ()
  661.           Eject paper
  662.  
  663. è
  664.  
  665. dxff      ()
  666.           Send a form feed
  667.  
  668. dxfor     ()
  669.           Select forward printing
  670.  
  671. dxhlf     ()
  672.           Send a half line feed
  673.  
  674. dxht      ()
  675.           Horizontal tab
  676.  
  677. dxinit    ()
  678.           Initialize the DW printer
  679.  
  680. dxlf      ()
  681.           Send a line feed
  682.  
  683. dxlinsp   (number)
  684.           Set line spacing in (n-1)/48 inch
  685.  
  686. dxlmarg   ()
  687.           Set left margin
  688.  
  689. dxpglen   (length)
  690.           Set page length
  691.  
  692. dxrhlf    ()
  693.           Send a reverse half line feed
  694.  
  695. dxrlf     ()
  696.           Send a reverse line feed
  697.  
  698. dxsetht   ()
  699.           Set a horizontal tab position
  700.  
  701. dxshast   ()
  702.           Start shadow printing
  703.  
  704. dxundend  ()
  705.           End underlined printing
  706.  
  707. dxundlst  ()
  708.           Begin underlining
  709.  
  710. dxuni     ()
  711.           Select unidirectional printing
  712.  
  713. è
  714.  
  715. endsound  ()
  716.           Uninstal∞ thσ sounΣ time≥ interrup⌠ anΣ turε backgrounΣ ì
  717.           music off
  718.  
  719. equip     ()
  720.           Returns a word indicating installed equipment
  721.  
  722. flagdec   ()
  723.           Decrements mouse cursor flag by one
  724.           ì
  725. forward   (pixels)
  726.           Move the turtle forward a number of pixels
  727.  
  728. GAL_LT    (gallons)
  729.           Convert gallons to liters
  730.  
  731. gcomtype  ()
  732.           Returns a byte indicating the computer type in use
  733.  
  734. gcurpos   (row, col, page)
  735.           Return current cursor position
  736.  
  737. getatch   (page)
  738.           Returns char and attribute at current cursor position
  739.  
  740. getbcnt   (which_button)
  741.           Returns the count of mouse button presses
  742.  
  743. getbrcnt  (which_button)
  744.           Returns mouse button releases
  745.  
  746. getbstat  ()
  747.           Returns current mouse button status
  748.  
  749. getchne   ()
  750.           Return keyboard character with no echo
  751.  
  752. getctype  (start, end, page)
  753.           Return the current cursor start & end lines and page
  754.  
  755. getcurp   (&row, &col)
  756.           Return cursor position
  757.  
  758. getcurps  (page, &row, &col)
  759.           Returns cursor position on a specified page
  760.  
  761. getdmaj   ()
  762.           Return the DOS major version number
  763. è
  764.  
  765. getdmin   ()
  766.           Return the DOS minor version number
  767.  
  768. getdver   ()
  769.           Return the DOS version number
  770.  
  771. gethpos   ()
  772.           Returns the current mouse horizontal position
  773.  
  774. getkey    ()
  775.           Destructive read of keyboard buffer
  776.  
  777. getkeycd  ()
  778.           Return keycode - waits for key stroke
  779.  
  780. getmode   ()
  781.           Returns the current video mode
  782.  
  783. getpage   ()
  784.           Returns the current video page
  785.  
  786. getscode  ()
  787.           Returns scan code for key stroke, waits for key
  788.  
  789. getstate  ()
  790.           Get video state, mode, width, page into register struct
  791.  
  792. get_str   ()
  793.           Get user string and replace CR with \0
  794.  
  795. getvpos   ()
  796.           Returns the mouse current vertical position
  797.  
  798. gliss     (start_freq, end_freq, rate)
  799.           sounds a glissando through the speaker
  800.  
  801. GM_OZ     (grams)
  802.           Convert grams to ounces
  803.  
  804. gothic    (char, row, col, color)
  805.           Writes a gothic character to the graphics screen
  806.  
  807. hollow    (char, row, col, color)
  808.           Writes an outline character to the graphics screen
  809.  
  810. INCH_CM   (inches)
  811.           Convert inches to cm
  812.  
  813. è
  814.  
  815. indexch   (*string, char)
  816.           Return the first position of a character in a string
  817.  
  818. indexr    (*string, char)
  819.           Return the rightmost position of char in string
  820.  
  821. iskey     ()
  822.           Returns non-0 if key in buffer / 0 if no key
  823.  
  824. kbstat    ()
  825.           Returns the keyboard status byte
  826.  
  827. keystat   ()
  828.           DOS interrupt to return keyboard status byte
  829.  
  830. KG_LB     (kilograms)
  831.           Convert kilograms to pounds
  832.  
  833. KM_MI     (kilometers)
  834.           Convert kilometers to miles
  835.  
  836. LB_KG     (pounds)
  837.           Convert pounds to kilograms
  838.  
  839. lhjoystk  ()
  840.           Return the current horizontal pos, of left joystick
  841.  
  842. lightpen  (&row, &col, &rasline, &ras_col)
  843.           Read the lightpen position
  844.  
  845. line      (x1, y1, x2, y2, color)
  846.           Draw a graphics line
  847.  
  848. lprintf   (*string)
  849.           Print a string to the line printer
  850.  
  851. lputch    (char)
  852.           Send a character to the printer
  853.  
  854. lrotate   (yc, xc, ys, xs, ye, xe, 3, angle)
  855.           Draw a rotated line around a center point
  856.  
  857. lsthpos   (which_button)
  858.           Return last mouse horiz. position when button pressed
  859.  
  860. lsthrpos  (which_button)
  861.           Last mouse horiz. position when button released
  862.  
  863. è
  864.  
  865. lstvpos   (which_button)
  866.           Last mouse vertical pos. when button pressed
  867.  
  868. lstrvpos  (which_button)
  869.           Last mouse vertical pos. when button release
  870.  
  871. LT_GAL    (liters)
  872.           Conver liters to gallons
  873.  
  874. lvjoystk  ()
  875.           Return the current vertical pos. of left joystick
  876.  
  877. M_YD      (meters)
  878.           Convert meters to yards
  879.  
  880. makebdr   (bp, type)
  881.           Sets a border type for a window/box
  882.  
  883. makebox   (row, col, height, width, bfore, bback, ffore, fback)
  884.           Defines a new box/window and returns a pointer to it
  885.  
  886. memsize   ()
  887.           Return memory size using int86 call
  888.  
  889. mgun      ()
  890.           Makes a machine gun tye sound through the speaker
  891.  
  892. MI_KM     (miles)
  893.           Convert miles to kilometers
  894.  
  895. moveto    (row, col)
  896.           Move the turtle to an absolute position
  897.  
  898. mreset    ()
  899.           Checks to see if mouse is installed
  900.  
  901. msize     ()
  902.           Returns the number of K Bytes of memory installed
  903.  
  904. note      (voice, octave, note, volume)
  905.           Set a musical note for TANDY 1000 voice
  906.  
  907. OZ_GM     (ounces)
  908.           Convert ounces to grams
  909.  
  910. paint     (row, col, color, border_color)
  911.           fill a bounded region with color
  912.  
  913. è
  914.  
  915. palette   (a, b, c)
  916.           Change color set for graphics modes
  917.           a = palette (0-3)
  918.           b = 4 for normal colors / 5 for alternate color set
  919.           c = background color
  920.  
  921. pcurpos   (row, col, page)
  922.           Places cursor to location
  923.  
  924. pencolor  (color)
  925.           Defines turtle pen color
  926.  
  927. pendown   ()
  928.           Places trutle pen on screen to draw
  929.  
  930. penup     ()
  931.           Lifts turtle pen off screen 
  932.  
  933. play      (note, octave, time)
  934.           plays a foreground tone in the speaker
  935.  
  936. point     (row, col, color)
  937.           Lights a single graphics pixel
  938.  
  939. prtbs     ()
  940.           Send backspace to the graphics printer
  941.  
  942. prtbuzz   ()
  943.           Sound the printer bell
  944.  
  945. prtcan    ()
  946.           Cancel and clear the printer buffer
  947.  
  948. prtcomof  ()
  949.           Turn off compressed print
  950.  
  951. prtcomon  ()   
  952.           Turn on compressed print mode
  953.  
  954. prtcr     ()
  955.           Send a carriage return to the graphics printer
  956.  
  957. prtdubof  ()
  958.           Turn off double print mode
  959.  
  960. prtdubon  ()
  961.           Turn on double print mode
  962.  
  963. è
  964.  
  965. prtempof  ()
  966.           Turn off emphasized print mode
  967.   
  968. prtempon  ()
  969.           Turn on emphasized print mode
  970.  
  971. prtsec    ()
  972.           Send an ESC code to the printer
  973.  
  974. prtff     ()
  975.           Send a form feed to the graphics printer
  976.  
  977. prtlf     ()
  978.           Send a line feed
  979.  
  980. prttab    ()
  981.           Send atab to the graphics printer
  982.  
  983. prtwidof  ()
  984.           Turn off the double width character mode
  985.  
  986. prtwidon  ()
  987.           Turn on the double width character mode
  988.  
  989. RAD_DEG   (radians)
  990.           Convert radians to degrees
  991.  
  992. rascha≥   (char¼ ULR¼ ULC¼ hmag¼ vmag¼ color)
  993.           Use≤ thσ interna∞ characte≥ fon⌠ description≤ t∩ ì
  994.           display characters at larger sizes
  995.      
  996. rdhcount  ()
  997.           Reads current mouse horizontal motion counter
  998.  
  999. rdvcount  ()
  1000.           Reads current mouse vertical motion counter
  1001.  
  1002. readkey   ()
  1003.           Destructivσ returε oµ ASCI╔ anΣ scaε code≤ fo≥ ke∙ ì
  1004.  
  1005. rect      (ULR, ULC, LRR, LRC, color)
  1006.           Draw a filled rectangle
  1007.  
  1008. rect1     (ULR, ULC, LRR, LRC, bdr_clr, rect_clr)
  1009.           Draw a flled rectangle bounded by a single pixel border
  1010.  
  1011. rect2     (ULR, ULC, LRR, LRC, bdr_clr, rect_clr)
  1012.           Dra≈ ß flleΣ rectanglσ boundeΣ b∙ ß double pixe∞ border
  1013. è
  1014.  
  1015. redalert  ()
  1016.           Plays a red alert sound through the speaker
  1017.  
  1018. replacech (*string, old_char, new_char)
  1019.           Replaces ALL occurences of char in string
  1020.  
  1021. resbox    (bp)
  1022.           Removes a window/box from the screen and restores video
  1023.  
  1024. rhjoystk  ()
  1025.           Return right joystick horizontal position
  1026.  
  1027. rotate    (yc, xc, x, y, angle)
  1028.           rotate a point around a given center point
  1029.  
  1030. rvjoystk  ()
  1031.           Return right joystick vertical position
  1032.  
  1033. savebox   (bp)
  1034.           Saves the memory where a window/box will be drawn
  1035.  
  1036. scankey   ()
  1037.           Returns scan and ASCII codes (non-destructive)
  1038.  
  1039. script    (char, row, col, color)
  1040.           Dra≈ ß simulateΣ handwritteε characte≥ oε thσ graphic≤ ì
  1041.           screen
  1042.  
  1043. scrolldε  (up_l_row¼ up_l_col¼ low_r_row¼ low_r_col¼ fore¼ back¼ ì
  1044.           num_rows)
  1045.           Scroll a bios window down
  1046.  
  1047. scrollup  (up_l_row¼ up_l_col¼ low_r_row¼ low_r_col¼ fore¼ back¼ ì
  1048.           num_rows)
  1049.           Scroll a bios window up  
  1050.  
  1051. setatten  (voice, level)
  1052.           Sets attenuation level on Tandy 1000 sound chip
  1053.  
  1054. setcallm  (mask, address)
  1055.           Define a mouse subroutine mask
  1056.  
  1057. setcur    (h_hot, v_hot, cursor)
  1058.           Define and pass a mouse graphics cursor
  1059.  
  1060. setcurp   (row, col)
  1061.           Sets the cursor to location
  1062.  
  1063. è
  1064. setcurps  (page, row, col)
  1065.           Sets position of cursor on the page
  1066.  
  1067. setcurt   (start, end)
  1068.           Sets the cursor type parameters
  1069.  
  1070. setcurtp  (start, end)
  1071.           Sets start and end lines for cursor
  1072.  
  1073. setfreq   (voice, freq)
  1074.           Set Tandy voice frequency
  1075.  
  1076. sethor    (min, max)
  1077.           Sets mouse min and max positions
  1078.  
  1079. setpage   (page)
  1080.           Set the current visual page number
  1081.  
  1082. set_pal   (color_set)
  1083.           Selects either color set 0 or 1 for graphics
  1084.  
  1085. setpal    (0/1)
  1086.           Selects a palette for graphics modes
  1087.  
  1088. setpos    (hor, ver)
  1089.           Set mouse cursor postion
  1090.  
  1091. setsound  ()
  1092.           enable≤ thσ backgrounΣ sounΣ interrup⌠ anΣ use≤ note≤ ì
  1093.           iε arra∙ melod∙ anΣ timinτ iε arra∙ bea⌠ t∩ producσ ì
  1094.           background sound
  1095.  
  1096. settxtc   (type,screen_mask/first_line, cur_mask/lst_line)
  1097.           Select and define mouse text cursor
  1098.  
  1099. setver    (min, max)
  1100.           Set max and min vertical mouse positions
  1101.  
  1102. sm        (mode)
  1103.           Set the video mode
  1104.  
  1105. smode     (mode)
  1106.           set video moe using int86
  1107.  
  1108. soundoff  ()
  1109.           Turn off Tandy sound chip
  1110.  
  1111. soundon   ()
  1112.           Turn on the Tandy sound chip
  1113. è
  1114. spalreg   (reg#, color)
  1115.           Set the palette register values (Tandy & EGA only)
  1116.  
  1117. spratio   (hor, ver)
  1118.           Set mouse movement ratios
  1119.  
  1120. str_cent  (*string, *destination, width)
  1121.           Center a string within width
  1122.  
  1123. strclr    (fore, back, *string)
  1124.           C function to write a string in color
  1125.  
  1126. strdel    (*string, start, number)
  1127.           Delete a substring from a string
  1128.  
  1129. strpad    (*string, number)
  1130.           Add spaces to the left of a string
  1131.  
  1132. strtolow  (*string)
  1133.           Convert a string to all lower case
  1134.  
  1135. strtoup   (*string)
  1136.           Convert a string to all upper case
  1137.  
  1138. tcos      (angle)
  1139.           returε ▓ digi⌠ valuσ oµ cosinσ fo≥ wholσ degree≤ - ì
  1140.           operates faster for graphics plotting
  1141.  
  1142. tone      (freq, time_in_ms)
  1143.           play a tone - time assumes 4.77 MHz clock
  1144.  
  1145. tsin      (angle)
  1146.           returε ▓ digi⌠ valuσ oµ siε fo≥ wholσ degree≤ - ì
  1147.           operates faster for graphics than does the sin function
  1148.  
  1149. turnleft  (angle)        
  1150.           Turns the turtle heading left
  1151.  
  1152. turnright (angle)
  1153.           Turns the turtle heading right
  1154.  
  1155. usrfont   (char, ULR, ULC, hmag, vmag, color, font#)
  1156.           Allow≤ use≥ t∩ selec⌠ froφ predetermineΣ font≤ thσ ì
  1157.           style of character to display
  1158.  
  1159. vbar3d    (base, height, col, width, depth, color, outline_color)
  1160.           3d bar graph plot function
  1161.  
  1162.  
  1163. è
  1164. wac       (char, color/attribute, xor_flag)
  1165.           Write a character and attribute/color using BIOS call
  1166.  
  1167. waitkey   ()
  1168.           Pauses and waits for key stroke if none in buffer
  1169.  
  1170. watch     (page, num_chars, char, fore, back)
  1171.           Writes character(s) in color using BIOS call
  1172.  
  1173. wch       (page, num_chars, char, color)
  1174.           Write≤ char(s⌐ t∩ pagσ (tex⌠ mode⌐ iε colo≥ (graphic≤ ì
  1175.           mode)
  1176.  
  1177. wchtty    (char, fore)
  1178.           Write≤ characte≥ usinτ tt∙ BIO╙ mode¼ colo≥ iµ graphic≤ ì
  1179.           mode in use
  1180.  
  1181. wco       (char, color)
  1182.           Writσ characte≥ onl∙ (colo≥ i≤ activσ iε graphics¼ ì
  1183.           dummy parameter in text modes)
  1184.  
  1185. wgets     (bp, row, col, len)
  1186.           Return a string that exists inside a window
  1187.  
  1188. w_hline   (row, col,fore, back, char, width)
  1189.           Draw a horizontal line of character
  1190.  
  1191. wnoise    (low_freq, high_freq, duration)
  1192.           Produces white noise over a specified freq range
  1193.  
  1194. wputs     (bp, str, row, col)
  1195.           Puts s string to a window using BIOS
  1196.  
  1197. wtty      (char, color)
  1198.           Writσ characte≥ iε TT┘ mode¼ colo≥ i≤ onl∙ activσ iε ì
  1199.           graphics modes, in text modes it is a dummy parameter
  1200.  
  1201. w_hline   (row, col, fore, back, ch, width)
  1202.           Draw a horizontal line of character
  1203.  
  1204. w_vline   (row, col, fore, back, char, height)
  1205.           Draws a vertical string of character
  1206.  
  1207. YD_M      (yards)
  1208.           Convert yards to meters
  1209.  
  1210. .pa
  1211. è
  1212.  
  1213.  
  1214.  
  1215.  
  1216. 
  1217.                            Appendix A
  1218.  
  1219. 
  1220.  
  1221.  
  1222.  
  1223.    Thi≤ sectioε oµ thσ manua∞ i≤ ß detaileΣ descriptioε oµ thσ ì
  1224. functions«  I⌠ include≤ ß descriptioε oµ thσ function¼ ß samplσ ì
  1225. cal∞ froφ C¼ ß samplσ prograφ o≥ prograφ fragmen⌠ usinτ thσ ì
  1226. functioε anΣ an∙ return≤ froφ thσ function«  IncludeΣ als∩ arσ ì
  1227. an∙ limits¼ peculiaritie≤ o≥ othe≥ informatioε abou⌠ thσ ì
  1228. function≤ requireΣ fo≥ effectivσ usσ iε programming.
  1229.  
  1230. .pa
  1231. è.he _C_Tool_Box___________________________________________Appendix_A_
  1232.                              atsay                     
  1233. 
  1234.  
  1235.  
  1236. Thi≤ functioε i≤ simila≥ t∩ thσ dBAS┼ functioε oµ thσ samσ namσ ì
  1237. iε tha⌠ i⌠ allow≤ thσ use≥ t∩ print¼ iε color¼ ß strinτ a⌠ ß ì
  1238. specified location on the screen.
  1239.  
  1240.  
  1241. Call:
  1242.           atsay(row, col, fore, back, *string)
  1243.  
  1244.           row       = the starting row for the string
  1245.           col       = the starting column for the string
  1246.           fore      = the foreground color of the string
  1247.           back      = the background color of the string
  1248.           string    = the string to be printed on the screen
  1249.  
  1250. Example:
  1251.           main()
  1252.           {
  1253.                /* sm(4); */
  1254.                atsay(5, 10, 3, 2, "Testing");
  1255.           }
  1256.  
  1257.           Thi≤ prograφ wil∞ prin⌠ thσ strinτ "Testingó oε thσ           ì
  1258.           screeε iε colo≥ 3¼ startinτ a⌠ ro≈ ╡ columε 10« Iµ iε ì
  1259.           graphic≤ modσ (removσ thσ comments⌐ thσ backgrounΣ ì
  1260.           colo≥ wil∞ bσ colo≥ 2¼ fo≥ tex⌠ modσ thi≤ paramete≥ i≤ ì
  1261.           a dummy parameter.
  1262.  
  1263.  
  1264. Return:
  1265.           None
  1266.  
  1267.  
  1268. Caveats:
  1269.           BackgrounΣ colo≥ i≤ onl∙ activσ iε graphic≤ modes«  Fo≥ ì
  1270.           tex⌠ mode≤ i⌠ i≤ ß dumm∙ parameter«  Fo≥ writtinτ witΦ ì
  1271.           ß backgrounΣ colo≥ iε tex⌠ mode≤ usσ thσ watcΦ ì
  1272.           function.
  1273.           Bσ surσ thσ strinτ parameter≤ liσ withiε thσ screeε ì
  1274.           boundries.
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280. .pa
  1281. è
  1282. 
  1283.    This ends the Board version of the manual.
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289. Thσ ful∞ manua∞ wil∞ bσ sen⌠ witΦ al∞ librar∙ sourcσ codσ t∩ al∞ ì
  1290. registereΣ owner≤ oµ thσ ├ Too∞ bo° Library«  Therσ simpl∙ i≤ no⌠ ì
  1291. enough room in a bulletin board sized file.
  1292. 
  1293. Thi≤ sectioε oµ thσ manua∞ i≤ aε earl∙ version«  Thσ fina∞ manua∞ ì
  1294. wil∞ contaiε completσ description≤ oµ al∞ aspect≤ oµ thσ too∞ ì
  1295. Box«  I⌠ i≤ availablσ iε tw∩ disδ formats«  Onσ suitablσ fo≥ ì
  1296. printinτ froφ DO╙ anΣ onσ iε WordSta≥ format«  I⌠ i≤ als∩ ì
  1297. availablσ iε thσ forφ oµ preprinteΣ page≤ suitablσ fo≥ ß threσ ì
  1298. ring binder.
  1299.  
  1300.  
  1301. Thσá followinτ i≤ includeΣ sincσ thσ ful∞ manua∞ i≤ no⌠ witΦ thi≤ ì
  1302. file.
  1303.  
  1304.  
  1305. BACKGROUND SOUND FUNCTIONS INFORMATION
  1306.  
  1307. Thσ number≤ fo≥ thσ musica∞ note≤ arσ listeΣ belo≈ fo≥ thσ octavσ ì
  1308. starting with middle C:
  1309.  
  1310. C    C#   D   D#   E    F    F#    G    G#    A   A#    B
  1311. 24   25   26  27  28   29    30    31   32    33  34    35
  1312.  
  1313. The note 100 may be used for rests.
  1314.  
  1315. Timing for the notes is in timer ticks (18.2 per second).
  1316.  
  1317. See the full manual for further details.
  1318.  
  1319. Placσ thσ note≤ iε aε arra∙ calleΣ melody[▌ anΣ thσ timinτ coun⌠ ì
  1320. iε aε arra∙ calleΣ beat[]¼ seσ ctdemo.π fo≥ aε example«  Othe≥ ì
  1321. song≤ ma∙ bσ defineΣ witΦ note≤ anΣ timinτ iε differen⌠ array≤ ì
  1322. bu⌠ thesσ wil∞ havσ t∩ bσ copieΣ int∩ thσ melod∙ anΣ bea⌠ array≤ ì
  1323. beforσ activatioε thσ backgrounΣ sounΣ function«  ┴ futurσ ì
  1324. release will pass a pointer to the desired array.
  1325.