? _____________________________________________________________________________ TI FORTH -------- This article is intended for all TI FORTH users who have (or plan on having) double density and/or double sided disk capabilities. While the techniques described should work with any disk controller capable of double density, the author's CorComp 9900 Disk Controller card is the only one that has been tested. The purpose of this article is to illustrate both how to access the additional screen capacity and how to modify the FORTH words and disc to be compatable with the new format and Disk Manager. Throughout this article lowercase letters used in a FORTH definition will indicate a variable value to be entered. The following terms will be used to refer to the various formats a FORTH disc may have. 90 SCRN or SSSD - the original 90 screen single sided single density format. 180 SCRN - either a SSDD or DSSD disk when comment applies to both. 360 SCRN or DSDD - a double sided double density disk. SSDD - a single sided double density disk. DSSD - a double sided single density disk. The first step is to use Disk Manager to format (initialize) a 180 or 360 SCRN disk. Next, you must copy FORTH from the 90 SCRN disk to the new 180 or 360 SCRN disk. The disk copy feature of CorComp's Disk Manager will d this properly for you. If you have two drives, the FORTH-COPY word in the -COPY screens will also do it properly (do 0 DISK_LO ! first). However, if you are using TI's Disk Manager II, after copying the three files you must use FORTH to copy screens 1 to 9 because Disk Manager II puts them in the wrong place! To do this, enter the following for each of the nine screens. n BLOCK UPDATE (where n is the screen number to be read from old disk) FLUSH (after inserting the new disk - note: up to five screens may be entered at a time) Now edit screen 3 of your new disk and add the following commands: x DISK_SIZE ! (where x=180 or 360 as appropriate) y DISK_HI ! (where y=x times 1, 2 ,3 or 4 depending on the number of drives you have) Unfortunately, TI FORTH does not provide a method for configuring each drive individually. Therefore, the user must be cognizant of which screens are available on each drive when there are differences between them. At this point, FORTH can be booted and it will recognize the full capacity of your 180 or 360 SCRN disk. You can create, edit, list, and load from screens greater than 89. However, neither Disk Manager nor FORTH-COPY will recognize this disk as having more than 90 screens. To fix this problem you must modify the -COPY screens (39 and 40), the disk header (sector 0) and, the SYS-SCRNS file header (sector 4). First edit screen 39. Change the value 90, which appears once in DTEST and twice in FORTH-COPY to 180 or 360 as appropriate. Next, edit screen 40 as follows: Line 3 - change 168 to 2D0 for 180 SCRN or 5A0 for 360 SCRN. Line 4 - change 944 to 1244 for SSDD or DSDD (no change for DSSD). Line 5 - replace entire line with: DUP 10 + 2028 SWAP ! DUP 12 + a SWAP ! DUP 14 + 24 0 FILL where a = 0201 for DSSD, 0102 for SSDD, or 0202 for DSDD. Line 10 - change 165 to 2CD for 180 SCRN, or 59D for 360 SCRN. Line 13 - change 4016 to C02C for 180 SCRN, or C059 for 360 SCRN. Next edit screen 33 to modify the FORMAT-DISK word to: : FORMAT-DISK 1 + a 33616 ! 18 SYSTEM ; where a = 258 for DSSD, 513 for SSDD, 514 for DSDD. Finally, you need to create a word that will modify the header sectors on your new disk. This word only needs to be executed once since copies of this disk, once it's modified, will not require modification. Here is the way to do it: HEX 0 DISK_LO ! ( removes disk fence) : DD-FORTH 0 BLOCK UPDATE ( read screen 0 and mark as updated) DUP A + a SWAP ! ( a = 2D0 for 180 SCRN, 5A0 for 360 SCRN) DUP C + b SWAP ! ( b = 944 for DSSD, 1244 for SSDD or DSDD) DUP 10 + c SWAP ! ( c = 2028 for all versions) DUP 12 + d SWAP ! ( d = 201 on DSSD, 102 on SSDD, 202 on DSDD) 38 + C8 FF FILL ( flag all sectors as in use) 1 BLOCK UPDATE ( read screen 1 and mark as updated) DUP E + f SWAP ! ( f = 2A0 for 180 SCRN, 570 for 360 SCRN) DUP 1C + g SWAP ! ( g = 4D20 for 180 or 360 SCRN versions) DUP 1E + h SWAP ! ( h = 2805 for 180 SCRN, 5205 for 360 SCRN) 20 + i SWAP ! ( i = F029 for 180 SCRN, F059 for 360 SCRN) FLUSH ; ( write modified screens to disk) DECIMAL DD-FORTH Now your new high capacity copy of FORTH is fully compatable with Disk Manager, the FORTH format, copy, test, and header words and your double density and/or double sided drives and controller. Enjoy! ***************************************************************************** Special thanks to Jim Vincent who is the FORTH columist for the 99'ers Users Group Association. U)3=GUUUUUUUU Download complete. Turn off Capture File.