home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / articles / archives / limanews.exe / SUPERXB.TXT < prev    next >
Text File  |  2006-10-19  |  11KB  |  367 lines

  1. PUBLISHED IN LIMA NEWSLETTER FEBRUARY
  2. 1988.  SOFTWARE DESCRIBED HERE IS IN
  3. THE LIMA UG LIBRARY.
  4.  
  5. ED. NOTE: The following article
  6. describes a SOFTWARE EMULATION OF 
  7. SUPER EXTENDED BASIC (v120) using the
  8. regular extended basic module.  It was
  9. sent to us by the author Art Byers, and
  10. was first published in the Jan. 88
  11. issue of CALL SOUNDS, the newsletter of
  12. the Central Westchester user group.
  13. The entire collection of sub programs
  14. is in the public domain and can be
  15. downloaded from Delphi.
  16. - - - - - - - - - - - - - - - - - - - -
  17.  
  18. The BIT BUCKET #7, CALL SOUNDS, 1/1/88
  19. by Art Byers, Sysop Delphi TINET
  20.  
  21. At the November '87 meeting of the
  22. Central Westchester 99'ers, Bob Cataldo
  23. gave us a very fine demonstration of
  24. the new module Super Extended Basic.
  25. I own three regular Extended BAsic
  26. modules and am not about to spend for a
  27. 4th, even tho it does have many nice
  28. features. Besides practically every
  29. "advanced " feature has been kicking
  30. around the 99/4A community for years,
  31. either as an assembly routine or as a
  32. CALLed SUB program in TI Extended
  33. Basic.
  34.  
  35. I do not know if it was Barry Traver or
  36. Jim Peterson who first published the
  37. GOTO(n), GOSUB(n), RESTORE(n), and
  38. RUNPROG("device.filename") [alternate
  39. RUNPROG(F$)]. Thanks to BOTH!!!!! The
  40. Smart Programer and the Genial
  41. Traveler have also published PEEKVdp
  42. and POKEVdp sub programs. A fine
  43. "CLOCK" Subprogram for Lo Memory was
  44. published by the Smart Programmer, and
  45. Barry's GT recently published a one
  46. line program that enables you to
  47. circumvent the auto LOAD boot of XB -
  48. but that too has been around for
  49. years!
  50.  
  51. Furthermore, in many many years of
  52. programming in TI XB, I have never
  53. really had the need to use GOSUB(n),
  54. RESTORE(n) or GOTO(n) and considered
  55. those subprograms interesting but not
  56. vital. The RUNPROG(F$) -IS- a very
  57. important feature.
  58.  
  59. The end result is that at the January
  60. meeting of the CW 99'ers, a disk was
  61. given out that will enable members to
  62. have a high degree of compatability
  63. with the new Super Extended Basic,
  64. using only their regular XB Module.
  65. In addition, any member of this club
  66. that finds a SUPER XB Module program
  67. that will not run using the merge
  68. SUB programs on this disk can brink me
  69. a copy and I will rewrite it so as they
  70. CAN use it. Obviously, I cannot afford
  71. to buy the QUALITY SOFT "Draw 'n Plot"
  72. disk for all the club. If they want
  73. more complete compatability, they will
  74. have to buy that for themselves.
  75.  
  76.   I am still searching for the proper
  77. CALL LOADs and CALL PEEKs that will
  78. enable me to duplicate a few
  79. subprograms in the Super XB Module.
  80. The subprograms not included below
  81. because of this are: SUB CLKOFF, SUB
  82. ALOCK, SUB CTRL, SUB FCTN,SUB SCROFF,
  83. and SUB SCRON
  84.  
  85. Here is the documentation for the disk,
  86. plus a printout of most of the CALL SUB
  87. programs:
  88.  
  89. ***************************************
  90. .IF DSK3.C5
  91.       SUPERXB*V1 - Documentation.
  92.  
  93.    This disk contains  a  series  of  TI
  94. Extended  Basic  CALL  SUBprograms  that
  95. attempt to make the  TI  Extended  Basic
  96. module  mostly  compatable  with the new
  97. Super Extended Basic Module.
  98.  
  99.    The  New  Super Extended Basic module
  100. will load  QUALITYSOFT's  Draw  'n  Plot
  101. routines  into  low  memory.   To obtain
  102. this to use with the TI XB  module,  you
  103. must  buy  them  from  Quality  Soft and
  104. preload them into lo  memory.   Complete
  105. documentation   and   instructions  come
  106. with the purchase.
  107.  
  108.    The  PEEKVdp  ram  and  POKEVdp   ram
  109. routines are built into the new Super XB
  110. module.  The only way you can use  these
  111. CALLs  with  the regular XB module is to
  112. preload assembly language routines, such
  113. as  those  that  appeared  in  the SMART
  114. PROGRAMMER   or   those   available   by
  115. subscribing   to  the  GENIAL  TRAVELER.
  116. These routines will reside in  Lo-memory
  117. and  be accessed by CALL LINKs.  You may
  118. have to rewrite the SUB  PEEKV  and  SUB
  119. POKEV  subprogrtrams to conform with the
  120. requirements of those assembly programs.
  121. Also,  they will cannot be used if "Draw
  122. 'n Plot" is in lo-memory, as  they  will
  123. over-write those sub programs.
  124.  
  125.    Similarly,  the clock programs are in
  126. the Super XB module.  To simulate  this,
  127. you  will  have  to  preload an assembly
  128. language clock routine such as  the  one
  129. tat appeared in the August 1984 Issue of
  130. the Smart  programmer.   Again,  if  the
  131. Draw  on  Plot  subprograms  are  in low
  132. memory, these will over write  them  and
  133. probably cause lockup.
  134.  
  135.    What  is  obvious  from  the above is
  136. that you cannot be 100% compatable  with
  137. a  program  written for the new Super XB
  138. maodule if it makes use of all the above
  139. calls  in  the  same  program.  However,
  140. most  programs  do  not  use  all  these
  141. subprograms.    In   addition,  the  SUB
  142. programs provided are  all  very  useful
  143. and  can  be used in your own regular XB
  144. programs.
  145.  
  146.    The  SUB  programs  are  provided  in
  147. MERGE   form,   consecutively  numbered.
  148. MERGE in only those  you  need  for  the
  149. program  you  wish to run or ar planning
  150. to write.  See  the  TI  Extended  Basic
  151. reference  Guide  for  the proper way to
  152. use CALL SUB programs.
  153.  
  154.    This  disk  contains  the   following
  155. CALLs which are 100% compatable with the
  156. CALLs  built  into  the  new  Super   XB
  157. module:
  158.  
  159.    CALL ALL(numeric expression)
  160.    This  call  fills the screen with the
  161. character of the  ASCII  number  in  the
  162. perenthesis.  ie: CALL ALL(32) fills the
  163. screen  with  blanks,  just  like   CALL
  164. CLEAR.   CALL  ALL(36)  fills the screen
  165. with dollar signs -$-.
  166.  
  167.    CALL BEEP sounds a beep tone.
  168.  
  169.    CALL BYE is the same as the immediate
  170. command  BYE except that it is used in a
  171. program.
  172.  
  173.    CALL CHIMES sounds  a  single  chime.
  174. Although it is possible to duplicate the
  175. chimes provided in the  ditor  Assembler
  176. Manual,  I  have  chosen  to use a chime
  177. from one of Jim Peterson's Tips from the
  178. TIGERCUB.  Jim is the undisputed KING of
  179. XB  CALL  SUB  programs,  and  this  was
  180. included  as  a tribute to him.  You can
  181. buy over 300 usefull CALL subs in  merge
  182. form on his three Nuts and Bolts disks -
  183. and get  a  real  education  on  how  to
  184. program in XB.
  185.  
  186.    CALL CLOCK will only work if you have
  187. the clock  routine  preloaded  into  Low
  188. memory.
  189.  
  190.    CALL   COLORS(foreground,background).
  191. This  call  sets  the   foreground   and
  192. background colors for all Character sets
  193. except set 0.  Therefore it does not set
  194. the border colors.  These can be done by
  195. the standard CALL SCREEN().  By  setting
  196. the  background color to TRANSPARENT -1-
  197. in CALL COLORS, the color called by CALL
  198. SCREEN()   will  become  the  background
  199. color.
  200.  
  201.    CALL GOSPRT starts all sprites moving
  202. after  they  have been stopped with CALL
  203. STSPRT.
  204.  
  205.    WARNING: only ONE  of  the  following
  206. can  be  used in any program as the last
  207. line of the CALL SUB XXXX(n)  absolutely
  208. MUST  be  the  last line of the program.
  209. Therefore, they all use  the  same  line
  210. numbers,   ending  in  32767,  and  will
  211. overwrite each other: GOSUB(n), GOTO(n),
  212. RESTORE(n), RUNPROG("device,filename").
  213.    CALL  GOSUB(n)  allows  you  to use a
  214. variable with GOSUB.  However,  remember
  215. when  you  RESequence  line numbers, (n)
  216. will NOT be resequenced.  Also  remember
  217. that  a  call  to  a  non  existing line
  218. number will crash your program.
  219.    CALL GOTO(n) same as above but  is  a
  220. GOTO instead of a GOSUB.
  221.    CALLL  RESTORE(n) allows the sue of a
  222. variable instead of a fixed line  number
  223. with the same cautions as in GOSUB(n).
  224.    CALL       RUNPROG("device.filename")
  225. circumvents TI XB's disallowance of  RUN
  226. "DSK1."A$"  or  RUN A$ where A$ might be
  227.        ___
  228. "DSK3.MYPROGRAM"
  229.  
  230.    CALL HONK sounds a warning honk.
  231.  
  232.    CALL KEYS("keylist",numeric variable)
  233. allows  validation of the keys listed by
  234. either  a  predefined  string  (A$)   or
  235. listed    in    between    the    quotes
  236. ie:"1234ABC"  and  returns  a   numberic
  237. variable.   If the key A was pressed the
  238. variable would be 5 as A is the fith  in
  239. the sequence shown.  If a key other than
  240. those defined  is  pressed,  a  honk  is
  241. sounded and the program awaits a correct
  242. key press.  IMPORTANT: CALL HONK must be
  243. MERGED   along   with   SUB  KEYS().   I
  244. consider  this  to  be  among  the  most
  245. usefull  of  all the subprograms on this
  246. disk.
  247.  
  248.    CALL NEW is the same as the immediate
  249. command   NEW  but  can  be  used  in  a
  250. program.
  251.  
  252.    CALL PEEKV(vdp address,  value  list)
  253. and  CALL POKEV(vdp address, value list)
  254. are explained above.
  255.  
  256.    CALL QUITOFF disables the  quit  key,
  257. FCTN=
  258.  
  259.    CALL  QUITON  enables  the  quit key,
  260. FCTN=
  261.  
  262.    CALL STSPRT stops all sprite  motion.
  263. To restart use CALL GOSPRT.
  264.  
  265. ****************************************
  266.    SUB    PROGRAMS   and   documentation
  267. written and donated to the public domain
  268. by   ART  BYERS.   SYSOP  TINET  special
  269. interest group on DELPHI.  12/16/87.
  270. ****************************************
  271.  
  272. 30000 SUB ALL(N)
  273. 30001 CALL VCHAR(1,1,N,768):: SUBEND
  274.  
  275. 30002 SUB BEEP
  276. 30003 CALL SOUND(220,880,1):: SUBEND
  277.  
  278. 30004 SUB BYE
  279. 30005 CALL LOAD(-31962,32):: SUBEND
  280.  
  281. 30006 SUB CHIMES
  282. 30007 FOR N=0 TO 25 STEP 5 :: CALL
  283. SOUND(-999,1047,N,784,N,659,N):: NEXT N
  284. :: FOR N=26 TO 30 :: CALL
  285. SOUND(-999,1047,N,784,N,659,N):: NEXT N
  286. :: SUBEND
  287.  
  288. 30008 SUB COLORS(F,B)
  289. 30009 FOR N=1 TO 14 :: CALL
  290. COLOR(N,F,B):: NEXT N :: SUBEND
  291.  
  292. 30010 SUB GOSPRT
  293. 30011 CALL LOAD(-31806,0):: SUBEND
  294.  
  295. 30012 SUB HONK
  296. 30013 CALL SOUND(220,220,1):: SUBEND
  297. 30014 SUB KEYS(A$,P)
  298. 30015 CALL KEY(0,K,S):: IF S=0 THEN
  299. 30015
  300. 30016 P=POS(A$,CHR$(K),1):: IF P>0 THEN
  301. 30017 ELSE CALL HONK :: GOTO 30015
  302. 30017 SUBEND
  303.  
  304. 30018 SUB NEW
  305. 30019 CALL LOAD(-31952,255,231,
  306. 255,231):: SUBEND
  307.  
  308. 30020 SUB QUITOFF
  309. 30021 CALL LOAD(-31806,16):: SUBEND
  310.  
  311. 30022 SUB QUITON
  312. 30023 CALL LOAD(-31806,0):: SUBEND
  313.  
  314. 30024 SUB STSPRT
  315. 30025 CALL LOAD(-31806,64):: SUBEND
  316.  
  317.  
  318. 30026 SUB CLOCK
  319. 30027 CALL CLEAR :: CALL LINK("CLOCK")
  320. 30028 DISPLAY AT(12,1):"TIME?000000" ::
  321. ACCEPT AT(12,6)SIZE(-6)BEEP
  322. VALIDATE(DIG IT):TIME$ :: CALL
  323. LINK("SETCLK",TIME$):: SUBEND
  324.  
  325. 32762 SUB GOSUB(N)
  326. 32763 CALL PEEK(-31952,[,]):: CALL
  327. PEEK([*256+]-65534,[,])
  328. 32764 DEF L1(N)=INT(N/256)
  329. 32765 DEF L2(N)=N-256*(INT(N/256))
  330. 32766 N=1000*N :: CALL
  331. LOAD([*256+]-65534,L1(N),L2(N))
  332. 32767 GOSUB 12345 :: SUBEND
  333.  
  334. 32762 SUB GOTO(N)
  335. 32763 CALL PEEK(-31952,[,]):: CALL
  336. PEEK([*256+]-65534,[,])
  337. 32764 DEF L1(N)=INT(N/256)
  338. 32765 DEF L2(N)=N-256*(INT(N/256))
  339. 32766 N=1000*N :: CALL
  340. LOAD([*256+]-65534,L1(N),L2(N))
  341. 32767 GOTO 12345 :: SUBEND
  342.  
  343. 32762 SUB RESTORE(N)
  344. 32763 CALL PEEK(-31952,[,]):: CALL
  345. PEEK([*256+]-65534,[,])
  346. 32764 DEF L1(N)=INT(N/256)
  347. 32765 DEF L2(N)=N-256*(INT(N/256))
  348. 32766 N=1000*N :: CALL
  349. LOAD([*256+]-65534,L1(N),L2(N))
  350. 32767 RESTORE 12345 :: SUBEND
  351.  
  352. 32762 SUB RUNPROG(FN$)
  353. 32763 REM THANKS TO BARRY TRAVER
  354. 32764 DISPLAY AT(24,1)ERASE ALL:"
  355. Loading ";FN$
  356. 32765 CALL PEEK(-31952,[,]):: CALL
  357. PEEK([*256+]-65534,[,])::
  358. @=[*256+]-65534 :: D$=FN$ :: CALL
  359. LOAD(@,LEN(D$))
  360. 32766 FOR [=1 TO LEN(D$):: CALL
  361. LOAD(@+[,ASC(SEG$(D$,[,1))):: NEXT [ ::
  362. CALL LOAD(@+[,0)
  363. 32767 RUN "DSK1.FILENAME" :: SUBEND
  364.  
  365. ***************************************
  366.  
  367.