TRSCROSS (TM) For the IBM Personal Computer and compatibles A program which reads and writes specific TRS-80 double-density diskettes Cat No. P86-212 Powersoft Products from MISOSYS, Inc. P.O. Box 239 Sterling, VA 22170 703-450-4181 TRSCROSS(tm) program manual copyright 1986, 1987, 1990, Misosys Inc. TRSCROSS(tm) computer program copyright 1986, 1987, 1990, Misosys Inc. First Edition (June 1986) Third Edition (March 1987) Fourth Edition (June 1990) All Rights Reserved. No part of this software package, diskette or documentation, may be reproduced in whole or in part, either manually or automatically, by any means, including but not limited to the use of electronic, electromagnetic, xerographic, optical, network or BBS information and retrieval systems, without the express written consent of MISOSYS Inc. Unauthorized reproduction and/or adaptation is a violation of United States Copyright laws and may subject the violator to civil penalties or criminal prosecution. Use of this software is limited to the original purchaser ONLY. Program License Agreement: This package is sold for use by the original purchaser on his/her machine only. If being purchased by a company, school or other entity with multiple machines, multiple users, or networked systems, single copy purchases for multiple use are not allowed or supported. Please write inquiring about our reasonable multiple-use and/or site-licenses for TRSCROSS or purchase extra copies from your dealer. The program may be copied, but for the purpose of archival copies only for the original purchaser's computer. Determination of suitability for any purpose whatsoever is the sole responsibility of the end-user. No warranties, expressed or implied, are given with regard to the suitability of this product for a particular purpose or application. This software is made available on an as-is basis, and MISOSYS, Inc. shall not be liable for any actual or consequential damages, whether real or alleged, arising from the use of this software. CONTENTS Contents...................................................3 Introduction...............................................5 Registration and Technical Support.........................6 Hardware...................................................7 Installation and Operation.................................8 Starting TRSCROSS..........................................8 Main Menu.................................................12 Copy from TRS-80 Diskette.................................13 Copy to TRS-80 Diskette...................................18 Format TRS-80 Diskette....................................20 Purge TRS-80 Diskette.....................................21 Display Directory.........................................22 Appendix A: Messages......................................23 Appendix B: Disk Formats..................................24 Appendix C: Common Questions..............................26 Appendix D: BASIC Conversion..............................33 INDEX.....................................................42 Acknowledgements: Z80 is a trademark of Zilog, Inc. 1-2-3 and LOTUS are trademarks of Lotus Development Corp. CP/M is a trademark of Digital Research, Inc. IBM and TopView are trademarks of International Business Machines Corp. LDOS and LSDOS are trademarks of MISOSYS, Inc. MS and GW are trademarks of Microsoft Corp. PFS is a trademark of Software Publishing Corp. MS and GW are trademarks of Microsoft Corp. Deskmate, PROFILE, SCRIPSIT, SuperSCRIPSIT, TRSDOS and TRS-80 are trademarks of Tandy Corp. TRSCROSS, and SUPER UTILITY are trademarks of MISOSYS, Inc. Introduction Thank you for purchasing TRSCROSS (pronounced TRISS-CROSS). This program attempts to answer the needs of many computer users, by allowing access to TRS-80 diskettes on a PC or compatible computer. The most commonly used formats can be read from, written to, and formatted (there are a few diskettes described in Appendix B which cannot be completely accessed.) TRSCROSS is menu-oriented and very easy to operate. We hope TRSCROSS is everything you want it to be, and that it will help ease your transition to a PC or keep your TRS-80 computer usable, whichever the case may be. Let us hear from you. Although we will attempt to fully describe the operation of TRSCROSS in the following pages, please be aware that most of the program's operation should be self-explanatory. In other words, those familiar with the operation of the computer and a few programs should not have much difficulty in just placing the TRSCROSS disk in drive A:, typing A:TRSCROSS , and using the program. You may also copy TRSCROSS to your hard drive and run it from drive C:. We do normally suggest reading or scanning the manual, and require that you do so if you have any questions. Questions concerning the use of this program should be covered here, and perhaps in Appendix C as well. All of us have worked very hard for many many months to bring you the very finest file transfer product for TRS-80 type diskettes available today. We have a history of catering to the TRS-80 community with many quality products, and with TRSCROSS we went all the way! We did not stop at just transferring raw ASCII data. As you use TRSCROSS, you will see that we incorporated features to cover just about any situation you might run into concerning transferring between the machines, and made it as easy as possible for you to use. We have built in many friendly features that you will really appreciate the more you use the program. This disk is not protected in any manner (other than an embedded serial number). Please do not allow others to copy, trade for, or borrow it. We have priced the program very reasonably so that TRSCROSS should be quite affordable to anyone who needs it. It is an excellent value. Each legitimate purchase allows us a small profit (after advertising, overhead, and dealer discounts) so that we can continue to be here to support you and bring you other products in the future. We appreciate your support. Registration and Technical Support Before you forget, please take a moment to fill out the enclosed registration card completely and mail it within 30 days of purchase to the address on the card. This establishes you as a customer of this product and will entitle you to receive limited technical support. Registered owners will be placed in the Preferred Customer database and will be informed of major upgrades, enhancements, and new releases of this program, as well as specials on other products that we will periodically mail out. Owners who do not register their copy will not be entitled to send their disks back for upgrade or receive technical support of any kind. Use the program today, and mail the card in tomorrow! OK? The program, to the best of our knowledge, contains no major bugs. if you do encounter a problem, please re-read the pertinent section of the manual first, and determine whether or not the problem is real. See if it occurs on another computer, or with another diskette. If you are unable to overcome the problem, please verify the exact circumstances under which it occurs, and send a complete description to MISOSYS Technical Support (address in front of manual). Describe the problem as thoroughly as possible ("It doesn't work" is not very descriptive). Always include a complete description of your hardware configuration. Also include your program Serial Number. We will do our best to assist all registered owners and answer queries in a timely manner. Your diskette contains a verified copy of the program. If it does not work when first used, consult your dealer. The first thing you should do with your TRSCROSS master diskette is either copy the program to another disk, or back it up. You should not use your master diskette for day-to-day operations. Hardware To use this program you must have an IBM PC or compatible with at least 128KB (kilobytes) of memory, but more is certainly better. TRSCROSS uses about 80 kilobytes of memory (or more if SuperSCRIPSIT files are being converted). TRSCROSS requires PC/MS-DOS 2.0 or higher (versions through 3.31 have been checked and are okay). (Copyist's note: it also runs just fine on MS-DOS version 6.2). For complete support, at least one 48 TPI (tracks per inch) drive is required - this is the normal 40 track, 360KB 5.25" diskette drive for the PC. Fixed disks, RAM disks, or additional diskette drives make transferring easier and are supported. We do not recommend copying to, formatting, or purging TRS-80 diskettes in "AT" type high capacity drives, since the resulting diskette cannot always be accessed in other drives; however, TRSCROSS is designed to support both 40 and 80 track TRS-80 diskettes in a high density drive. (Copyist's note: I have repeatedly copied to TRS-80 diskettes using my computer's "AT" style high density disk drive and have never experienced a problem using those disks in my Model 4P. It probably is a good idea, though, to immediately copy such a file onto another TRS-80 disk by using your model 4's own disk drives.) Since this program must access diskettes which would otherwise be totally unreadable on a PC, we access the diskette controller directly. For this reason, fairly complete PC hardware compatibility is required. For example, the Tandy 2000 is not supported at the time of this writing. TANDY 1000 Users - you must have DMA (Direct Memory Access). The 1000 EX does not normally have DMA. For the original 1000 and 1000 SX, if you have more than 128KB of memory, you have DMA. Also, if you are using TANDY'S MS-DOS 2.11, you must have DEVICE=ANSI.SYS installed in your CONFIG.SYS for the program to operate properly (your Disk Operating System manual should tell how to use CONFIG.SYS, but it is also discussed in Appendix C of this manual). This is optional if you are using PC-DOS 2.0 or higher - or Tandy's MS-DOS 3.10 or higher. Note: Some fast 286 and 386 computers may have to be switched to a lower speed in order to be able to properly access a TRS-80 floppy diskette. Installation and Operation In addition to the program TRSCROSS.EXE, two other files present on the distribution diskettes are TRSCROSS.PIF and README.DOC (these files are not necessary for normal operation). The PIF (Program Information File) is for use with systems like TopView from IBM Corp. and Windows from Microsoft Corp. The other file will contain any necessary updated information, and can be displayed by the DOS command: TYPE README.DOC How to answer TRSCROSS when it asks you something: TRSCROSS is written in C and assembly language, but we utilize an INKEY function very similar to that used in BASIC. what this means in layman terms is that you don't always have to press the key! This makes things quicker and easier for you. Here are a few tips on how to understand what TRSCROSS is asking of you. One key responses are accepted and executed automatically. When the program is waiting for a single key response, like a menu option, a drive letter or number, Mode letter, or a function key - type the one key response - but don't press . The key must be pressed, however, whenever the response required from you is MORE than one key in length. Examples would be path and wildcard mask prompts. If the computer seems to be waiting for no reason, press . Starting TRSCROSS To start the program type TRSCROSS and press (optionally preceded by a drive specifier and path name, as with any program). The Main Menu should then appear. TRSCROSS uses PC type drive specifiers when addressing PC/MS- DOS media (A, B, C, etc.) and uses TRS-80 type drive numbers when addressing TRS-80 diskettes (0, 1, 2). This instructs TRSCROSS as to what type of media it will be reading. (Drive A: = 0, B: = 1, etc.) Your PC/MS-DOS default drive should not be the same as the drive used for accessing the TRS-80 diskette. In other words, if you are going to start TRSCROSS from the "A>" prompt, do not use the built-in default drive number (0) for the TRS-80 diskette. Use "1" instead for the TRS-80 diskette, or start TRSCROSS from drive "B>" or "C>". (This is suggested, as you can then use TRSCROSS defaults) TRSCROSS can be optionally started with one or more of many switches available. It is not really necessary to use these switches. The program can be used simply by typing TRSCROSS and answering various prompts for most cases. We provide the switches to extend the usefulness of the program to those that desire to use them. Switches are usually specified by adding a space and / or - (a slash or a dash) followed by the specific switch. Multiple switches should be separated by at least one space. Examples will follow. Forcing startup color - The program normally displays in either white-on-black or white-on-blue, depending on your current MODE (MODE BW-80/MONO or MODE CO80 in DOS). To force another color, you can start the program with TRSCROSS /Cxy, where x is the background color and y is the foreground color. Choices range from 0 - 7, where 0=black, 1=blue, 2=green, 3=cyan, 4=red, 5=magenta, 6=yellow, 7=white. Logging activity - If you desire a log of the program's activity, you can start the program by typing TRSCROSS /Dfilename , where filename is either a desired file for the log or a device such as PRN, specifying the printer. The log will show which files were copied and the mode used, along with any files purged. This might be useful when transferring many files. The log file can be quite useful during BASIC conversion because it shows conversion warnings. Examples: TRSCROSS /DXFERLOG sends log to a file named XFERLOG TRSCROSS /DPRN sends log to printer for immediate hard copy Invisible and System files - Starting the program with TRSCROSS /I specifies that you desire to include INVISIBLE files from the disk. Similarly, starting the program with TRSCROSS /S specifies that you desire to include SYSTEM files. An example of multiple switches would be TRSCROSS /I /S . Note that many invisible and system files are not normally usable on a PC. Adding carriage returns - Starting the program with TRSCROSS /L specifies that you desire the LINES mode when copying a file as ASCII or SUPERS. This will be explained in detail later. Forcing NEWDOS/80 recognition - Starting the program with TRSCROSS /N will reset the internal parameters to allow access to NEWDOS/80 diskettes (single or double sided). Revisable Form Text (DCA) from SuperSCRIPSIT documents - Starting the program with TRSCROSS /RF specifies that you desire SUPERS files to be written in Revisable Form Text (DCA) format, rather than ASCII. If your PC word processor supports this format, documents can be converted with formatting information intact. This includes underscore, boldface, super- and sub-script, strike-through, new page, and hyphenation information. Running from the DOS prompt - The last three switches allow you to run most of the program (with the default responses) from the command line. You should fully understand the associated function of TRSCROSS before using these three switches. These switches might be useful to the experienced user who does not prefer to deal with menus or desires complete operation from BAT files. Specifically; TRSCROSS /1 copies TRS-80 files from drive 0 to the default drive and current directory. TRSCROSS /2*.* copies files from the default drive and current directory to the TRS-80 diskette in drive 0. The "*.*" is the wildcard mask as explained in the related section of the manual. TRSCROSS /3x formats the TRS-80 diskette in drive 0, where x specifies the format desired. 0 = TRSDOS 1.3 1 = other type single sided 2 = other type double sided For example, TRSCROSS /31 formats a single sided diskette from the DOS prompt. Finally, an invalid parameter such as TRSCROSS ? will display a summary of available switches, in case you forget. Starting TRSCROSS with a .BAT file - One possibility for starting TRSCROSS easily with commonly used switches is to create a .BAT file with the starting command. For example, to start TRSCROSS with b/w color, you could type: COPY CON TRS.BAT TRSCROSS /CO7 %1 You would then simply type TRS to start the program. Note that the %1 in the previous example allows for a user- specified switch to be added, as in TRS/DPRN. Your .BAT file could be as simple as: COPY CON TRS.BAT TRSCROSS /N Typing TRS using the above example loads TRSCROSS with NEWDOS/80 parameters. The mentioned in both examples above means press the F6 key. It inserts the end-of-file marker in the file. It is very similar to hitting the key with a TRS-80 DOS to finish the BUILD command. If you are not familiar with .BAT files, please see your DOS manual for further instructions on this very powerful feature of DOS. Main Menu TRSCROSS is normally operated from the main menu, as shown below. TRSCROSS - 2.01 c. 1986, 1987 MISOSYS, Inc. All Rights Reserved 1 - Copy from TRS-80(tm) diskette 2 - Copy to TRS-80(tm) diskette 3 - Format TRS-80(tm) diskette 4 - Purge TRS-80(tm) diskette 5 - Display directory 6 - Exit To choose the option you desire, simply press the key for the desired function (1-6), or the function key (F1-F6). You can also select an option by using the cursor control keys and pressing when the desired option is highlighted. The cursor control keys are the arrows and related keys such as and . Pressing "H" will display some HELP text. Choices 1 - 5 are fully explained in their own section of the manual. Choice 6 exits the program, returning to DOS. Note that pressing also allows exit of the program. There is an unlisted menu choice. Choice 7 (or F7) displays a color map., and allows you to enter a new color choice based on what you like. Pressing alone will keep the same choice, while entering a choice like 07 or 17 will display using the selected colors. This number is the same number as can be specified following the /C switch when starting TRSCROSS. Copy from TRS-80 Diskette This is often considered to be the main function of the program. First we will explain the easiest way to use TRSCROSS to copy from a TRS-80 diskette utilizing the built in defaults of TRSCROSS. If you have any trouble (such as a "can't read diskette" message), it might be necessary to see Appendix B. The EASY method for copying files from TRS-80 to PC/MS-DOS: Start TRSCROSS, put a TRS-80 diskette in a diskette drive other than the PC/MS-DOS default drive and press . Answer the Drive number question and press one more time. Now we will explain this function in detail, as well as its options. The COPY FROM option will prompt the Source drive. The default answer for this prompt is 0 (zero). this is the PHYSICAL drive number in which the TRS-80 diskette is placed. By simply pressing TRSCROSS will use drive 0, the most common answer. Drive 0 is your diskette drive otherwise known as "A". Drive 1 would be your diskette drive known as "B" (if you have one). The drive cannot be the same as the PC/MS-DOS default drive. A screen display will then show "Reading system information". During this time, the diskette is analyzed to determine the DOS type, number of sides, etc. If successful, the entire directory is read into memory, and displayed. It is possible for a message to be displayed, such as "trscross: file not found." This particular message means that the disk appears to be empty - there are no files to copy. If you do not understand a message, please refer to Appendix A for explanation. The screen on which the directory is displayed will be referred to as the select screen. It will present up to 20 files per screen, with such information as the filename (including extension), modification date, and flags showing System, Invisible, Protected, and modified (+) files. Also included is the default copy mode for the file. This is called a select screen because it is used to select the file(s) and mode of copying. Pressing "H" will display some HELP text. TRSCROSS copies all files that have some type of mode displayed. If you do not want to copy all the files, but only selected ones, press the "N" key (for NO COPY) next to files you wish to ignore. If the P (Protected) flag is displayed, the file will be marked as read-only when copied to the PC. A password is not necessary, and the status can be changed using the ATTRIB command from DOS. If the diskette is formatted with Model I/III TRSDOS, the day of the month will appear as 00 in the date, since it is unknown. Filenames ending with: BAS - defaults to BASIC (de-tokenizing/conversion, and ASCII save). EXE, COM, BAK, OBJ - defaults to the No Copy mode. CMD, DVR, FLT, DCT, SYS, CTL - defaults to No Copy mode. DAT, MP, DOC, WKS, FIL, CAL, KEY - defaults to BINARY mode. Most other extensions default to the ASCII mode. When copying, we remind you to check the default modes displayed for correctness, and to change the mode if necessary. The automatic mode default is based solely on the extension - not the content of the file. If incorrect, it is not necessary to rename the file, only to change the mode from the default. A fairly common change would be to set files from ASCII mode to BASIC mode for copying. The reason is that many TRS-80 BASIC programs did not necessarily end with the BAS extension, as they do on the PC. For correct conversion, you need to set the mode to BASIC. Also, SuperSCRIPSIT files should be set to SUPERS. The following paragraphs discuss each mode in detail. The first mode of copying is ASCII. ASCII stands for the American Standard Code for Information Interchange, and is the most common way to store text files, program source code (other than BASIC), sequential data files from BASIC, and data files from programs such as Visicalc. It is an almost universal way to transfer data between programs and systems. If your data can be LISTed (TRS-80) or TYPEd (PC) from DOS, then your data is ASCII. In this mode TRSCROSS automatically "strips" the high bit of each byte, properly adds a linefeed after each carriage return, and ensures that the End Of File (EOF) is marked. If chosen at startup time, a special feature is available with ASCII mode. There is sometimes a need for an ASCII file which was created with carriage returns only at the end of each paragraph to be translated to an ASCII file with carriage returns at the end of each LINE. The /L switch of TRSCROSS allows you to select this mode where carriage returns are placed at the first space after the 64th position in each line. Note that this feature should not normally be chosen unless you find that your file cannot be accessed on the destination computer. The second mode of copying is BINARY. This is a pure, 8-bit, mirror image copy of data exactly as it existed on the TRS-80 diskette. No changes of any kind are made to the file. This is normally used for data files such as those created by the OPEN "R" command of BASIC, even if such files contain only ASCII codes. The third mode of copying is BASIC. This mode should be selected when copying a BASIC program, which can be stored normally (also called tokenized or compressed) or as ASCII. If the program has been saved as ASCII, it will be copied without any program changes. Normal BASIC programs will be converted into an ASCII version which can be loaded, edited, and run on the destination computer. If the source program was a TRS-80 Model I/III type program, spaces will be added where appropriate, PRINT@ statements will be converted to LOCATE & PRINT, and other changes such as in the PRINT USING statement will be made. PRINT@ statements in Model 4 programs will also be converted. Appendix D describes BASIC conversion in detail. The final mode of copying is SUPERS. This mode should be used when transferring SuperSCRIPSIT files. This mode converts files to ASCII or RFT/DCA (described previously). SuperSCRIPSIT files which have already been converted to ASCII can be set to either ASCII or SUPERS mode. Some files which exist on the TRS-80 diskette are not appropriate for moving. For example, any machine language (CMD) programs would almost always be useless on a PC. Such files do not have a mode listed. The space for mode would be blank, meaning that they will not be copied. Pressing will proceed to copy the files as selected. If you desire to change the automatic mode choices, or choose your own, it is possible by the following methods. Note that you will have a "help" line displayed at the bottom showing choices using the function keys. Pressing the space bar toggles through the available modes (ASCII, BINARY, BASIC, SUPERS, and NONE). The mode can also be chosen directly by pressing function keys through . through changes the mode for ALL files from the highlighted file through the end of the list. Cursor control keys can also be used to move down or up to select the file for changing. Since there can be multiple pages of files, note that the and keys are quite useful. These keys will move you either down or up 20 filenames at a time. If your directory has many files, you can be quite selective in the files you want to copy by going down the displayed list with the arrow keys and typing N for all files you wish to NOT COPY. Sorting the directory - Pressing D,E, or F sorts the directory from the highlighted file through the end of the list by Date, Extension, or Filename. Note that sorting is done in memory only, and does not affect your disk or write to it in any way. Pressing causes return to the Main Menu without copying. After pressing , there is one more piece of information needed. You will be asked the Destination path. The prompt for Destination path refers to the drive and directory that you desire to copy the files into. Pressing is the most usual choice, specifying the default drive and current directory (as displayed). Other common answers might be: D: - drive D and its current directory C:\ - drive C, using the ROOT directory \FILES - default drive, using a subdirectory named FILES C:\FILE - drive C, using a subdirectory named FILES Paths are further discussed in PC manuals. NOTE - this is NOT to be confused with the PATH command! When all prompts have been answered, the screen will display the current file and location on the TRS-80 diskette. If selected at startup time, the log file will also indicate the file copied and mode used. During the copy, a line of additional information is displayed on the screen, referred to above as the location. This is an indicator that the program is still copying. The copy proceeds a little slower than TRS-80 users might expect. This is largely due to the complex actions necessary to access the TRS-80 diskette and any changes which might be made during the copy. Incidentally, when accessing NEWDOS/80 diskettes, a "lump" is the logical equivalent of a cylinder in other systems. It is represented by one byte in the GAT (Granule Allocation Table). After the last file is copied, the program will return to the main menu. Pressing during the copy process causes copying to stop after the current file is complete. The copying process should not change your TRS-80 diskette in any way, and it is okay to write-protect the diskette if you desire. Copy to TRS-80 Diskette This function is the opposite of the "COPY FROM" option; however, most operations are quite similar to "COPY FROM" in operation. The first prompt is for the desired path. For the default drive and current directory, simply press . If you don't understand this prompt, it is explained in the previous section. The next prompt is Wildcard mask. This is asking if you want to see ALL the files in the directory, or a select group. For the default of *.* (meaning display all files), simply press . A wildcard mask of *.BAS would choose all the BASIC files, while typing A*.* would choose all the files starting with the character A, and so forth. The wildcard mask is further discussed in PC manuals. The select screen will appear next. This is the same screen as described earlier, with the default modes of copying automatically selected. Pressing H displays some HELP text. Note that you will have a "help" line displayed at the bottom showing choices using the function keys. Pressing proceeds with the copy as displayed. The default modes can be changed using the cursor control and other keys. Pressing the space bar toggles through the available modes (ASCII, BINARY, BASIC, and None). The mode can also be chosen directly by pressing function keys through . through changes the mode for ALL files from the highlighted file through the end of the list. The cursor control keys can also be used to move down or up to select the file for changing. Since there can be multiple pages of files, note that the and keys are quite useful. These keys will move you either down or up 20 filenames at a time. Pressing causes return to the Main Menu without copying. Sorting the directory - Pressing D, E, or F sorts the directory from the highlighted file through the end of the list by Date, Extension, or Filename. Note that sorting is done in memory only, and does not affect your disk or write to it in any way. After pressing , there will be a prompt for the Destination drive. The default of 0 corresponds with the drive normally known on the PC as A. This physical drive number is fully described in the previous section. The destination drive must contain a formatted TRS-80 diskette. Finally, TRSCROSS will read system information from the TRS- 80 diskette, copy the files, and then write system information to the diskette. when done, the program will return to the main menu. Note that during copying, most of the information discussed in the previous section will be appropriate, namely that the name of the file will appear on the screen as well as on any log file, along with the mode of copying. ASCII files are adjusted, and non-ASCII BASIC files are de-tokenized. No major changes are made to GW-BASIC programs. Incidentally, the granule displayed during the copy operation is an allocation unit, usually three sectors on TRSDOS, five sectors on NEWDOS/80, and six sectors on other disk operating systems. Although the number displayed is accurate, it is intended as an "activity indicator" only. Note that the copying process should not change your PC/MS- DOS files in any way. The files are opened in read-only mode. Format TRS-80 Diskette This function is used to prepare a blank diskette for TRS-80 files. After formatting, the diskette can be used by TRSCROSS or the original TRS-80 system. To format the diskette, some additional information is necessary. Usually the default choices can be used, so press if you are uncertain. The first prompt is for Drive. This is the physical drive number, such as 0 for the drive known as A. (Drive numbers are discussed in a previous section). The next prompt is for Cylinders. This may be known to you as tracks. The answer is almost always 40. The next prompt is for Sides. The default choice is 1 since most TRS-80 computers are not double sided. Don't confuse this prompt with the type of diskette (media) you are using - that generally does not matter. It is the capability of the TRS-80 computer that is important here. Finally, if the answer to "Sides" was NOT 2, you will be asked which type of format you desire; 1) TRSDOS 6/LDOS or 2) TRSDOS 1.3. The default choice is 1. Choosing 2 prepares the disk for the Model III TRSDOS operating system. This question does not appear if a double-sided format is requested because TRSDOS 1.3 does not support double-sided. If you desire to format a TRS-80 diskette for another system, like MultiDos or DOSPLUS, pick the choice for TRSDOS 6/LDOS. They should be data compatible. If TRSCROSS was started with the /N switch (NEWDOS/80), this question will not be asked. The NEWDOS/80 PDRIVE specification to access this disk must have GPL=2, DDSL=17, DDGA=2, and there should not be a K after TI=. After answering the prompts, the formatting proceeds (any existing data on the diskette will be destroyed). Verification is done during this process. If a cylinder is flawed, a warning message will appear. At the end of the format, system information will be written to the diskette (BOOT & DIR), and the program will return to the main menu. Pressing during formatting aborts to the main menu. Diskettes formatted by TRSCROSS are initialized with the current date, an ID of TRSCROSS, and a master password of PASSWORD. Purge TRS-80 Diskette This function is used to delete/erase/kill/remove files from a TRS-80 diskette. For example, if you format a diskette, copy many files to it, and realize that one should not have been copied, it is easier and faster to purge that one file rather than format and copy many again. Note that the file is only marked as deleted, the information is still available to be recovered by a program like Super Utility for the TRS-80 computer. This option prompts for the physical drive number, which is usually 0. After reading system information from the TRS-80 diskette, the select screen will appear. This screen is quite similar to the select screen described in the two sections about copying. Pressing H displays some HELP text. The default for all files is to NOT purge. To purge a file, select it by using the cursor control keys and using the space bar to toggle modes or press Y or N. Pressing Y means "Yes, purge this file," while pressing N means, "NO". Remember to use to access any files beyond the first 20 shown. Also note that , , , and are allowed, as well as D, E, and F. To begin the purge, press from the select screen. The new system information will then be written to the TRS-80 diskette and the program will return to the main menu. Pressing at the select screen will return to the main menu without purging. Note that you will have a "help" line displayed at the bottom showing valid choices using the function keys. Purged files will be listed in the activity log, if it was specified at startup time with the /Dfilename switch. Display Directory This function exists for those who desire to quickly display the directory of a disk without using another function of TRSCROSS. Free space is also displayed. When this option prompts for a drive, you can answer with a physical drive number, such as 0-3, or by pressing . A number like 0 or 1 specifies a TRS-80 type diskette, while pressing designates a PC/MS-DOS disk. If a directory of a PC/MS-DOS disk is requested, two additional prompts will appear. The first is for the desired PATH (default is the default drive and current directory), and the second is for the Wildcard mask (default is *.* for all files). Note that volume identifications, subdirectories, system files, and hidden (invisible) files will not appear. To view system and invisible files on a TRS-80 diskette, be sure to start the program by typing TRSCROSS /I /S . After reading the disk, TRSCROSS displays the free bytes available. At this point you may either press to return to the main menu, or any other key (such as ) to continue displaying the directory. The directory is displayed in the same format as used in the select screen. Press if necessary to view more than 20 files. Pressing or returns to the main menu. Pressing D, E, or F sorts the directory from the highlighted file through the end of the list Date, Extension or Filename. Note that sorting is done in memory only, and does not affect your disk in any way. You will have a "help" line displayed at the bottom showing valid choices using the function keys. Appendix A: Messages DOS 2.0 or later required - this message is self-explanatory. trscross: can't format - a major error has been encountered in attempting to format a TRS-80 diskette. Try re-inserting the diskette and/or resetting the computer. trscross: can't read diskette (A or I?) - the TRS-80 diskette is not completely readable. While you can often type I to Ignore this condition, please see the discussion in Appendix B. trscross: couldn't open log file - an invalid filename was specified with the /D switch. trscross: disk error reading dir - the TRS-80 diskette is not readable, specifically one of the sectors of the directory cylinder. See the discussion in Appendix B. Note that some fast 286 or 386 machines may need to be set to a lower CPU speed for proper floppy disk I/O with TRSCROSS. trscross: disk error reading boot or GAT - the TRS-80 diskette is not readable, specifically sector one of track (cylinder) zero or the first sector of the directory cylinder. See the discussion in Appendix B. trscross: file not found - this is a message indicating that no files exist to copy, purge, or display from the disk. trscross: insufficient disk space - this message might appear during copying files, and is self-explanatory. trscross: invalid directory - the path you specified when copying files is invalid. Select another path (see the related section of the manual for further details). trscross: invalid filename - a PC/MS-DOS filename does not meet the TRS-80 requirements. Rename the file before using TRSCROSS. trscross: no directory space - the TRS-80 diskette has no more space available in the directory. trscross: too many flaws - the TRS-80 diskette you attempted to format has more flaws than TRSCROSS considers acceptable. You should use another diskette and consider discarding the flawed one. Appendix B: Disk Formats This section attempts to explain some features of the TRS-80 diskette format. The information may be simplified for clarity and is not guaranteed (although every effort has been made to be as accurate as possible). Several formats exist in the TRS-80 world. The original TRS- 80 computer, now known as the Model I, usually stored data on single density disks. Using a hardware modification and appropriate DOS, double density storage was available. Double density disks which were "bootable" were actually a mixture of single and double density. TRSCROSS cannot access single-density diskettes, and results are not guaranteed for Mod I "bootable" diskettes (those with a single density track 00. Double-density DATA disks are okay. Although most drives are 48 TPI (40 or 35 tracks/cylinders), some higher capacities were allowed using 96 TPI (80 tracks/cylinders). TRSCROSS cannot access 96 TPI (80 track) TRS-80 diskettes in 48 TPI (40 track) drives. Along with the Model III came a variety of different Disk Operating Systems. TRSDOS 1.1 was the first, and is not supported by us (or Tandy for that matter). Later came TRSDOS 1.2 and finally TRSDOS 1.3. NEWDOS/80 was released and is completely different from all the other systems, therefore requiring the /N switch. Some other systems were LDOS, MultiDos, and DOSPLUS. Later, Tandy introduced the Model 4, 4P, and 4D. These machines have two "modes," namely Model III mode and Model 4 mode. The newer model 4 mode is the 80 column mode provided with TRSDOS 6, a system similar to LDOS. On the later produced Model 4 (4P/4D) machines, Tandy changed the disk controller from a 1793 to a 1770/1773 type. Although the chip was supposedly software compatible, this change led to something called the GAP PATCH, a change in the FORMAT/CMD of LDOS and TRSDOS 6 systems. This change occurred after mid- 1985, and was present in TRSDOS 6.2.1. The GAP PATCH might have been due to an oversight in LDOS and TRSDOS 6, as many disks do not exhibit this problem (including those formatted by Super Utility Plus 3.2 and Super Utility 4/4P). Unfortunately, all of our research has found that the PC (and TRSCROSS) also require the GAP PATCH to completely read disks. This seems to be due to the fact that the PC needs some minimum amount of space between the index hole and the first sector on a diskette in order to read the first sector. It is a hardware situation that cannot be corrected with software. Following is an explanation, as well as some possible solutions, or at least some ways to get your data transferred. The first sector of a track is usually sector 0, though with some special formatting (track to track skew), it might be any sector. This means that we might lose up to one sector per track, and we don't know which one! TRSCROSS attempts to deal with this situation by displaying the "can't read diskette" message during the directory read, and giving the option of Abort or Ignore (A or I). Choosing A will end the operation, while choosing I will ignore the error (and insert a note in the log file, if specified). Skipping the error will not cause any major problems, but there is a possibility of some missing file(s). In our experience, the chances are good that your data can be copied off correctly, even when ignoring the error. You should always receive one "can't read" message if there is this possibility. It should not happen without warning. Please note that you should not attempt to copy or purge from this diskette. Format another diskette instead, as we describe below using TRSCROSS. Of course, there are several possible ways to avoid the above problems (all assume that you still have access to the TRS-80 computer). The first is to use TRSCROSS to format the diskette, and then use that diskette in the TRS-80 when copying the files. Another method is to update your LDOS/TRSDOS 6 with the GAP PATCH. Finally, you can use a program like Super Utility (on your TRS-80 computer) to format/re-format/backup your disks. Feel free to contact us if you have any questions regarding this Appendix, and please mention that you need "TRSCROSS GAP PATCH info." Appendix C: Common Questions My answer to the Drive prompt question is not accepted by the computer. It just beeps. What is wrong? You are trying to use the default PC/MS-DOS drive for reading the TRS-80 diskette (probably your "A>" drive). As stated elsewhere in this manual, this is not allowed. If you start TRSCROSS from the "A>" prompt, the drive for reading the TRS- 80 diskette cannot be drive 0 (your "A" drive). Either start TRSCROSS from "B>" or "C>", or read your TRS-80 diskette in drive "1" (your "B>" drive). TRSCROSS locks up my system when trying to access the TRS-80 diskette. What is wrong? You are probably using Tandy's MS-DOS 2.11, and need to install ANSI.SYS in your CONFIG.SYS file. To do this on a copy of your MS-DOS diskette, type the following from your "A>" prompt: COPY CON CONFIG.SYS DEVICE=ANSI.SYS now press the key and then press . After resetting the computer, ANSI.SYS is installed and TRSCROSS should run properly. I have a TRS-80 diskette with /VC files and want to use the data with 1-2-3 on my PC - HELP! Start TRSCROSS and choose 1 from the Main Menu. When prompted for the drive, be certain that the TRS-80 diskette is inserted in a drive and enter its number. If you receive an error message, read the appropriate Appendix of the manual. The VC files should be shown on the screen with ASCII following each. Press once to exit the select screen and again to choose the default directory. The copy should proceed, and when the Main Menu appears, exit TRSCROSS. You should then load LOTUS. Use the Translate feature and select VC > WKS. The procedure is usually simple and any further explanation should be provided in your LOTUS 1-2-3 manual. After translation, you should have complete access to the spreadsheet from 1-2-3. I have a TRS-80 diskette with BASIC programs and want to use them on my PC - HELP! The procedure is similar to the situation above, except that the file should be copied in BASIC mode. If your file does not have the BAS extension, you must select the BASIC mode for that file. After pressing twice, the files should be copied and you can exit TRSCROSS. After entering BASIC, you should be able to LOAD the file. If a message like "File not found" is displayed, it is most likely due to the fact that issuing a command like LOAD "PROGRAM" in GW-BASIC looks for a file called PROGRAM.BAS rather than PROGRAM. The easiest solution is to issue the BASIC command NAME "PROGRAM" AS "PROGRAM.BAS" and try to LOAD it again. TRSCROSS makes many of the BASIC program changes for you, but some changes are not supported due to machine differences. If the program does not RUN without errors, you must edit the program to the proper syntax. Some common changes are described in Appendix D. I have a TRS-80 diskette with /CMD programs, like SCRIPSIT, PROFILE, VISICALC (etc.) and want to use them on my PC - can I? Sorry, but the answer is no. Those programs are Z-80 machine language (CMD), and though we can move them to the PC, they will not function at all. (Copyist's note: This was written before the advent of modern TRS-80 emulators designed for use on the IBM PC.) Our program allows you to move the data associated with an application, for use with a similar application on the other computer. Also, you can't expect to be able to use a PC program like Lotus 1-2-3 on your TRS-80 computer - it just won't function. I have data from Model 4 PFS:File and want to transfer it to PFS:File on the PC. What is the proper method? The data files must be transferred in the BINARY (image) mode, not ASCII. After the transfer, one more step is necessary to make everything okay. That step is to use the Change Design option on the main menu, and just press . On PFS:Professional File, try the Check Data File feature. Please note that these steps are those reported to us by users. I have a TRS-80 diskette with data from PROFILE and want to use it on my PC - HELP! This is not a simple process to explain. It depends largely on your experience and the database program you will use on the PC. One method is to use a feature of PROFILE designed for merging with SuperSCRIPSIT (for form letters). Using this feature actually creates an ASCII file on disk with all your data. Another way to make an ASCII file from Model 4 PROFILE is by using the "ROUTE *PR filename" command of TRSDOS 6, print a report, and then RESET *PR. If your database on the PC can import DIF files, you can try using the features of PROFILE to create them. If any of those methods are used, you the use TRSCROSS on the PC to move the newly created ASCII file. At that point, most databases on the PC have the capability to access an ASCII file. This is often called "a gateway", "importing", or "translating." For the more technically knowledgeable, the existing KEY, DAT, etc. file can be converted as BINARY. It can then be treated as an ASCII Fixed Field (not delimited) type file. You'll need to describe the record length and field lengths for the conversion. If you have the knowledge (and your database includes support), this is probably the best method. I have a TRS-80 diskette with data files from DeskMate and want to use them on my PC - HELP! Based on our experience, if you have DeskMate for the PC, you can move Text, Worksheet, Filer, and Calendar files (in BINARY mode). Otherwise, you can only move text (DOC) files, and you should set them to ASCII mode. I used TRSCROSS/RF and my SUPERS files can't be read by my word processor - what did I do wrong? You probably need to use a conversion program before trying to load the file. Instructions are often indexed under RFT, DCA, conversion, or importing in your manual. My TRS-80 files are on a hard drive - how do I move them? You must format a TRS-80 diskette (on your TRS-80 computer or by using TRSCROSS), and use a command like COPY in your DOS to move the file(s) onto the diskette. If a file larger than the diskette size needs to be moved, you must split it up on the TRS-80 computer, move it, and then combine it again on the PC. Copying large files from a PC to a TRS-80 diskette may also require splitting. I have CP/M (or Apple or Color Computer or Commodore or Atari) diskettes and want to access them on the PC - can I? Sorry, but not with TRSCROSS. We don't support Apple, Atari, Commodore, or the Color Computer at all. However, there is a program called SuperCross/XT (TM) which runs on the TRS-80 computer and allows access of up to 170 different formats of CP/M and PC/MS-DOS diskettes. Since SuperCross/XT does not run on the PC, it does not have the access problem as discussed in Appendix B. What is the Gap Patch? Do I need it? The author of TRSCROSS used that wording to show us that exact area of your question and what your difficulty might be when you call or write. It was a flag to us that you were using the program correctly, but running into the limitations of the program and PC hardware. There is no patch to magically "fix" the situation. If you are having problems accessing a diskette and the error you get is the A)bort I)gnore prompt, we recommend pressing the letter "I" to ignore, and you only skip one cylinder out of the 40 on the disk. In most cases, it is empty or has system information on it anyway. We have found a very helpful suggestion that works on many machines, but not on all. It is worth trying if a very important file happens to not copy over correctly or you have a lot of older format TRSDOS 6 or LDOS diskettes. Put an opaque write protect tab over the timing hole and the disk reads flawlessly on many PCs. Just cover the index hole with the tab, but do not press hard because you do not want to stick to the actual media itself, just the jacket. This suggestion was sent in to us by Albert W. Kuhfeld, as well as some others and seems to work in many cases. We recommend using 360K drives when using this method. I have a large file that is not copying over correctly. Sometimes part of it is missing, or sometimes a line is scrambled. What do I do? If you will re-copy the file onto a freshly formatted TRS-80 type diskette, your problem will usually disappear. You may use the FORMAT DISK option of TRSCROSS to format the disk right in your MS-DOS based machine, providing you have a 360KB drive. If you are curious why you have to do this, it is because your TRS-80 data file is split into too many "pieces" (extents). Many times a single file will be spread all over the diskette, and if the disk already has files on it, the file could be in many more pieces (extents) than normally could be necessary. Recopying it to a new disk will "put it back together" in as few extents as possible. Notes: If transferring a SuperSCRIPSIT file to MS-DOS, make sure that TRSCROSS is set to the "SUPERS" mode of transferring. This allows automatic conversion to ASCII, so that your files can now be loaded into just about any MS-DOS word processor that accepts ASCII data. Remember, Profile data files MUST be converted to ASCII before they will be of any use. You accomplish this with either the "MERGE WITH SCRIPSIT" option, and select the option to write to a disk file rather than going to the printer, or via the ROUTE *PR TO FILENAME command of LDOS or TRSDOS 6.X. See your manuals for more details. It is beyond the scope of TRSCROSS to convert PROFILE data files to ASCII. Once converted to ASCII, these files can be easily loaded into DBASE, RBASE, Q&A, and many other databases that allow importation of standard delimited ASCII files. Hard Drive Users: If your MS-DOS computer has a hard drive C: and floppy A;, this is the most common configuration and what the built in defaults of TRSCROSS are set up for. Copy TRSCROSS to your hard drive C: like any other program you might buy, type TRSCROSS from the C: prompt like your other programs, and put your TRS-80 diskette in DRIVE A:. Now you're ready! Floppy drive users: TRSCROSS will work with floppies as well, just answer drive letters instead of hitting when prompted for drives. When TRSCROSS asks where the TRS-80 disk is, answer 0 or 1, not A or B. (A=0, B=1). Use A, B, or C for MS-DOS. Do not try and read a TRS-80 diskette from the same floppy drive you are running TRSCROSS from. Run TRSCROSS from Drive B: and read your TRS-80 disk in A: (which TRSCROSS will refer to as :0). You will be reading the files from A: and copying them back to B:. 3.5" disk users: Obviously you must have a 5.25" drive to read your TRS-80 disks from, but if you have one of each, boot your 3.5" MSDOS, place the TRSCROSS Master Disk in the 5.25" drive and copy the TRSCROSS.EXE file over to your system. You then run TRSCROSS from A: and read the TRS-80 disk in the 5.25" drive B:, copying the files back to Drive A:, if you do not have a C: or a D:. If you have a fixed (hard) disk, ALWAYS run TRSCROSS from the hard disk and copy your files from the 5.25" to the hard disk. If you are converting a BASIC program from the TRS-80 to MS- DOS, remember that GW-BASIC absolutely requires that your programs and assorted modules (if in BASIC) all end with a .BAS extension! On the TRS-80 you could call them anything you wanted to, but not on MS-DOS. You can RENAME the files before transferring them over, or if you've already transferred your programs, use the REN command from the DOS prompt as follows to rename the program so that BASIC will accept it. MS-DOS examples of renaming a BASIC program from DOS (not BASIC): REN LOAN TO LOAN.BAS or maybe REN PAYROLL.MOD TO PAYROLL.BAS If you need to read and convert a Model III PFS:FILE diskette, use the command, TRSCROSS /PFS3 to read this very special (weirdly formatted) disk. This will work 90% of the time with usually no data loss. This is not an ordinary disk (PFS Model III), but try this. There is no other way to get the data off. the Model 4 version of PFS is usually no problem at all. The high capacity drive found in AT or 286 type machines (Tandy 3000, 4000, etc.) will read 80 track single or double- sided diskettes with TRSCROSS, if the alignments of the 80 track drives in the TRS-80 were okay. Disks formatted for more than 80 tracks are tough. The "Binary" mode of transferring has nothing to do with "machine language". A "Binary" copy means that TRSCROSS copies the file over in a "mirror image" manner. In other words, it copies the file over EXACTLY, with NO conversion performed in any way. This is sometimes desired when the data file has a certain structure that is desirable to maintain. An example might be data files from Visicalc or Multiplan, or your own program that has a certain file structure. When copying data files over, we recommend using the BINARY method first. If that does not work for you - try the "ASCII" mode. You can TRSCROSS either SuperSCRIPSIT document files or ASCII converted SuperSCRIPSIT files to WordPerfect (Version 4.2) with the same results using this hint from A. M. Schubert of Texas A & M University. After converting the files into PC, use either the TEXT IN/OUT command (CTRL-F5) using the #3 option (RETRIEVE converting CR/LF in H-Zone to Soft Return) or the TEXT IN (#5) on the LIST FILES menu to get the file into WordPerfect. The new WordPerfect document has the default margins and tabs set into WordPerfect which makes the document look different than it did in SuperSCRIPSIT. Also, there is no feature of WordPerfect which parallels the way SuperSCRIPSIT handles the Tab Line. Therefore, settings such as the INDENT point residing to the left of the LEFT MARGIN to force lines following the first line of the paragraph to be indented are lost. Despite this drawback, you should be able to get the file back into the form it had in SuperSCRIPSIT with proper adjustment of margins, tabs, and indent commands on WordPerfect without too much trouble. Appendix D: BASIC Conversion Many simple BASIC programs, like those typed in from a book, should move and execute with little or no trouble. The following information is for the problem programs. It should be noted that if you do not have experience programming in BASIC, it is possible that you won't be able to convert a particular application to PC. Many applications programs were written to squeeze every bit of memory and potential out of the TRS-80 computer and it was done in a very machine- specific manner (like using PEEK and POKE). One way to find specific errors is simply to RUN the program, but be sure to use backups to avoid any loss of data. Note that starting by typing TRSCROSS/DPRN will send conversion warnings (with line numbers) and the filename to the printer (PRN). The program listings included at the end of this appendix show examples of what syntax is and is not converted by TRSCROSS. There is one Model I/III type program and one Model 4 type program, along with the same two programs after conversion. Please note that the example is a "do-nothing" program, and is intended to point out what is handled automatically along with some examples of rare syntax, usually not used, which is not handled. The file created by TRSCROSS is stored in ASCII, ready to be loaded into GW-BASIC, a BASIC compiler, or an editor. After the first LOAD in GW-BASIC, it is a good idea to SAVE the program once so that it is stored in the compressed (tokenized) format. Automatic space insertion - Line 60 in the Model I/III program shows an example of our space insertion. Since spaces are required around keywords, we insert them where necessary, and existing spaces (indents, etc.) are left unchanged. Don't worry about what appear to be missing spaces (such as after the 0 in line 160), because they are not needed in GW-BASIC. By leaving them out, we hope to avoid truncating the line after 255 characters. If lines exceed 255, GW-BASIC can't load the entire file (the error is direct statement in file). Truncated lines are flagged in the log file, if specified. CLEAR - Line 60 in the Model I/III program also shows that the parameters of CLEAR are left unchanged. The parameter is allowed by GW-BASIC, but ignored since string space is dynamically allocated. RANDOM - Line 100 in the Model I/III program (40 on the Model 4 version) shows that we convert RANDOM to RANDOMIZE TIMER. If you are using an early version of BASIC that does not support TIMER, you should manually edit the line and remove the TIMER reference. By itself, RANDOMIZE causes GW-BASIC to prompt for the random number seed at the console. RND(x) - Line 110 in the Model I/III program (45 on the Model 4 version) shows our conversion of RND(0) to RND(1) and RND(x) to INT(1+RND*(x)). Although rare, it is possible for a variable/expression used in RND(x) with TRS-80 BASIC to evaluate as zero, in which case the line should be manually edited. Pixel graphics (SET/RESET) - Line 180 and 260 in the Model I/III program show that we convert SET/RESET to PSET/PRESET. Note that results are not quite the same, and a special SCREEN statement must be added earlier in the program for it to function. PRINT @ - Line 220 in the Model I/III program and 60-70 in the Model 4 version show our PRINT @ to LOCATE:PRINT conversion. The positions are computed so that the display starts in the upper left-hand corner of the screen. Variables/expressions are allowed only with the Model 4 PRINT @ syntax (variables/expressions) are flagged in the log file, if specified. ROW(x) - Line 75 in the Model 4 program shows that we convert ROW(x) to (CSRLIN-1). Subtracting 1 is done to return a base zero value, and is offset by our addition of 1 in PRINT @ (x,y). TAB(x) - Line 280 in the Model I/III program shows that we add 1 to the TAB position for proper results on the PC. Variables/expressions are allowed. PRINT USING / LPRINT USING - Line 300 in the Model I/III program shows that we convert two specifiers in the PRINT USING / LPRINT USING syntax. The "% %" is converted to "\ \" and exponentiation is also changed. Line 320 in the Model I/III program shows that we do not detect/convert specifiers assigned to a string variable. They must be converted manually. Exponentiation symbol - Line 380 in the Model I/III program shows that we convert the symbol used on the Model I/III (up arrow/open bracket) to the symbol used in GW-BASIC(^-caret). Automatic THEN insertion - Line 380 in the Model I/III program also shows that on the Model I/III, THEN is usually optional after the IF statement. In GW-BASIC, it is required except before GOTO. We insert THEN in most cases, and flag exceptions in the log file, if specified. Filename conversion - Line 400 in the Model I/III program (100 and 120 in the Model 4 version) shows our conversions of filenames. We change "/" to "." but do nothing to the drive specifier except flag it in the log file (FILE:1 should be changed to B:FILE). Line 460 in the Model I/III program (140 in the Model 4 version) shows that we do not convert filenames assigned to string variables. Line 580 in the Model I/III program (190 in the Model 4 version) shows that we convert filenames after statements other than OPEN. OPEN mode conversion - Line 100 and 120 in the Model 4 program also show that we convert OPEN mode "D" to "R" and "E" to "A". DATE$ / TIME$ - Line 470 in the Model I/III program (145 in the Model 4 version) shows our conversion of TIME$ (Model I/III) and DATE$ (Model 4) to the format on the PC. If the format does not need to match TRS-80 values exactly, manual editing can reduce the long string expression. CMD - Line 480 in the Mod I/III program shows that we convert CMD to SYSTEM, but parameters other than "S" are left unchanged. If the parameter to CMD (or SYSTEM in Mod 4) is a DOS command, the SHELL command of GW-BASIC can be substituted manually for similar results. Some suggested substitutions are listed below. Mod I/III Mod 4 PC CMD"D:x" (number) SYSTEM"DIR:x" FILES"x:"(letter) CMD"I","x" SYSTEM"x" SHELL"x" CMD"L","x" BLOAD"x" ERR - Line 520 in the Mod I/III program (160 in the Mod 4 version) shows that we leave references to ERR unchanged. While Mod 4 error codes match the PC's almost exactly (the exception is that code 68 should be changed to 70 on the PC), the pattern to Mod I/III codes is not perfect and must be carefully checked. ERR/2+1 ERR 1-17 same 18-22 19-23 51-68 50-67 69 70 A complex function can be defined to return the old value. An expression like IF ERR/2+1=54 THEN RESUME could be replaced by IF FNERR21(ERR/2+1)=54 THEN RESUME. The function is DEF FNERR21(X)=-(X<18)*X-((X<23)AND(X>17))*(X+1)- ((X<69)AND(X>50))*(X-1)-(X=69)*70. ERRS$ - Line 160 in the Mod 4 version also shows our conversion of ERRS$ to ERDEV$. Note that the results are similar, but not the same (a potential error is specified in the log file, if specified). MEM - Line 540 in the ModI/III program (170 in the Mod 4 version) shows that we convert the MEM keyword to FRE(0), which returns the amount of free memory available on the PC. PEEK/POKE statements usually won't convert. A common use of such statements is along with USR and VARPTR (and sometimes READ/DATA) to access Z80 machine language subroutines. Such routines won't work on the PC. Another possible use of these statements is to access the Mod I/III screen directly by video memory, and this cannot be easily converted. The remaining common uses of these statements are to access values stored in memory, such as the count of lines printed on the Mod I/III at 16425. One way to convert that usage is to initialize a variable LINES to 0 or 1, and increment it each time a new line is printed by LPRINT. Change the test of the PEEK(16425) value to a test of LINES, and reset LINES to 0 or 1 after each top-of-form. Other references are listed next. address description 14312 printer status INP/OUT/WAIT statements often won't work on the PC. These statements access ports of the computer, and are used to interface with hardware directly. If another statement is flagged in the log file (such as SOUND), there is some incompatibility which should be obvious and can be seen by comparing the two BASIC manuals side by side. For SOUND, the difference is that the parameters on the Mod 4 are tone (0-7) and duration (0-31), while on the PC they are frequency (in Hertz) and duration (in clock ticks). Sometimes CHR$(x) statements will need to be changed because they are used to control codes to the video. Some useful equivalents are listed below. Codes listed for LPRINT should not need to be changed if you are using the same type printer. STRING$(y,x) statements might also need to be adjusted. Mod I/III/4 PC CHR$(24) CHR$(29) CHR$(25) CHR$(28) CHR$(26) CHR$(31) CHR$(27) CHR$(30) CHR$(28) CHR$(11) When accessing "random" files on disk, it is important to note that the value of the LOF function is different on the PC (it is a count of bytes rather than of records). To have the same meaning as in TRS-80 BASIC, the value must be divided by the record length (often 256). Also the default record length on the PC is 128 rather than 256. To use 256, you should add ",256" as the fourth parameter of OPEN (after the filename), and you may need to specify switches such as /S:256 when starting GW-BASIC. The BASIC Handbook by David A. Lien is a good programming reference on all versions of BASIC. If you have not already done so, you should study the TRS-80 manual and GW-BASIC manuals side-by-side. It helps much when manually converting. Model I/III version 20 'TEST/BAS - Demonstration - 07/30/86 40 REM Model I/III version 60 CLEAR1000 80 ONERRORGOTO520 100 RANDOM 110 PRINTRND (0)"is a random number and"RND(20)"is between 1 and 20" 120 CLS 140 FORX=A0TO5 160 FORY=0TO5 180 SET(X,Y) 200 NEXTY,X 220 PRINT@128,"This is a box" 240 FORZ=1TO1000:NEXT 260 FORX=0TO5:FORY=0TO5:RESET(X,Y) :NEXTY,X 280 PRINTTAB(0)"First tab"TAB(31)'No closing quote 300 PRINTUSING"% % #.####[[[[";"STRING",3.14159 320 U$="% %":PRINTUSINGU$;"string" 340 A=0:B=1.0:C=1.01:D=1.000000001:E=15:F=300:G=32767:H=65000: I=&HABCD:J=&4567:K=1.2E+10 360 B=-1.0:C=-1.01:D=-1.000000001:E=-15:F=-300:G=-32768:H=- 65000:I=-&HABCD:J=-&4567:K=-1.2D-20 380 IFA=B[2PRINT"This should never print" 400 OPEN"R",1,"TEST/DAT:1" 420 FIELD1,1ASA$,2ASB$,3AS C$ 440 CLOSE 460 F$="TEST/DAT":KILLF$ 470 PRINT"The current date and time are "TIME$ 480 CMD"S":REM return to DOS 500 END 520 PRINT"Error"ERR/2+1"in line"ERL 540 PRINT"Free memory=";MEM 560 RESUMENEXT 580 SAVE"TEST/BAS":REM used during development Model I/III version : Converted to IBM PC GW-BASIC format 20 'TEST/BAS - Demonstration - 07/30/86 40 REM Model I/III version 60 CLEAR 1000 80 ON ERROR GOTO 520 100 RANDOMIZE TIMER 110 PRINT RND (1)"is a random number and"INT(1+RND*(20))"is between 1 and 20" 120 CLS 140 FOR X=A0 TO 5 160 FOR Y=0TO 5 180 PSET(X,Y) 200 NEXT Y,X 220 LOCATE 3,1:PRINT"This is a box" 240 FOR Z=1TO 1000:NEXT 260 FOR X=0TO 5:FOR Y=0TO 5:PRESET(X,Y) :NEXT Y,X 280 PRINT TAB(1+0)"First tab"TAB(1+31)'No closing quote 300 PRINT USING"\ \ #.####^^^^";"STRING",3.14159 320 U$="% %":PRINT USING U$;"string" 340 A=0:B=1.0:C=1.01:D=1.000000001:E=15:F=300:G=32767:H=65000: I=&HABCD:J=&4567:K=1.2E+10 360 B=-1.0:C=-1.01:D=-1.000000001:E=-15:F=-300:G=-32768:H=- 65000:I=-&HABCD:J=-&4567:K=-1.2D-20 380 IF A=B^2 THEN PRINT"This should never print" 400 OPEN"R",1,"TEST.DAT:1" 420 FIELD 1,1AS A$,2AS B$,3AS C$ 440 CLOSE 460 F$="TEST/DAT":KILL F$ 470 PRINT"The current date and time are "LEFT$(DATE$,2)+"/"+MID$(DATE$,4,2)+"/"+RIGHT$ (DATE$,2)+" "+TIME$ 480 SYSTEM:REM return to DOS 500 END 520 PRINT"Error"ERR/2+1"in line"ERL 540 PRINT"Free memory=";FRE(0) 560 RESUME NEXT 580 SAVE"TEST.BAS":REM used during development Model 4 version 10 'TEST/BAS - Demonstration - 07/30/86 20 REM Model 4 version 30 ON ERROR GOTO 160 40 RANDOM 45 PRINT RND (0)"is a random number and"RND(20)"is between 1 and 20" 50 CLS 60 PRINT @ 80,"Second line" 65 PRINT@(2,0),"Third line" 70 X=3:Y=0:PRINT@(X,Y),"Fourth line" 75 X=ROW(0) 80 A=0:B=1!:C=.01:D=1.000000001#:E=15:F=300:G=32767:H= 65000!:I=&HABCD:J=&04567:K=1.2E+10 90 B=-1#:C=-1.01:D=-1.000000001#:E=-15:F=-300:G=-32768!:H=- 65000!:I=-&HABCD:J=-&04567:K=-1.2D-20 100 OPEN"D",1,"TEST/DAT:1" 110 CLOSE 120 OPEN"E",1,"TEST/DAT" 130 CLOSE 140 F$="TEST/DAT":KILL F$ 145 PRINT"The current date is "DATE$ 150 END 160 PRINT"Error"ERR"in line"ERL;"(";ERRS$;")" 170 PRINT"Free memory=";MEM 180 RESUME NEXT 190 SAVE"TEST/BAS":REM used during development Model 4 version : Converted to IBM PC GW-BASIC format 10 'TEST/BAS - Demonstration - 07/30/86 20 REM Model 4 version 30 ON ERROR GOTO 160 40 RANDOMIZE TIMER 45 PRINT RND (1)"is a random number and"INT(1+RND*(20)"is between 1 and 20" 50 CLS 60 LOCATE 2,1:PRINT"Second line" 65 LOCATE 3,1:PRINT"Third line" 70 X=3:Y=0:LOCATE X+1,Y+1:PRINT"Fourth line" 75 X=(CSRLIN-1) 80 A=0:B=1!:C=1.e-002:D=1.000000001:E=15:F=300:G=32767:H= 65000!:I=&HABCD:J=&04567:K=1.2e+010 90 B=-1#:C=-1.01:D=-1.000000001:E=-15:F=-300:G=-32768!:H=- 65000!:I=-&HABCD:J=-&04567:K=-1.2D-020 100 OPEN"R",1,"TEST.DAT:1" 110 CLOSE 120 OPEN"A",1,"TEST.DAT" 130 CLOSE 140 F$="TEST/DAT":KILL F$ 145 PRINT"The current date is "LEFT$(DATE$,2)+"/"+MID$(DATE$,4,2)+"/"+RIGHT$(DATE$,2) 150 END 160 PRINT"Error"ERR"in line"ERL;"(";ERDEV$;")" 170 PRINT"Free memory=";FRE(0) 180 RESUME NEXT 190 SAVE"TEST.BAS":REM used during development INDEX /C switch 12 Hard drive 5,28,30 /D switch 23 Invisible files 9,22 /I switch 9,22 Kill 21,39,40,41 /L switch 9,14 LDOS 4,20,24,25,29,30 /PFS3 switch 31 Linefeed 14 /RF switch 10 Lines mode 9,14 /S switch 9,22 Log 9,16,19,21 ANSI.SYS 26 Lotus 4,26,27 ASCII 5,9,10,14,15,18,19, Model I 14,15,24,33,34,35,38,39 26,27,28,30,31,32,33 NEWDOS/80 9,11,16,19,20,24 BAS 14,27 Path 8,16,18,22,23 BASIC 3,8,9,14,15,18,19, PFS File 4,27,31 26,27,31,33,34,35, PROFILE 4,27,28,30 36,37,39,41 Purge 3,12,21,23,25 Binary 14,15,18,27,28,31 RFT 15,28 CMD 14,15,24,27,35 Select Screen 13,18,21,22,26 Color 9,10,12,28,29 Single Density 24 CONFIG.SYS 7,26 Sorting the directory 16,18 Copy Mode 13 SUPERS 9,10,14,15,28,30 Copying files from TRS-80 13 SuperSCRIPSIT 4,7,10,14,15,28, Copying files to TRS-80 18 30,32 Copyright 2 Switches 9,10,37 CP/M 4,28,29 System files 9,22 Cursor control keys 12,15, Technical Support 3,6 18,21 TPI 7,24 DCA 10,15,28 TRSDOS 4,10,14,19,20,24,25, Delete 21 28,29,30 Deskmate 4,28 VisiCalc 14,27,31 Direct Memory Access 7 Wildcard mask 8,10,18,22 Double sided 9,10,20 Windows 8 Drive 5,7,8,10,13,16,18,19, 20,21,22,26,28,29,30, 31,35 Erase 21 Format 3,10,12,20,21,22,23, 24,25,28,29,33,35,39, 41 Function keys 15,18,21,22 GAP PATCH 24,25,29 GAT 16,23 Granule 16,19 Hard disk 30