****************************************************************** Sending Files and Programs to and from the HX-20 ****************************************************************** We have received many questions on how to transmit files between the HX-20 and the QX-10 or to another HX-20. The following procedures, submitted by Justin Bell, Technical Services, describe some of the methods for sending files and programs to and from the HX-20. Four techniques are described: Sending BASIC programs from the HX-20 to the QX-10 (with PIP and MODEM7) o Sending documents created by EpsonLink to the QX-10 o Sending BASIC programs from the QX-10 to the HX-20 o Sending BASIC programs from one HX-20 to another Also presented in this document are two programs (written by Bob Diaz in Product Development) for transmitting SkiWriter files from the HX to the QX. Sending BASIC Programs from the HX-20 to the QX-10 We will describe two ways to send programs from the HX to the QX: first, using the PIP program in CP/M, and then using the MODEM 7 program. Both methods assume the program you are sending resides in the BASIC memory area of the HX. Using PIP Follow this procedure to send a BASIC program from the HX-20 to the QX-10 with PIP: 1. Use the SETUP program on the QX to change the serial options. Since the default settings for the HX-20 in BASIC are 4800 baud, 8 bit word and no parity, set the QX-10 to match. 2. Connect the HX to the QX with the 715 printer cable. 3. Use the STAT program on the QX to receive a file in serial format by typing: STAT RDR:=UR1: [RETURN] 4. Then assign a name to the BASIC program the QX is going to receive by typing (at the QX): PIP filename.RDR=UR1: [RETURN] where "filename" is the name you assign to the file. 5. To prevent BASIC programs with over 80 characters per line from being broken, you may need to use the WIDTH command. On the HX, type: WIDTH "COM0:",255 [RETURN] 6. Send the BASIC program from the HX to the QX by typing on the HX: LIST "COM0:" [RETURN] Using MODEM7 The MODEM7 program, from the CP/M User's library, offers a fast and reliable alternative to the above procedure. If you have the program, use this method for sending programs from the HX to the QX: 1. Follow steps 1 and 2 above. 2. Load the MODEM7 program by typing on the QX: MODEM7 [RETURN] One of the available commands in this program is M for Menu. If you are unfamiliar with MODEM7 commands, type M to display the possible options. 3. Set the QX in the Terminal mode to receive the file with the command: T filename.HXA [RETURN] where "filename" is the name you want to give to the transmitted file. 4. Open the QX buffer with: CTRL Y 5. Send the file from the HX by typing: LIST "COM0:" [RETURN] 6. When the QX has received all the data, close the buffer by typing on the QX: CTRL W 7. Then, to Exit the Terminal mode, type: CTRL E 8. Write the new data to disk on the QX by typing: WRT [RETURN] 9. Exit the MODEM program by typing: CPM [RETURN] You can then give the TYPE command on the QX to make sure the file was received properly. Sending Documents Created by EpsonLink to the QX-10 EpsonLink has a limited text editor that can be used as a "quickie" word processor. This offers a convenient way to write documents on the HX-20 in remote places, and transfer them to the QX-10 later. Then you can edit the documents with a more sophisticated word processing progam like Valdocs, WordStar or Peachtext. Follow this procedure to send a document to the QX with EpsonLink: 1. Use the EpsonLink text editor to create a document. 2. Store the document to tape by using the output text function. Do not turn off the power switch on the HX until you have done this, or you will lose the document. 3. When you are ready to transfer the document to the QX, turn on both computers and choose the Terminal Emulator function on the HX. 4. Use the SETUP function on the HX to set the parameters to 4800 baud, 8 bit word, and no parity. (The BASIC program defaults to these parameters, but EpsonLink does not.) 5. Connect the HX to the QX with the 715 printer cable. 6. Use the SETUP program on the QX to set the serial parameters to match the HX (4800 baud, 8 bit word, no parity). 7. Use the STAT and PIP programs to set up the QX as follows: STAT RDR:=UR1: [RETURN] PIP filename.ext=RDR: [RETURN] where "filename" is the name you assign to the tranferred file. 8. Use the tape transmit function on the HX to transfer data from the HX to the QX. 9. Verify that the data was actually transferred by giving the TYPE command on the QX. For example, if you named the transferred file TEST, type: TYPE TEST [RETURN] You should see your text file scroll on the screen. Then you can use your word processor (Valdocs, Wordstar, Peachtext, etc.) to edit the file as desired. Sending BASIC Programs from the QX-10 to the HX-20 This method is very similar to the procedure for sending files from the HX to the QX. Before a BASIC program can be transferred from the QX, it must be stored in the ASCII format, using the SAVE command with the A option. For example, to store a BASIC program named "INTEREST.BAS" you would give the command: SAVE "INTEREST.BAS",A [RETURN] The A stores the program as an ASCII file. You can use the TYPE command to display the file, if you want to make sure it is in ASCII format. (An ASCII file lists clearly on the screen; non- ASCII files display as garbled text.) Then follow this procedure to send an MBASIC program from the QX to the HX: 1. Use the SETUP program to set the QX serial options to 300 baud, 8 bit word, no parity. 2. Type the following on the HX: LOAD "COM0:(28N1B)" [RETURN] 3. Set up the QX to send by typing: STAT PUN:=UP1: [RETURN] 4. Send the program from the QX by typing: PIP PUN:=filename.ext [RETURN] Sending BASIC Programs from One HX-20 to Another The procedure below describes the simple method for transmitting files between two HX-20s. To avoid data loss, make sure the ports on both computers are open before sending. Also make sure you use the WIDTH command to allow for BASIC lines longer than 80 characters. 1. Turn on both computers and connect the two RS-232C ports with a 716 cable. 2. On the sending HX, type: OPEN "I",#2,"COM0:(28N2B)" [RETURN] WIDTH "COM0:",255 [RETURN] 3. On the receiving HX, type: LOAD "COM0;(28N2B)" [RETURN] 4. Send the data by typing on the sending HX: LIST "COM0;(28N2B)" [RETURN] Verify that the file was sent by finding it on the receiving HX. Sending SkiWriter Files from the HX-20 to the QX-10 Below are two programs written by Bob Diaz (Product Development) that let you transmit SkiWriter files to the QX-10. The first is for sending the file residing in the memory area of SkiWriter and the second is for sending a file recorded on tape. Sending from the Memory 1 REM HX-20 SkiWriter Memory to QX-10 .DOC File Transfer Program 2 REM Written 12/13/83 by Bob Diaz 10 WIDTH 20,16 20 DEFINT A-Z 30 PRINT "SkiWriter Memory" 40 PRINT "To QX-10 File." 50 PRINT 60 INPUT "Push Return.",A$ 70 PRINT "Set the QX's BAUD" 80 PRINT "Rate to 4800 BAUD" 90 PRINT "and Push Return." 100 INPUT "",A$ 110 OPEN "O",2,"COM0:" 120 WIDTH "COM0:",255 130 PRINT "ENTER:" 140 PRINT "PIP FNAME.DOC=UR1:" 150 PRINT "On the QX and" 160 INPUT "Push Return. ",A$ 170 L=3113 180 A$=CHR$(PEEK(L)):L=L+1 190 IF A$=CHR$(3) THEN 260 200 IF A$=CHR$(12) THEN 230 210 IF A$=CHR$(13) THEN A$=A$+CHR$(10):GOTO 230 220 IF A$<" " THEN A$="#" 230 PRINT #2,A$; 240 PRINT A$; 250 GOTO 180 260 PRINT #2:PRINT #2,CHR$(26) 270 PRINT 280 CLOSE Sending a Tape File 1 REM HX-20 SkiWriter File to QX-10 .DOC File Transfer Program 2 REM Written 12/13/83 by Bob Diaz 10 WIDTH 20,16 20 DEFINT A-Z:DIM P(5) 30 P(1)=50:P(2)=1335:P(3)=2410:P(4)=3500:P(5)=4600 40 PRINT "SkiWriter Tape File" 50 PRINT "To QX-10 File." 60 PRINT "Select File Number:" 70 INPUT "(1 - 5)";F 80 IF F<1 OR F>5 THEN GOTO 60 90 WIND P(F) 100 PRINT "Set the QX's BAUD" 110 PRINT "Rate to 4800 BAUD" 120 PRINT "and Push Return." 130 INPUT "",A$ 140 OPEN "I",1,"CAS0:" 150 OPEN "O",2,"COM0:" 160 WIDTH "COM0:",255 170 PRINT "ENTER:" 180 PRINT "PIP FNAME.DOC=UR1:" 190 PRINT "On the QX and" 200 INPUT "Push Return. ",A$ 210 A$=INPUT$(1,1) 220 IF A$=CHR$(3) THEN 290 230 IF A$=CHR$(12) THEN 260 240 IF A$=CHR$(13) THEN A$=A$+CHR$(10):GOTO 260 250 IF A$<" " THEN A$="#" 260 PRINT #2,A$; 270 PRINT A$; 280 GOTO 210 290 PRINT #2:PRINT #2,CHR$(26) 300 PRINT 310 CLOSE