This is the text of the "Preliminary CC40 Wafertape User's Manual", retyped in August 1990 by Charles Good. The is no copyright statement on the documentation as received by me. Each page of the xerox copy I am using bears the notation "1758L CC-40 Wafertape" and the date 08/11/83. It is presented to the community of TI computer users as an interesting historical curiosity. The WAFERTAPE drive was made mainly for use with the CC40 computer, although the 99/2 and 99/8 computers and the TI74 calculator have HexBus ports that can allow use of the WAFERTAPE drive. TI never officially released this peripheral TI's "consumer service" representatives deny the existance of the product. I have serial number 0000007, and it works. I know of a serial number 0000095 in private hands that also works. It is my understanding that many of the wafertape drives out there do not work. A former TI employee has stated that the device was not released to the public because TI was not satisfied with its reliability. ------------------------------------------------- Page 1 TABLE OF CONTENTS Introduction p.1 Set-Up Instructions p.3 Battery Installation p.4 Connect the WAFERTAPE (tm) Peripheral p.5 Testing the peripheral p.6 Operating the System p.8 Using BASIC Statements and Commands p.10 Recovery from Errors p.27 WAFERTAPE (tm) Applications p.28 File Management p.28 Initializing Wafers p.29 Saving and Loading Programs p.30 Loading Programs for Immediate Execution p.31 Sample Programs p.32 Running Programs from a Menu p.32 Storing and Retrieving Data Files p.33 Directory Program p.35 Appendixes A. Error Codes p.39 B. Using Assembly Language p.42 C. WAFERTAPE Description p.45 D. Handling and Maintenance Service Information In Case of Difficulty Service Centers If You Have Questions or Need Assistance Warranty p.50 ------------------------------------------------ Page 2 INTRODUCTION The Texas instruments HX-2000 Wafertape (tm) Digital Tape Drive is a versatile, efficient, and compact information storage device for computers that use the TI HEX-BUS Intelligent Peripheral Interface. The Wafertape peripheral enables you to store, retrieve, and update programs and data quickly and accurately with simple commands from the computer console. Information is stored on a continuous tape housed in a slim cartridge called a wafer (described in appendix C). As part of the growing family of TI products that use the HEX-BUS interface (a standardized interconnection system with a uniform set of cabling patterns, control signals, and message structures), the WAFERTAPE peripheral plugs directly into any computer compatible with this interface system. This manual first shows you how to connect and test the WAFERTAPE peripheral and presents the BSIC instructions that are used to operate the device. Some common applications of the peripheral are given next, followed by sample programs giving additional examples of BASIC used with the device. A number of helpful appendices and a section of service information complete the manual. Explanations and examples of programming employ the version of BASIC developed for the TI compact Computer Model CC40. Users of other TI computers may note differences in format between the BASIC statements shown here and equivalent statements used with their own machines. Apart from that distinction, however, the material in this manual applies to operation of the WAFERTAPE peripheral with any computer compatible with the HEX-BUS interface. ------------------------------------------- Page 3 SET-UP INSTRUCTIONS Setting up the WAFERTAPE (tm) is a simple three part process. First the batteries are installed. Next the device is attached to the HEX-BUS (tm) interface. Then its operation is checked. This sections describes the steps involved in each of these procedures. Please read the material completely before you begin to set up the peripheral. CAUTION The electronic components of the WAFERTAPE drive can be damaged by discharges of static electricity. To remove static, touch a metal object (such as a doorknob or desk lamp) before handling the peripheral. Avoid touching the connector contacts. After you have unpacked the WAFERTAPE drive and installed four AA batteries as described on the following page, you are ready to connect the unit to the HEX-BUS interface. Save the packing material for storing or transporting the device. The devices in the TI HEX-BUS (tm) interface system are fitted with identical eight-pin recessed connectors for the lengths of cable through which they communicate. The computer has one such connector, while each peripheral device has two of them so that a chain of devices may be attached to the computer. The first peripheral is plugged directly into the computer, the second peripheral is cabled to the first, and so on. The last peripheral has one connector free. You may link peripherals to the computer in any order. Just plug one end of a HEX-BUS interface cable into the available connector and plug the other end into one of the connectors on the WAFERTAPE drive, as described shortly. The plugs are keyed so that you can insert them only one way. Peripherals are normally arranged in a stack next to the computer, using the short sections of cable furnished with the devices. Longer cables are available spearately if you prefer to arrange the peripherals differently. ------------------------------------------ Page 4 BATTERY INSTALLATION The WAFERTAPE (tm) peripheral is powered by four AA type dry-cell alkaline batteries {Note added 8/90: You really do have to use alkaline batteries. Other types of AA batteries soon give a "low battery" error.}. An optional AC adapter is available separately. To install batteries, follow the procedure described below. 1. Ensure that the WAFERTAPE drive is turned off and disconnected from the HEX-BUS interface. 2. Turn the tape drive over. locate the thumbnail slot and arrow molded into the battery compartment cover. 3. To release the cover, press in the direction shown by the arrow as illustrated below {Note added 8/90: the illustration is omitted from this text file}. (This pressure frees the opposite end of the cover and allows it to pivot naturally in the direction of the arrow, away from the peripheral housing.) Then take the cover by its free end and lift it clear of the battery compartment. 4. Install the batteries, arranging them as indicated by the polarity markings on the floor of the battery compartment. 5. Reposition the cover over the battery compartment so that the small step on the end of the cover by the arrow fits under the edge of the peripheral bottom. Press the cover down and in the direction of the arrow until the tabs at the free end drop into place. Set the unit back on its feet. The length of battery service life depends on how frequently and how long the WAFERTAPE peripheral is used. When it is time to replace the batteries, an attempt to access the peripheral causes error code 25 (see appendix A) to appear in the computer display. --------------------------------------------------- Page 5 CONNECTING THE WAFERTAPE PERIPHERAL 1. Turn off the computer. 2. If other peripherals are already attached to the HEX-BUS (tm) interface, turn them off. 3. Locate the device having the one available HEX-BUS connector (either the last peripheral on the bus, or the computer if no peripherals are attached yet). Holding that device firmly, plug one end of the cable into the connector. 4. Place the WAFERTAPE peripheral in position and attach the other end of the cable to either connector on the unit. 5. You mau use the optional AC adapter model AC9201 to power the WAFERTAPE drive. DO NOT CONNECT ANY OTHER ADAPTER TO THIS PERIPHERAL. If you intend to use the AC adapter, attach the power cord to the small jack on the back of the WAFERTAPE drive and plug the unit into a standard 115 volt outlet. CAUTION To prevent damage, disconnect all devices before moving any part of the HEX-BUS interface system. The cables and connectors which link the computer and peripherals are subject to accidental strain if not detached. For shipment over long distances repack the system securely, preferably in its original packing materials. ------------------------------------------- Page 6 TESTING THE PERIPHERAL Note: The following test procedure is used with the CC40. computers other than the CC40 may require different test procedures from that listed below. 1. Turn on the WAFERTAPE peripheral and any other attached devices first. Then turn on the computer. Note: All peripherals must be turned on for proper operation. 2. Check the device number switch on the back of the WAFERTAPE drive. If the switch is set to device number 1, go on to step 3. If the switch is set to a different number, read the note following step 3 first. {Note added in 8/90: My WAFERTAPE drive has a switch with settings from 0 thru 9. Setting the switch to 0 [zero] causes the device to respond as device #1. Switch setting 1 causes the device to respond as device #2, etc.} 3. Type [CALL IO(1,1)] and press ENTER. The CALL IO statement causes the I/O (Input/Output) indicator in the computer display and the "working" light on the peripheral to flicker momentarily. the message I/O error 4 "1" should then appear in the display as the error indicator comes on. This message tells you that the WAFERTAPE peripheral is functioning correctly. Note: [CALL IO(1,1)] is an attempt to end access to the WAFERTAPE peripheral. Because it has just been turned on at this point, however, the device is not yet enabled for access. In returning error code 4 (device not open), the peripheral is operating as it should. If the peripheral is assigned a device number other than 1 (see the note at THE "OPEN" STATEMENT), the CALL IO entry should include that number. With an address of 7, for instance, enter [CALL IO(7,1) as a power up check. The use of an incorrect device number either tests some other peripheral or, if no device by that address is found, produces I/O error 255. Page 7 If the "working" light does not come on when the CALL IO statement is entered, the device may not be connected properly. Check the cabling between the computer and the WAFERTAPE peripheral. If a code other than "4" is displayed, refer to appendix A. If the I/O indicator stays on while the rest of the display remains blank, verify that all peripherals are powered up. The computer cannot respond to further input from the keyboard while in this state. Turn the wafertape peripheral off momentarily to clear the condition. Then check the cable connections and try the operational check once more. If results are the same, a hardware problem may exist in the HEX-BUS interface cable or the peripheral. See the IN CASE OF DIFFICULTY section of the manual for further assistance. 4. Press [CLR] to clear the error message and restore the cursor. The peripheral is now ready for use. 5. New wafers must be initialized with the FORMAT statement before their first use. this procedure is described under The FORMAT Statement and INITIALIZING WAFERS. ----------------------------------------------- Page 8 OPERATING THE SYSTEM After the WAFERTAPE drive is connected to the HEX-BUS interface and tested, you can control its operation from the computer console in one of several ways. --You can operate the peripheral with BASIC statements and commands in applications of your own, as described on the following pages. --You can use separately available SOLID STATE SOFTWARE (tm) cartridges that allow you to access peripherals by responding to prompts in prewritten programs for engineering, science, business, and financial applications. --If you are using a CC40 computer equipped with an Editor/Assembler cartridge, you can control the WAFERTAPE peripheral in assembly language. Appendix B lists and describes the assembly language command codes applicable to the WAFERTAPE (tm) peripheral. Further information on the use of SOLID STATE SOFTWARE or Editor/assembler cartridges with this device can be found in the manuals for those cartridges. Page 9 As an introduction to the operation of the WAFERTAPE peripheral in BASIC, you may wish to key in the following short program. 100 FORMAT 1 110 INPUT "ENTER MESSAGE: ";M$ 120 OPEN #1,"1.INTRO" 130 PRINT #1,M$ 140 RESTORE #1 150 INPUT #1,M$ 160 CLOSE #1 170 PRINT "MSG WAS: "M$:PAUSE After you type in the program and press RUN, the WAFERTAPE drive should be active for several seconds. Next the prompt ENTER MESSAGE: should appear in the computer display. Type a message and press ENTER. After an interval of renewed activity at the tape drive, your entry should reappear in the display together with the phrase MSG WAS:. This program initializes the wafer in the tape drive, prompts you for input, opens the peripheral for access, and writes your message to the wafer. Then it rewinds the wafer, reads your message back to the computer, closes the WAFERTAPE drive, and displays the message. ---------------------------------------------- Page 10 USING BASIC STATEMENTS AND COMMANDS Statements are BASIC instructions within a program that are executed when the program is run. Commands are BASIC instructions outside a program that are executed immediately. Every instruction belongs to one of these two categories, though some BASIC statements can also be executed immediately. The BASIC statements and commands available for use with the WAFERTAPE peripheral are summarized below. All of them are implemented in the CC40 computer. The CALL IO statement may not be available in other TI computers. --FORMAT- Prepares wafers to store programs and data. Blank wafers must be formatted prior to first use. --SAVE, OLD- Store and retrieve programs on WAFERTAPE. --VERIFY- Compares the contents of computer memory and wafers after program storage or retrieval to ensure that no information is lost. --RUN- Retrieves and executes programs stored on WAFERTAPE. --OPEN, CLOSE- Begin and end the use of the WAFERTAPE peripheral in programming. --INPUT, LINPUT, PRINT- Send and receive data. --RESTORE- Positions the tape to the beginning of an open file. --DELETE- Places WAFERTAPE files in an inactive state. --CALL IO- Calls a subprogram which is available for communication with peripherals. Offers more control over internal aspects of operations than is otherwise possible in BASIC. --EOF- (End of file)- Tests whether a data file open for input contains additional records that can be read. --LIST- Prints or displays a copy of a program. --CALL LOAD- Calls a subprogram to load assembly language subprograms from WAFERTAPE storage into computer memory. Page 11 The OPEN statement must precede the INPUT, LINPUT, PRINT, CLOSE, RESTORE, and EOF statements. It may precede CALL IO, CALL LOAD, FORMAT, DELETE, and RUN as well. The rest of the statements and commands listed above are used independently of OPEN. Note: Each wafer comes with a reflective write-enable sticker on the face of the cartridge, as shown below. As long as this small circular label is in place directly between the window over the tape and the rubber roller at the forward edge of the cartridge (NOT over the window), the tape can be both read and written to. Removing the sticker from this area disables the write circuitry of the WAFERTAPE peripheral and prevents data from being placed on the tape. The write-enable sticker must be in place for successful execution of FORMAT, SAVE, OPEN for output, CLOSE, PRINT, DELETE, and LIST. {note added 8/90: The diagram below has been enhanced with additional labels compared to the original. Wafer size data shown below is not found in the original.} DIAGRAM OF WAFER CARTRIDGE FOR TI'S WAFERTAPE DIGITAL TAPE DRIVE ---------------------------------------------------------------- Tape exposed here to drive motor capstan WRITE ENABLE STICKER goes here | \ \ Tape exposed here for READ/WRITE head __________________\___ \ ___ \ _____ | \ I__I I________I | | XXXX | | XXXX | | _ _ | | Size 68x40x5 ' ` | | millimeters. `- -' | | /|\ | | | | | | | ---------------------|-------------------- WINDOW (leave uncovered for detection of reflective end/beginning of tape marker) ------------------------------------- The FORMAT statement: FORMAT initializes wafers as described in the WAFERTAPE APPLICATIONS section of the manual to prepare them for storing programs and data. A digital pattern called a DIRECTORY is written onto the tape when FORMAT is executed. The directory maintains file management information such as the position of a given file on the tape, the number of records per file, and the length of the longest record. It can serve as an index for up to 16 files. In the CC40 the FORMAT statement has the following general form. FORMAT device number Page 12 DEVICE NUMBER refers to the WAFERTAPE (tm) peripheral itself, not to the individual programs or data files stored on tape. The formatting operation makes any files previously stored on the wafers inaccessible. Example: 100 FORMAT 1 Initializes the wafer currently in tape drive 1. FORMAT may either be run within a program, as shown above, or entered independently for immediate execution. Before initializating a wafer, ensure that the write enable sticker is in place on the cartridge. ---------------------------------------------- The OPEN Statement The OPEN statement prepares the computer for communication with peripheral devices. When used with this peripheral, the OPEN statement sets parameters for communication and provides a link between a file number and a WAFERTAPE file. If the file already exists, the parameters given in the OPEN statement must match the characteristics of the file. The OPEN statement for the WAFERTAPE (tm) peripheral has the following general form. OPEN #file nunber,"device number.file name"[,file attributes] File number is a numeric expression that evaluates to an integer between 1 and 255. Device number is the numeric designation of the peripheral to be operated. Each HEX-BUS peripheral has a number of its own. Numbers for the WAFERTAPE device may range from 1 through 8. [Note added 8/90: My Wafertape drive has a switch with positions 0-9. However, only positions 0-7, corresponding to device numbers 1-8, are active.] Note: The WAFERTAPE unit is shipped from the plant with a device number of 1 (the number used in the examples in this manual). the address can easily be switched to any of the other seven possibilities, but this is necessary only if you connect additional WAFERTAPE devices to the HEX-BUS interface. Up to eight WAFERTAPE drives may be connected to the interface. In such an application, each drive must have a number of its own so that the computer can address them individually. Page 13 Addresses are determined by setting of a small rotary switch on the back of the peripheral housing. An arrow in the center of the switch points to the address currently in effect. To change device numbers, simply turn the arrow to a different position within the range 1 through 8. This corresponds to devices 1 through 8 on the HEX/BUS interface. FILE NAME is a one to 12 character expression identifying the data file to be accessed or established. There are no restrictions on the types of symbols or characters which may make up file names. FILE ATTRIBUTES are optional keywords that define certain features of the file itself. For attributes not specified, the computer automatically supplies preset values called DEFAULT VALUES. These features are described below. --FILE ORGANIZATION-- SEQUENTIAL is the only file organization which may be used with the WAFERTAPE peripheral. this is the default value and need not be specified in the OPEN statement. RELATIVE (random access) files cannot be used. --FILE TYPE-- It is possible for the HEX-BUS interface system to process data either in ASCII (American Standard Code for Information Interchange) characters as DISPLAY files or in the internal machine format as INTERNAL files, on the other hand, are a better choice in most WAFERTAPE (tm) applications. The file contents are usually read only by machine, and INTERNAL files generally occupy less space. --OPEN MODE-- this entry determines whether the file may be read (INPUT), written to (OUTPUT), or both (UPDATE). If you do not specify an open mode, the default is UPDATE. A new file may be created, provided that the tape directory has enough space, by opening in OUTPUT or UPDATE mode. If the directory cannot accommodate another file, the WAFERTAPE peripheral responds to the OPEN statement with I/O error code 11 (directory full). ------------------------------------------- Page 14 The INPUT statement When you use the INPUT statement with the WAFERTAPE (tm) peripheral, data records are transmitted from the WAFETAPE to the computer and assigned to the variables listed in the statement. The peripheral must first be opened in INPUT or UPDATE mode. In this application the INPUT statement has the following general form. INPUT #file number,variable list As the computer reads data from a WAFERTAPE file, it holds each complete record internally in a temporary storage area called an input/output (I/O) buffer. A separate buffer is set up for each open file. From the data in the buffer, values are assigned to the variables listed in the INPUT statement. If the list of variables in the INPUT statement requires more data items than the record being processed can supply, the computer gets the next record from the file and uses data from that record to complete the list. After values have been assigned to all variables in the statement, any data left in the buffer is discarded unless the INPUT statement ends with a trailing comma. A trailing comma creates a "pending input" condition. In such a case the computer uses the existing data in the I/O buffer of a given file, beginning where the previous INPUT ended, to complete the variable list of the next INPUT statement involving that file. Page 15 100 OPEN #3,"1.DATA",OUTPUT opens file 3 under the name DATA on the tape in drive 1. Record length is left at the default value of 256 characters. If the file is a previously established one, the OUTPUT open mode renders the current file contents inactive and opens a second file under the same name in final position on the tape. If the original file was not in final position it may be possible to retrieve the old data if necessary after reopening the file with an entry such as the following. [OPEN #3, "1."&CHR$(4),INPUT] It is assumed in this example that the original file called data is the forth file on the tape. If you are not sure of an inactive file's location on a tape, you can begin the search with an OPEN entry that includes CHR$(1) and increment by 1 until the desired file is found. THE CLOSE STATEMENT A peripheral or file made ready for use with an OPEN statement must also be closed when its use is ended. The CLOSE statement for the WAFERTAPE peripheral has the following general form. CLOSE #file-number[,DELETE] File Number is the number specified in the corresponding OPEN statement. The optional keyword DELETE allows the user to delete a WAFERTAPE file while closing it. Data may be lost from files that are not closed after use. If a program stops due to a BREAK statement or because the [BREAK] key is pressed, files may remain open even though you have CLOSE statements in the program. If you do not wish to continue a program interrupted by BREAK, you can ensure that all files are closed by entering [END]. Page 16 THE INPUT STATEMENT When you use the INPUT statement with the WAFERTAPE (tm) peripheral, data records are transmitted from the WAFERTAPE to the computer and assigned to variables listed in the statement. The peripheral must first be opened in INPUT or UPDATE mode. In this application the INPUT statement has the following general form. INPUT #file-name,variable-list As the computer reads data from a WAFERTAPE file, it holds each complete record internally in a temporary storage area called an input/output (I/O) buffer. A spearate buffer is set up for each open file. From the data in the buffer, values are assigned to the variables listed in the INPUT statement. If the list of variables in the INPUT statement requires more data items than the record being processed can supply, the computer gets the next record from the file and uses data from that record to complete the list. After values have been assigned to all variables in the statement, any data left in the buffer is discarded unless the input staterment ends with a trailing comma. A trailing comma creates a "pending input" condition. In such a case the computer uses the existing data in the I/O buffer of a given file, beginning where the previous INPUT ended, to complete the variable list of the next INPUT statement involving that file. Page 17 EXAMPLES: 100 INPUT #3,INFO$ Puts the next character string available from the file opened as #3 into the string variable INFO$. 100 INPUT #5,K,L,M Puts the next three values from the file opened as #5 into variables K,L, and M. 100 INPUT #7,D,A,V, Assigns the next three values from the file opened as #7 to variables D,A, and V. The comma after V establishes a pending input condition. Any data remaining in the buffer for file 7 is not discarded, but is saved for the next input from this file. See THE LINPUT STATEMENT for additional examples. Page 18 -------------------------------------- The LINPUT Statement LINPUT handles any data received during an input operation as a single string variable. The format for the LINPUT statement used with peripherals is as follows. LINPUT #file-number,string-variable In contrast to the INPUT statement, LINPUT is unaffected by punctuation marks in the data being accepted--information is stored exactly as received. the following table gives examples of the difference between the two statements DATA RECEIVED PROGRAM SEGMENT DATA DISPLAYED "ROME, ITALY" 100 INPUT #1,A$ ROME, ITALY 200 DISPLAY A$ "ROME, ITALY" 100 LINPUT #1,A$ "ROME, ITALY" 200 DISPLAY A$ ROME, ITALY 100 INPUT #1,A$ ROME 200 DISPLAY A$ ITALY 100 INPUT #1,A$ ITALY 200 DISPLAY A$ ITALY 100 LINPUT #1,A$ ITALY The data string "ROME, ITALY", placed in memory by INPUT, is displayed as ROME, ITALY without quotation marks. When LINPUT is used, the display matches the original data. ROME, ITALY without quotation marks is taken by LINPUT as a single string variable. INPUT treats the comma as a separator and takes the data as two distinct variables. Page 19 When ITALY preceded by blank spaces is received, INPUT takes the blanks as zero input and disregards them. LINPUT takes them as actual input and preserves the entire string, including the blanks. As the examples show, LINPUT has great utility in applications that involve transfers of data with punctuation, such as passages of text. In such cases you may often find it more useful than INPUT. EXAMPLE: 100 LINPUT #4,MICRO$ puts into the string variable MICRO$ whatever remains of the record currently being read from the file open as #4. If the entire record is available, all of it is placed in MICRO$. If only part of the record is left, that part is assigned to MICRO$. Both INPUT and LINPUT take data from the WAFERTAPE (tm) peripheral (LINPUT can be used only with DISPLAY files). When used without a file number, both statements also accept data from the computer console. ---------------------------------- The PRINT Statement To transmit data from the computer to the WAFERTAPE peripheral, use the PRINT statement in the format shown below. The peripheral must be opened in OUTPUT or UPDATE mode before data can be sent. PRINT #1file-number,print-list When multiple items are written out to a DISPLAY file as shown in the third example below, commas must also be written to the file to separate the elements of the print list. If commas are omitted, the computer reads the entire DISPLAY file as one element when data is later input from the file. Page 20 The process of writing multiple items to an INTERNAL file (as shown in the fourth example) is simpler. It is only necessary to separate the elements of the print list by commas, not to write the commas to the file. When used without a file number, the PRINT statement places data in the computer display. EXAMPLES: 100 PRINT #2,DRAW$ puts the value of the variable DRAW$ into the next record of the WAFERTAPE file opened as #2. 100 PRINT #2,"ENTER DATA" PLACES ENTER DATA in the next record of the WAFERTAPE file opened as #2. 100 PRINT #3,X;",";Y;",";Z transmits the values of the variables X, Y, and Z to a DISPLAY file opened as #3. Commas enclosed in quotation marks separate the variables so theat each is handled as a distinct element by subsequent INPUT statements. (INPUT requires no special format to access DISPLAY files.) 100 PRINT #4,X,Y,Z transmits the values of the variables X,Y, and Z to an INTERNAL file opened as #4. Note that the write enable sticker must be in position on the wafer to which you intend to transfer data. Removing the sticker disables the write circuitry of the WAFERTAPE peripheral and prevents any more data from being placed on the tape with the PRINT statement. -------------------------------------- Page 21 The RESTORE Statement RESTORE is used to position the WAFERTAPE to the beginning of an open file. The next input or output statement that references the same file then accesses the first record of the file. Any pending output data is transferred to the file before the RESTORE statement is executed. Any pending input data is ignored. When used with the WAFERTAPE peripheral, the RESTORE statement has the following general form. RESTORE #file nunber EXAMPLE: 100 RESTORE #1 positions file 1 to the first record in the file. ------------------------------------------- The DELETE Statement The DELETE statement places the WAFERTAPE files in an inactive condition. Files to be deactivated may be either open or closed. The DELETE statement for closed files has the following general form. DELETE "device-number.file-name" EXAMPLE: 100 DELETE "1.GRAPH" removes the file named GRAPH from the wafer in tape drive 1. It is possible to delete open WAFERTAPE files at the time they are closed by following CLOSE with the keyword DELETE. The format is given under The CLOSE Statement. ---------------------------------------------- Page 22 The EOF Function Functions are program statements that, after manipulating data, return a value based on parameters given in the statements. you can use EOF (end-of-file) when accepting input from mass storage devices such as the WAFERTAPE (tm) peripheral to test whether the end of a data file has been reached. The value returned by the EOF function (0 or -1) depends on where you are in the file being read. A -1 denotes the end of a file. A 0 indicates that no end of file has been reached. The EOF function has the following general form. EOF(file number) The value of file number must correspond to the number of an open file. EXAMPLES: 100 PRINT EOF(11) prints the value of 0 or -1 according to whether you are at the end of the file opened as #11. 100 IF EOF(3) THEN 920 transfers program control to line 920 if you are at the end of the file opened as #3. Further information about the EOF function can be found in the BASIC manuals for computers compatible with the HEX-BUS (tm) interface, such as the Compact Computer 40 User's Guide. ---------------------------------------- Page 23 The SAVE Command The SAVE command allows the computer user to transfer a copy of a program in memory to a storage device such as the WAFERTAPE peripheral. SAVE has the following general form. SAVE "device-number.program-name"[,PROTECTED] By using the optional keyword PROTECTED, you may specify that a program being saved can only be loaded into memory and run--it cannot be listed or edited. the copy of the program still in memory, however, remains available for listing and editing. A write enable sticker must be in place on the wafer on which you intend to save programs. EXAMPLES: SAVE "1.PRG7" sends a copy of the program in memory to WAFERTAPE peripheral 1 under the name PRG7. SAVE "1.PLOT",PROTECTED copies the program in memory to WAFERTAPE peripheral 1 under the name PLOT. The program may be loaded into the computer and run, but PROTECTED ensures that it cannot be listed or edited. ------------------------------------------ The OLD Command The OLD command loads programs from storage devices such as the WAFERTAPE (tm) peripheral into computer memory. any open files are closed and the current program is cleared from memory automatically before the next program is loaded. The OLD command has the following general form. OLD "device number.program name" EXAMPLE: OLD "1.MYPROG" moves a copy of the program MYPROG from WAFERTAPE storage to computer memory. -------------------------------------------- Page 24 The VERIFY Command VERIFY is used after the SAVE and OLD commands to check that programs saved or loaded from the WAFERTAPE(tm) peripheral have been transferred intact. After SAVE, the program on the wafer is compared to that in computer memory. After OLD, the program in memory is compared to that on tape. Any discrepancies cause error messages. The VERIFY command has the following general form. VERIFY "device nunber.program name"[,PROTECTED] EXAMPLES: SAVE "1.MYPROG" VERIFY "1.MYPROG" stores the program MYPROG on WAFERTAPE and then compares the copy on tape to the program in memory. OLD "1.STAT" VERIFY "1.STAT" loads the program STAT into computer memory and then compares the copy in memory to the program on tape. If VERIFY follows a SAVE "device number.program name",PROTECTED command, then the VERIFY command must also include PROTECTED. ------------------------------------------- Page 25 The RUN Statement The RUN statement begins program execution. When RUN is entered with no options, the program currently in memory begins execution at the lowest numbered line. In WAFERTAPE applications the RUN statement also allows you to retrieve a program from storage, load it into computer memory, and commence execution immediately. The OLD command is not necessary. Used in this way, the RUN statement has the following general form. RUN "device-number.program-name" Device number designates the WAFERTAPE drive. Program name specifies the program that you intend to load and run. If another program is currently in computer memory, the entry of RUN deletes that program before loading and executing the contents of program name. A string expression may be used to specify device number.program name. Note that if you inadvertently attempt to load and run a data file instead of a program, it may be necessary to reset the computer. EXAMPLE: RUN "1.PGM3" causes the computer to load and begin execution of the program stored in file PGM3 on WAFERTAPE drive 1. -------------------------------------------- Page 26 The CALL IO Statement. CALL IO is a BASIC statement used in the CC40 computer to support special features and capabilities unique to many HEX-BUS (tm) peripherals. The HX3000 RS232 peripheral, for instance, can be configured to issue service requests through use of CALL IO. With the WAFERTAPE peripheral, CALL IO is used most frequently in cataloging tape contents. The directory program in the SAMPLE PROGRAMS section of the manual illustrates this application of CALL IO. Appendix B lists the commands available through CALL IO that pertain to the WAFERTAPE peripheral. For more information about the CALL IO statement, consult the reference manual for the CC40 Editor/Assembler software package. ------------------------------------------------- The LIST Command It is possible, though not practical, to store a program on WAFERTAPE either in part or in its entirety by use of the LIST command in the following format. LIST "device number.file name"[,line list] Storing a program with LIST instead of SAVE causes each program line, regardless of its length, to be handled as a separate record. All but the shortest programs may quickly exceed the storage capacity of the tape. For that reason, the LIST command has little application with the WAFERTAPE peripheral. Using LIST without specifying a device number causes the program lines to be listed in the computer display. ------------------------------------------------- The CALL LOAD Statement CALL LOAD is a CC40 BASIC statement used to load assembly language subprograms from WAFERTAPE storage into computer memory. These subprograms are run with the CALL EXEC statement (described in the Compact Computer 40 User's Guide). For additional information on the CALL LOAD statement, refer to the User's Guide or the manual for the CC40 Editor/Assembler software package. --------------------------------------------------- Page 27 RECOVERY FROM ERRORS Most errors that involve the WAFERTAPE(tm) peripheral occur during input or output with the device as a result of some discrepancy in program statements. These errors are seldom serious, and they are easily remedied. They are normally indicated to the user in the form of a displayed message beginning "I/O error..." which includes a one to three digit error code and the device number of the peripheral. If the error occurs during execution of a program, any open files are automatically closed. The error codes that you may encounter with the WAFERTAPE peripheral are listed in appendix A with their meanings and recommended corrective steps. In the event of such an error, first note the code number and look it up in appendix A. Next clear the fault indication and restore the cursor by pressing [CLR]. Then try the operation again, following the suggestions given in the appendix for that error. Should the above measures not solve the problem, turn the peripheral off briefly and try again. If the malfunction persists, turn the computer off momentarily and try again. Successive attempts that produce the same error may indicate a hardware fault. Consult the IN CASE OF DIFFICULTY section of the manual for service information and additional troubleshooting suggestions. -------------------------------------------------- Page 28 INITIALIZING WAFERS FORMAT may be used either as a program statement or as a separate command. When done separately, the intiializing procedure is carried out as follows (the WAFERTAPE (tm) device number is assumed to be 1). after setting up the WAFERTAPE peripheral as described in the CONNECTING AND TESTING sections, place a write enabled wafer in the slot. Hold the peripheral in position if necessary to keep it from slipping and insert the wafer carefully and evenly until it clicks into place. The sliding plastic cover, which normally shields the forward edge of the wafer, moves aside as the wafer enters the slot. Type [FORMAT 1] and press ENTER. The computer display clears as the I/O indicator in the display and the "working" light on the front of the peripheral comes on, showing that the initialization is in progress. After a few seconds the light and the I/O indicator go out and the flashing cursor reappears at the left side of the display. At that point the WAFERTAPE initialization is complete. The above indications also occur when FORMAT is executed as a program statement. After initialization, the program simply continues at the next statement. The formatting operation may also be performed on used wafers containing data you no longer wish to save. A new directory is set up on each tape, and existing data is written over by the new material stored on the tape. ----------------------------------------------- Page 30 SAVING AND LOADING PROGRAMS The WAFERTAPE peripheral allows you to store both programs and data fro later use. Data is written to WAFERTAPE files with the PRINT statement and read back with INPUT or LINPUT, as described in the USING BASIC section. To store a program on WAFERTAPE, enter the SAVE command in the format shown in the USING BASIC section. When SAVE is entered, the program in computer memory is copied to the WAFERTAPE peripheral. While the program is being copied, the light at the WAFERTAPE peripheral and the I/O indicator in the computer display are turned on. The rest of the display is blank, When the copying process is complete, the I/O indicator and peripheral light go out as the flashing cursor reappears at the left side of the display. To retrieve a program from WAFERTAPE (tm), use the OLD command in the format shown in the USING BASIC section. After the OLD command is entered, the WAFERTAPE peripheral begins to search for the program named. The WAFERTAPE light and the computer I/O indicator illuminate as the display clears. They remain on while the program is loaded into computer memory. When the retrieval is finished, the WAFERTAPE light and I/O indicator go out and the flashing cursor reappears in the display. If the program is not found, the peripheral returns I/O error 3 (file not found). Page 31 Using the VERIFY command after execution of SAVE or OLD allows you to be certain that BASIC programs are stored or retrieved successfully. When VERIFY is entered, the system begins a comparison between the program in memory and the program on tape. The computer display clears, the I/O indicator illuminates, and the WAFERTAPE light comes on. If no errors are found, the I/O indicator and "working" light are extinguished after a few moments and the cursor returns to the display. If the verification is unsuccessful, an error message is displayed. The RECOVERY FROM ERRORS section and appendix A provide suggestions for dealing with various types of error indications. ----------------------------------------- LOADING PROGRAMS FOR IMMEDIATE EXECUTION When retrieving and running programs you can, if you wish, bypass the OLD command by entering RUN and the program name in the format shown under THE RUN STATEMENT. the computer display clears and the "working" light on the WAFERTAPE drive illuminates as the peripheral searches for the program named and transfers it to the computer. The program begins to run immediately after it is loaded into memory. If the program is not found, the peripheral returns I/O error 3 (file not found). ------------------------------------------ Page 31 SAMPLE PROGRAMS RUNNING PROGRAMS FROM A MENU The following program illustrates the use of the RUN statement to load and execute one program from within another. A menu is displayed to allow the user to choose what other program to run. If the other programs are written to end by running this program rather than terminating in the usual way, the menu is given again after they are finished. 100 PRINT "ENTER 1, 2, OR 3 FOR PROGRAMS":PAUSE 2 110 PRINT "...OR ENTER 4 TO STOP":PAUSE 2 120 INPUT "YOUR CHOICE: ";C 130 IF C=1 THEN RUN "1.PRG1" 140 IF C=2 THEN RUN "1.PRG2" 150 IF C=3 THEN RUN "1.PRG3" 160 IF C=4 THEN STOP 170 GOTO 100 Page 33 STORING AND RETRIEVING DATA FILES in addition to saving and loading programs, the WAFERTAPE peripheral allows you to maintain data files. The sample program below offers an example of the storage and retrieval of data files on WAFERTAPE. Although the variable names and certain program segments relate mainly to payroll files, the techniques of originating, storing, and retrieving the information are valid for many applications involving such a matrix of data. It is assumed that the data wafer will to be accessed by the INPUT and PRINT statements is in tape drive 1. Areas of the program not dealing with WAFERTAPE input or output are simplified as much as possible. 100 DIM LN$(5),FN$(5),MI$(5),SSN(5) 110 DIM GRS(5),TAX(5),NET(5) 120 FOR C=0 TO 4 130 INPUT "LAST NAME: ";LN$(C):INPUT "FIRST NAME: ";FN$(C) 140 INPUT "INITIAL: ";MI$(C):INPUT "SSN: ";SSN(C) 150 INPUT "GROSS SALARY: ";GRS(C):INPUT "TAX: ";TAX(C) 160 INPUT "NET SALARY:;NET(C) 170 NEXT C In lines 100-170 a payroll file is originated for up to five employees. Arrays are set up in computer memory to receive the data, which is entered initially from the computer keyboard. After the file is established and stored, it may be read in from the WAFERTAPE peripheral for subsequent updating. 200 DISPLAY "ENTER N FOR NEW EMPLOYEE FILE. .":PAUSE 2 210 INPUT "OR U TO UPDATE EXISTING FILE: ";A$ 220 IF A$="N" THEN 250 230 IF A$="U" THEN 300 240 GOTO 200 250 INPUT "LAST NAME: ";LN$(C):INPUT "FIRST NAME: ";FN$(C) 260 INPUT "INITIAL: ";MI$(C):INPUT "SSN: ";SSN(C) 270 GOTO 400 ! Compute tax Page 34 In lines 200-270 the user is first prompted to indicate whether the payroll task involves a new employee file or one already in existence. If the file is a new one, employee data is read in from the keyboard and the program branches to the wage-and-tax segment beginning at line 400. 300 INPUT "LAST NAME: ";LN$(5) 310 FOR C=0 TO 4 320 IF LN$(C)=LN$(5) THEN 400 ! Compute tax 330 NEXT C 340 DISPLAY LN$(5)&" NOT FOUND":PAUSE 2 350 GOTO 200 If the file is an existing one, the user is prompted in line 300 to supply a last name. The name is then compared with those in the array LN$. If a match is found, the program continues with the computation beginning at line 400. If the name is not found, the user is informed and execution returns to the entry prompts at line 200. (No provision for duplication in names is made in this example.) 400 INPUT "HOURS: ";HOURS 410 INPUT "RATE: ;RATE 420 GRS(C)=HOURS*RATE:MIN=100 430 IF GRS(C)>MIN THEN 450 440 NET(C)=GRS(C):GOTO 470 450 TAX(C)=(GRS(C)-MIN)*.25 460 NET(C)=GRS(C)-TAX(C) 470 DISPLAY "GROSS: ";GRS(C);"TAX: ";TAX(C);"NET: ";NET(C):PAUSE The salary calculation routine in lines 400-470 is common to both old and new payroll files. The user is prompted for hours worked and hourly rate of pay, which is multiplied for a gross salary. If this amount exceeds a minimum fighre (set here at 100 dollars), a percentage of the difference is withheld as tax. If the gross salary does not exceed the minimum, no tax is withheld. The gross salary, tax (if any), and net wage are displayed. When ENTER is pressed, program execution continues at line 500 Page 35 500 REM STORE DATA ON WAFERTAPE 510 OPEN #1,"1.PAYROLL",INTERNAL,OUTPUT,VARIABLE 500 520 FOR C=0 TO 5 540 PRINT #1,LN$(C),FN$(C),MI$(C),SSN(C),GRS(C),TAX(C),NET(C) 550 NEXT C 560 CLOSE #1 570 DISPLAY "DONE":PAUSE In lines 510/550 the updated payroll file is returned to WAFERTAPE storage. The peripheral is first opened for output. The FOR/NEXT loop is given an upper limit of 5 instead of the initial 4 to accommodate the additional employee data that may have been entered. The elements of the file are then written out to the device in the same order they were input. After the final item is transferred, the peripheral is closed and DONE is displayed to indicate completion of the task. After the data is placed on a tape, it may be read back when necessary with a sequence such as the following. 600 OPEN #1,"1.PAYROLL",INTERNAL,INPUT,VARIABLE 500 610 FOR C=0 TO 5 620 INPUT #1,LN$(C),FN$(C),MI$(C),SSN(C),GRS(C),TAX(C),NET(C) 630 IF EOF(1) THEN 650 640 NEXT C 650 CLOSE #1 DIRECTORY PROGRAM The program described on the following pages allows you to catalog the contents of an entire wafer by inputting directory information for each file in turn. After keying the program in for your initial cataloging task, you may wish to store it on a separate wafer. You can then obtain subsequent WAFERTAPE directories with a few keystrokes Page 36 100 INPUT "DRIVE NUMBER: ";DN 110 LINPUT "LIST DEVICE: "LD$ 120 OPEN #1,LD$,OUTPUT 130 PRINT #1,"File No. File Name No. of Records Largest Record" 140 IMAGE " ## ############## ###### #### " 150 RECN=0 In lines 100-120 the user is prompted for the device numbers of the WAFERTAPE drive and the unit (such as a printer or a video display terminal) to which the directory is to be listed. The designated list device is then opened for putput and prints or displays a directory heading. line 150 initially zeroes the number of directory records input. 160 CALL GETMEM(13,CATADDR) !Get Catalog PAB area 170 CALL GETMEM(22,BUFFADDR) !Get data buffer 180 CALL SPLIT(BUFFADDR+21,MSB,LSB) !Split buffer pointer 190 CALL SPLIT(RECN,MSB2,LSB2) !Split file number 200 PAB$=CHR$(DN)&CHR$(14)&CHR$(0)&CHR$(LSB2)&CHR$(MSB2) !Create PAB 210 PAB$=PAB$&CHR$(32)&CHR$(0)&CHR$(0)&CHR$(0)&CHR$(0) 220 PAB$=PAB$&CHR$(LSB)&CHR$(MSB) 230 CALL IO (PAB$,STATUS) !Get next file information 240 IF STATUS=0 THEN 300 !Successful? 250 IF STATUS=3 THEN CLOSE #1:STOP !End of directory? 260 PRINT "Read error--";STATUS:PAUSE:CLOSE #1:STOP Information necessary for the file cataloging operation is assembled in computer memory as a unit called a Peripheral Access Block (PAB). Directory data received from the WAFERTAPE peripheral is stored in an area of memory designated as a data buffer. In lines 160-190 above, memory space is first prepared for the PAB and the data buffer. Then pointers are set up to track the meorry locations of the file number and the directory data returned for each file. In lines 200-230 the PAB is constructed and a READ CATALOG command is sent. The value returned in the variable STATUS determines which part of the program is executed next. Page 37 If STATUS is returned set to zero, the program continues imputting directory information at line 300 below. If STATUS is set to 3, indicating that the directory is complete, the program ends. Any other value returned in STATUS stops the program and causes an error message to be printed. 270 ! 280 !Get file name 290 ! 300 FILE$="" 310 FOR I=1 TO 12 320 CALL PEEK(BUFFADDR+21-I,K) 330 FILE$=FILE$&CHR$(K) 340 NEXT I 350 ! 360 !Get maximum record size 370 ! 380 CALL PEEK(BUFFADDR+7,K,L) 390 MAXSIZ=K*256+L 400 ! 410 !Get number of records 420 ! 430 CALL PEEK(BUFFADDR+5,K,L) 440 NRECS=K*256+L 450 !Get flag information 470 ! 480 CALL PEEK(BUFFADDR+4,FLAGS) 490 PRINT #1,USING 140,RECH,FILE$,NRECS,MAXSIZ Lines 300-480 assemble the directory information (file number, file name, number of records, largest record, file status) for each file in turn. The data is then printed or displayed at the list device using the format specified in the IMAGE statement of line 140 Page 38 500 IF (FLAGS AND 128)=0 THEN PRINT #1,":*";ELSE PRINT #1,":A"; 510 IF FLAGS AND 16 THEN PRINT #1,":I";ELSE PRINT #1,":D"; 520 IF FLAGS AND 64 THEN CLOSE #1:STOP 530 PRINT #1 !Prints output line 540 RECN=RECN+1 !Set up for next file 550 GOTO 190 In lines 500-550 file status (active or inactive) and file type (DISPLAY or INTERNAL) are first established and passed on to the list device. In preparation for the next group of catalog data, the directory display or printout is then advanced by one line, the file number is incremented, and the program loops back to line 190. The SPLIT subprogram called in lines 180 and 190 converts the values representing the data buffer address and file number into a decimal form suitable for display. It breaks a 16-bit integer into a Most Significant Byte and a Least Significant Byte, as shown below. 560 ! 570 !Routine to split 16-bit integer 580 !into Most Significant Byte 590 !and Least Significant Byte 600 ! 610 SUB SPLIT(DATAVAL,MSB,LSB) 620 MSB=INT(DATAVAL/256) 630 LSB=DATAVAL-MSB*256 640 SUBEND ---------------------------------------------- Page 39 APPENDIX A; ERROR CODES Listed below are the error codes related to the operation of the WAFERTAPE peripheral in BASIC programs. The error codes marked with an asterisk (*) are those that apply only if you use the CALL IO instruction. They do not occur with any other BASIC statements or commands. CODE MEANING 0* NO ERRORS 1 DEVICE/FILE OPTIONS ERROR. Check the options in the OPEN statement or IO call. Make sure that commas, periods, and equal signs are used correctly. Be certain that file names are not more than 12 characters long. 2 ERROR IN ATTRIBUTES. Check the file attributes given in the OPEN statement or IO call. Makeure that the correct file name is used. 3 FILE NOT FOUND. Be certain that the correct wafer is in the tape drive. 4 DEVICE/FILE NOT OPEN. Open the peripheral before using it. 5 DEVICE/FILE ALREADY OPEN. An attempt to open a previously opened WAFERTAPE file or to open a second file at the same peripheral causes this error message. Close the device and try again. If the CLOSE statement in BASIC does not work, use CALL IO (see page XX) to close the device. If neither of the above steps is successful, you can close all peripherals by momentarily turning the computer off. Do not try to open more than one file on a single wafer. 6 DEVICE ERROR. The WAFERTAPE peripheral generates this error message if a malfunction occurs during storage, retrieval, or file processing operations. similar to error 16. Try the operation again. Page 40 7 END OF FILE ERROR. this error occurw when the user tries to read past the end of a file or verify a record not on a file. Include EOF function when inputting files, and be sure to supply the correct recorrd number when using CALL IO to verify a data transfer. 8* DATA/FILE TOO LONG. Modify the Peripheral Sccess block. This device does not support data records longer than 32768 bytes. 9 WRITE PROTECT ERROR. The write enable sticker of the wafer currently in the tape drive is not in place. The tape can be read from, but not written to. To make the wafer available for output, apply the sticker to the area between the small circular window and the forward edge of the cartridge. Take care not to cover any part of the window. 11 DIRECTORY FULL. No additional files can be stored on the wafer in the tape drive. Use another tape. 12 BUFFER SIZE ERROR. The data buffer length specified in the input/output sugsystem instructions or the record length set in the OPEN statement is not sufficient for the data returned by a peripheral. Make the buffer larger. 13 UNSUPPORTED COMMAND. The WAFERTAPE (tm) peripheral sends this message in response to commands that it cannot accpet. 14 DEVICE/FILE NOT OPEN FOR OUTPUT. The peripheral's current open mode does not allow you to send data. Reopen the device in OUTPUT or UPDATE mode. 15 DEVICE/FILE NOT OPEN FOR INPUT. The peripheral's current open mode does not allow you to receive data. Reopen the device in INPUT or UPDATE mode. 16 DATA ERROR. This message is generated when an error occurs during input. Try the read operation once more. If the error persists, write the data back to the WAFERTAPE peripheral before trying to input a third time. Page 41 17 RELATIVE FILES NOT SUPPORTED. The WAFERTAPE peripheral can only process SEQUENTIAL files. 19 APPEND MODE NOT SUPPORTED. This peripheral cannot operate in the APPEND mode. It must be opened in INPUT, OUTPUT, or UPDATE mode, depending on its application in a given program. 23 INCORRECT FILE TYPE. The file type (INTERNAL or DISPLAY) of an existing file dows not match the type used with the file is reopened for a subsequent data transfer. Reopen INTERNAL files in INTERNAL format and DISPLAY files in DISPLAY format. 24 VERIFY ERROR. The verify operaation indicates an unsuccessful storage or retrieval of data. Issue the VERIFY command once more. If the error is not cleared, repeat the entire sequence of storage or retrieval followed by verification. 25 LOW BATTERIES IN PERIPHERAL. Change the batteries as described under SET UP INSTRUCTIONS. 26 UNITIALIZED WAFER. The wafer in the tape drive is not ready for use. initialize it with the FORMAT command before attempting to process files. 32 WAFER FULL. No more data can be placed on the wafer in the tape drive. Use another wafer. 80 NOT LAST FILE ON TAPE. The peripheral sends this error message when the user tries to open, in UPDATE mode, a file other than the last file on a wafer. 255 TIME OUT ERROR. The computer generates this error code if it cannot communicate with a peripheral. Check the HEX-BUS cable connections and make sure you are using the correct device number. ----------------------------------------------- Page 42 APPENDIX B: USING ASSEMBLY LANGUAGE This appendix is primarily for use in conjunction with the Editor/Assembler manual and software package created for the CC40 computer and its peripherals. The descriptions given here supplement the explanations and examples found in the Editor/Assembler manual. The CC40 computer has an Input/Output subsystem which you can access to communicate with HEX-BUS (tm) peripherals on an assembly language level. This communication can take place either entirely in assembly language if you have the Editor/Assembler cartridge, or from BASIC if you use CALL IO with appropriate command codes. The directory program in the SAMPLE PROGRAMS section of the manual is an example of such an application. COMMAND CODES The WAFERTAPE (tm) peripheral is a mass storage, file oriented device. The commands which control this peripheral involve the basic functions of opening or closing files and reading or writing file records. The assembly language command codes with which you can direct the WAFERTAPE peripheral to carry out these tasks are listed below, together with any applicable restrictions. 0 OPEN. Readies a peripheral for use. The APPEND mode and RELATIVE file type cannot be used with the WAFERTAPE device. The UPDATE mode can be used only with the last file on the tape. 1 CLOSE. Completes any pending operations by a device and ends the use of the device for data transfer until the next open instruction. Note that FORMAT MEDIA, RETURN STATUS, and READ CATALOG may be executed when the WAFERTAPE peripheral is not open. 2 DELETE OPEN FILE. Closes a file and deletes it from the wafer. 3 READ RECORD. Inputs data from a peripheral device. The WAFERTAPE peripheral must first be opened in INPUT mode (or may be opened in UPDATE mode, if the file being read from is in final position on the tape). Page 43 4 WRITE. Sends data to a peripheral device. The WAFERTAPE peripheral must first be opened in OUTPUT mode (or UPDATE, if the file being written to is in final position). 5 RESTORE FILE. Rewinds the WAFERTAPE so that the record accessed during the next input or output operation is the first record in a given file. 7 RETURN STATUS. Used in requesting device and file status information from peripherals. When this message is used with the WAFERTAPE (tm) peripheral, the END OF FILE flag is returned set to -1 if the end of a file has been reached and to 0 if no end of file is found. 10 SERVICE REQUEST POLL. Not used in programming, but automatically sent to peripherals by the computer when it receives a service request. Determines which device is requesting service. the WAFERTAPE peripheral normally returns a status indication of 10 (not requesting service) in response, since it cannot issue service reauests. 12 VERIFY READ/WRITE OPERATION. Checks the accuracy of data transfers to or from peripherals by sending input and output records back to the peripheral and returning a status indication. 13 FORMAT MEDIA. Initializes WAFERTAPE wafers for use in storing data. 14 READ CATALOG. Returns information (file number, file name, number of records, maximum record length, and device dependent flags) about a single WAFERTAPE file. The user can assemble a directory for an entire wafer by sending this command repeatedly, incrementing the file number each time. Page 44 254 NULL OPERATION. Sent by the computer in response to any service requests received while a previous request is being processed. Though the computer may enable a number of peripherals for service requests, it can process only one request at a time. 255 RESET BUS. Closes all open device files and resets all peripherals attached to the computer. For a detailed treatment of the Input/output sybsystem and command codes including sample applications, refer to the manual for the Editor/Assembler cartridge. --------------------------------------------------- Page 45 APPENDIX C: WAFERTAPE DESCRIPTION The WAFERTAPE storage medium is a .068 inch wide, high quality magnetic tape wound in a continuous loop within a small cartridge called a WAFER. The tapes are available in various lengths ranging from five to 50 feet. The WAFERTAPE has a data capacity of around 1K bytes per foot (depending on record length--see The OPEN Statement) and is driven at the rate of about 8 inches per second. Access time and total storage capacity vary with tape and record length. A 10 foot tape, for instance, can hold approximately 10K bytes of information or up to 16 files. Any location on the tape can be reached in little more than 15 seconds. Each tape has a reflective end-of-tape/beginning-of-tape marker that serves to orient the WAFERTAPE drive. optical and electronic sensors in the peripheral detect the marker's presence. Control circuitry uses it as a point of reference in locating data on tape. Each wafer comes with a reflective write enable sticker on the face of the cartridge. As long as the sticker is in place, the tape can be both read from and written to. Removing the sticker disables the write circuityr of the WAFERTAPE peripheral and prevents any more data from being placed on the tape. A table of WAFERTAPE lengths and storage capacities is given below. RECORD SIZE IN KBYTES ______________________________________________________________________ T .08 .25 .5 1 2 4 6 8 10 12 16 A _____________________________________________________________________ P 5 4 3 2 1 1 E 5ft (.4) (1) (2) (2) (2) (4) ________________________________________________________________________ 12 10 9 6 4 2 1 1 1 1 L 10ft (1) (3) (5) (6) (8) (8) (6) (8) (10) (12) E ________________________________________________________________________ N 32 28 24 18 12 7 5 4 3 2 2 G 25ft (3) (7) (12) (18) (18) (28) (30) (32) (30) (24) (32) T ------------------------------------------------------------------------- H 65 58 49 36 24 14 10 8 6 5 4 50 ft (5) (15) (25) (36) (48) (56) (60) (64) (60) (60) (64) -------------------------------------------------------------------------- TOTAL NUMBER OF RECORDS AND (IN PARENTHESES) TOTAL NUMBER OF KBYTES ----------------------------------------------- Page 46 APPENDIX D: HANDLING AND MAINTENANCE Though the wafer is an almost fully enclosed cartridge, several millimeters of tape are exposed along its forward edge. This part of the wafer is normally protected by the sliding plastic cover, which moves aside when the wafer is inserted into the tape drive and moves back into position when the wafer is removed. Leave the cover in place when the wafer is not in use. be careful not to insert wafers into the tape drive or remove them from it while the drive drive motor is running. Either action may damage the tape. Data stored on WAFERTAPE is susceptible to loss or damage by magnetic fields. Keep the wafers away from strong sources of magnetism such as television sets, video monitors, transformser, speakers, and so on. Also be aware of more obscure sources--magnetic cabinet latches and note holders, for instance. The tape path inside the WAFERTAPE peripheral may need to be cleaned from time to time. an approved method is to apply a small amount of alcohol or tape head cleaner to a cotton swab. Gently rub the cotton swab along the surfaces of the tape path, with particular attention to the tape head and the drive capstan. Observe the caution included under SET UP INSTRUCTIONS: before handling the peripheral, touch some metal object to remove static electricity. Avoid touching the connector contacts. ------------------------------------------- Page 47 SERVICE INFORMATION IN CASE OF DIFFICULTY If the WAFERTAPE peripheral does not appear to be working properly, check the following. 1. POWER--Be sure that the batteries are serviceable and that the power switch is on. All peripherals must be turned on for proper operation. 2. CABLES--Verify that the proper cables are being used. Check for loose or broken leads and connectors. Be sure that cables are plugged in securely. 3. SOFTWARE--Be sure all commands and statements are used as described in this manual. Especially check the use of OPEN, INPUT, and PRINT. 4. COMPUTER-- Check to see that the computer works properly with all peripherals disconnected. 5. WAFERS--Inspect the WAFERTAPE cartridge for signs of wear or damage. Use only wafers that are in good condition. Page 48 If the WAFERTAPE drive still does not appear to be working properly, first turn off all devices attached to the HEX-BUS (tm) interface. Next, disconnect this peripheral from the HEX-BUS interface. Then follow the steps below. 1. See if the computer itself is working properly. Turn on the computer. Enter the statement [OPEN #1,"1.TEST"] (if the peripheral is set to a device number other than 1, use that number instead). The error message I/O error 255 #1 should appear in the computer display, indicating that the device named cannot be opened. This result is expected when the WAFERTAPE peripheral is not connected to the HEX-BUS interface. 2. Check that the WAFERTAPE peripheral is working properly. Refer to the set up instructions and reconnect the peripheral to the HEX-BUS interface. Type the statement [OPEN #1,"1.TEST"] (if the device number is not 1, use the number in effect) and press ENTER. The OPEN statement should disappear from the computer display and be replaced by a flashing cursor on the left side, indicating that the peripheral has been opened. 3. If the WAFERTAPE drive still does not work when reattached to the HEX-BUS interface, then the unit or its cable may be faulty. 4. If none of the above procedures correct the difficulty, consult the section entitled IF YOU HAVE QUESTIONS OR NEED ASSISTANCE or refer to the SERVICE INFORMATION portion of the User's Reference Guide. --------------------------------------------- Page 49 SERVICE CENTERS If your HX2000 WAFERTAPE Digital Tape Drive requires service and you do not wish to return the unit to a service facility for repair or replacement, you may elect to exchange the unit for a factory reconditioned HX2000 WAFERTAPE peripheral of the same model (or equivalent model specified by TI) by going in person to one of the service centers which have been established across the United States. A handling fee will be charged by the service center for in warranty exchanges of the HX2000 WAFERTAPE drive. Out of warranty exchanges will be charged at rates in effect at the time of exchange. Please refer to the enclosed Service Center listing to call Consumer Relations Department for exchange fee information and location of the nearest service center. ------------------------------------------------- Page 50 IF YOU HAVE QUESTIONS OR NEED ASSISTANCE If you have questions in connection with repair of the HX2000 WAFERTAPE Digital Tape Drive or concerning peripheral, accessory, or software purchase, please call our Customer Relations Department at 800-858-4565 (toll free within the contiguous United States). The representatives at these numbers cannot provide technical assistance. For technical questions such as programming, specific applications, etc., you can call 806-741-2663. Please note that this is not a toll free number and collect calls cannot be accepted. As an alternative you can write to Consumer Relations department Texas Instruments Incorporated P.O. Box 53 Lubbock Texas 79408 Because of the number of suggestions which come to Texas Instruments from many sources containing both new and old ideas, Texas Instruments will consider such suggestions only if they are freely given to Texas Instruments. it is the policy of Texas Instruments to refuse to receive any suggestions in confidence. Therefore, if you wish to share your suggestions with Texas Instruments or if you wish us to review any BASIC language program which you have developed, please include the following statement in your letter. "All of the information forwarded herewith is presented to Texas Instruments on a nonconfidential, nonobligatory basis; no relationship, confidential or otherwise, expressed or implied, is established with Texas Instruments by this presentation. Texas Instruments may use, copyright, distribute, publish, reproduce, or dispose of the information in any way without compensation to me." Page 51 THREE MONTH LIMITED WARRANTY This Texas Instruments HX-2000 WAFERTAPE(tm) Digital Tape Drive warranty extends to the original consumer purchaser of the accessory. WARRANTY DURATION This HX-2000 WAFERTAPE (tm) Digital Tape Drive is warranted for a period of three (3) months from the date of the original purchase by the consumer. WARRANTY COVERAGE This HX-2000 Digital Tape Drive is warranted against defective materials or workmanship. This warranty is void if the accessory has been damaged by accident, unreasonable use, neglect, improper service or other causes not arising out of defects in materals or workmanship. WARRANTY DISCLAIMERS Any implied warranties arising out of this sale, including but not limited to the implied warranties of merchantability and fitness for a particular purpose, are limited in duration to the above three month period. Texas Instruments shall not be liable for loss of use of the HX-2000 WAFERTAPE (tm) Digital Tape Drive or other incidental or consequential costs, expenses, or damages incurred by the consumer or any other user. Some states do not allow the exclusion or limitation of implied warranties or consequential damages, so the above limitations or exclusions may not apply to you in those states. LEGAL REMEDIES This warranty gives you specific legal rights, and you may also have other rights that vary from state to state. ------------------------------------------ Page 52 WARRANTY PERFORMANCE During the above three month warranty period, your HX-2000 WAFERTAPE (tm) digital Tape Drive will be repaired or replaced with a new or reconditioned unit of the same or equivalent model (at TI's option) when the unit is returned by prepaid shipment to a Texas Instruments Service Facility listed below. The repaired or replacement unit will be warranted for three months from date of repair or replacement. Other than the postage requirement, no charge will be made for the repair or replacement of in warranty units. TEXAS INSTRUMENTS CONSUMER SERVICE FACILITIES U.S. Residents Texas Instruments Service Facility 2303 North University Lubbock Texas Canadian Residents Geophysical Services Incorporated 41 Shelley road Richmond Hill, Ontario Canada L4C5G4 Consumers in California and Oregon may contact the following Texas Instruments offices for additional assistance or information. Texas Instruments consumer Service 831 South Douglas Street El Segundo, California 90245 213-973-1803 Texas Instruments Consumer Service 6700 Southwest 105th Street Kristin Square Suite 110 Beaverton, Oregon 97005 503-643-6758