background image

Содержание TRS-80 Model 4

Страница 1: ...Custom Manufactured in USA by RADIO SHACK A Division of TANDY CORPORATION...

Страница 2: ...TWARE SOLD LEASED LICENSED OR FURNISHED BY RADIO SHACK INCLUDING BUT NOT LIMITED TO ANY INTERRUPTION OF SERVICE LOSS OF BUSINESS OR ANTICIPATORY PROFITS OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE...

Страница 3: ...TRS 80 Model 4 4P Disk System Owner s Manual...

Страница 4: ...ion with non certified peripherals is likely to result in interference to radio and TV reception Model 4P Only The TRS 80 Model4P Computer Catalog Number 26 1 080 is equipped with an external I O bus...

Страница 5: ...128K High speed Z 80A microprocessor the brains of the computer Upper and lower case text display of 80 characters by 24 lines or 64 by 16 software selectable Compatible with Radio Shack s Model III...

Страница 6: ...to back If you are a programmer you ll find a lot of useful information in this manual If you are an advanced programmer you ll find additional advanced information included for you in this manual Ad...

Страница 7: ...d in Chapter 7 for Brevity 2 4 Section 11I1 Operations 2 7 Chapter 11 Sample Session 2 9 Chapter 21 Command And Execution Section 2 13 Chapter 31 Line Edit Mode 2 17 Section IVI BASIC Language 2 23 Ch...

Страница 8: ...rams A 75 Appendix FI BASIC Keywords and Derived Functions Reserved BASIC Words A 79 Internal Codes for BASIC Keywords A 80 Derived BASIC Functions A 82 Appendix GI BASIC Worksheet Video A 83 Appendix...

Страница 9: ...Part I1TRSDOS Version 6...

Страница 10: ...Section II Using TRSDOS...

Страница 11: ...you supply TRSDOS Terms Below is a listing of terms which we use frequently in this section The italicized words represent variable information which you must supply command represents the TRSDOS com...

Страница 12: ...displays the date in expanded form for example Tue Jun 14 1983 TRSDOS Ready Whenever you see the TRSOOS Ready prompt you know that you are in control of TRSOOS not COBOL PAYROLL or any of your applica...

Страница 13: ...sequence what is displayed on the screen is printed on the printer Disk Files You can keep a record of anything you type into your Model 4 by storing it on disk in a disk file A disk file can contain...

Страница 14: ...ile or with the ATTRIS command A password is a sequence of up to eight alphanumeric characters the first of which must be a letter drive Often when you re using your computer you ll have more than one...

Страница 15: ...If you issue the command DI RBI LLI NG 1 ENTER TRSDOS displays BILLING BILLING DAT Because you did not specify an extension TRSDOS assumed that all extensions are acceptable If you issue the command D...

Страница 16: ...d SET library commands Devspec When you want to access a device you use its device specification or devspec TRSDOS devices already have devspecs assigned to them You assign devspecs to devices that yo...

Страница 17: ...Section III TRSDOS Commands...

Страница 18: ...nd to set your computer to AUTOmatically perform a particular function at start up The Initialization commands are AUTO DATE SETCOM SYSGEN TIME You might find the Auxiliary commands helpful for such f...

Страница 19: ...a list of all library commands use the LIB command Type LI 6 ENTER and the following list is displayed Libran A Append Cop LinK List Route Run Libran 6 Device Dir Do Filter Lib Load MeMOry ReMove Rena...

Страница 20: ...ional parameter information Finally each entry gives examples of the command s use The command s syntax tells you what format to use when you type the command For example here is the syntax for the RE...

Страница 21: ...LRL parameter the LRL parameter tells TRSDOS to assign a specific record length to a destination filespec type copy NEW DAT l TO NEWDAT ONE 2 LRL 12B ENTER Every command uses some variation of the sy...

Страница 22: ...K I TO WEST IDAT 0 ENTER appends the information that you type on the keyboard to the end of WEST OAT on Drive 0 Press CONTROL SHIFT at the same time to end the append APPEND KI TO WEST DAT 0 ECHO ENT...

Страница 23: ...SET library command to close the file Sample Uses Suppose you have two data files PAYROLUA and PAYROLUB PAYROLUA PAYROLUB Atkins W R Lewis G E Baker J B Miller L O Chambers C P Peterson B Dodson M W R...

Страница 24: ...rd is specified If this parameter is omitted the level is unchanged You have to give a file an OWNER password before you can set PROT The optional levels for access to a file are EXEC Execute only REA...

Страница 25: ...same value either the password you specified or a blank password if you did not specify one ATTRIB allows you to assign a file two different passwords The user password could be for the operator It pr...

Страница 26: ...ASSWORD before it executes this command ATTRIB 1 NAME DATA PW SECRET MPW BOSSMAN ENTER sets the disk name in Drive 1 to DATA changes the master password to SECRET if the current disk master password i...

Страница 27: ...art up or reset by 1 holding down the ENTER key or 2 pressing BREAK while the auto command is executing The exception to this is when you store the AUTO command with the parameter which disables the B...

Страница 28: ...ID displays the AUTO command on Drive 1 AUTO 1 ENTERJ executes the AUTO command on Drive 1 Error Conditions To place an AUTO command on a disk it must be write enabled The system does not check the co...

Страница 29: ...word other than PASSWORD and you do not state it with the MPW parameter the system prompts for it as well If the destination drive is not ready the message Insert DESTINATION dis ENTER is displayed In...

Страница 30: ...on backing up backup limited diskettes see Appendix M Backup Limited Diskettes Backups With the X Parameter When you specify the X parameter you do not have to have a system disk in Drive 0 when you b...

Страница 31: ...UP 0 1 ENTEfJ backs up the disk in Drive 0 to the disk in Drive 1 Its main use is to back up non system disks such as data disks in a two drive system When you use this parameter you are prompted to i...

Страница 32: ...ce and destination disks have a different number of cylinders the following message appears C linder counts differ AttefrlPt frlirror iiTlage bacfZup Answer this question with CD to attempt a mirror i...

Страница 33: ...to memory with the SYSTEM SYSRES number command Remember that the X parameter is used only when there is a non system disk in Drive 0 Mirror Image Backup TRSDOS makes a mirror image backup if the sour...

Страница 34: ...oked because the two disks are of different sizes This command moves only the visible files If you want all of the files to be moved then you must use the command BACKUP 5 2 SYS INV This moves visible...

Страница 35: ...keys in time simply reset and hold the keys down as soon as the screen clears BOOT loads the TRSDOS system in floppy Drive 0 back into the computer It returns the computer back to its normal power up...

Страница 36: ...hich are not available from the keyboard The APPEND parameter lets you add data to the end of an existing file Some programs such as SCRIPSIT place their own marker at the end of a file If this marker...

Страница 37: ...g the I allows SPECIAL to be built without an extension BUILD MYJOBS JCL APPEND ENTER searches all available drives for MYJOBS JCL until it is found and adds the information from this build to the end...

Страница 38: ...s are packed together 00 ends a logical line and ENTER ends a physical line If a non hex digit is entered the error message Bad hex digit encountered is displayed and the build aborts Error Conditions...

Страница 39: ...ontrol 3 The Device Control codes are discussed in the CLEAR SHIFT D command section devspec is usually CL the RS 232C communications line Note Before you can use CL you have to SET it to its driver p...

Страница 40: ...ted to a different symbol using XLATER Use the same method that we used for XLATES See Appendix C for a list of characters and their hex values The Function Keys The Function Keys are used to 1 Direct...

Страница 41: ...ress CLEARl ZJ followed by CLEARl D If you are writing data to floppy disks and the RS 232 port is running at a speed higher than 300 baud you have to wait until you receive an entire file before turn...

Страница 42: ...t aside an area of memory to receive the data so any incoming data is ignored To save incoming data enter the command CLEAR followed by CLEAR Q Now data received is placed in the Data Received FR area...

Страница 43: ...it A CLEAR SHIFT J followed by a CLEAR O indicates Half Duplex Full Duplex is used with a computer that can read data while it is sending it or send data while it is receiving it A CLEAR SHIFT J follo...

Страница 44: ...art of an FR or FS file so you can start again For example if you are receiving a file and it aborts with an error you can startover by pressing CLEAR J followed by CLEAR SHIFT OO Then you can attempt...

Страница 45: ...the communications line Symbol Value Description DC1 17 X 11 Resume transmission XON or Proceed character DC2 18 X 12 Turns the FR device ON DC3 19 X 13 Pause transmission XOFF or Pause character DC4...

Страница 46: ...COMM closes it before it exits to TRSDOS This feature prevents you from having unclosed files in your system Quick Reference Label If you are a beginning COMM user you may find it helpful to make a la...

Страница 47: ...With some TRS 80 Bulletin Board Systems you can receive graphics characters For you to be able to accept these graphics the COM OVR driver has to be initialized at 8 bits per word see the SETCOM libr...

Страница 48: ...you want to send by pressing CLEAR followed by CLEARl ID and entering the name of the file in response to the prompt 2 Turn on the handshake mode by pressing CLEAR SHIFT D followed by ENTER assuming t...

Страница 49: ...ng end presses CLEAR followed by CLEAR ID and enters in the name of the file to be received Turn the dump to disk OTO OFF by pressing CLEAR W followed by CLEAR G This stores the file in memory as it i...

Страница 50: ...en both ends are ready the receiving end presses CLEAR J followed by CLEAR CJ The sending end then presses CLEAR followed by CLEAR C to turn ON the receive and send files 4 When the receiving end has...

Страница 51: ...break command To transmit a break character to another computer press CONTROLl J if the other computer is a Model II 12 or 16 Press CONTROLJC J if the other computer is a Model I or III Escape code s...

Страница 52: ...e destination disk DIR displays a short directory of a TRSDOS 1 3 disk If you do not specify destination drive a short directory is displayed If you specify DIR no files are moved If you don t specify...

Страница 53: ...fore each file is moved CONI 2 0 NEW ENTER moves only those files from Drive 2 that do not already exist on Drive 0 CONV DATA l 2 OLD ENTER moves any file whose filename is seven or eight characters l...

Страница 54: ...f source If CLONE is not specified the directory entry as well as the contents of source copies to destination The owner and user passwords are copied along with the assigned protection level the visi...

Страница 55: ...opies from the keyboard to the printer As keys are pressed they are sent to the line printer The keystrokes are visible on the video because the ECHO parameter is specified Pressing CONTROL SHIFT l or...

