************************************************************* * RXB MANUAL * ************************************************************* * (C) 1 JAN 1991 * * by * * Richard Lynn Gilbertson * ************************************************************* IMPORTANT NOTICE REGARDING PROGRAMS AND MANUAL MATERIALS ------------------------------------------------------------- The following should be read and understood before purchasing and/or using RXB. Richard Lynn Gilbertson does not warrant that the program and accompanying book materials will meet the specific requirements of the consumer, or that the programs and manual will be free from error. The consumer assumes complete responsibility for any decision made or actions taken based on information obtained using these programs and manual materials. Any statements made concerning the utility of Richard Lynn Gilbertson's programs or manual materials are not to be construed as express or implied warranties. RICHARD LYNN GILBERTSON MAKES NO WARRANTY, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. REGARDING THESE PROGRAMS OR MANUAL MATERIALS OR ANY PROGRAMS DERIVED THEREFROM AND MAKES SUCH MATERIALS AVAILIABLE SOLELY ON AN "AS IS" BASIS. IN NO EVENT SHALL RICHARD LYNN GILBERTSON BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGE IN CONNECTION WITH OR ARRISING OUT OF THE PURCHASE OR USE OF THESE PROGRAMS OR MANUAL MATERIALS, AND THE SOLE AND EXCLUSIVE LIABILITY OF RICHARD LYNN GILBERTSON, REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE RXB PRODUCT. MOREOVER, RICHARD LYNN GILBERTSON SHALL NOT BE LIABLE FOR ANY CLAIM OF ANY KIND WHATSOEVER AGAINST THE USER OF THESE PROGRAMS OR MANUAL MATERIALS BY ANY OTHER PARTY. Some states do not allow the exclusion or limitation of implied warranties or consequential damages, so the above limitatiions or exclusions may not apply to you. ************************************************************* ************************************************************* * TABLE OF CONTENTS * ************************************************************* TITLE SCREEN of RXB.....( example )...................PAGE 1 TITLE SCREEN of RXB.....( explainations ).............PAGE 2 SPECIAL FEATURES OF RXB ( explainations ).............PAGE 3 SUBPROGRAMS or COMMANDS (By alphabetical order) NAME---------------------TYPE----------ACCESS---------PAGE-## AMSBANK...............SUBPROGRAM........AMS............ A1 AMSINIT...............SUBPROGRAM........AMS............ A2 AMSMAP................SUBPROGRAM........AMS............ A3 AMSOFF................SUBPROGRAM........AMS............ A4 AMSON.................SUBPROGRAM........AMS............ A5 AMSPASS...............SUBPROGRAM........AMS............ A6 BASIC.................SUBPROGRAM........DEVICE......... B1 BEEP..................SUBPROGRAM........SOUND.......... B2 BIAS..................SUBPROGRAM........CONVERSION..... B3 BLOAD.................SUBPROGRAM........DISK........... B4 BSAVE.................SUBPROGRAM........DISK........... B5 BYE............SUBPROGRAM or COMMAND....EXIT RXB....... B6 CALL...............SUBPROGRAM LIST..................... C1 CAT...................SUBPROGRAM........DISK........... C2 CHAR..................SUBPROGRAM........SCREEN......... C3 CHARSETALL............SUBPROGRAM........SCREEN......... C4 CLSALL................SUBPROGRAM........DISK........... C5 COINC.................SUBPROGRAM........SPRITE......... C6 COLOR.................SUBPROGRAM........SPRITE......... C7 COPY....................COMMAND.........LINES.......... C8 CUTDIR................SUBPROGRAM........DISK........... C9 DEL.....................COMMAND.........LINES.......... D1 DIR...................SUBPROGRAM........DISK........... D2 DISTANCE..............SUBPROGRAM........SPRITE......... D3 DUPCHAR...............SUBPROGRAM........SCREEN......... D4 DUPCOLOR..............SUBPROGRAM........SPRITE......... D5 EA....................SUBPROGRAM........DEVICE......... E1 EALR..................SUBPROGRAM........DISK........... E2 EAPGM.................SUBPROGRAM........DISK........... E3 EXECUTE...............SUBPROGRAM........ASSEMBLY........ E4 FCOPY.................SUBPROGRAM........DISK........... F1 FILES.................SUBPROGRAM........DISK........... F2 GCHAR.................SUBPROGRAM........SCREEN......... G1 GMOTION...............SUBPROGRAM........SPRITE......... G2 HCHAR.................SUBPROGRAM........SCREEN......... H1 HEX...................SUBPROGRAM........CONVERSION..... H2 HGET..................SUBPROGRAM........SCREEN......... H4 HONK..................SUBPROGRAM........SOUND.......... H5 HPUT..................SUBPROGRAM........SCREEN......... H6 INIT..................SUBPROGRAM........ASSEMBLY....... I1 INVERSE...............SUBPROGRAM........SCREEN......... I2 IO....................SUBPROGRAM........TSM9901 CHIP... I3 ISROFF................SUBPROGRAM........INTERUPTS...... I11 ISRON.................SUBPROGRAM........INTERUPTS...... I12 JOYST.................SUBPROGRAM........JOYSTICKS...... J1 KEY...................SUBPROGRAM........KEYBOARD....... K1 LDIAG.................SUBPROGRAM........SCREEN......... L1 LIST....................COMMAND.........DISK........... L2 LOAD..................SUBPROGRAM........DISK........... L3 MKDIR.................SUBPROGRAM........DISK........... M1 MOTION................SUBPROGRAM........SPRITE......... M2 MOVE....................COMMAND.........LINES.......... M3 MOVE..................SUBPROGRAM........MEMORY.(ALL)... M4 MOVES.................SUBPROGRAM........MEMORY.(ALL)... M6 NEW............SUBPROGRAM or COMMAND....MEMORY.(XB).... N1 PEEKG.................SUBPROGRAM........GROM........... P1 PEEKV.................SUBPROGRAM........VDP............ P2 POKEG.................SUBPROGRAM........GRAM........... P3 POKER.................SUBPROGRAM........VDP REGISTERS.. P4 POKEV.................SUBPROGRAM........VDP............ P5 PROTECT...............SUBPROGRAM........DISK........... P6 QUITOFF...............SUBPROGRAM........KEYBOARD....... Q1 QUITON................SUBPROGRAM........KEYBOARD....... Q2 RDIAG.................SUBPROGRAM........SCREEN......... R1 RENAME................SUBPROGRAM........DISK........... R2 RES.....................COMMAND.........LINES.......... R3 RMDIR.................SUBPROGRAM........DISK........... R4 RMOTION...............SUBPROGRAM........SPRITE......... R5 SCSI..................SUBPROGRAM........SCSI CONTROLLER S1 SECTOR................SUBPROGRAM........DISK........... S2 SIZE...........SUBPROGRAM or COMMAND....MEMORY (ALL)... S3 SWAPCHAR..............SUBPROGRAM........SCREEN......... S4 SWAPCOLOR.............SUBPROGRAM........SPRITE......... S5 USER..................SUBPROGRAM........DISK........... U1 VCHAR.................SUBPROGRAM........SCREEN......... V1 VERSION...............SUBPROGRAM........GROM RXB....... V2 VGET..................SUBPROGRAM........SCREEN......... V3 VPUT..................SUBPROGRAM........SCREEN......... V4 XB....................SUBPROGRAM........DEVICE......... X1 XBPGM.................SUBPROGRAM........DISK........... X2 REA DOCS............................................... REA1 ************************************************************* PAGE 1 This is a copy of the RXB title screen: FIRMWARE CONTROL ________________________________ ******************* * R X B * * * * creator * * * * Rich Gilbertson * ******************* >> press ============= result << ANY KEY = DSK#.LOAD ENTER = DSK#.UTIL1 (COMMA) , = DSK#.BATCH SPACE BAR = RXB COMMAND MODE (PERIOD) . = EDITOR ASSEMBLER PAGE 2 This is a explaination of the keys of the title screen: ANY KEY = DSK#.LOAD ------------------------------------------------------------- This asks for which drive number the LOAD program is on. Any key means just what it says. The flashing # symbol indicates this option is waiting for a response. If after 5 seconds no key is pressed a search for LOAD begins. Drives 1 to 9 are searched for the XB LOAD program. If the LOAD program can not be found, like old XB it goes to the XB command mode eventually after many searches. ENTER = DSK#.UTIL1 ------------------------------------------------------------ After pressing ENTER the number symbol flashes indicating this option has been selected. Any key will then select the Drive to load the UTIL1 program from. If ater 5 seconds no key is pressed a search for UTIL1 begins. Drives 1 to 9 are searched for the UTIL1 program. This will only load a EA5 program image file named UTIL1. (COMMA) , = DSK#.BATCH ------------------------------------------------------------ After pressing the , (COMMA) key the number symbol flashes indicating this option has been selected. Any key will then select the Drive to load the BATCH control file from. If after 5 seconds no key is pressed a search for DSK1.BATCH begins. If the control file BATCH can not be found on Drive 1 it defualts to XB command mode. See CALL USER for more information on BATCH CONTROL FILES. SPACE BAR = RXB COMMAND MODE ------------------------------------------------------------ Pressing the SPACE BAR results in XB command mode. (PERIOD) . = EDITOR ASSEMBLER ------------------------------------------------------------ Pressing the . (PERIOD) key will switch to EDITOR ASSEMBLER menu. Pressing the . (PERIOD) key while in EDITOR ASSEMBLER will switch back to RXB. PAGE 3 DISK AND HARD DRIVE ACCESS ----------------------------------------------------------------- CALL FCOPY copy's a file from device to device. CALL PROTECT protects or unprotects a file. CALL RENAME renames a file or directory. CALL MKDIR makes a directory on hard drives or names disks. CALL RMDIR deletes a directory on hard drive. CALL CUTDIR deletes a directory and all sub-directories. CALL SECTOR reads or writes disk or hard drive sectors. CALL SCSI retrieves the scuzzy device ID codes. The info will contain the device company name, version number, revision number and size. BATCH FILE SYSTEM: ----------------------------------------------------------------- CALL USER overides the normal edit mode by allowing a DV80 file to take control. This allows coversions from DV80 to XB program or DV80 to XB MERGE format or loading files, resequencing them, and saving or merging or adding lines through another DV80 file. All variables used through CALL USER are not affected so from a running program more lines or variables can be added to the size of the program without losing anything. Of course the RUN command will as always clear all variables before the program is run, this feature can be turned off with a CALL LOAD. (PRESCAN OFF) As the USER subprogram can overide the editor many features can be bypassed. Example: NEW cr OLD DSK1.XBPROGRAM cr RES 11,3 cr MERGE "DSK1.MERGEPGM" cr SAVE "DSK1.NEWPROGRAM" cr RUN cr The above is a good example of a DV80 Batch file for RXB. Note that there must be a CHR$(13) or Carriage Return after every input line. If not then RXB assumes the it is the same line. But even that is not much of a problem as RXB allows 21 lines of input per program line. You can make them even longer if you want. INPUT/OUTPUT ACCESS: ---------------------------------------------------------------- CALL IO controls the 9901 CRU chip. Sound lists can be played independently of current status. (i.e. type in a program while playing music from VDP/GROM.) Control Register Unit can turn on/off single bits of CRU address bus. (i.e. cards/chips) Cassette direct bus control. (i.e. no menu input/output,verify) PAGE 4 REDO KEY ELIMINATED: ---------------------------------------------------------------- The REDO (FCTN 8) no longer exists in RXB. USER needed a buffer that would not be molested or modified by CALL LINK, CALL LOAD or routines that need a buffer and usually use the same area that USER previously used. So to update and eliminate questions of compatibility the USER buffer was installed in place of the Edit reall buffer (REDO). The REDO key was not considered to be of much use anyway as the Crunch Buffer is 163 tokens long and in non-tokenized form the Edit recall buffer is only 152 bytes long. That is why when REDO is pressed only part of the line last typed in was recalled to screen. Additionally COPY lines, and MOVE lines commands can do the samething as REDO could, so not much of anything is lost becuase it is assumed a TEXT EDITOR will be used to create programs in RXB then use CALL USER. PROGRAM DEVICE NAMES ACCESS: ---------------------------------------------------------------- New access names established as devices are now availiable. By using any TRUE DSR (Device Service Routine) you may now access the Editor Assembler main menu by typing 'EA' within Basic or RXB. Example: RUN "EA" or OLD EA or DELETE "EA" You may also access RXB from Editor Assembler or Basic or even another cartidge. Example: OLD XB or DELETE "XB" from Basic. At any Editor Assembler device prompt type 'XB' then enter. FOR ASSEMBLY LANGUAGE PROGRAMMERS: ----------------------------------------------------------------- CALL MOVE and CALL MOVES are new commands that are GPL commands converted and added to RXB to give total control over every type of memory with-in the TI-99/4A. MOVE works with address only and MOVES works with strings. Both can copy, over-write or move blocks of memory of any type. Both can change VDP registers by tranfering bytes directly into them. RXB TO ASSEMBLY DIRECT ACCESS BY ADDRESS: ---------------------------------------------------------------- EXECUTE is much faster then the traditional LINK routine built into XB. The main problem with LINK is it checks everything and pushes everything onto the VDP stack. After getting to Assembly it pops everything off the stack for use or pushes what is to be passed to XB onto the stack. EXECUTE on the other hand just passes a address to a 12 byte Assembly program in Fast RAM and RTWP ends the users program. A LINK will use up 6 bytes for the name, 2 bytes for the address and wastes time checking things. The advantage to EXECUTE is you use LOAD or MOVE or MOVES to place the values needed directly into the registers then do it. EXECUTE uses less space, is faster, and is easy to debug. PAGE 5 AMS SUPPORT ROUTINES: ---------------------------------------------------------------- The AMS now has support routines built into RXB. CALL AMSMAP will turn the AMS mapper on. CALL AMSPASS will turn the AMS mapper back to pass mode. CALL AMSON will turn on the read/write lines of the mapper. CALL AMSOFF will turn off the read/write lines. With these commands pages of memory can be written with a CALL LOAD or read with a CALL PEEK. Also little known by users is the fact that if a RXB program is smaller then 10K it can be run from VDP not the upper 24K. So paging the upper or lower memory of the AMS is possible from RXB programs. RXB AMS SUPPORT USES NO ASSEMBLY OR CALL LINKs. That means up to 1meg of lower 8K pages or upper 24K pages from RXB. That is impossible to do from XB as you have to load your normal support somewhere. GPL is where all the support routines are stored in RXB so not one byte is wasted on assembly support. That also means not one byte of AMS memory in wasted on control routines. Speaking of control CALL AMSINIT intializes the mappers and switches the AMS to map mode. CALL AMSBANK switches 4K pages in the lower half and upper half of the lower 8K. You can now load a SCREEN DUMP, STAR, WINDYXB, XB-RAMDISK, XB PACKER, MOUSE support, and that only used 40K. With a 128K card you still have 56K unused. With a 256K card you would have 184K unused. Keep in mind that all the above software can be run from one XB program. That is not even mentioning other RXB commands allow you MOVE or COPY any memory to any memory. INTERUPT SERVICE ROUTINE CONTROL: ---------------------------------------------------------------- ISR (Interupt Service Routine) like MOUSE or Screen dumps or any special program like XB Packer use a ISR. The problem with these programs is unless they are written to work with new devices, a lock-up occurs. EXAMPLE: running a mouse routine and XB Packer. They were never made to work together. RXB now has a handle on this. CALL ISROFF turns off the interupt and saves the address for turning it back on. CALL ISRON restarts the interupt. As several pages of the AMS can be used with interupts a whole new world of programming is now possible. NO ASSEMBLY IS USED OR CALL LINKs. Absolute compatibility. LOWER 8K PROGRAM IMAGE FILE LOADER AND SAVER ---------------------------------------------------------------- Hidden loaders were created to overcome the slow loading speed of CALL LOAD. The disadvantage of a hidden loader is it can only load one assembly support program at a time. BLOAD loads program image files of the lower 8K, and BLOAD can load as many times as needed within one RXB program. BSAVE is the opposite and creates the program image files of the lower 8K support routines. AMSBANK subprogram PAGE A1 ------------------------------------------------------------- Format CALL AMSBANK(page-number,page-number) CALL AMSBANK(numeric-variable,numeric-variable) Description The AMSBANK command will only work with a AMS memory card. AMSBANK turns on the read/write lines of AMS mapper registers stores the first value into the mapper register that sets low half of lower 8K, then stores the second value into the mapper register that sets high half of lower 8K. If the page-number is less then 0 or larger then 239 a BAD VALUE error results. If page-number is larger then the AMS card size allows * AMS BANK NUMBER ERROR * results. Neither error will affect previously loaded pages. No lock-up will result. AMSBANK breaks the lower 8K into two halves of 4K. The lower 4K is Hex >2000 to >2FFF and the upper is Hex >3000 to >3FFF so switching lower 8K requires two 4K pages to be used. This is the only disadvantage to AMSBANK, but flexability does result. Less wasted pages results in more memory available. AMSBANK values range from 0 to 239 if you have 1Meg, 0 to 111 if you have 512K, 0 to 47 if you have 256K, and 0 to 15 if you have 128K AMS. The formula is: SIZE/4-16=pages. EXAMPLE: 256/4-16 is 48 pages. In other words 0 to 15 pages would be 16 pages for use. The odd ball numbering scheme of AMSBANK results from pages 0 to 15 not being used in MAP mode. AMSBANK creates it's own numbers of pages 0 to 239 by starting actually at page 16 of the AMS. That would be page 0 of AMSBANK. This lay out leaves open 8 4K pages for PASS mode, and 8 4K pages for future use. See docs MANUAL-AMS for examples of memory maps. Also run AMS-TEST or AMS-SAVE or AMS-LOAD programs. Programs This sets up & starts map mode| >100 CALL AMSINIT This reads low half 8K page. | >110 CALL PEEK(16388,L) This reads high half 8K page. | >120 CALL PEEK(16390,H) This shows pages used. | >130 PRINT "LOW";L;"HIGH";H This loads a assembly program.| >140 CALL LOAD("DSK1.CHAR") This changes low/high 8K pages| >150 CALL AMSBANK(16,17) This loads a assembly program.| >160 CALL LOAD("DSK1.DUMP") This changes low/high back. | >170 CALL AMSBANK(L,H) This uses a routine in CHAR. | >180 CALL LINK("CHAR") This changes low/high again. | >190 CALL AMSBANK(16,17) This uses a routine in DUMP. | >200 CALL LINK("DUMP") | The above example program shows one RXB program using two assembly programs with links for both. Thus only 16K of the AMS was used for support. 256K would be 47 assembly support programs. Compatability of most software assured. Options Dependent on other AMS commands. Also insure that ISR hooks are off if in use or lock-up will occur. See ISR off. AMSINIT subprogram PAGE A2 ------------------------------------------------------------- Format CALL AMSINIT Description The AMSINIT command will only work with a AMS memory card. AMSINIT turns on the read/write lines of AMS mapper registers stores pages 0 to 15 into mapper registers, then turns on MAP mode. Essentially PASS mode and MAP mode are the same in that the mapper registers are exactly the same in both modes. That means in both modes the same memory is used. This would make the AMS of little use so LOAD is used to change mapper registers and switch pages. But if upper memory is switched from a XB program the page that just did this is switched out and a lock-up occurs. On the other hand switching pages in the lower 8K presents very few problems. So see AMSBANK. AMSINIT can also be used like AMSPASS but stays in MAP mode. See docs MANUAL-AMS for examples of memory maps. Also run AMS-TEST or AMS-SAVE or AMS-LOAD programs. Programs This sets up & starts map mode| >100 CALL AMSINIT This reads low half 8K page. | >110 CALL PEEK(16388,L) This reads high half 8K page. | >120 CALL PEEK(16390,H) This shows pages used. | >130 PRINT "LOW";L;"HIGH";H This changes low half 8K page.| >140 CALL LOAD(16388,16) This changes high half 8K page| >150 CALL LOAD(16390,17) This sets up & starts map mode| >200 CALL AMSINT This reads low half 8K page. | >210 CALL PEEK(16388,L) This reads high half 8K page. | >220 CALL PEEK(16390,H) This shows pages used. | >230 PRINT "LOW";L;"HIGH";H This changes low/high 8K pages| >240 CALL AMSBANK(16,17) | In the above program 100 to 150 and 200 to 240 do the same thing. Options Dependent on other AMS commands. Also insure that ISR hooks are off if in use or lock-up will occur. See ISR off. AMSMAP subprogram PAGE A3 ------------------------------------------------------------- Format CALL AMSMAP Description The AMSMAP command will only work with a AMS memory card. MAP MODE on the AMS card means the mapper registers are turned on so they can be changed. But even with the mapper on unless the read/write lines are on no mappers will appear to be at the DSR address. AMSON turns on read/write mapper registers. Then a LOAD or AMSBANK can change the memory pages. See docs MANUAL-AMS for examples of memory maps. Also run AMS-TEST or AMS-SAVE or AMS-LOAD programs. Programs This turns on map mode. | >100 CALL AMSMAP This turns on read/write. | >110 CALL AMSON This fetches map register 2. | >120 CALL PEEK(16388,BYTE) This turns off read/write. | >130 CALL AMSOFF This turns on pass mode. | >140 CALL AMSPASS This prints the page from map | >150 PRINT "Register 2 PAGE#" mode in register 2. | ;BYTE | Options Dependent on other AMS commands. Also insure that ISR hooks are off if in use or lock-up will occur. See ISROFF. AMSOFF subprogram PAGE A4 ------------------------------------------------------------- Format CALL AMSOFF Description The AMSOFF command will only work with a AMS memory card. The read/write lines to the AMS mapper registers are turned off so they will not be changed. Any PEEK or LOAD to the DSR space will be zero after the AMSOFF command. They can't be read/written to. See docs MANUAL-AMS for examples of memory maps. Also run AMS-TEST or AMS-SAVE or AMS-LOAD programs. Programs This sets up & starts map mode| >100 CALL AMSINIT This turns on read/write. | >110 CALL AMSON This fetches map register 2. | >120 CALL PEEK(16388,BYTE) This turns off read/write. | >130 CALL AMSOFF This turns on pass mode. | >140 CALL AMSPASS This prints the page from map | >150 PRINT "Register 2 PAGE#" mode in register 2. | ;BYTE | Options Dependent on other AMS commands. Also insure that ISR hooks are off if in use or lock-up will occur. See ISROFF. AMSON subprogram PAGE A5 ------------------------------------------------------------- Format CALL AMSON Description The AMSON command will only work with a AMS memory card. The read/write lines to the AMS mapper registers are turned on so they can be changed. Any PEEK or LOAD to the DSR space can then be used to change the mapper registers or read them. See docs MANUAL-AMS for examples of memory maps. Also run AMS-TEST or AMS-SAVE or AMS-LOAD programs. Programs This sets up & starts map mode| >100 CALL AMSINIT This turns on read/write. | >110 CALL AMSON This loads 9 in map register 2| >120 CALL PEEK(16388,9) This turns off read/write. | >130 CALL AMSOFF This loads values in lower 8K.| >140 CALL LOAD(8192,1,2,3,4) This turns on pass mode. | >150 CALL AMSPASS This peeks values in lower 8K.| >160 CALL PEEK(8192,A,B,C,D) This prints values. | >170 PRINT A;B;C;D This turns on map mode. | >180 CALL AMSMAP This turns on read/write. | >190 CALL AMSON This loads 2 in map register 2| >200 CALL LOAD(16388,2) This turns off read/write. | >210 CALL AMSOFF This peeks values in low page.| >220 CALL PEEK(8192,A,B,C,D) This prints values. | >230 PRINT A;B;C;D | Options Dependent on other AMS commands. Also insure that ISR hooks are off if in use or lock-up will occur. See ISROFF. AMSPASS subprogram PAGE A6 ------------------------------------------------------------- Format CALL AMSPASS Description The AMSPASS command will only work with a AMS memory card. PASS MODE on the AMS card means the mapper registers are not on. This is the normal mode of the AMS. No extra memory is is available or used. This renders the AMS like a normal 32K card. See docs MANUAL-AMS for examples of memory maps. Also run AMS-TEST or AMS-SAVE or AMS-LOAD programs. Programs This sets up & starts map mode| >100 CALL AMSINIT This turns on read/write. | >110 CALL AMSON Load 22 into map register 2. | >120 CALL LOAD(16388,22) This turns off read/write. | >130 CALL AMSOFF This turns on pass mode. | >140 CALL AMSPASS | Options Dependent on other AMS commands. Also insure that ISR hooks are off if in use or lock-up will occur. See ISROFF. BASIC Device Service Routine (DSR) PAGE B1 ------------------------------------------------------------- Format RUN "BASIC" DELETE "BASIC" CALL XBPGM("BASIC") CALL CAT("BASIC") OLD BASIC SAVE BASIC -(Must have a program within - memory to work at all) CALL LOAD("BASIC") -(CALL INIT must proceed it) Description The BASIC DSR (Device Service Routine) allows access to the TI BASIC . The access will work only if the DSR is the GPLDSR or LINK DSR. In other words, a DSR that acknowledges any type of DSR in RAM, ROM, GROM, GRAM, or VDP. Most DSR's only accept DSK or PIO. Others like the SAVE or LIST commands will only work with a program in the memory first. Still others like CALL LOAD("EA") must have the CALL INIT command used first. Keep in mind that if it does not work, the problem is the DSR your using. Almost all DSR's today only acknowledge the ROM or RAM DSR's. As the BASIC DSR is in GROM/GRAM it seems a bit short sighted on the part of most programmers to use cut down versions of a DSR. Please discourage this practice as it is a diservice to us all. Programs The program at the right will | >100 CALL XBPGM("BASIC") go to the BASIC prompt. | | This line asks for a string. | >100 INPUT A$ This line uses the string and | >110 DELETE A$ if you type BASIC then enter | will switch to BASIC. | | This line will switch to the | >CALL CAT("BASIC") BASIC. | | This line shows even lower | >CALL EAPGM("basic") case works also. | Options CALL EA or CALL XB is also availiable. BEEP subprogram PAGE B2 ------------------------------------------------------------- Format CALL BEEP Description The BEEP command produces the same sound as the ACCEPT or BEEP as in DISPLAY options. See EXTENDED BASIC MANUAL pages 47, 48, 49, 77, 78. Programs The program to the right will | >100 CALL BEEP will produce a beep sound. | | Options NONE. BIAS subprogram PAGE B3 ------------------------------------------------------------- Format CALL BIAS(numeric-variable,string-variable [,...]) Description The BIAS command adds 96 to all characters in the string or subtracts 96 from all characters in the string. If numeric variable is 0 then it subtracts the XB screen bias of 96 from the characters, if the numeric variable is not 0 then it adds the XB screen bias of 96 to all the characters in the string. The XB screen bias only affects charactes read or written to the screen. See PEEKV, and POKEV. Programs The program to the right will | >100 CALL MOVES(4,255,0,V$) load V$ with 255 charactes off| the screen. But will not be | readable as they have a bias. | The bias is now subtracted | >110 CALL BIAS(0,V$) from the string printed. | >120 PRINT V$ Options NONE. BLOAD subprogram PAGE B4 ------------------------------------------------------------- Format CALL BLOAD("access-name") CALL BLOAD(string-variable) Description The BLOAD subprogram loads ONLY program image files created by BSAVE. BLOAD is the opposite of BSAVE. BLOAD is a faster version of CALL LOAD. BLOAD has the speed of a hidden loader and is much easier to use. BLOAD only loads into lower 8K. Unlike CALL LOAD the BLOAD and BSAVE subprogram will work without CALL INIT being used first. Remember to turn on the interupts if the program has them. Or the program support will not work. See ISROFF and ISRON. NOTE: 8K of VDP memory MUST be free for BLOAD to function or a memory full error will result. Always place the BLOAD command at the top of the RXB program. Programs This line loads a previously | >100 CALL BLOAD("DSK2.MOUSE") saved program image file. | This line turns on the mouse | >110 CALL LINK("MSON") (program would continue here)| | This line load a previously | >100 CALL BLOAD("DSK1.DUMP") saved program image file. | This line turns on interupt | >110 CALL ISRON(16384) within program. | This line links to support. | >120 CALL LINK("DUMP") | Options AMS users will find this a easy way to load RXB AMS support. EXAMPLE: >100 CALL AMSINIT >110 FOR L=0 TO 15 STEP 2 >120 CALL AMSBANK(L,L+1) >130 CALL BLOAD("DSK1.BANK"&STR$(L/2)) >140 NEXT L The above program would load RXB AMSBANK banks 0 to 15 into AMS memory from files named BANK0 to BANK7 on disk 1. BSAVE subprogram PAGE B5 ------------------------------------------------------------- Format CALL BSAVE("access-name") CALL BSAVE(string-variable) Description The BSAVE subprogram saves ONLY program image files to be used for BLOAD. BSAVE is the opposite of BLOAD. BSAVE has the speed of a hidden loader without the hassle. BSAVE saves ONLY lower 8K program image files for ONLY BLOAD to use. Unlike CALL LOAD the BLOAD and BSAVE subprogram will work without CALL INIT being used first. To save a program with hidden loaders just break program after loading is complete and type CALL BSAVE("DSK#.NAME") Remember to check for interupts or the program will not work after loading with BLOAD. See ISRON and ISROFF. NOTE: 8K of VDP memory MUST be free for BSAVE to function or a memory full error will result. Always place the BSAVE command at the top of the RXB program. Programs Initialize lower 8K. | >100 CALL INIT Load the assembly support. | >110 CALL LOAD("DSK1.MSETUPO") Load the assembly support. | >120 CALL LOAD("DSK1.HDSR") Turn on the mouse setup. | >130 CALL LINK("MSETUP") BSAVE the whole thing. | >140 CALL BSAVE("DSK2.MOUSE") | Procedure for hidden loaders.| Loads program on disk 1 | >CALL XBPGM("DSK1.LOAD") Break program. | PRESS FCTN 4 to break program. Get address of interupts. | >CALL ISROFF(I) See if they are on. | >PRINT I Save the program to disk. | >CALL BSAVE("DSK2.EXAMPLE") | Options AMS users will find this a easy way to save RXB AMS support. EXAMPLE: >100 CALL AMSINIT >110 FOR L=0 TO 15 STEP 2 >120 CALL AMSBANK(L,L+1) >130 CALL BSAVE("DSK1.BANK"&STR$(L/2)) >140 NEXT L The above program would save RXB AMSBANK banks 0 to 15 into 8 program image files named BANK0 to BANK7 on disk 1. BYE command or subprogram PAGE B6 ------------------------------------------------------------- Format BYE CALL BYE Description The BYE command is the same as the BYE command in the EXTENDED BASIC MANUAL page 54. The BYE command ends the program and returns the system to a reset. BYE will close all open files before exiting to a reset. Command May only be used from command | >BYE mode. Programs May only be used in program | >100 CALL BYE mode. | | The INPUT asks for a Y to go | >110 INPUT "END PROGRAM":A$ on, if not the loop forever. | >120 IF A$<>"Y" THEN 110 Must be a Y so reset system. | >130 CALL BYE Options NONE. CALL subprogram list of format modified PAGE C1 ------------------------------------------------------------- CALL BYE CALL CLSALL CALL CHAR(ALL,pattern-identifier) CALL COINC(#sprite,#sprite,tolerance,numeric-variable[,...]) CALL COLOR(ALL,foreground,background[,...]) CALL DISTANCE(#sprite,#sprite,numeric-variable[,...]) CALL FILES(number) CALL GCHAR(row,column,numeric-variable[,...]) CALL HCHAR(row,column,character-code,repetition[,...]) CALL JOYST(key-unit,x-return,y-return[,...]) CALL KEY(key-unit,return-variable,status-variable[,...]) CALL KEY(string,key-unit,return-variable,status-variable[,...]) CALL MOTION(ALL,row-velocity,column-velocity[,...]) CALL NEW CALL SIZE CALL VCHAR(row,column,character-code,repetition[,...]) CALL VERSION(numeric-variable) CAT subprogram PAGE C2 ------------------------------------------------------------- Format CALL CAT("#"[,...]) CALL CAT("DSK#."[,...]) CALL CAT("DSK.DISKNAME."[,...]) CALL CAT(string-variable[,...]) CALL CAT(number[,...]) CALL CAT(numeric-variable[,...]) CALL CAT(ASC II value[,...]) Description The CAT command catalogs the disk drive indicated by the # which can be 1 to z or by path name. The path name may be up to 30 characters long. A numeric variable or number can be used for drives 1 to 9 or if higher then it is assummed that the numeric-variable or number is a ASCII value between 30 to 255. This allows a catalog of a RAM-DISK designated by letters or control characters. RXB CAT can be used from program mode or command mode. Also CAT can catalog up to 32 drives in one command. The SPACE BAR will pause the catalog routine, then when the pressed again continues the catalog listing. ANY OTHER KEY WILL ABORT THE CATALOG. Programs This line puts the pathname in| >100 A$="DSK.ADISKNAME" the string A$ | This line uses A$ for the name| >110 CALL CAT(A$) of the device to catalog. | | This line will catalog RAMDISK| >100 CALL CAT("A") designated DSKA. | | This line will catalog drive 4| >100 CALL CAT(N) if N=4 | | This line will catalog drive C| >100 CALL CAT(X) if X=67 (ASCII 67 is C) | | This line is path name. | >10 V$="WDS1.VOLUME.SUB-DIR." This line will catalog device | >20 CALL CAT(V$) WDS1 for directory VOLUME and| catalog SUB-DIR | | This line catalogs drives 1 | >100 CALL CAT(1,2,3,"WDS1.") then 2 then 3 then WDS1 | Options See DIR, FCOPY, MKDIR, PROTECT and RENAME for the same access. CHAR subprogram PAGE C3 ------------------------------------------------------------- Format CALL CHAR(character-code,pattern-identifier [,...]) CALL CHAR(ALL,pattern-identifier[,...]) Description See EXTENDED BASIC MANUAL page 56 for more data. The only difference is the addition of the ALL command allows all the characters from 32 to 127 to be redefined at once. Programs This line will define all the | >100 CALL CHAR(ALL,"") characters as a empty string.| | This line sets variable A$ up.| >100 A$="FF818181818181FF" | This line will define all the | >100 CALL CHAR(ALL,A$) characters as a box. | Options NONE. CHARSETALL subprogram PAGE C4 ------------------------------------------------------------- Format CALL CHARSETALL Description The CHARSETALL command is just like the CHARSET command, but it resets characters from 32 to 127 thus resetting characters 95 to 127 unlike CHARSET. Exactly like CHARSET it also resets colors to original mode. Programs This resets all characters and| >100 CALL CHARSETALL colors to original. | Set all characters the same. | >100 CALL CHAR(ALL,"4") Set all colors the same. | >110 CALL COLOR(ALL,14,10) Reset characters and colors. | >120 CALL CHARSETALL Go start over. | >130 GOTO 100 Options NONE. CLSALL subprogram PAGE C5 ------------------------------------------------------------- Format CALL CLSALL Description The CLSALL command will find and close all open files. This allows programmers to save time and program space. Programs The program to the right will | >100 CALL CLSALL CLOSE all open files. | | This opens the printer. | >100 OPEN #9:"PIO",OUTPUT This opens a disk file JUNK. | >110 OPEN #2:"DSK1.JUNK",INPUT This closes both files. | >120 CALL CLSALL Options NONE. COINC subprogram PAGE C6 ------------------------------------------------------------- Format CALL COINC(#sprite-number,#sprite-number, tolerance,numeric-variable[,...]) CALL COINC(#sprite-number,dot-row,dot-column, tolerance,numeric-variable[,...]) CALL COINC(ALL,numeric-variable[,...]) Description See EXTENDED BASIC MANUAL PAGE 64 for more data. The only difference is the use the comma has been added for auto-repeat. Programs * See EXTENDED BASIC MANUAL. The program to the right will | >100 CALL CLEAR :: X=190 will set up 3 sprites to be on| >110 CALL SPRITE(#1,65,2,9,X, the same vertical plane, and | 20,0,#2,66,2,9,X,30,0,#3,67, COINC will scan for which ones| 2,9,X,-20,0) collide. You will notice that | >120 CALL COINC(ALL,A,#1,#2,1 ALL has never been very good | 2,B,#1,#3,12,C,#2,#3,12,D) at detecting collisions. The | >130 PRINT A;B;C;D other 3 scans are much better.| >140 GOTO 120 Options While characters 144 to 159 are being used, you can not use sprites. Notice the ALL option must always be first as it was given highest priority to increase the detection rate. Though the ALL option does not improve much,the others do. COLOR subprogram PAGE C7 ------------------------------------------------------------- Format CALL COLOR(#sprite-number,foreground-color[,...]) CALL COLOR(character-set,foreground-color, background-color[,...]) CALL COLOR(ALL,foreground-color,background-color [,...]) Description See EXTENDED BASIC MANUAL page 66 for more data. Presently modifications to the COLOR subprogram is ALL that will change all character sets from 0 to 14 the same foreground and background colors. Also sets 0 to 16 can be changed. Programs This line sets all character | >100 CALL COLOR(ALL,2,11) sets to foreground 2 and the | background 11 | | Sets all to transparent, then | >100 CALL COLOR(ALL,1,2,ALL,2 all to black on transparent. | 1) Go start over. | >110 GOTO 100 Options While characters 144 to 159 are being used, you can not use sprites. COPY command PAGE C8 ------------------------------------------------------------- Format COPY start line-end line,new start line,increment Description The COPY command is used to copy a program line or block of program lines to any other location in the program. The COPY does not affect the original lines and leaves them intact. The block to be copied is defined by start line and end line. If either of these numbers are ommited, the defaults are the first program line and the last program line. However, at least one number and a dash must be entered (both can't be ommitted), and there must be at least one valid program line between start line and end line. To copy one line enter it as both the start line and end line number. If any of the above conditions are not met, a Bad Line Number Error will result. The new start line number defines the new line number of the first line in the block to be copied. This number must be entered. There is no default. The increment defines the line number spacing of the copied lines and may be ommited. The default is 10. There must be suffficient space in the program for the copied segment to fit between new start line number and the next program line following the location where the block will be moved. If not, a Bad Line Number Error message is reported. This problem can be corrected by using a smaller increment, or by using RES to open up space for the segment. A Bad Line Number Error also results if the copying process would result in a line number higher then 32767. The COPY routine does not change any program references to the copied lines. It is an exact copy of the source lines with new line numbers. A check for sufficient memory space is made before each line is copied. If space is not available the copying process is halted and a Memory Full Error is reported. Before the first line is copied, any open files are closed and all variables are lost. Description Addendum PLEASE NOTE: The COPY command copies the lines in reverse order. If the copying process is halted due to insufficent memory space, any uncopied lines will be at the beginning of the block. Commands Lines 100 to 150 are copied to| >COPY 100-150,9000,5 line 9000 and incremented by 5| | Line 10 is copied to line 25 | >COPY 10-10,25 | Line 5 to last line are copied| >COPY 5-,99 to 99 and incremented by 10 | (Defualt). | | Options NONE. CUTDIR subprogram PAGE C9 ------------------------------------------------------------- Format CALL CUTDIR(pathname,directory-name[,...]) CALL CUTDIR(string-varialbe,string-variable [,...]) Description The CUTDIR subprogram removes directorys and subdirectorys on hard drives. The pathname determines the device used and the pathname can be up to 255 chracters in length. The pathname must end with a period and the directory may only be 10 characters in length. Only a SCSI controller supports this command. CUTDIR will remove a directory and all its sub-directorys at once. BE CARFULL WITH THIS COMMAND! Programs This line removes a directory| >CALL CUTDIR("WDS1.","TEST") named TEST on hard drive 1. | | This line removes directory | >100 CALL CUTDIR("WDS1.","ONE ONE and all sub-directorys | ") that within it. | | This line would remove every | >100 CALL CUTDIR("WDS1.","WOW thing off WDS1 if WOW had | ") all main directorys in it. | Options This command requires a updated SCSI EPROM. DEL command PAGE D1 ------------------------------------------------------------- Format DEL start line-end line Description The DEL command is used to delete a line or block of lines from a program. Start line number and end line number define the lines to be deleted. If start line number is ommited, line deletion will begin at the first line of the program. In this case, end line number must be preceeded by a dash. If end line number is ommited, line deletion will end at the last line of the program. If start line number and end line number are ommited, then the first line number of the program to the last line number of the program is deleted. At least one valid program line must exist between start line number and end line number or a Bad Line Number Error will be reported. If only one line number is given without a dash, then that one line will be deleted. After the DEL command has executed any open files are closed and all variables are lost. Commands Lines 100 to 150 are deleted. | >DEL 100-150 | Line 10 is deleted. | >DEL 10 | Line 5 to last line are | >DEL 5- deleted. | | First line to 80 are deleted. | >DEL -80 | Options NONE. DIR subprogram PAGE D2 ------------------------------------------------------------- Format CALL DIR("#"[,...]) CALL DIR("DSK#."[,...]) CALL DIR("DSK.DISKNAME."[,...]) CALL DIR(string-variable[,...]) CALL DIR(number[,...]) CALL DIR(numeric-variable[,...]) CALL DIR(ASC II value[,...]) Description The DIR command catalogs the disk drive indicated by the # which can be 1 to z or by path name. The path name may be up to 30 characters long. A numeric variable or number can be used for drives 1 to 9 or if higher then it is assummed that the numeric-variable or number is a ASCII value between 30 to 255. This allows a catalog of a RAM-DISK designated by letters or control characters. RXB DIR can be used from program mode or command mode. Also DIR can catalog up to 32 drives in one command. The SPACE BAR will pause the catalog routine, then when the pressed again continues the catalog listing. ANY OTHER KEY WILL ABORT THE CATALOG. Programs This line puts the pathname in| >100 A$="DSK.ADISKNAME" the string A$ | This line uses A$ for the name| >110 CALL DIR(A$) of the device to catalog. | | This line will catalog RAMDISK| >100 CALL DIR("A") designated DSKA. | | This line will catalog drive 4| >100 CALL DIR(N) if N=4 | | This line will catalog drive C| >100 CALL DIR(X) if X=67 (ASCII 67 is C) | | This line is path name. | >10 V$="WDS1.VOLUME.SUB-DIR." This line will catalog device | >20 CALL DIR(V$) WDS1 for directory VOLUME and| catalog SUB-DIR | | This line catalogs drives 1 | >100 CALL DIR(1,2,3,"WDS1.") then 2 then 3 then WDS1 | Options See CAT, FCOPY, MKDIR, PROTECT and RENAME for the same access. DISTANCE subprogram PAGE D3 ------------------------------------------------------------- Format CALL DISTANCE(#sprite-number,#sprite-number, numeric-variable,[,...]) CALL DISTANCE(#sprite-number,dot-row, dot-column,numeric-variable[,...]) Description The only thing added by RXB to DISTANCE is the autorepeat. See EXTENDED BASIC MANUAL page 80 for more data. Program The program at the right will | >100 CALL CLEAR set up 3 sprites on screen and| >110 CALL SPRITE(#1,65,7,99,9 start them moving. | 9,0,10,#2,66,4,99,99,10,0,#3 | ,67,2,1,2,-50,-50) Scans three sprites locations | >120 CALL DISTANCE(#1,#2,D,#1 and returns the distance from| ,#3,E,#2,#3,F) each other squared. | >130 DISPLAY AT(1,1):"#1/#2"; | D:"#1/#3";E:"#2/#3";F Rstart loop | >140 GOTO 120 | Options While characters 144 to 159 are being used, you can not use sprites. The DISTANCE subprogram does get more accurate if you have more then one to check at a time. DUPCHAR subprogram PAGE D4 ------------------------------------------------------------- Format CALL DUPCHAR(character-code,character-code [,...]) Description The DUPCHAR subprogram allows you to duplicate character definitions. You can duplicate character-codes from 30 to 159 The first character-code specifies the character-code to be duplicated, and the second character-code specifies the destination character-code. Program The program at the right will | >100 CALL DUPCHAR(65,66) duplicate the character | definition of character-code | 65 into character definition | of character-code 66. | The program at the right will | >100 FOR C=32 TO 158 blank out all character-code | >110 PRINT CHR$(C); definitions from 33 to 159. | >120 CALL DUPCHAR(C,C+1) Line 110 is just to show what | >130 NEXT C the character was before the | DUPCHAR subprogram blanked it.| Options NONE. DUPCOLOR subprogram PAGE D5 ------------------------------------------------------------- Format CALL DUPCOLOR(character-set,character-set [,...]) CALL DUPCOLOR(#sprite-number,#sprite-number, [,...]) Description The DUPCOLOR subprogram duplicates foreground and background colors of the first set into the second set. Or the first sprite-number color into the second sprite-number color. The character-set numbers are given below: set-number character-codes ~~~~~~~~~~ ~~~~~~~~~~~~~~~ 0 --------------- 30 to 31 1 --------------- 32 to 39 2 --------------- 40 to 47 3 --------------- 48 to 55 4 --------------- 56 to 63 5 --------------- 64 to 71 6 --------------- 72 to 79 7 --------------- 80 to 87 8 --------------- 88 to 95 9 --------------- 96 to 103 10 --------------- 104 to 111 11 --------------- 112 to 119 12 --------------- 120 to 127 13 --------------- 128 to 135 14 --------------- 136 to 143 (also sprite table) 15 --------------- 144 to 151 (also sprite table) 16 --------------- 152 to 159 Programs The program to the right will | >100 CALL DUPCOLOR(6,9) will duplicate set 6 colors in| to set 9. | | Line 100 sets up two sprites | >100 CALL SPRITE(#1,65,2,99,9 on screen. | 9,#2,66,16,88,88) Line 110 duplicates the color | >110 CALL DUPCOLOR(#1,#2) from sprite-number 1 into | >120 GOTO 120 sprite-number 2. | Options NONE. EA Device Service Routine (DSR) PAGE E1 ------------------------------------------------------------- Format RUN "EA" DELETE "EA" CALL XBPGM("EA") CALL CAT("EA") OLD EA SAVE EA -(Must have a program within - memory to work at all) CALL LOAD("EA") -(CALL INIT must proceed it) Description The EA DSR (Device Service Routine) allows access to the Editor Assembler section of RXB. The access will work only if the DSR is the GPLDSR or LINK DSR. In other words, a DSR that acknowledges any type of DSR in RAM, ROM, GROM, GRAM, or VDP. Most DSR's only accept DSK or PIO. Others like the SAVE or LIST commands will only work with a program in the memory first. Still others like CALL LOAD("EA") must have the CALL INIT command used first. Keep in mind that if it does not work, the problem is the DSR your using. Almost all DSR's today only acknowledge the ROM or RAM DSR's. As the EA DSR is in GROM/GRAM it seems a bit short sighted on the part of most programmers to use cut down versions of a DSR. Please discourage this practice as it is a diservice to us all. Programs The program at the right will | >100 CALL XBPGM("EA") go to the Editor Assembler. | | This line asks for a string. | >100 INPUT A$ This line uses the string and | >110 DELETE A$ if you type EA then enter will| switch to the Editor Assembler| | This line will switch to the | >CALL CAT("EA") Editor Assembler. | | This line shows lower case can| >call ea be used. | | This line will have a strange | >CALL EAPGM("EA") looping effect. | Options BASIC and XB are also availiable. EALR subprogram PAGE E2 ------------------------------------------------------------- Format CALL EALR("access-name") Description The EALR subprogram is used to switch to the Editor Assembler Load and Run menu screen prompt. EALR will only load and run Editor Assembler DISPLAY FIXED OBJECT FILES created by the Editor Assembler for the Editor Assembler environment, not the EXTENDED BASIC DISPLAY FIXED OBJECT FILES. They've never been compatible, hence one of RXB's reasons for existing. The access-name is moved into the Editor Assembler and the name is loaded onto the screen so you can see it. This gives you a chance to change the disk if needed, or to see what is wrong if it does not load. After the DISPLAY FIXED OBJECT FILE is loaded, you will receive the normal `Program Name?' prompt. This name would be the same as the link name from Editor Assembler BASIC. You can ABORT the loader by holding the FCTN BACK (9) key while the name is being placed onto the screen. If an error occurs the code will be returned onto screen and you must press ENTER to restart the loader. Description Addendum EALR only works from EXTENDED BASIC, not BASIC. Programs The program at the right will | >100 CALL EALR("DSK3.SAVE") load a Display/Fixed 80 file | named SAVE from disk drive 3. | | This program loads a Display/ | >100 CALL EALR("DSK.DNAME.FNA Fixed Object file named FNAME | ME") after searching all disk | drives and RAMDISKs for the | disk named DNAME. | | Options None. EAPGM subprogram PAGE E3 ------------------------------------------------------------- Format CALL EAPGM("access-name") Description The EAPGM subprogram is used to switch to the Editor Assembler `Run Program file?'screen prompt. It will not run EXTENDED programs or BASIC programs for that see XBPGM. The access-name is moved into the Editor Assembler and the name is loaded onto screen so you can see it. This gives you a chance to change the disk if needed, or to see what is wrong if it does not load. After the Program Image file is loaded, it executes the program normally. You can ABORT the loader by holding down the FCTN BACK (9) key while the name is being placed onto the screen. If an error occurs the error code will be returned onto the screen and you must press ENTER to restart the loader. If a empty string is used then the search routine is evoked and a search for UTIL1 is executed. Drives 1 to 9 will then be searched for UTIL1 file. Description Addendum EAPGM only works from EXTENDED BASIC, not BASIC. Programs The program at the right will | >100 CALL EAPGM("DSK2.FW") load a Program Image file | named FW from disk drive 2. | | This program loads a Program | >100 CALL EAPGM("DSK.FW.MG") Image file named MG after | searching all disk drives and | and RAMDISKS for a disk named | FW. | | This program causes a search | >100 T$="" for UTIL1 to be started. | >110 CALL EAPGM(T$) | Options NONE. EXECUTE subprogram PAGE E4 ------------------------------------------------------------- Format CALL EXECUTE(cpu-address[,...]) CALL EXECUTE(numeric-variable[,...]) Description The EXECUTE subprogram directly goes to the cpu-address and expects to find 4 bytes to be present. The bytes are 1 and 2 define the workspace register address. Bytes 3 and 4 define the address to start execution at in cpu memory. Programmers can see this is a BLWP at a cpu-address. The programmer is responsible for keeping track of the workspace and program space he is using. Also for any registers while doing a BL or another context switch. A RTWP will end either a BL or a BLWP as long as registers set are not changed. By using CALL LOAD or CALL MOVE or CALL MOVES the programmer can set up a BLWP routine in the lower 8K by filling the registers with values first, then using CALL EXECUTE to directly complete these commands. This is faster then CALL LINK as no interpetation of the access or values are checked. EXECUTE runs a XML link from GPL by moving 12 bytes from the Fast RAM at HEX 8300 to VDP at HEX 03C0 then moving the value in FAC passed from XB to HEX 8304 and does a GPL XML >F0 After a RTWP by the Assembly program, it returns VDP HEX 03C0 to Fast RAM HEX 8300 so the 12 bytes are restored. Thus this allows programmers use of FAC and ARG areas in Fast RAM. Here is the program loaded into Fast RAM by EXECUTE: AORG >8300 CPUPGM DATA >8302 First address. BLWP @>834A Switch context with FAC as dummy. CLR @>837C Clear for GPL return. RT Return to GPL. END If a programmer absolutly must use Fast RAM for his program I suggest he set up a buffer for saving HEX 8300 to HEX 83FF if only so it will not mess up any GPL pointers and don't go and mess up the 12 bytes at VDP HEX 03C0. Then the only thing to worry about is messing up something else. EXECUTE PAGE E5 ------------------------------------------------------------- Programs Line 100 initilizes lower 8k | >100 CALL INIT Line 110 loads the assembly | >110 CALL LOAD(9838,47,0,38,1 program shown below. VMBR | 14,4,32,32,44,3,128) Line 120 loads registars with | >120 CALL LOAD(12032,0,0,48,0 VDP address, Buffer, Length. | ,2,255) Line 130 runs line 110 program| >130 CALL EXECUTE(9838) Line 140 loads the assembly | >140 CALL LOAD(9838,47,0,38,1 program shown below. VMBW | 14,4,32,32,36,3,128) Line 150 loads registars with | >150 CALL LOAD(12032,0,0,48,0 VDP address, Buffer, Length. | ,2,255) Line 160 runs line 140 program| >160 CALL EXECUTE(9838) Line 170 put a command in here| >170 CALL CLEAR Line 180 loops to line 160 | >180 GOTO 160 HEX ADDRESS|HEX VALUE|ASSEMBLY COMMAND EQUIVILENT >266E >2F00 DATA >2F00 (workspace area address) >2670 >2672 DATA >2672 (start execution address) >2672 >0420 BLWP (first executed command) >2674 >202C @VMBR (or >2024 VMBW) >2676 >0380 RTWP ------------------------------------------------------------- >2F00 >0000 REGISTER 0 (VDP address) >2F02 >3000 REGISTER 1 (RAM buffer address) >2F04 >02FF REGISTER 2 (length of text) Options. Dependent on Programmers use. FCOPY subprogram PAGE F1 ------------------------------------------------------------- Format CALL FCOPY(master-pathname,filename, copy-pathname,filename[,...]) CALL FCOPY(string-variable,string-variable, string-variable,string-variable[,...]) CALL FCOPY(number,filename,number,filename [,...]) Description The FCOPY subprogram copies files from drive to drive. The pathname determines the device used and the pathname can be up to 255 characters in length. The Myarc HFDC can only support 29 character pathnames plus the filename of 10, so that would add up to 39 characters total. The pathname must end with a period and the filename may only be 10 characters in length. FCOPY can copy up to 12 files from 12 drives to 12 drives and 12 different filenames all in one command. NOTE: FCOPY does have a cost for existing in the TI, and the price is 4K of VDP must be available for use. A *STACK OVERFLOW* or *MEMORY FULL* error will result if not enough VDP memory is available. Using FCOPY leaves 8K available for programs. USE RUN TO RESET MEMORY FOR FEWER CRASHES! Programs This line will copy the file | >CALL FCOPY(1,"TESTER",2," TESTER from drive 1 to drive | TESTED") 2 and rename the file TESTED. | | This line will copy the file | >CALL FCOPY("DSK.FWB.","FW"," FW from the disk named FWB to | DSK.FWB.","UTIL1") the same disk and name a copy | file UTIL1. (Neat trick HUH!) | | This next program will copy any directory to any directory. Or any disk to any disk, all the files on the disk. | Name of program. | >100 ! COPY DIR TO DIR Clear the screen. | >110 CALL CLEAR Get master path of device. | >120 INPUT "MASTER PATH:":M$ Get copy path of device. | >130 INPUT "COPY PATH:":C$ Open a Catalog of device. | >140 OPEN #1:M$,INTERNAL,INPU | >T,FIXED 38 Get a filename. | >150 INPUT #1:A$,B,C,D If first name, ignore diskname| >160 X=X+1 :: IF X=1 THEN 150 If filename empty end program,| >170 IF LEN(A$)=0 THEN CALL close files and restart. | >CLSALL :: RUN Count files and show pathname.| >180 PRINT X-1: :C$&A$ Copy files. | >190 CALL FCOPY(M$,A$,C$,A$) Continue endlessly. | >200 GOTO 150 Options See CAT or DIR for number or ASCII access to disk options. FILES subprogram PAGE F2 ------------------------------------------------------------- Format CALL FILES(number) CALL FILES(numeric-variable) Description The FILES subprogram differs from the Disk Controller FILES on the CorComp, TI, Myarc or Parcom versions. All of these require a NEW after CALL FILES. NEW is executed after the FILES subprogram in RXB, so there is no need to use NEW. Also RXB FILES accepts values from 1 to 15 unlike the other FILES routines that can only accept 1 to 9. Each open file reduces VDP by 534 bytes, plus each file opened will use 518 bytes more. Programs FILES opens ussual buffers. | >CALL FILES(3) | FILES ends the program and | >100 CALL FILES(1) executes NEW. | Options See XBPGM for even more powerful aplications made easy. GCHAR subprogram PAGE G1 ------------------------------------------------------------- Format CALL GCHAR(row,column,numeric-variable[,...]) Description See EXTENDED BASIC MANUAL page 88 for more data. The only change to GCHAR is the auto-repeat function. Programs This line stores the character| >100 CALL GCHAR(4,5,A,4,6,B) at row 4 column 5 in A, then | stores character at row 4 | column 6 in B. | Gets row 9 column 3 in Q and | >100 CALL GCHAR(9,3,Q,9,4,R) row 9 column 4 in R. | Put R at row 9 column 3 and | >110 CALL HCHAR(9,3,R,1,9,4,Q Q at row 9 column 4 | ,1) Continue loop. | >120 GOTO 100 Options NONE. GMOTION subprogram PAGE G2 ------------------------------------------------------------- Format CALL GMOTION(#sprite-number,row-velocity, column-velocity[,...]) Description The GMOTION subprogram returns the row-velocity and column-velocity as numbers from -128 to 127. If the sprite is not defined, row-velocity and column-velocity is set to zero. The sprite continues to move after its motion is returned, so this must be allowed for. See EXTENDED BASIC MANUAL MOTION subprogram for more data. Program GMOTION returns the row- | >100 CALL GMOTION(#1,X,Y) velocity into X and the | column-velocity into Y. | | Options While characters 144 to 159 are being used, you can not use sprites. HCHAR subprogram PAGE H1 ------------------------------------------------------------- Format CALL HCHAR(row,column,character-code) CALL HCHAR(row,column,character-code, repetition[,...]) Description See EXTENDED BASIC MANUAL page 92 for more data. The only change to HCHAR is the auto-repeat function. Notice the new auto-repeat must have the repetitions used or it gets row confused with repetitions. Programs This line puts character 38 at| >100 CALL HCHAR(1,1,38,99,9,1 row 1 column 1 99 times, then| ,87) puts character code 87 at | row 9 column 1 | | Fills screen with characters. | >100 CALL HCHAR(1,1,32,768,1, | 1,65,768,1,1,97,768,1,1,30,7 | 68) :: GOTO 100 Options NONE. HEX subprogram PAGE H2 ------------------------------------------------------------- Format CALL HEX(string-variable,numeric-variable[,... ]) CALL HEX(numeric-variable,string-variable[,... ]) Description The HEX subprogram converts Decimal to Hexidecimal or from Hexidecimal to Decimal. If a number or numeric-variable is first, HEX will convert the Decimal floating point value (Rounded off) to a four character sting and puts the string into the string-variable. If a string or string-varialbe is first, HEX will convert the String into a Decimal integer and put it into the numeric-variable. A numeric-variable or number ranges from -32768 to 32767 or the Hexidecimal equivelent of >8000 to >7FFF. The > is not used in HEX. When a string or string-variable is null (length of zero) the numeric-variable will contain 0. The opposite is if a number or numeric-variable is 0 then the string-variable will contain a length of four and a value of >0000. Any time a string-variable is second it will be cleared before being assigned a new string value. All strings in HEX must be right justified or are returned as right justified, thus each string will be padded with zeros. HEX will only use the first four characters of a string to convert the value, it will ignore the rest of the string. Errors will result if a string contains characters other then 0-9 and A-F or a-f. Errors will result if a number is less then -32768 or larger then 32767. HEX PAGE H3 ------------------------------------------------------------- Programs From command mode. | Upper case | >CALL HEX("F",V) or lower case | >CALL HEX("f",V) will both return same result. | >PRINT V V=16 | | Line 100 sets address counter.| >100 FOR D=-32768 TO 32767 Line 110 converts it to HEX. | >110 CALL HEX(D,H$) Line 120 shows DEC to HEX. | >120 PRINT D,H$ Line 130 continues loop count.| >130 NEXT D | Line 100 asks for HEX number. | >100 INPUT "HEX=":H$ Line 110 converts HEX to DEC. | >110 CALL HEX(H$,D) Line 120 shows DEC equivilent.| >120 PRINT D: : Line 130 starts program over. | >130 GOTO 100 | Line 100 list of numbers. | >100 DATA 200,124,97,249,140, It takes 8 bytes to store any | 77,81,173,254,78,93,12,38,65 number in XB. | ,55,6,0 Line 110 read list into N. | >110 READ N Line 120 convert to HEX. | >120 CALL HEX(N,N$) Line 130 Save into a string as| >130 S$=S$&N$ it takes 4 bytes per number. | Line 140 check for end of list| >140 IF N<>0 THEN 110 Line 150 show number of bytes | >150 PRINT LEN(S$)+1 used to store numbers. | Line 160 show number of bytes | it would have used. | >160 PRINT 8*16 Options NONE. HGET subprogram PAGE H4 ------------------------------------------------------------- Format CALL HGET(row,column,length,string-variable [,...]) Description The HGET subprogram returns into a string-variable from the screen at row and column. Length determines how many characters to put into the string-variable. Row numbers from 1 to 24 and column numbers from 1 to 32. Length may number from 1 to 255. If HGET comes to the edge of the screen then it wraps to the other side. Programs The program to the right will | >100 CALL HGET(5,9,11,E$) put into string-variable E$ | the 11 characters at row 5 and| column 9. | | >100 CALL HGET(1,3,5,M$,9,3,1 The program to the right will | ,Q$,24,1,32,N$) put into string-variable M$ | the 5 characters at row 1 and | column 3, then put into | string-variable Q$ the 1 | character at row 9 and column | 3, then put into | string-varialbe N$ the 32 | characters at row 24 and | column 1. Options NONE. HONK subprogram PAGE H5 ------------------------------------------------------------- Format CALL HONK Description The HONK command produces the same sound as the ACCEPT or in INPUT or if a error occurs. Programs The program to the right will | >100 CALL HONK will produce a honk sound. | | Options NONE. HPUT subprogram PAGE H6 ------------------------------------------------------------- Format CALL HPUT(row,column,string[,...]) CALL HPUT(row,column,string-variable[,...]) CALL HPUT(row,column,number[,...]) CALL HPUT(row,column,numeric-variable[,...]) Description The HPUT subprogram puts a string, string-variable, number, or numeric-variable onto the screen at row and column. The The row numbers from 1 to 24 and column numbers for 1 to 32. If the string, string-variable, number, or numeric-variable being put onto screen goes to an edge it wraps to the other side. Unlike the EXTENDED BASIC DISPLAY AT the HPUT subprogram will not scroll the screen. Programs Line 100 puts string "THIS" on| >100 CALL HPUT(10,4,"THIS") the screen at row 10 and | column 4. | | Line 110 sets string-variabe | >110 A$="HPUT" A$ equal to string "HPUT" | | Line 120 puts string "is" at | >120 CALL HPUT(12,5,"is",14,4 row 12 and column 5, then puts| ,A$) string-variable A$ at row 14 | and column 4. | | Line 100 puts number 97 at row| >100 CALL HPUT(16,5,97) 16 and column 5. | Options NONE. INIT subprogram PAGE I1 ------------------------------------------------------------- Format CALL INIT Description The INIT command is the same as the EXTENDED BASIC MANUAL page 101. Originally INIT loaded more data then actually existed, this has been fixed. The other correction is that you no longer have to use INIT before LINK, or LOAD. They will function if INIT has been called first or not. Programs The program to the right will | >100 CALL INIT initialize the lower 8K by | loading support routines for | assembly. | | Options NONE. INVERSE subprogram PAGE I2 ------------------------------------------------------------- Format CALL INVERSE(character-code[,...]) CALL INVERSE(ALL[,...]) Description The INVERSE subprogram finds the character definition of the character-code and inverts all the bytes in the character definition. That means it just reverses the foreground and background. The ALL feature inverts characters 30 to 143 thus not affecting characters 144 to 159 as this would destory sprites. Programs The program to the right will | >100 CALL INVERSE(65) INVERSE all character-code (A)| in the character definition | table in memory. | | The program to the right will | >100 CALL INVERSE(ALL) INVERSE all character-codes | from 30 to 143. | | Line 100 will ask for a string| >100 INPUT A$ of characters terminated by | the ENTER key. | Line 110 is a loop to counter.| >110 FOR L=1 TO LEN(A$) Line 120 singles each one of | >120 C=ASC(SEG$(A$,L,1)) the characters in A$. | Line 130 INVERSEs each one. | >130 CALL INVERSE(C) Line 140 completes the loop. | >140 NEXT L Line 150 restarts the program.| >150 GOTO 100 (Be sure and not enter any blank characters in this program) Options NONE.