home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pgxos / xosbas.tip < prev    next >
Text File  |  2006-10-19  |  8KB  |  178 lines

  1.           XOSBAS.TIP by Paul Globman
  2.               Copyright (c) 1990
  3.  
  4. This file is for XOS-C and XBASIC users who would like to integrate all the
  5. internal RAM banks.  XOS requires all three internal RAM banks are installed.
  6. XBASIC will function with any two banks.
  7.  
  8.                     XBASIC
  9.  
  10. XBASIC runs in the ALTLCD (TELCOM's previous screen) area of system memory,
  11. which is available when TELCOM is not used.  There are 476 bytes of RAM in
  12. which many utility programs are designed to run.  The advantage of m/l programs
  13. which run in the ALTLCD, is that they never require the setting of HIMEM and
  14. can be run directly from the main menu at any time.  Programs which require the
  15. CLEAR'ing of HIMEM will not load into its execution address _unless_ HIMEM is
  16. CLEAR'ed first.
  17.  
  18. PROGRAMS can be made to operate in other banks by CHAIN'ing", leaving one
  19. program and continuing in another program in another RAM bank.  All FILES in
  20. those banks can be displayed.
  21.  
  22. Programs can be written so DATA (.DO) files can be OPEN'ed for READ or WRITE in
  23. other banks.  Only one cross bank file can be "opened" at a time, so if you
  24. must access two files in other banks, one of them must first be copied into the
  25. current bank.
  26.  
  27. BASIC programs CHAIN to programs in other banks by setting the destination
  28. program as the IPL program of that bank.  Then the program switches banks and
  29. lets the IPL function take over (holding the shift key while bank switching
  30. will inhibit the IPL feature).
  31.  
  32. If you CHAIN to a data file, the TEXT editor is run.  If you jump to another
  33. bank for a file that isn't there, then you will go to the main menu of that
  34. bank.  The program you CHAIN to should clear IPL with the IPL"" command at the
  35. beginning of the program (CALL 7194 in m/l).
  36.  
  37.  
  38. After LOADM"XBASIC" your program will have 7 XBASIC  commands in the form of:
  39.  
  40.  10 CALL 63600,CMD
  41.    :CALL 63600,CMD,VARPTR(X$)
  42.    :CALL 63600,CMD,BANK
  43.  
  44.     CMD   FUNCTION    VARPTR(X$)
  45.     ---   --------    ----------
  46.      0    CLOSE         N/A
  47.      1    OPEN READ   X$ = FILENAME
  48.      2    OPEN WRITE  X$ = FILENAME
  49.      3    GET X$      X$ = DATA
  50.      4    PUT X$      X$ = DATA
  51.      5    CHAIN       BANK (IPL)
  52.      6    FILES       BANK
  53.  
  54. See the file XBASIC.200 (docs are part of the file) for programming details on
  55. how to use XBASIC.
  56.  
  57. ============================================================
  58.  
  59.                     XBAS-2
  60.  
  61. XBAS-2, is part of the XOS-C code, and offers the following additional cross
  62. bank commands:
  63.  
  64.  10 CALL 63600,CMD,VARPTR(X$)
  65.  
  66.     CMD   FUNCTION    VARPTR(X$)
  67.     ---   --------    ----------
  68.      7    KILL        X$ = FILNAM.DO
  69.      8    LOADM       X$ = FILNAM.CO
  70.      9    RUN         X$ = FILNAM.BA
  71.  
  72.  
  73. XBAS-2 does not reside in memory as a file, so you cannot LOADM, as you did
  74. with XBASIC.CO.  Once XOS-C is installed, CALL 41179 (from any bank) will be
  75. the equivalent of LOADM "XBAS-2".  Once XBAS-2 is LOADM'ed, you can then
  76. LOADM"XBASIC", regardless of which bank it is stored in (bank #3 is recommended
  77. as the storage bank for all CO and BA files).  Here's the code...
  78.  
  79. 0 REM XBASIC CROSS BANK LOADER
  80. 1 REM   BY PAUL GLOBMAN (C) 1990
  81. 2 CALL 41179             'LOADM XBAS-2
  82. 3 X$="3:XBASIC.CO"       'SPECIFY FILE
  83. 4 CALL63600,8,VARPTR(X$) 'LOADM XBASIC
  84. 5 IFPEEK(61302)<>0THENSTOP  'BAD LOADM
  85.  
  86. XBASIC and XBAS-2 both run in the ALTLCD area so after XBASIC.CO is loaded into
  87. place, XBAS-2 is no longer available.  XBAS-2 can be reloaded by CALL 41179
  88. (which will then overwrite XBASIC.CO.
  89.  
  90. A BASIC program with subroutines to LOADM either cross bank BASIC enhancer 
  91. prior to its use, can be made to perform tasks not previously though possible.
  92.  
  93.  
  94. PROGRAMS can be called into the current bank to operate there.  Programs have
  95. either a .BA or .CO file extension and perform a function.  XBAS-2 (and XOS)
  96. brings BASIC programs into the unsaved program file slot and then IPL's the
  97. program.
  98.  
  99. So after using XBAS-2 (or XOS's F3(Cmd)) to call in a BASIC program, you will
  100. discover that the  program seems to run itself every time you turn power on, or
  101. switch into that bank.
  102.  
  103. To turn off the auto-execute of the program, put IPL"" into the code (see line
  104. 10).  This would be installed in any BASIC program that gets called in from
  105. another bank.
  106.  
  107.   10 IPL"":REM clear IPL
  108.  
  109. Both XBASIC and XBAS-2 offer a "result descriptor" byte so you can check the
  110. result of any XBASIC operation.  The RD byte is different for each so careful
  111. study of the docs are required to ensure proper operation.
  112.  
  113. ============================================================
  114.  
  115.                     XOS-C
  116.  
  117. The functions of XOS are explained in the XOS docs, but the applications of the
  118. functions are left to the user to discover.  Here are a few tips...
  119.  
  120. INSTALLATION - After installing XOS as per docs, and before doing ANYTHING 
  121. else, go to each bank and enter/exit BASIC.  This must be done before any
  122. attempting to copy files between banks to ensure file pointers are properly
  123. set.
  124.  
  125.  
  126. PRINT - background printing operates like the TEXT function F3(Save to: LPT:).
  127. Note the ":" after LPT: directs the output to the printer.  Without the ":" the
  128. file will be saved to cassette as LPT.DO.  The ":" signifies a "device" name
  129. rather than a "file" name.
  130.  
  131. By creating a small file (2 bytes) with an ESC-E (^[E) and calling it EMPH.DO
  132. (the actual filename is optional), you can cursor select EMPH.DO, press XOS's
  133. F7(Prnt) and the printer will be put into the EMPHASIZED mode.  If you have the
  134. kind of printer that allows margin settings and fonts via control characters,
  135. you can print formatted .DO files while using the Tandy 200 to run another
  136. program, log on to CIS, or maybe edit another DO file.
  137.  
  138. Use F7(Prnt) for quick dumps when formatting is not needed or if the file is
  139. already formatted.  Unlike SHFT/PRINT, background printing does NOT filter out
  140. control codes.
  141.  
  142.  
  143. PASTE - you are working on a large file and you CUT a section of TEXT into the
  144. PASTE buffer, only to discover that you have no room in that bank to PASTE it
  145. back into the file.  If you go to the Menu and use F6(Pste) and go to another
  146. bank, you will transfer the PASTE buffer to that bank.  Now you can return to
  147. the bank you were working in and can use the PASTE buffer for other TEXT
  148. manipulation.  After clearing memory to make room for that missing block of
  149. TEXT, you can then go to the bank where you left the PASTE buffer and again use
  150. F6(Pste) to return to the first bank.  The PASTE buffer will once again contain
  151. the original block of TEXT you had previously CUT.
  152.  
  153.  
  154. NAME - if you cursor select a file on the menu and rename it so the first
  155. character of the filename is a blank, and then use only 5 characters (or
  156. less) for the filename, you will produce an extensionless filename.  This is
  157. useful if you wish to protect that file from being accessed by programs because
  158. the filename will not be recognized.  Simply renaming the file with a normal
  159. filename will restore its extension.
  160.  
  161.  
  162. F3(Cmd) - the execution of IPL programs are inhibited by pressing the SHIFT
  163. key.  When using F3(Cmd) to run a BASIC program, holding the SHIFT key will 
  164. prevent the program from running but will leave the program intact in the 
  165. unsaved program area.  You can access the program by simply entering BASIC.
  166. You can now LIST, EDIT, or RUN the program manually.
  167.  
  168. BASIC programs called in from another bank via the F3(Cmd) can be made to
  169. remove itself from RAM upon completion.  The following code can be used to
  170. terminate the program and return to the Menu, instead of the MENU command.
  171.  
  172. 10010 CLEAR99,MAXRAM:MAXFILES=1
  173. 10020 M$="CALL40961"+CHR$(13):AD=64798
  174. 10030 L=LEN(M$):POKE AD,L
  175. 10040 FORI=1TOL:M=ASC(MID$(M$,I,1))
  176. 10050 POKE AD+2*I,0:POKEAD+2*I-1,M:NEXT
  177. 10060 NEW
  178.