Страница 56: ...N dis f ENTER Receives the file being copied May appear twice in a row The disk must have a different Disk 10 disk name master password or date from the source diskette If it is a system disk use ATTR...

Страница 57: ...spec number can be from 1 to 256 If you omit this parameter the record length defaults to 256 REC number assigns the specified number of fixed length records to the file SIZE number allocates disk spa...

Страница 58: ...Up to 25 letters Social Security Number 11 characters Job Description Up to 92 characters Your records would need to be 25 11 92 128 bytes long You could create an appropriate file with this command C...

Страница 59: ...2 digit day of the month specification yy is a 2 digit year specification If you omit mm dd yy TRSDOS displays the current date It is important to set the date because TRSDOS uses the date when creat...

Страница 60: ...the file s protection is not execute only You can also automatically activate the debugger by holding down the key while the system is booting While in the DEBUG monitor you can enter any of a special...

Страница 61: ...4F h KI 00 00 M 05 00 78 00 87 00 x SP 03 EA 88 08 50 06 08 02 20 04 4A 2B 4F 4F 16067805 P J OO x 08 EI l 38 07 28 05 79 FE 03 28 6A E5 23 7D 23 BE 28 20 8 o FF00 20 20 20 20 20 2D 20 ZD 20 20 20 20...

Страница 62: ...and press SPACE BAR to modify the byte and move to the next address ENTER to modify the byte and exit from the A command If you do not specify address TRSDOS uses the current memory modification addr...

Страница 63: ...ple F3D08 3E14 00 ENTER fills the block of memory from 3008 to 3E14 with the value 00 G Go to an Address and Execute Gaddress breakpoint1 breakpoint2 Enter the above command line to begin execution at...

Страница 64: ...le step through the instructions pointed to by the PC register This command is identical to the C command except that any calls encountered are stepped through instruction by instruction Note that RST...

Страница 65: ...e Press rn to change the monitor format from the register display mode to full screen mode The full screen mode displays a page of memory 256 bytes beginning with the current display address see the 0...

Страница 66: ...unded by asterisks Hold down the ENTER key to abort the disk function Example 2 0 0 R 6000 2 ENTER reads into memory beginning at address X 6000 sectors 0 and 1 of cylinder 0 from the disk in Drive 2...

Страница 67: ...irectly from disk using DEBUG To use this command position the vertical bars over the file type byte at the beginning of any block Press J ENTER and DEBUG advances to the next load block header Exampl...

Страница 68: ...ER to exit the command V Compare Vfirst address second address length Enter the above command line to compare a block of memory beginning at first address to the block of memory beginning at second ad...

Страница 69: ...do not specify word DEBUG uses the last word given in a previous W command Example WAB06 3412 ENTER searches memory for word 1234 beginning at address AB06 The address where word is found is displayed...

Страница 70: ...40 Oden Sides 1 Step 12f1ts Oly Ss K X 08C3 00 X 0 00 PR X 0E2E 2 51 KI 50 00 cD JL NIl 3 Options Tn e 1 The DRIVE section shows the current configuration of the disk drives 2 The DEVICE section shows...

Страница 71: ...me is the amount of time the system waits after starting the drive motor before it attempts to access the disk NOTE The Step rate and Delay time are preset for this system Information needed to change...

Страница 72: ...brary command Examples DEV I CE ENTER displays the device table DEV I CE D NO ENTER displays the TRSDOS options and turns the drive portion of the display off Any new drives or disks are not detected...

Страница 73: ...the printer SYS displays the system files along with the visible files DATE displays the files with today s date DATE M1101IY1 M2102IY2 displays the files with modify dates between the two specified d...

Страница 74: ...1 18 1 50K 1 02 Feb 83 PATCH CMO EXEC 258 10780 247 3 00K I 01 Feb 83 PRINT OAT FULL 256 I 37 1 50K 1 16 Feb B3 PRINT TXT FULL 256 0 0 0 00K 0 TAMMY JCL FULL 258 I III 1 50K I 15 Feb 83 TESTFILE FULL...

Страница 75: ...led drives DI R 1 I S ENTER displays all files visible invisible and system on Drive 1 Specifying a drive that is not enabled or ready causes qn Illegal drive number error message or a No Disk message...

Страница 76: ...displays any file that matches partspec T T CMD on Drive 1 DI R CMD 2 ENTER displays all visible files on Drive except for those that have a CMD extension 1 71...

Страница 77: ...mpiled When you specify a control character you must leave a space between DO and the character or TRSDOS ignores the character The parameters are Iabe lets you create JCL files with multiple entry po...

Страница 78: ...SYSTEM JCl which contains the last DO file that was compiled DO TEST NEW 2 D 5IE 6 ENTER compiles and executes the file TEST NEW on Drive 2 The variable parameters D 5 and E 6 are passed as needed du...

Страница 79: ...o set up the following TRSDOS functions to execute by typing one command FORMS MARGIN 8 TIME CLOCK ON Use BUILD to create such a file If you called the file BEGIN then use the command DO BEG I N ENTER...

Страница 80: ...ecimal number TRA address sets the address at which your program begins executing after you load it If you omit this parameter any subsequent run of the file will only load the program and return you...

Страница 81: ...ince you did not specify a file extension to TEST it defaulted to ILMF Also since you did not specify a transfer address it is written to the file as a return to TRSDOS Ready DUMP WORD IMG 0 S 7000 E...

Страница 82: ...rams to devspec as you want to If there is not any more space in memory for the filter connection the error message No device space available appears See the SET command for more information on FILTEA...

Страница 83: ...DEN specifies the density of the disk as single DDEN specifies the density of the disk as double CYL number specifies the number of cylinders tracks for the disk number can be 35 to 96 QUERY NO turns...

Страница 84: ...rst character must be a letter Pressing ENTER causes the master password to default to PASSWORD The remaining prompts concern the type of diskette you are using Press ENTER in answer to each of them i...

Страница 85: ...f ENTER appears insert the system disk in Drive 0 and the format is completed FORMAT 1 QUERY NO lABS ENTER formats the disk in Drive 1 with the default options even if the disk already contains data B...

Страница 86: ...directory When the format begins you see the cylinder numbers appear as the necessary information is written to them After all cylinders are written FORMAT verifies that the proper information is act...

Страница 87: ...The default value for number is 66 MARGIN number sets the left margin PAGE number sets the physical page size as number of lines The default value for number is 66 QUERY prompts you for each parameter...

Страница 88: ...nuously rather than individually when the line count reaches 45 Be aware that certain printers cannot respond to FFHARD FORMS MARGIN 10 CHARS 80 INDENT lG ENTER causes all lines to start 10 spaces in...

Страница 89: ...SET FF TO FORMS FLT ENTER FILTER PR FF ENTER FORMS CHARS 55 LINES 20 PAGE 24 ENTER Now when you run your payroll program you can print the checks on the proper size form 1 84...

Страница 90: ...h enabled disk in the following format Drive 0 TRSDDSG0 02 02 83 Free Space 94 50K 180 00K Files 96 128 Drive 1 TRSDDS60 02 17 83 Free Space 91 50K 180 00K Files 97 128 Drive 2 No Disk Drive 3 No DisK...

Страница 91: ...k type hard or floppy This value will change depending on the type of drive 6 Detailed space allocation map The organization of data on the disk The numbers on the left represent the cylinders on the...

Страница 92: ...displays a list of the TRSDOS library commands Library A Append Copy Link List Route Run Dump Date Debug Sysgen System Spool Create Verify Library B Attrib Auto Build Free Purge Time Library C Forms...

Страница 93: ...devices in the link command line is important Once linked any information sent to devspec1 is also sent to devspec2 and any information requested from devspec1 can also be supplied by devspec2 Howeve...

Страница 94: ...TITXT remains open until you issue a RESET DU command To break the link between the printer and PRINTITXT without closing the file use the RESET PR command See the ROUTE and RESET library commands als...

Страница 95: ...es REC number sets the starting record number to number If you omit the REC parameter TRSDOS uses 0 The REC parameter is used only with the HEX parameter LRL number sets the logical record length to b...

Страница 96: ...f 8 LIST REPLY T T NUMtTAB 10tP ENTER prints a listing of REPLY TXT on the printer numbering each line that is printed Lines are numbered beginning with 00001 Any tab character encountered causes a ju...

Страница 97: ...OAD STATUS CMD ENTER loads the file STATUS CMD into memory LOAD Xl PROGRAM CIM ENTER loads PROGRAM CIM from a non system disk The system prompts you to insert the disk with the desired file on it with...

Страница 98: ...LOG CMD Utility I LOG CMD is used in Radio Shack hard disk installations See your hard disk manual for an explanation on how to use this utility 1 93...

Страница 99: ...efault value ADD address displays the word at address and specifies the address of WORD and BYTE If you specify ADD the current contents of the address are displayed and WORD and BYTE are not necessar...

Страница 100: ...X 0000 X 3E0A High E100 LOIAI 2FFF 1 The address specified in hexadecimal notation 2 The decimal equivalent of the address 3 The new contents of address and address 1 in MSB LSB format 4 The current...

Страница 101: ...and ICMD is its default extension filespec2 contains the patch commands filespec2 can contain only ASCII characters and IFIX is its default extension The patch commands are address value identifies t...

Страница 102: ...nd changes a file by direct modify patch It changes a file by directly applying the patch code to the specified record and byte of filespec When you BUILD a file containing patch commands in this form...

Страница 103: ...comment onto the end of a patch command by using a semicolon to separate the two parts You can also use SCRIPSIT to create a PATCH file When you create a PATCH file with SCRIPSIT use the S A type of...

Страница 104: ...he data in LIB1 FIX Since you did not specify an extension to LIB1 it defaulted to FIX This patch is in the memory load location mode Library patches can also be done with the direct disk modify mode...

Страница 105: ...ate Once you enter the PURGE command TRSDOS prompts you for the disk s password if it is not PASSWORD unless you specified it with the MPW parameter Then the system displays the files one at a time It...

Страница 106: ...th the extension ICMD PURGE 1 DATE 102 011B1 ENTER purges all visible files on Drive 1 with modify dates of February 1 1981 or later You are questioned before each file is removed Sample Use Refer to...

Страница 107: ...sword the error message Illegal access attempted to protected file is displayed If you supply the wrong password the error message File access denied is displayed REMOI JE LU ENTER removes the user cr...

Страница 108: ...the system devices KI 00 PR SI SO and JL Examples RENAME TEST IDAT Ql TO DLD DAT ENTER renames TEST OAT on Drive to OLD OAT RENAME TEST IDAT Ql TO REAL ENTER renames TEST OAT on Drive to REAL OAT Sin...

Страница 109: ...d because you did not add a I to TESTER Suppose you want to rename TEST JCL to TEST ASS but the file TEST ASS already exists Typing RENAME TEST JCL TO TEST ABS ENTER produces the error message Duplica...

Страница 110: ...read any disk formatted by any disk operating system other than TRSDOS Version 6 LDOS 5 1 3 or their successors Once a disk is modified by TRSDOS the operating system that created it may not be able...

Страница 111: ...a DEVICE library command and examine the device table that is displayed You can use the REMOVE library command to remove the device from the device table once it points at NIL Example Suppose you hav...

Страница 112: ...Example Suppose that your system lost power and there is a file named PRINTER OAT that is not properly closed RESET PR INTER DAT ENTER closes the file named PRINTERIDAT and lets you access it 1 107...

Страница 113: ...ally sent to the printer will be displayed on the screen ROUTE PR TO PRINTER OAT routes the printer PR to a disk file PRINTER OAT All data normally sent to the printer will be stored in a disk file na...

Страница 114: ...pend the time allocating more space Sample Use Suppose you want to route a report producing program to a file instead of printing the report Issue the command ROUTE PR TO REPORT DAT ENTER Now you can...

Страница 115: ...ions RUN filespec must load above X 2FFF RUN X filespec must load above X 2FFF Examples RUN CONTROLI CMD ENTER loads a program named CONTROLlCMD and executes it CONTROLlCMD ENTER loads a program named...

Страница 116: ...ce you set a system device to a driver the device is controlled by your own driver program rather than the TRSDOS driver program The parameters are values sent to the driver filespec These parameters...

Страница 117: ...ur program The parameters are values sent to the filter program These parameters are totally independent of the SET command They are determined only by the needs of your filter program Example Suppose...

Страница 118: ...ate number can be 110 135 150 300 600 1200 2400 4800 9600 The default value for BAUD is 300 WORD number sets the word length to number number can be 5 6 7 or 8 The default value for number is 7 STOP n...

Страница 119: ...ne character buffer to prevent loss of characters during disk I O and other lengthy operations The system usually uses the CL devspec to communicate with the RS 232C port If you are using a serial pri...

Страница 120: ...er to set the system break bit whenever a modem break extended null or an ASCII logical BREAK is received The system pause bit is set whenever the hex code 60 is received The system enter bit is set w...

Страница 121: ...1 number equals 2 when the system is started or reset WAIT number sets the initial delay between the time a key is first pressed and the first repeat of that key as number number is any number greate...

Страница 122: ...vailable space in K on the disk PAUSE temporarily suspends output to devspec RESUME restarts devspec after a PAUSE CLEAR clears the spool buffer How Data Is Spooled To a Device All data sent to devspe...

Страница 123: ...riginally given If they do an error occurs Examples SPOOL PR TO TE TFILE 0 MEM S DISK lS ENTER allocates 5K of memory and 15K of disk space in a file named TEXTFILE SPL on Drive 0 Since you did not sp...

Страница 124: ...or REMOVE library command SPOOL must be turned off to close the file Sample Use Since most programs produce reports faster than the printer can print the data you can use SPOOL to let the programs run...

Страница 125: ...onfigurations are stored in a file named CONFIG SYS The file is invisible in the directory Each time you reset your computer the configuration stored in this file is loaded into memory If you don t wa...

Страница 126: ...use existing data to be overwritten Examples SYSGEN YES ENTER creates a configuration file on Drive 0 and writes the system configuration to it SYSGEN NO ENTER removes the configuration file from Driv...

Страница 127: ...character in the upper right corner of the screen If the alive bug is moving the task processor is running Note that the alive bug may continue moving indicating an alive system even when the SYSTEM T...

Страница 128: ...prompt if it has been disabled with the NO switch If yotJ do not specify switch YES is assumed If you specify the switch as NO the date prompt is disabled when you power up or restart your system Sinc...

Страница 129: ...not write to the disk although you can still read from it If you specify WP NO you can write to and read from the disk assuming the disk is not hardware write protected If you do not specify drive the...

Страница 130: ...assigned to which logical drive number SYSTEM TIME s A itch ENTER turns on or off the start up time prompt The switch is either YES or NO If you specify TIME YES you enable the start up time prompt I...

Страница 131: ...parameters are READ specifies that you want to read a file file or filet from tape and write it to a file file or file2 on disk If you specify READ you do not have to specify filet TRSDOS simply reads...

Страница 132: ...er up or reset with the SYSTEM TIME command Examples TI ME CENTER displays the real time of the system The clock is reset to 1 1 1 1 1 1 every time you power up TIME CLOCK YES ENTER displays the real...

Страница 133: ...time All disk writes are automatically verified during any BACKUP utility function whether or not the VERIFY switch is on The state of the VERIFY command can be saved in the configuration file with th...

Страница 134: ...Part III BASIC For TRSDOS Version 6 Reference Manual...

Страница 135: ...ion includes a definition for each of BASIC s keywords statements and functions in alphabetical order In addition it shows how to write a program to store data on disk IMPORTANT NOTE If you have read...

Страница 136: ...s are optional a command with its parameter s or a function with its argument s This shows the format to use for entering a keyword in a program line Terms Used in Chapter 7 for Brevity line integer s...

Страница 137: ...r 1 Sample Session Chapter 2 Command Mode Execution Mode Chapter 3 Line Edit Mode Section IV The BASIC Language Chapter 4 BASIC Concepts Chapter 5 Disk Files Chapter 6 Introduction to BASIC Statements...

Страница 138: ...Section 111 Operations...

Страница 139: ...u Dec 1 1983 and displays the message TRSDOS Ready This indicates that you are at the Operating System level To load BASIC into the system type BAS I C ENTER A paragraph with copyright information app...

Страница 140: ...on at 32768 allows six data files to be open Notice that the sequence in which the M and F options are specified is irrelevant TRSDOS Read BASIC initializes BASIC allows three data files to be open us...

Страница 141: ...sign it the filespec AUTHOR Type the following command SAl E AUTHOR ENTER It takes a few seconds for the computer to find a place on disk to store our program When this process is completed it display...

Страница 142: ...pe LOAD filespec R Example LOAD AUTHOR R ENTER tells the computer to load the program AUTHOR from disk into memory option R tells the computer to run it Another way to load and run a program is to typ...

Страница 143: ...e number A physical line on the other hand is one line on the display It contains a maximum of 80 characters For example if you type 100 R s and then press ENTER you have two physical lines but only o...

Страница 144: ...r message immediately after pressing ENTER Special Keys in the Command Mode 8 Backspaces the cursor erasing the preceding or CTRL OD character in the line Use this to correct typing errors before pres...

Страница 145: ...Terminates execution and returns you to command mode Interprets data entered from the keyboard as a response to the INPUT statement 2 15...

Страница 146: ...type EDIT 1 ine nUfTlbe r ENTER This lets you edit the specified line number If the line number you specify has not been used an Undefined line number error occurs If you do not have a space after the...

Страница 147: ...re than one space at a time type the desired number of spaces first then press the space bar For example type 6 and press the space bar The display should show something like this depending on how man...

Страница 148: ...FOR I 1 TO 10 STEP 5 PRINT I 1 2 1 3 NE T We can now add another statement to the line or delete material from the line by using the 8 key For example type PRINT DONE ENTER at the end of the line If...

Страница 149: ...an END statement The display shows 100 FOR I 1 TO 10 STEP 25 PRINT I 1 2 1 3 NE T Press 00 then type END and press ENTERl List the line 100 FOR I 1 TO 10 STEP 25 PRINT I 1 2 I 3 NE T END should be dis...

Страница 150: ...1 TO 10 STEP 25 PRINT I 1 2 I 3 When you list the complete line you will see that everything from the PRINT to the next statement has been deleted nC Change Lets you change the specified number of ch...

Страница 151: ...to escape from the insert subcommand mode The next time you list the line it should appear as 100 FOR I 1 TO 15 STEP 25 NEXT I END nKc Search and Kill Deletes all characters up to the nth occurrence...

Страница 152: ...Section IV The BASIC Language...

Страница 153: ...t operators and functions you can use to manipulate and test your data D How to Construct an Expression This topic can help you in constructing powerful statements instead of using many short ones A O...

Страница 154: ...m specific operations For example GO TO 11 1 tells the computer to perform the operations of 1 locating line 100 2 transferring control to that line and 3 executing the statement s on that line END te...

Страница 155: ...utations on data Some serve a special purpose such as controlling the video display or providing data on the status of the computer You may use functions in the same manner that you use any data as pa...

Страница 156: ...and one numeric constant 2 In these examples the constants input to the PRINT statement They tell PRINT what data to print on the display These are more examples of constants 3 14159 1 775E 3 NAME TI...

Страница 157: ...equires that all reserved words be delimited This means that you must leave a blank space between a reserved word and any variables constants or other reserved words See Appendix F for a list of BASIC...

Страница 158: ...ension two in the second and two in the third for a total of 2 2 2 8 elements How BASIC Stores Data The way BASIC stores data determines the amount of memory it consumes and the speed in which BASIC c...

Страница 159: ...n all be stored as single precision values But even though BASIC stores a number with up to seven digits of precision when printing it only six digits are shown NOTE When used in a decimal number the...

Страница 160: ...Hex 4A Code ASCII Char J acter A string can be up to 255 characters long Strings with length zero are called null or empty How BASIC Classifies Constants When BASIC encounters a data constant in a sta...

Страница 161: ...th a type declaration tag at the end Rule 4 If the number is not an integer and contains seven or fewer digits it is single precision For example 1234567 1 23 1 3321 are all classified as single preci...

Страница 162: ...example in A 1 23456789D 1 the double precision constant has the value 0 123456789 How BASIC Classifies Variables When BASIC encounters a variable name in the program it classifies it as either a str...

Страница 163: ...what attributes have been assigned to the letters I F N and C T RY QUAN PERCENT are all single precision variables regardless of what attributes have been assigned to the letters T R Q and P X RR PRE...

Страница 164: ...pe such as A Ai A A A A X The conversion procedures are explained on the following pages Single or double precision to integer type BASIC rounds the fractional portion of the number NOTE The original...

Страница 165: ...ion number If the original value has an exact binary representation in single precision format no error is introduced For example A 1 5 stores 1 5000000000000 in A since 1 5 does have an exact binary...

Страница 166: ...T A which prints a value of 1 3 The conversion in line 20 causes the value in A to be stored accurately in double precision variable A Illegal Conversions BASIC cannot automatically convert numeric va...

Страница 167: ...ample A B 2 PRINT 5 Operators fall into four categories Numeric String Relational Logical based on the kinds of operands they require and the results they produce Numeric Operators Numeric Operators a...

Страница 168: ...on and returns a single precision result NOTE To enter the operator press CLEAR D For example PRINT 6 3 prints 6 to the 3 power Multiplication The operator is the symbol for multiplication Once again...

Страница 169: ...rand is converted For example when one operand is integer type and the other is single precision the integer is converted to single precision and four byte addition is performed When one operand is si...

Страница 170: ...CATSLOl JEM I CE Since BASIC does not allow one string to be longer than 255 characters you will get an error if your resulting string is too long Relational Operators Relational operators compare tw...

Страница 171: ...e two strings NOTE Appendix C contains a listing of ASCII codes for each character Examples of true relational expressions A B The ASCII code for A is decimal 65 for Bit s 66 CODE COOL The ASCII code...

Страница 172: ...re used in IFtTHEN statements to make a logical test between two or more relations For example IF A 1 OR C 2 THEN PR I NT The logical operator OR compares the two relations A 1 and C 2 Logical operato...

Страница 173: ...oth bits are 1 1 1 1 or both bits 1 l l are l the l 1 l result is 1 l l 1 IMP The result is 1 1 1 1 unless the first 1 l l bit is 1 and the l 1 1 second bit is l l l 1 Hierarchy of Operators When your...

Страница 174: ...shown in decreasing order of precedence and are executed as encountered from left to right For Numeric Operations Parentheses Exponentiation Unary sign operands not addition and subtractionJ 1 Multipl...

Страница 175: ...u from having to write a BASIC routine and they operate faster than a BASIC routine would Examples SQR A 6 tells BASIC to compute the square root of A 6 MID A t3t2 tells BASIC to return a substring of...

Страница 176: ...QR 8 are all simple numeric expressions since they only consist of one numeric term A STRING 20 A WORD M are all simple string expressions since they only consist of one string term Here s how a simpl...

Страница 177: ...s how a complex string expression is formed Most functions except functions returning system information require that you input either or both of the following kinds of data One or more numeric expres...

Страница 178: ...ned is a number the function may be used as a term in a numeric expression If the data is a string the function may be used as a term in a string expression SIN A STR X VAL A LOG 53 are all examples o...

Страница 179: ...order it was stored sequentially To read from or write to a particular section in the file you must first read through all the contents in the file until you get to the desired section Data is stored...

Страница 180: ...ame buffer used to OPEN the file Sample Program 10 OPEN 0 1 LIST EMP 20 LI NE INPUT NAME N 30 IF N DONE THEN 60 1I0 WRITE 1 N 50 PR I NT GOTO 20 60 CLOSE 1 RUN NOTE The file L1ST EMP stores the data y...

Страница 181: ...0 OPEN 1 1 LIST EMP 20 IF EoF 1 THEN 100 30 INPUT 1 N 40 PRINT N 50 GoTo 20 100 CLOSE Updating a Sequential Access File 1 To add data to the file OPEN it in E extend mode OPEN E 1 LIST EMP opens the f...

Страница 182: ...access files requires more program steps than sequential access files However direct access files are more flexible and easier to update One important note BASIC allocates space for records in numeri...

Страница 183: ...buffer use the LSET statement Numeric values must be converted into strings when placed in the buffer To do this use the make functions MKI to make an integer value into a string MKS for a single prec...

Страница 184: ...TO END 0 BASIC stored SMITH 34 55 and 567 9000 in record 20 of file LISTING Accessing a Direct Access File 1 OPEN the file in 0 mode R can also be used Example OPEN D 1 FILE 32 2 Use the FIELD statem...

Страница 185: ...j CODEX 35 IF CODE 0 THEN 1000 40 GET 1 CODE 50 PRINT N 60 PRINT USING j Cl JS A 70 PRINT P PRINT 80 GO TO 30 1000 CLOSE 1 After typing this program SAVE it and RUN it When BASIC asks you to enter a 2...

Страница 186: ...functions That is because a statement is a complete instruction to BASIC while a function is a built in subroutine which may only be used as part of a statement Some keywords have several sample prog...

Страница 187: ...defines variables as single precision defines variables as strings defines the entry point for USR routines dimensions an array erases an array assigns a value to a variable the keyword LET may be omi...

Страница 188: ...isk file writes data to a sequential disk file writes data to a disk file using the specified format puts a record into a direct access file moves data and right justifies it to a field in a direct ac...

Страница 189: ...TRSDOS LEN LOG INSTR INP INT COS CSNG EXP FIX FRE Functions A function is a built in subroutine It may only be used as part of a statement Most BASIC functions return numeric or string data by perform...

Страница 190: ...type returns a string of characters returns the time POS MKS MKD CVI CVS Input Output Functions perform input output to the keyboard display line printer or disk files INKEY returns the keyboard char...

Страница 191: ...mber is greater than or equal to zero ASS number number If number is less than zero ASS negative number number Example ABS Y computes the absolute value of Y and assigns it to X Sample Program 100 INP...

Страница 192: ...hat only those characters are input and exclude all other characters you can insert the following routine 100 INPUT ENTER A HE ADECIMAL l JALUE 0 9 lA F N 110 A ASC N I et ASCII code 120 IF A 47 AND A...

Страница 193: ...mber every time you press ENTER Immediately following the line number you can enter your text for that line AUTO begins numbering at line and displays the next line using increment The default for bot...

Страница 194: ...CALL instruction The corresponding subroutine should return with a simple RET The method for passing parameters depends upon the number of parameters to pass 1 If the number of parameters is less tha...

Страница 195: ...subroutines as well as those subroutines written in assembly language See also USR and VARPTR Example 110 MY ROUT HD000 120 CALL MYRoUTCI J KI We assume that 0000 is the address for an assembly langua...

Страница 196: ...rograms and passing variables each new program must contain a COMMON statement The MERGE option overlays the lines of filespec with the main program See MERGE to understand how BASIC overlays merges p...

Страница 197: ...MENSION STATEMENT IN PRoG 1 80 CHAIN PRoG1 80 80 END Save this program as PROG2 using the A option Load PROG1 and run it Your screen should display I JAR I ABLES I N COMMON MUST BE ASS I GNED VALUES B...

Страница 198: ...r defined functions for use by the chained program That is any DEFINT DEFSNG DEFDBL DEFSTR or DEF FN statements containing shared variables must be restated in the chained program When using the MERGE...

Страница 199: ...0 31 represent certain control functions 100 CLS 110 INPUT TYPE IN THE CODE 32 255 C 120 PRINT CHR C 130 GOTO 110 For a complete list and discussion of output to the video display see the Character C...

Страница 200: ...e default is 512 bytes or one eighth of the memory available whichever is smaller An Out of memory error occurs if there is insufficient stack space for program execution NOTE BASIC allocates string s...

Страница 201: ...no effect Do not remove a diskette which contains an open file CLOSE the file first This is because the last records may not have been written to disk yet Closing the file writes the data if it hasn...

Страница 202: ...ace for variables so they can be passed to a CHAINed program COMMON may appear anywhere in a program but we recommend using it at the beginning The same variable cannot appear in more than one COMMON...

Страница 203: ...imarily a debugging tool During a break or stop in execution you may examine variable values using PRINT or change these values Then type CaNT ENTER execution continues with the current variable value...

Страница 204: ...n displays 144 See also STOP I COS number Function I Computes the cosine of number COS returns the cosine of number in radians The number must be given in radians When number is in degrees use COS num...

Страница 205: ...double precision when its single precision value is printed only six significant digits are shown BASIC rounds the number in this conversion Example PRINT CSNG 1453885508 prints 145389 Sample Program...

Страница 206: ...respectively Examples Suppose the name GROSSPAY references an eight byte field in a direct access file buffer and after GETting a record GROSSPAY contains an MKD representation of the number 13123 38...

Страница 207: ...DATA statement must match up with the variable types in the corresponding READ statement otherwise a Syntax error occurs Examples 1340 DATA NEW YORK CHICAGO LOS ANGELES PHILADELPHIA DETROIT stores fi...

Страница 208: ...em supports dates between January 1 1980 and December 31 1987 During a program if you request the date BASIC displays it in this fashion 03 12 83 Sample Program 1080 PRINT Inl Jento r Checf 1100 IF DA...

Страница 209: ...L through P as double precision variables Their values include 17 digits of precision though only 16 are printed out 10 DEFSTR A classifies all variables beginning with the letter A as string variable...

Страница 210: ...ition mayor may not appear as variable If it does BASIC uses its value to perform the function Otherwise it uses the current value of the variable Once you define and name a function by using this sta...

Страница 211: ...broutines as necessary However only 10 definitions may be in effect at one time If you omit digit BASIC assumes USR0 See also USR VARPTR and CALL Examples DEF USR3 H7D00 assigns the starting address 7...

Страница 212: ...r Examples DELETE 70 deletes line 70 from memory If there is no line 70 an error will occur DELETE 50 110 deletes lines 50 through 110 inclusive DELETE 40 deletes all program lines up to and including...

Страница 213: ...d Arrays can be created implicitly without explicit DIM statements Simply refer to the desired array in a BASIC statement For example A S 3QlQl creates array A and assigns element A 5 the value of 300...

Страница 214: ...2 sets up three arrays 81 and CR are three dimensional each containing 3 6 9 elements LY is two dimensional containing 51 3 string elements I EDIT line Statement I Enters the edit mode so that you ca...

Страница 215: ...other than the last sequential line An END statement at the end of a program is optional Sample Program 40 INPUT 51 t 52 50 G05UB 100 55 PRINT H 80 END 100 H 5QR 51 51 52 52 110 RETURN line 60 preven...

Страница 216: ...true when it has been read The buffer number must access an open file Sample Program The following sequence of lines reads numeric data from DATAlTXT into the array A When the last data character in...

Страница 217: ...ension arrays or use their previously allocated space in memory for other purposes If one of the parameters of ERASE is a variable name which is not used in the program an Illegal Function Call occurs...

Страница 218: ...led line number 0 is returned Otherwise ERL returns the line number in which the error occurred If the error occurred in the command mode 65535 the largest number representable in two bytes is returne...

Страница 219: ...r is an Out of Memory error code 7 if it is any other error control goes instead to line 2000 For an example of how to use ERR in a program see ERROR IERRS Function I Returns a system error number and...

Страница 220: ...onding to that code had occurred Refer to Appendix D for a listing of Error Codes and their meanings Example ERROR 1 a Next Without For error code 1 occurs when BASIC reaches this line Sample Program...

Страница 221: ...of number This is the inverse of the LOG function therefore number EXP LOG number The number you supply must be less than or equal to 87 3365 The result is always single precision Example PRINT E P 2...

Страница 222: ...does not clear the buffer s contents only the means of accessing it Also two or more field names can reference the same area of the buffer See also the chapter on Disk Files OPEN CLOSE PUT GET LSET a...

Страница 223: ...e decimal point are simply chopped off so the resultant value is a whole number For a negative non whole number X FIX X INT X 1 For all others FIX X INT X The result is the same precision as the argum...

Страница 224: ...tes the loop and continues with the statement after NEXT If increment has a negative value then the final value of variable is actually lower than the initial value BASIC always sets the final value f...

Страница 225: ...atement may be used for all of them Sample Program 880 FOR I 1 TO 3 890 PRINT OUTER LOOP 900 FOR J 1 TO 2 910 PRINT INNER LOOP 920 NEi T J 930 NEi T I This program performs three outer loops and withi...

Страница 226: ...ll prints the amount of memory left PRINT FRE L L prints the amount of memory left I GET buffer record Statement I Gets a record from a direct access disk file and places it in a buffer Before using G...

Страница 227: ...statement which follows GOSUB GOSUB is similar to GOTO in that it may be preceded by a test statement Every subroutine must end with a RETURN Example GOSUB 1000 branches control to the subroutine at...

Страница 228: ...values assigned in the command mode to variables in the execute mode Example GOTO 100 transfers control automatically to line 100 Sample Program 10 READ R 20 IF R 13 THEN END 30 PRINT R jR 40 A 3 14 R...

Страница 229: ...them though Examples PRINT HE 30 t HE S0 t HE 80 prints the following strings 1E 32 SA HE lB Y is the hexadecimal string representing the integer quotient X 16 IF THEN ELSE Statement IF expression TH...

Страница 230: ...clause IF A YES THEN 210 ELSE IF A NO THEN a00 ELSE 370 branches to line 210 if A is YES If not the program skips over to the first ELSE which introduces a new test If A is NO then the program branch...

Страница 231: ...t inside some sort of loop Otherwise a program execution would pass through the line containing INKEY before a key could be pressed Example 10 A INKEY 20 IF A 1111 THEN 10 This causes the program to w...

Страница 232: ...PUT with too many items or with the wrong type of value including numeric type causes BASIC to print the message Redo from start No values are assigned until you provide an acceptable response If a pr...

Страница 233: ...to the beginning of the file The pointer advances each time data is input To start reading from the beginning of the file again you must close the file buffer and re OPEN it INPUT doesn t care how the...

Страница 234: ...is terminated Examples INPUT lt At5 sequentially inputs two numeric data items from disk and places them in A and B Buffer 1 is used INPUT 4t A t 5 t C sequentially inputs three string data items fro...

Страница 235: ...NPUT to have an operator input a password for accessing a protected file By using INPUT the operator can type in the password without anyone seeing it on the video display To see the full file specifi...

Страница 236: ...e that the entire substring must be contained in the search string or zero is returned Optional integer sets the position for starting the search If omitted INSTR starts searching at the first charact...

Страница 237: ...BURLESON T 76148 430 DATA 71 FIRSTFIELD ROAD GAITHERSBURG MD 20760 440 DATA 1000 TWO TANDY CENTER FORT WORTH T 76102 450 DATA 16633 SOUTH CENTRAL EXPRESSWAY RICHARDSON TX 75080 460 DATA END jlNT nUmbe...

Страница 238: ...AS deletes this file from the first drive which contains it KILL DATA 2 deletes this file from Drive 2 only I LEFT sfring infegerj Function I Returns the leftmost integer characters of string If integ...

Страница 239: ...Y Line 750 gets the three leftmost characters of A and stores them in B Line 760 prints these three characters a string and the original contents of A ILEN slring Function I Returns the number of char...

Страница 240: ...t you might want to use LET to be compatible with versions of BASIC that do require it Examples LET A A ROSE IS A ROSE LET 51 1 23 LET Z 1 In each case the variable on the left side of the equals sign...

Страница 241: ...d quotes can be used as part of the string input Leading blanks are not ignored they become part of variable The only way to terminate the string input is to press ENTER Some situations require that y...

Страница 242: ...you want to read in data without following the usual restrictions regarding leading characters and terminators LINE INPUT reads everything from the first character up to the end of file the 255th dat...

Страница 243: ...ur program You can substitute period for either startline or endline to signify current line number Examples LIST displays the entire program To stop the automatic scrolling press SHIFT D This freezes...

Страница 244: ...en LLiST and LIST is that LLiST lists the lines on printer See LIST Examples LUST lists the entire program to the printer To stop this process press SHIFTlC This causes a temporary halt in the compute...

Страница 245: ...OPEN files LOAD with the R option leaves all OPEN files open and runs the program automatically You can use either of these commands inside programs to allow program chaining one program calling anot...

Страница 246: ...valid for sequential files It returns the number of sectors 256 byte block read from or written to the file since the file was OPENed Example IF LOC 1 55 THEN END if the current record number is great...

Страница 247: ...sting file you often need a way to know when you ve read the last valid record LOF provides a way 1540 OPEN R 1 IUNKNoWNIT T 255 1550 FIELD 1 255 AS A 1560 FOR 1 1 TO LOF 1 LoF 1 HIGHEST 1570 GET 1 I...

Страница 248: ...alue 1 14473 Z 10 LOG Ps P1 performs the indicated calculation and assigns the value to Z Sample Program This program demonstrates the use of LOG It utilizes a formula taken from space communications...

Страница 249: ...POSlXl G0 THEN LPRINT LPRINT LPRINT USING Statement LPRINT data LPRINT USING format data Prints data on the printer See PRINT and PRINT USING for more information Examples LPRINT IA 21 3 prints the va...

Страница 250: ...ters The statements LSET NM JIM CRICKET JR LSET AD 2000 EAST PECAN ST set the data in the buffer as follows JIM CRICKET JR 2000 EAST PECAN ST Notice that filler blanks were placed to the right of the...

Страница 251: ...rs MEM requires no argument Example PRINT MEM Enter this command in the immediate mode no line number is needed The number returned indicates the amount of leftover memory that is memory not being use...

Страница 252: ...is portion of the new program will be numbered 70 75 80 85 90 If line numbers on the disk program coincide with line numbers in the resident program the disk program s lines replace the resident progr...

Страница 253: ...ne SUB TXT is stored on disk in ASCII format 90 GOSUB 1000 1000 REM 1010 REM 1020 REM 1030 REM 1040 RETURN You can MERGE the subroutine with the main program with MERGE SUB T n and the new program in...

Страница 254: ...acter to be changed Length is a number specifying the number of characters to be replaced Replacement string is the string to replace a portion of oldstring The length of the resultant string is alway...

Страница 255: ...rs beginning with the character at position integer Examples If A WEATHERFORD then PRINT MID A 3 2 prints AT F MID A 3 puts ATHERFORD into F Sample Program 200 INPUT AREA CODE AND NUMBER NNN NNN NNNN...

Страница 256: ...hich make up the number are not changed only one byte the internal data type specifier is changed so that numeric data can be placed in a string variable MKD returns an eight byte string MKI returns a...

Страница 257: ...is left unchanged The new filespec may not contain a password or drive specification Example NAME FILE AS FILE OLD renames FILE as FILE OLD NAME B AS A renames B as A Statement I Deletes the program...

Страница 258: ...tion of the integer quotient X 84 to base 8 ON ERROR GOTO ION ERROR GOTO line Statement I Transfers control to line if an error occurs This lets your program recover from an error and continue executi...

Страница 259: ...e is three the third line number in the list is the destination of the branch If expression s value is zero or greater than the number of items in the list but less than or equal to 255 BASIC continue...

Страница 260: ...destination of the branch If there is no fourth line number control passes to the next statement in the program If the value of expression is negative or greater than 255 an Illegal function call err...

Страница 261: ...her OPEN statement You must first CLOSE the first file Examples OPEN 0 2 DATA BAS SPECIAL opens the file DATA BAS in direct access mode with the password SPECIAL Buffer 2 is used If DATA BAS does not...

Страница 262: ...o retrieve information from the file using INPUT or LINE INPUT If MGT does not exist a File not found error occurs See the chapter on Disk Files for programming information I OPTION BASE n Statement I...

Страница 263: ...gned ports see the Technical Reference Manual Example OUT 32 100 sends 1 to port 32 I PEEK memory locatIon Function I Returns a byte from memory location The memory location must be in the range 32768...

Страница 264: ...h a byte is to be read PEEK and POKE are useful for storing data efficiently loading assembly language subroutines and passing arguments or results to and from assembly language subroutines For more i...

Страница 265: ...ata Statement I Prints numeric or string data on the display BASIC prints the values of the data items you list in this statement You may separate the data items by commas or semicolons If you use com...

Страница 266: ...Examples PRINT DO i NOT i LEAl JE i SPACES BETWEEN i THESE i WORDS prints on the display DONOTLEAVESPACESBETWEENTHESEWORDS Sample Program 80 INPUT ENTER THIS YEAR i Y 70 INPUT ENTER YOUR AGE iA 80 INP...

Страница 267: ...escribed below They are followed by sample program lines and their output to the screen Specifiers for String Fields Print the first character in the string only PRINT USING PERSONNEL P Print 2 n char...

Страница 268: ...a percent sign is also printed in front of the rounded number PRINT USING 111 22 111 22 If the number of digits specified exceeds 24 an Illegal function call occurs PRINT USING 75 0 75 PRINT USING 87...

Страница 269: ...er PRINT USING _ _ 12 34 12 34 Sample Program 420 CLS A 1 DOLLARS 430 INPUT WHAT IS YOUR FIRST NAME F 440 INPUT WHAT IS YOUR MIDDLE NAME M 450 INPUT WHAT IS YOUR LAST NAME L 460 INPUT ENTER AMOUNT PAY...

Страница 270: ...It can also be a a pair of numbers r c where 23 r 0 and 79 c 0 Whenever you instruct BASIC to PRINT the bottom line of the display it generates an automatic line feed everything on the display moves u...

Страница 271: ...des n by 80 and uses the remainder of the division as the tab position For example if you enter the line PRINT NAME TAB 85 AMOUNT BASIC converts TAB 84 into TAB 4 Since the cursor is already at column...

Страница 272: ...the data before writing it to disk It writes an ASCII coded image of the data Examples If A 123 L15 PRINT itA writes this nine byte character sequence onto disk 123 L15 carria e return The punctuation...

Страница 273: ...itted the current record number is used This statement moves data from the buffer of a file into a specified place in the file If record is higher than the end of file record number then record become...

Страница 274: ...ut RANDOM at the beginning of the program This will help ensure that you get a different sequence of pseudorandom numbers each time you run the program RANDOM needs to execute just once Sample Program...

Страница 275: ...ntax error occurs If the number of variables in the READ statement exceeds the number of elements in the DATA statement s an Out of data error message is printed If the number of variables specified i...

Страница 276: ...ting of your program or someone else does it will be easier to figure it out If REM is used in a multi statement program line it must be the last statement in the line You may use an apostrophe as an...

Страница 277: ...er of the first line will be 10 RENUM 600t 5000t 100 renumbers all lines numbered from 5000 up The first renumbered line will become 600 and an increment of 100 will be used between subsequent lines R...

Страница 278: ...g XXXX Note that RENUM renumbers the program in spite of this warning message It does not change the incorrect line number reference but it does renumber YYYY according to the parameters in your RENUM...

Страница 279: ...number RESUME NEXT causes the computer to branch to the statement following the point at which the error occurred A RESUME that is not in an error handling routine causes a RESUME without error messa...

Страница 280: ...OGRAM FINDS THE AREA OF A CIRCLE 340 INPUT TYPE IN A I JALUE FOR THE RADIUS R 350 GOSUB 370 380 PR I NT AREA IS A END 370 A 3 14 R R 380 RETURN IRIGHT slring number Function I Returns the rightmost nu...

Страница 281: ...D produces a pseudorandom number using the current seed number BASIC generates the seed internally therefore it is not accessible to the user RND may be used to produce random numbers between 0 and 1...

Страница 282: ...OW Y assigns the cursor s current row number to X Sample Program When you type a key the program below prints the keyboard character the cursor s row number and column number and the character s ASCII...

Страница 283: ...a program RUN followed by a line or nothing at all simply executes the program in memory starting at line or at the beginning of the program RUN followed by a filespec loads a program from disk and th...

Страница 284: ...VEs and LOADs faster BASIC programs are stored in RAM using compressed format Using the A option causes the program to be saved in ASCII format This takes up more disk space However the ASCII format a...

Страница 285: ...PAK TXT on the first non write protected drive I SGN number Function I Determines number s sign If number is a negative number SGN returns 1 If number is a positive number SGN returns 1 If number is z...

Страница 286: ...ISOUND lone duralion Statement I Generates a sound with the tone and duration specified Tone is a digit between 0 and 7 It specifies the sound s frequency level Zero specifies the lowest frequency le...

Страница 287: ...SOUND 1 2 PRINT THE CORRECT ANSWER IS AMERIGO I JESPUCCI I SPACE number Function I Returns a string of number spaces Number must be in the range 0 to 255 Example PRINT DESCRIPTION SPACE 4 TYPE SPACE 8...

Страница 288: ...ft parenthesis must immediately follow SPC SPC may only be used with PRINT LPRINT or PRINT Example PRINT HELLO SPC 15 THERE prints HELLO 15 spaces THERE ISQR number Calculates the square root of numbe...

Страница 289: ...ed by the line number that contains the STOP STOP is primarily a debugging tool During the break in execution you can examine variables or change their values The CONT command resumes execution at the...

Страница 290: ...it in S Sample Program 10 A 1 6 B A C VAL STR A 20 PRINT REGULAR CONI JERSION TAB 40 SPECIAL CONI JERS I ON 30 PRINT B TAB 40 C Function STRING number characfer Returns a string of number characters...

Страница 291: ...the character corresponding to one of the ASCII codes provided Statement SWAP variable1 variable2 Exchanges the values of two variables Variables of any type may be SWAPped integer single precision d...

Страница 292: ...les are not affected If command is a constant it must be enclosed in quotes You can specify only the TRSDOS library commands not the utilities If you omit command SYSTEM returns to the TRSDOS Ready mo...

Страница 293: ...inus one is the rightmost position TAB may only be used with the PRINT and LPRINT statements Sample Program 10 PRINT NAME TAB 25 AMOUNT PRINT 20 READ A B 30 PRINT A TAB 25 B 40 DATA G T JONES 25 00 RU...

Страница 294: ...e time initially when TRSDOS is started up When you request the time TIME supplies it using this format 14 47 18 which means 14 hours 47 minutes and 18 seconds 24 hour clock To change the time use the...

Страница 295: ...ram advances to a new line TRON displays that line number inside a pair of brackets TROFF turns the tracer off Sample Program 2290 TRON 2300 X X 3 14159 2310 TROFF Lines 2290 and 2310 above might be h...

Страница 296: ...age is the low level language used internally by your computer It consists of 2 80 microprocessor instructions Machine language subroutines are useful for special applications things you can t do in B...

Страница 297: ...ess form e g a value of 128 indicates a 7 exponent a value of 66 indicates a 62 exponent A value of 7 always indicates the number is zero Highest seven bits of the mantissa with hidden implied leading...

Страница 298: ...to by HL or DE For example the statement USRl AX transfers control to the USR1 subroutine with HL pointing to the two byte ASA for integer variable A Suppose you modify the contents of its storage ar...

Страница 299: ...12 34 and VAL A E 8 returns the value 12E34 that is 12 10 34 VAL terminates its evaluation on the first character which has no meaning in a numeric value If the string is non numeric or null VAL retur...

Страница 300: ...R returns an address which indicates where the value of a variable is stored this address can be passed to a machine language subroutine as the argument of USR the subroutine can then extract the cont...

Страница 301: ...of memory where the program line with the constant is stored in the program buffer area Thus program statements like A HELLO do not use string storage space For all of the above variables addresses K...

Страница 302: ...00 however the high bit is changed to zero since the value is positive called hidden or implied leading one So A is stored as Exponent K 3 MSB K 2 Next MSB K 1 LSB K 130 0 0 0 A 5 is stored as Exponen...

Страница 303: ...ck and reads the data at the port again If the result is nonzero execution continues with the next statement If integer2 is omitted it is assumed to be zero It is possible to enter an infinite loop wi...

Страница 304: ...ith the statement following the WEND statement WHILE WEND loops may be nested to any level Each WEND matches the most recent WHILE An unmatched WHILE statement causes a WHILE without WEND error and an...

Страница 305: ...e The data may be numeric and or string They must be separated by commas When the data are printed each data item is separated from the last by a comma Strings are delimited by quotation marks After p...

Страница 306: ...he data items as they are written to disk It delimits strings with quotation marks Therefore it is not necessary to put explicit delimiters between the data The items on data must be separated by comm...

Страница 307: ...d Problems A 61 EI Converting TRSDOS Version 1 BASIC Programs to TRSDOS Version 6 BASIC Programs A 75 FI BASIC Keywords and Derived Functions A 79 GI BASIC Worksheets A 83 HI Glossary A 85 II TRSDOS P...

Страница 308: ...S commands You can make this file more powerful by utilizing macros and other features of JCL This section describes how The steps for creating and using a JCL file are 1 Create a JCL file consisting...

Страница 309: ...e line cannot be longer than 79 characters Depending on the JCL method used execute only or compile JCL either ignores all characters after the 79th or aborts the processing entirely Any program or ut...

Страница 310: ...er program Pause Delay Provide IIPAUSE Suspends execution and Macros special displays a message functions IIDELAY Suspends execution and displays a message for a specified amount of time IIWAIT Suspen...

Страница 311: ...one is controlled by a number ranging from 0 7 with 7 producing the lowest tone and 0 producing the highest tone The tone is followed by a period of silence which you select with a second number rangi...

Страница 312: ...SDOS Ready or BASIC Ready after it finishes To conclude a program that requires additional keyboard input use the IISTOP macro Using the IIEXIT macro would terminate the program IIFLASH duration messa...

Страница 313: ...use was ordered Press ENTER to resume JCL execution or press BREAK to abort the JCL The IIDELAY IIWAIT and IISLEEP macros are similar to the IIPAUSE macro and are used to give JCL execution a specific...

Страница 314: ...library command your computer displays the device table lists free space information about all enabled drives and returns to TRSDOS Ready Because an execution macro cannot be the first line in a JCL...

Страница 315: ...mple displays the comment and then waits until the system clock matches the time of 02 15 00 specified in the IIWAIT macro It would then execute DEVICE and FREE and return to TRSDOS Ready This program...

Страница 316: ...is FREE O Pro raM 2 is FREE Pro raM 3 is DEVICE IIKEYIN Select pro raMt 1 3 1 FREE O IIE IT 112 FREE IIE IT 113 DEl I I CE IIE IT 1 There are two new macros used in this example They are Iinumber and...

Страница 317: ...N the IIINPUT line is displayed You can also enter information directly into the system at the JCL level For example the IIWAIT macro description mentions that you can set the time for the system cloc...

Страница 318: ...e called SYSTEM JCL After the compile phase completes control is normally passed to the execution phase which executes the SYSTEM JCL file As stated earlier the JCL works by substituting lines in a fi...

Страница 319: ...l operator The simple logical operators are AND represented by the ampersand symbol OR represented by the plus symbol NOT represented by the minus symbol 3 Label A JCL label is used to define the star...

Страница 320: ...lock blocks IIEND Defines the end of a conditional block IIELSE Defines the alternative to a false IIIF Higher Provide for IISET Gives a token a logical Order higher condi true value Logical tional lo...

Страница 321: ...de these lines IIEND IIIF tof en I nore these lines IIEND 3 If token is false perform the alternative IIIF tof en I nore these lines IIELSE Include these lines IIEND With this type of logical decision...

Страница 322: ...it a new value Consider this example IIIF KI IIRESET P2 IIEND This JCL file specifies that if KI is true then P2 is reset to a false condition Consider the JCL file named MENU JCL MENU JCl revision 1...

Страница 323: ...ows how many different TRSDOS options can be established with a JCL file The way it is structured you can choose any or all of the options If you did not use IISET you would have to enter four separat...

Страница 324: ...y of the previous examples that used the IISET macro the IIASSIGN macro could have been substituted The character string value assigned to the token has no effect on the JCL logic In the following exa...

Страница 325: ...e following lines result II RATE was not set l START JCL set ff to forms flt filter pr ff fOrtTIS lines G01 Job aborted The comment line is displayed as the file is being compiled However since IIABOR...

Страница 326: ...pr ff forMs chars 132 basic run I PRoGRAM1 SToP The compile phase substitutes the character string value of the tokens into the actual command line The length of the replacement string does not have...

Страница 327: ...tes the backup command with Drive 1 as the source drive and Drive 2 as the destination drive The substitution fields can be used in message lines and comments as well as in executable command lines Be...

Страница 328: ...ples in the previous sections have been very short In a practical operating environment this is often the case However each of these small files is taking up the minimum disk allocation of one gran an...

Страница 329: ...he compiling starts with the file named in the DO command line As soon as the IIINCLUDE is reached all lines in the second JCL file are processed and then the compiling returns to the rest of the orig...

Страница 330: ...only requirement is that a JCL file containing labels must be compiled When you use labels in a JCL file we recommend that you start the file with a comment line or some executable line other than a l...

Страница 331: ...provides an alternative method to select a block of lines for compiling IIIF A B include these lines if A or B is specified IIEND IIIF A B include these lines if A and B are specified IIEND These exam...

Страница 332: ...e other IIIF IIEND blocks within the main conditional block called nesting The IIELSE macro provides an alternative course of action in case an IIIF evaluates false It is also possible to have more II...

Страница 333: ...JCL Although not shown in the example you can use the logical operators when nesting IIIFs Using Nested IIINCLUDE Macros When you use the IIINCLUDE macro the included file can also contain another II...

Страница 334: ...in hex to the system as though they came from the keyboard The syntax is character value Below are some valid values and their results Hex Value 09 0A 1F Result Position to next tab stop every 8 colum...

Страница 335: ...Interfacing With BASIC A JCL file is the perfect method to interface between the operating system and the BASIC language JCL can be used to create procedures that require only the inserting of a disk...

Страница 336: ...e JCL file ALERT JCL is executed sending a series of repeating tones out the tone generator You are notified that your BASIC procedure has completed Pressing ENTER ends the JCL alert and returns you t...

Страница 337: ...tion program has completed If you want to run more programs you could add the proper RUN PROGRAM line to the JCL file followed by any required responses to program prompts If you want to return to the...

Страница 338: ...ample shows how to back up a diskette using a JCL file A minimum of three drives are required Drive 0 must contain a system diskette with the JCL file Drive 1 contains the source diskette Assume that...

Страница 339: ...ter you press ENTER in response to the seconds pause the backup takes place When the backup completes the comment line appears and the DO command executes The command causes the SYSTEM JCl file to exe...

Страница 340: ...able below shows what happens for each combination of settings Break Break Type Enabled Vector Ahead Set Enabled y N Y If characters are in the type ahead buffer then the buffer is emptied If the type...

Страница 341: ...sing the BREAK SVC normally off Type ahead is enabled using the SYSTEM TYPE ON command this is the default condition Because the BREAK key is checked for more frequently than other keys on the keyboar...

Страница 342: ...CA 6A CB 6B CC 6C 5E 3B 5F 00 R 9A 1A 98 18 83 03 96 16 82 02 8E 0E 80 00 1B 1B 10 10 1C 1C SHIFT Z F8 X E3 C F6 V E2 B EE N 4E ED M 40 7B 70 3E SHIFT FA 5A 58 43 56 42 3C 7C 3F DA 7A 08 78 C3 63 06...

Страница 343: ...nsity floppy disk drives The operating system software is loaded from an operating system disk in Drive 0 by a built in read only memory ROM bootstrap program Console Processor Mode14 The TRS 80 Model...

Страница 344: ...hics characters Keyboard The keyboard has the standard typewriter keys numeric keypad and three function keys Three Modes Control Shift Caps Floppy Disk Drives Minimum Model 4 One built in 5 1 4 inch...

Страница 345: ...Power Supply Power Requirements 105 130 VAC 60 Hz 240 VAC 50 Hz Australian 220 VAC 50 Hz European Grounded outlet Maximum Current Drain 1 7 Amps Typical Current Drain 1 5 Amps Operating Temperature 5...

Страница 346: ...a 2 RD Receive Data 3 RTS Request to Send 4 CTS Clear to Send 5 DSR Data Set Ready 6 SGND Signal Ground 7 CD Carrier Detect 8 DTR Data Terminal Ready 20 RI Ring Indicator 22 STDt Secondary Transmit Da...

Страница 347: ...put to computer from printer high 21 indicates busy PAPER Input to computer from printer high 23 EMPTY indicates no paper If the printer doesn t provide this the signal is forced low BUSY t Inverse of...

Страница 348: ...s characters Codes 192 through 255 when output to the video display represent either space compression codes or special or alternate characters as determined by software Toggling between these modes i...

Страница 349: ...ASCII Dec Hex Abbrev Keyboard Video Display 0 00 NUL CTRL Next character is treated as displayable if in the range 1 31 a special character is displayed see list of special characters later in this A...

Страница 350: ...e reverse video and set high bit routine off Set to 80 characters per line CTRL ENTER Erase line and start over CTRL CTRL Erase to end of line SYN CTRL V ETB CTRL W CAN SHIFT CTRL X EM SHIFT CTRL Y SU...

Страница 351: ...A 43 28 44 2C 45 20 46 2E 47 2F 48 30 0 0 49 31 1 50 32 2 2 51 33 3 3 52 34 4 4 53 35 5 5 54 36 6 6 55 37 7 7 56 38 8 8 57 39 9 9 58 3A 59 38 60 3C 61 30 62 3E 63 3F 64 40 65 41 A A A Z codes 65 90 ar...

Страница 352: ...F 71 47 G G 72 48 H H 73 49 I I 74 4A J J 75 48 K K 76 4C L L 77 4D M M 78 4E N N 79 4F 0 0 80 50 P P 81 51 Q Q 82 52 R R 83 53 S S 84 54 T T 85 55 U U 86 56 V V 87 57 W W 88 58 X X 89 59 Y Y 90 5A Z...

Страница 353: ...104 68 H h 105 69 I 106 6A J j 107 68 K k 108 6C L I 109 60 M m 110 6E N n 111 6F a 0 112 70 P P 113 71 Q q 114 72 R r 115 73 S s 116 74 T 117 75 U u 118 76 V v 119 77 W w 120 78 X x 121 79 Y Y 122 7...

Страница 354: ...CTRL E 134 86 CLEAR CTRL F 135 87 CLEAR CTRL G 136 88 CLEAR CTRL H 137 89 CLEAR CTRL I 138 8A CLEAR CTRL J 139 8B CLEAR CTRL K 140 8C CLEAR CTRL L 141 80 CLEAR CTRL M 142 8E CLEAR CTRL N 143 8F CLEAR...

Страница 355: ...A 52...

Страница 356: ...191 BF 192 C0 CLEAR 193 C1 CLEAR A 194 C2 CLEAR B 195 C3 CLEAR C 196 C4 CLEAR 0 197 C5 CLEAR E 198 C6 CLEAR F 199 C7 CLEAR G 200 C8 CLEAR H 201 C9 CLEAR 1 202 CA CLEAR J 203 CB CLEAR K 204 CC CLEAR L...

Страница 357: ...04 CLEAR T 213 05 CLEAR U 214 06 CLEAR V 215 07 CLEAR W 216 08 CLEAR X 217 09 CLEAR Y 218 OA CLEAR Z 219 DB 220 DC 221 DO 222 DE 223 OF 224 E0 CLEAR SHIFT 225 E1 CLEAR SHIFT A 226 E2 CLEAR SHIFT B 22...

Страница 358: ...E8 CLEAR SHIFT H 233 E9 CLEAR SHIFT I 234 EA CLEAR SHIFT J 235 EB CLEAR SHIFT K 236 EC CLEAR SHIFT L 237 ED CLEAR SHIFT M 238 EE CLEAR SHIFT N 239 EF CLEAR SHIFT 0 240 F0 CLEAR SHIFT P 241 F1 CLEAR S...

Страница 359: ...Code ASCII Dec Hex Keyboard Video Display 248 F8 CLEAR SHIFT X See Special Character Table 249 F9 CLEAR SHIFT Y 250 FA CLEAR SHIFT Z 251 FB 252 FC 253 FD 254 FE 255 FF A 56...

Страница 360: ...p S Cl r l til n S r l S til n c J Q J fJ til N QO 152 153 154 155 156 157 158 159 I I CJ1 I l J I ii...

Страница 361: ...Special Characters 0 31 192 255 o 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 192 193 194 195 196 197 198 199 200 201 202 203 A 58 204 205 206 207...

Страница 362: ...08 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 II II 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 A 59 252 253 254 25...

Страница 363: ...uter Problem 2 RS 232C communications do not work or function incorrectly If you experience RS 232C problems the first thing you should do is to make sure both ends are operating with the same RS 232C...

Страница 364: ...d see your application program manual for an explanation When an error message is displayed Try the operation several times Look up operating system errors below and take any recommended actions See y...

Страница 365: ...s use a different disk Device in use Error 39 X 2T RESET the device in use before REMOVEing it Device not available Error 8 X 08 Make sure you enter the correct device specification and that the devic...

Страница 366: ...r a file that is password protected File already open Error 41 X 29 Use the RESET library command to close the file before trying to open it File not in directory Error 24 X 18 Check the spelling of t...

Страница 367: ...gal logical file number Error 16 X 10 Your program probably has altered the File Control Block improperly Check for an error in your application program Load file format error Error 34 X 22 An attempt...

Страница 368: ...ifferent drive If it still fails use a different disk Parity error during header write Error 9 X 09 Try the operation again using a different drive If it still fails use a different disk Parity error...

Страница 369: ...disk drive Error 14 X 0E Try the operation again using a different drive If it still fails use a different disk If the problem continues contact a Radio Shack Service Center Write protected disk Erro...

Страница 370: ...evice not available Parity error during header write Seek error during write Lost data during write Parity error during write Data record not found during write Write fault on disk drive Write protect...

Страница 371: ...a RETURN statement for which there is no matching GOSUB statement Out of DATA BASIC encountered a READ statement but no DATA statements with unread items remain in the program Illegal function call A...

Страница 372: ...rong number of subscripts Duplicate Definition Two DIM statements were given for the same array or a DIM statement was given for an array after the default dimension of 10 has been established for tha...

Страница 373: ...was made to continue a program that a Has halted due to an error b Has been modified during a break in execution c Does not exist Undefined user function A USR function was called before providing a f...

Страница 374: ...o Radio Shack the conditions under which the message appeared Bad file number A statement or command references a file with a buffer number that is not OPEN or is out of the range of file numbers spec...

Страница 375: ...e the EOF function to detect the end of file 63 Bad record number In a PUT or GET statement the record number is either greater than the maximum allowed 65 535 or equal to zero 64 Bad file name An ill...

Страница 376: ...erence With TRSDOS 6 you can type up to 249 characters per line The other six characters are reserved for the line number and the space following the line number With TRSDOS 1 you can type up to 240 c...

Страница 377: ...essages TRSDOS 6 BASIC Error Codes Character Codes and Internal Codes for BASIC keywords differ from TRSDOS 1 BASIC codes See the Appendices for more information on TRSDOS 6 BASIC codes II String Spac...

Страница 378: ...if you typed TAB 91 TRSDOS 6 BASIC would tab to position 11 on the screen TRSDOS 1 BASIC would tab to position 91 18 Self Documenting Programs TRSDOS Version 6 BASIC programs can be self documenting...

Страница 379: ...ENUM CLS INSTR RESTORE COMMON INT RESUME A CONT KILL RETURN COS LEFT RIGHT CSNG LEN RND CVD LET ROW CVI LINE RSET CVS LIST RUN DATA LLiST SAVE DATE LOAD SGN DEF LOC SIN DEFDBL LOF SOUND DEFINT LOG SPA...

Страница 380: ...51 132 222 151 176 174 175 173 170 134 167 162 129 65453 251 166 215 216 168 223 65419 192 65439 212 130 65423 193 141 A 80 GOTO HEX IF IMP INKEY INP INPUT INSTR INT KILL LEFT LEN LET LINE LIST LLiST...

Страница 381: ...RND 65416 VAL 65428 ROW 65459 VARPTR 221 RSET 202 WAIT 150 RUN 138 WEND 181 SAVE 203 WHILE 180 SGN 65412 WIDTH 161 SIN 65417 WRITE 183 SOUND 205 XOR 250 SPACES 65432 243 SPC 213 244 SQR 65415 245 STE...

Страница 382: ...HYPERBOLIC SECANT INVERSE HYPERBOLIC COSECANT INVERSE HYPERBOLIC COTANGENT A 82 BASIC Equivalent SEC X 1 COS X CSC X 1 SIN X COT X 1fTAN X ARCSIN X ATN X SQR X X 1 ARCCOS X ATN X SQR X X 1 1 5708 ARSC...

Страница 383: ...Appendix G Video Display Worksheet A 83...

Страница 384: ...of eight binary bits that are either ON 1 or OFF 0 One byte can represent a number from 0 to 255 COMM A communications program capable of interacting with disk printer video display keyboard and the R...

Страница 385: ...format required by the hardware and vice versa devspec The name associated with a device by which it is referenced A devspec always consists of three characters an asterisk followed by two alphabetic...

Страница 386: ...of file marker for filespec is updated after every write to the file filter A machine language program that monitors andlor alters 1 0 that passes through it FILTER is also the library command that es...

Страница 387: ...Byte In a hexadecimal word it is sometimes referred to as the high order byte NIL A dummy device which a logical device can be linked or routed to When you reset a user defined device it points at NI...

Страница 388: ...om or write to a disk Several sectors make up a track One or more tracks make up a cylinder 81 The Standard Input device Programs that read data from this device normally receive data from the keyboar...

Страница 389: ...ommands occur When you issue a RESET JL command the Joblog function ceases and filespec closes See the ROUTE library command for additional information To view the contents of a Joblog file issue a RE...

Страница 390: ...into high memory The parameter is ENTER value specifies value as the character TRSDOS recognizes as an ENTER character in a KSM file value is a number in the hexadecimal format X nn a decimal number...

Страница 391: ...program can use any file in ASCII format TRSDOS uses the same rules concerning ENTER and the semicolon for a file in an ASCII format If you wish to deactivate the KSM filter issue the command RESET K...

Страница 392: ...VR sets CL to the RS 232C hardware After you SET CL to the RS 232C hardware you can alter the parameters of the RS 232C port with the SETCOM command Example SET CL TO COM DVR sets CL to its driver pro...

Страница 393: ...0 INDENT 17 ENTER configures the printer filter by causing all lines to start 12 spaces in from the normal left hand starting position Any line longer than 70 characters is indented 17 spaces 5 spaces...

Страница 394: ...Install the Memdisk When you start Memdisk the following menu is displayed A BanK 0 PriMary MeMOry B Bard 1 C Bard 2 D BanKs 1 and 2 E Disable MeMDISK Which type of allocation A B C D or E Each bank...

Страница 395: ...N N can be from 1 to 12 The value of N varies according to the number of other drivers resident in memory If you specified Bank 0 Single Density the following message is displayed Note Each CYlinder e...

Страница 396: ...installed after Memdisk was set up and the other program is still in the way This is known as memory fragmentation If you need to use this area of memory then you must reset the system If you receive...

Страница 397: ...isk and there is no MemDISK in the system to disable then you receive the error message MemDISK not present Technical Information A Bank 0 Memdisk and BASIC use the same area of memory RAM Since a Ban...

Страница 398: ...n the keyboard your computer produces a tone You can use this tone as an auditory feedback You can change the pitch and duration of the tone produced by the key click filter To do this you must apply...

Страница 399: ...used by Stack to HIGH File Control BASIC and the File Control or User Defined Block s Block s FCBs Each FCB top of memory requires 564 bytes of M storage The number of FCBs that your system has is se...

Страница 400: ...on how to load BASIC see Chapter 1 Assuming that the HIGH marker is at the top of physical memory FFFFH and that the highest memory location the M option was not specified when BASIC was loaded then...

Страница 401: ...ce and a file involves the ROUTE and LINK commands ROUTE can create a user device and routes it to a file LINK creates a link between two devices Remember that it is a good idea to issue a DEVICE comm...

Страница 402: ...first device is usually a system device and the second device is always a user created filter device Example To create a filter link you need a filter program In this example we use the system filter...

Страница 403: ...m 3 To return the keyboard to its start up condition issue the command RESET K I ENTER 4 To remove DU from the device table issue the following commands RESET DU ENTER REMOt E DU ENTER Using the RESET...

Страница 404: ...remove the link between PR and DU issue the command RESET PR ENTER The device table shows PR QlDE3 DU NIL Now you have returned PR to its original start up condition and the link between PR and DU no...

Страница 405: ...anges the clock speed for 50 Hz users HERZ50 is a DO file that makes a change in the software of TRSDOS Only the Drive 0 diskette is changed Be sure it is write enabled before you start the DO file On...

Страница 406: ...diskette if one is present Because the diskette is not write protected you should be very careful that you do not accidentally format the master diskette or back up the blank diskette to the master d...

Страница 407: ...1 Place a write protect tab on it and place a label on the jacket to identify it Insert the TRSDOS system diskette in Drive 0 and press ENTER A message is displayed telling you if the backup operation...

Страница 408: ...nsert DESTINATION disk ENTER remove the backup limited diskette from the drive and insert the blank diskette Press ENTER 8 The following message may appear Destination disf NalTle disf nafTIe Are YOU...

Страница 409: ...u are allowed to make three backups of a backup limited diskette You do a backup by class to move visible files If one of the visible files is protected then that file is copied along with the other v...

Страница 410: ...s the right to refuse to service the equip ment or to void any remaining warranty on the equipment 2 If any Radio Shack computer equipment has been modified so that it is not within manufacturer s spe...

Страница 411: ...1 40 device 1 40 library command 1 40 CLEAR1 SHIFT 1 41 data received 1 41 Addition 2 41 Advanced Information ii Advanced Programmer s Command 1 14 Advanced Programmer s Utilities 1 14 APPEND 1 17 com...

Страница 412: ...d Restart 2 20 APPEND 1 17 Auxiliary 1 13 Break 1 46 CONTROLlCA 1 46 Model II 12 or 16 1 46 CONTROLlm 1 46 Model I or III 1 46 breakable AUTO 1 30 BUILD 1 31 Device Handling 1 13 device related A 103...

Страница 413: ...t 1 10 DIM 2 87 DIR 1 28 1 68 partspec 1 68 Direct Access Files 2 54 Accessing 2 56 Creating 2 54 Disk Files 1 7 2 51 A 75 Disk ID s 1 27 1 28 Disk Prompts 1 51 DESTINATION 1 51 SOURCE 1 51 SYSTEM 1 5...

Страница 414: ...GET 2 100 GOSUB 2 101 GOTO 2 102 Graphics Characters 1 42 H H Hex Modify 1 58 hexadecimal value 1 59 vertical bars 1 58 HANDSHAKE 1 37 40 44 HERZ50 A 107 Hex byte representations 1 32 HEX 2 103 Hexade...

Страница 415: ...A 15 execution A 5 IIABORT A 6 IIALERT A 6 IIDELAY A 6 IIEXIT A 7 IIFLASH A 7 IIINPUT A 7 IIKEYIN A 7 Iinumber A 11 IIPAUSE A 8 IISLEEP A 8 IISTOP A 8 III triple slash A 11 IIWAIT A 9 keyboard A 5 nes...

Страница 416: ...41 Physical device 1 10 Physical line 1 32 POKE 2 138 Ports A 76 POS 2 138 Power Supply A 40 Power up configuration 1 30 PRINT 2 139 PRINT TAB A 77 2 145 PRINT USING 2 141 Print Zones A 75 PRINT A 77...

Страница 417: ...ing Operator 2 42 String Relations 2 43 String Space A 76 Strings 2 32 STR 2 164 STRING 2 164 Subscripted Variablas 2 29 Substitution Fields A 21 Subtraction 2 41 SWAP 2 165 Symbol DC1 1 40 resume tra...

Страница 418: ...Sequential Access Files 2 53 User passwords 1 20 USING IIASSIGN A 15 II Comment and IIQUIT A 19 IIIF IIEND IIELSE A 15 IISET and II RESET A 15 USR 2 170 Utilities 1 14 v VAL 1 173 Variable Names A 75...

Отзывы: