The Retriever If you have ever trashed a microcassette by inadvertently DIRINITializing a tape with useful files on it, or have otherwise rendered a tape useless by corrupting its directory, then we have something for you .... The Retriever. Written in BASIC this program accomplishes something even the programmers at Epson America couldn't; the recovery of files from a microcassette with an erased or unreadable directory. The process The Retriever uses to recover the directory requires operator assistance. The program"plays" the tape on the PX-8 speaker. The start and end of files, as well as the record count of each file are indicated by tone differences in what you hear from the speaker. By depressing the required keys, the operator indicates to the program the start, number of records, and end of each file on the tape. Operator counting of records is necessitated because the different modes of tape operation (stop and non-stop) use different amounts of tape, thereby rendering any formula for determining records from the tapecount worthless. The program then verifies each file and writes a directory of the files (with the generic names F1.RET, F2.RET, F3.RET etc) to the tape. The software itself is menu driven and quite easy to follow. You might want to first listen to a tape being played without trying to input anything to the program to familiarize yourself with the sounds that you will hear. Also, because of the constant use of the speaker and cassette drive, it is almost necessary to have the battery charger plugged in whenever using The Retriever. The program can not recover data that has been magnetically altered, nor will it function with a physically damaged tape. Even with the safety features for tape operations implemented on the revised operating system for the PX-8, The Retriever is a program that no PX owner should be without. You may never need to use it, but that one time you do makes the bargain basement price of $9.50 a wise investment. For more information or ordering, contact WHALESONG SOFTWARE, P.O. Box 1183, Franklin PA 16323 (412-376-3627). Installing Turbo Pascal On the PX-8 One of the most popular software products of 1984 was Turbo Pascal from Boreland International. The following instructions indicate the installation procedure for using this program on the PX-8. The licensing agreement for the software does indicate that the package may be used on only one CPU. Boreland states that they are not against the transfer and use of Turbo Pascal on the PX-8 as long as only one copy of the program is operational at any one time. They were even curious about the installation steps themselves. All of the user input contained in the following instructions will be that BETWEEN the double quotation marks. Using the installation program Boreland provides with Turbo, you will first be presented with a selection of about 30 terminals to chose from for the installation. Selection 21 should be "Soroc 120, Apple CPM", and is the proper choice for PX-8 installation. Then you are asked if you want to modify this definition before installation. Answer with a "y". Enter "PX-8" or "Epson PX-8 -- Ain't it Great" for the terminal type. Next comes an inquiry about sending an initialization string to the terminal. Answer "y". You will enter the following at the 'Change to:' prompt:"27 208 0 40 8 27 209 1 27 243 4 19 5 24 0". Next you must change the reset string in a similar manner. Answer "y" to the 'Send reset string to the terminal?' question. Enter "27 209 0 27 243 28 29 30 31" at the 'Change to:' prompt. Now you may just hit the "RETURN" key (accepting the default values) for the remaining questions until you see the one about screen length. Of course you will input "8" for this one. When finished, the program will ask you if the definition is correct. A negative answer will send you through the procedure again, while a positive one will illicit a question about the nature of the hardware. You will be asked for the operating frequency of your microprocessor. Answer "3" to this and then "Q"uit the installation program and you should have Turbo Pascal operational on your PX-8. More experienced users can then use DDT or PATCH (a version of PATCH is on this months tape) to remove the extra line feeds from the Turbo menus so that they will appear on one screen. PFK OFFSET equ 6CH ;PUTPFK BIOS routine offset from WBOOT ON equ 0 ;Value for pfk display ON OFF equ 1 ;Value for pfk display OFF DISPLAY equ OFF ;Set display to ON or OFF for pfk display BDOS equ 5 PRINT equ 9 org 0100h lxi d,disppfk mvi c,print call bdos ;Send the display string to the console lhld 1 ;Get BIOS WBOOT address mov a,l adi offset ;get address of the PUTPFK BIOS call mov l,a shld putpfk+1 ;modify the call address mvi c,0ffh lxi h,pfk1 loop: inr c mov a,c cpi 10 rz push b push h putpfk: call 0000 ;<----MODIFIED ADDRESS!!!!! pop h pop b mov a,m ;get string length add l inr a mov l,a ;put computed string length back jmp loop disppfk:db 1bh,0d3h,display,'$' ;Function key display on/off pfk1: db pfk2-pfk1-1,'dir ' pfk2: db pfk3-pfk2-1,'type ' pfk3: db pfk4-pfk3-1,'c:stat ' pfk4: db pfk5-pfk4-1,'c:pip ' pfk5: db pfk6-pfk5-1,'battery',0dh pfk6: db pfk7-pfk6-1,'modem t',0dh pfk7: db pfk8-pfk7-1,'modem r ' pfk8: db pfk9-pfk8-1,'modem s ' pfk9: db pfk10-pfk9-1,'c:term',0dh pfk10: db last-pfk10-1,'c:config',0dh last: equ $ end The above listing is the assembly language code (referred to as an .ASM file) for a program written for the PX-8 by David Kozinn (the comment lines have been removed to conserve space). It is a simple but very useful program which redefines the PX-8 function keys. You can see in the tail end of the listing exactly how the keys will be defined by this version of the program. As shown above it is not an executable program. 'Assembling' and 'loading' the above file will produce an executable .COM file that will redefine the function keys as indicated. Not everyone will want to use the key definitions used in this listing. You may customize the program to your needs by editing the above .ASM program with your own key definitions and then assembling and loading this file. For many PX owners this presents a small problem, however. The ASM.COM program needed to accomplish the 'assembling' is distributed only on the system disk that accompanies the PF-10 floppy disk drive. It is NOT a public domain program, so we can not distribute it to you on a tape of the month, and you shouldn't be able to find it on any RBBS's. That renders the above program quite useless you have the disk drive or another CPM computer with ASM.COM. There is a public domain version of ASM.COM called LASM.COM that we will distribute on this month's tape along with PFK.ASM, making the latter file useful to more PX owners. You should be forwarned that the documentation for the LASM program assumes some familiarity with ASM. It is strongly suggested that unless you are familiar with ASM that you invest $15--$20 in a book such as CP/M and the Personal Computer (Addison-Wesley, ISBN 0-201-10355- 9) by Dwyer and Critchfield, or The CPM Bible (Howard W.Sams & Co., ISBN 0-672-22015-6) by Waite and Angermeyer. Now let's go through the customization of PFK a little more thoroughly. If you don't really want to be bothered with learning all about LASM (or ASM), these instructions will provide enough information to allow you to customize PFK. The part of the program that requires editing is listed below. pfk1: db pfk2-pfk1-1,'dir ' pfk2: db pfk3-pfk2-1,'type ' pfk3: db pfk4-pfk3-1,'c:stat ' pfk4: db pfk5-pfk4-1,'c:pip ' pfk5: db pfk6-pfk5-1,'battery',0dh pfk6: db pfk7-pfk6-1,'modem t',0dh pfk7: db pfk8-pfk7-1,'modem r ' pfk8: db pfk9-pfk8-1,'modem s ' pfk9: db pfk10-pfk9-1,'c:term',0dh pfk10: db last-pfk10-1,'c:config',0dh Say you have a customized utility ROM in the I drive, making the above definitions worthless. Enter WordStar and indicate at the main menu that you wish to edit a document in the non-document mode by hitting "N" and then entering PFK.ASM for the filename. Use CTRL-C to page down to the part of the program indicated above. Position the cursor on the 'd' of 'dir' on the first line above and enter bat (for BATTERY.COM). Then hit CTRL-G 3 times to delete 'dir' (but not the apostrophe). Then space past the apostrophe and enter a comma followed by 0dh (which indicates a carriage return in HEX). The first line should now look like this: pfk1: db pfk2-pfk1-1,'c:bat ',0dh PF1 is now be redefined to be "c:BAT ". We continue in this fashion to redefine PF2 to "c:FILINK ",PF3 to "c:CONFIG and so on. Then save your new PFK with CTRL KX. Now we're ready to use LASM (or ASM). LASM is a CPM assembler; it allows the writing of programs in human decipherable format. LASM generates two files from a program listing such as that above -- a PRN file (the machine language program in human readable form) and a HEX file (the source program, or object code). But neither of these is in a form that the computer can understand. One more step is necessary. The HEX file must be converted into a COM file that the computer can then load and run whenever this file's name is entered (like PIP, STAT, WS etc.). LOAD.COM (also on this month's tape) accomplishes this conversion of the ASCII HEX file into an executable COM file. If you do not have any memory expansion set your RAM (or A) drive to 24K with CONFIG and then put your customized version of PFK.ASM, LASM.COM, and LOAD.COM on this drive. You will need at least 12K of free space for all the files that will be generated. Now invoke LASM by entering at the "A>" prompt: A>lams pfk and you will see LINKASM AS OF 7/06/81 PFK PFK 017E 001H use factor 48 input lines read End of assembly Remember we are using PFK.ASM with all the comment lines removed; on the unedited version you will see '63 input lines read'. If you now do a 'dir' you will see the two files created by LASM -- PFK.PRN and PFK.HEX. Now create the COM file by entering at the 'A>' prompt: A>load pfk and you will see FIRST ADDRESS 0100 LAST ADDRESS 017D BYTES READ 007E RECORDS WRITTEN 01 and you now have your own customized version of PFK.COM. Let's back up a little and examine the two files that LASM created. Looking at a portion of the PRN file we see that it shows both the ASM listing on the left and the corresponding machi language translation of the program produced by LASM on the right. 006C = OFFSET equ 6CH ;PUTPFK BIOS routine offset from WBOOT 0000 = ON equ 0 ;Value for pfk display ON 0001 = OFF equ 1 ;Value for pfk display OFF 0001 = DISPLAY equ OFF ;Set display to ON or OFF for pfk display 0005 = BDOS equ 5 0009 = PRINT equ 9 0100 org 0100h 0100 112A01 lxi d,disppfk 0103 0E09 mvi c,print 0105 CD0500 call bdos ;Send the display string to the console 0108 2A0100 lhld 1 ;Get BIOS WBOOT address 010B 7D mov a,l 010C C66C adi offset ;get address of the PUTPFK BIOS call 010E 6F mov l,a 010F 221F01 shld putpfk+1 ;modify the call address 0112 0EFF mvi c,0ffh 0114 212E01 lxi h,pfk1 0117 0C loop: inr c 0118 79 mov a,c 0119 FE0A cpi 10 011B C8 rz 011C C5 push b 011D E5 push h 011E CD0000 putpfk: call 0000 ;<----MODIFIED ADDRESS!!!!! This gives the programer a listing of what LASM did with his program, and is a valuable debugging tool. Now if we look at the HEX file we will see: a / \ / \ b c d e f g h i j k l m n o p q r / \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ :10010000112A010E09CD05002A01007DC66C6F225F :100110001F010EFF212E010C79FE0AC8C5E5CD0096 :1001200000E1C17E853C6FC317011BD30124046429 :1001300069722005747970652007633A737461747D :100140002006633A70697020086261747465727980 :100150000D086D6F64656D20740D086D6F64656DBD :10016000207220086D6F64656D20732007633A74F8 :0E01700065726D0D09633A636F6E6669670D07 :0000000000 \ / \ / \ / \ / s Each line of the file is organized as follows: a: The colon at the beggining of each line indicates the beginning of a record. The first 2 digits after the colon indicate the length of the record in HEX. Here the record length is 10 HEX or 16 in decimal. Following this are 4 digits (0100) that tell the 'loader' the starting location in memory where the machine code of the record is to stored. b-q: The program per se; each line contains 16 or 10H bytes (in hexadecimal code) of the machine language program. Correlate this with the left portion of the PRN file. r: Checksum. s: Portion of the data to set the function keys to. This file is in what is known as Intel Hex format. All of the characters are ASCII, and each line contains checksum error detection, allowing it to be more inter-computer transferable than a COM file. It is also possible to print or view this file, something that cannot be done with COM files. This is the type of file that is 'burned' into our personalized ROMs. Using the PX from Hotel and Motel Rooms Peter Lert has contributed the following discussion which describes how to circumvent the unavailability of modular phone jacks in most hotels and motels, a situation that makes it impossible to use the modem in the PX's MFU. THIS FILE DESCRIBES A SIMPLE, CHEAP ADAPTER TO LET YOU USE THE #39.95 RADIO SHACK PORTABLE ACOUSTIC COUPLER (designed for use with the "Trash-80" models 100 & 200) WITH THE EPSON PX-8 "GENEVA" PORTABLE COMPUTER AND MODEM UNIT OR MULTI-UNIT. It's written in non-technical terms for those out there with little electronics background; bear with me, other technofreaks! INTRODUCTION A significant disadvantage of the Modem Unit and Multi-Unit available for the PX-8 is encountered when travelling: many hotels and motels have telephones hard-wired to the wall, with no modular outlet suitable for direct MODEM connection. The same is true of public telephones. The author has, until now, made use of two cumbersome expedients: 1.) Disassemble the telephone using a Swiss Army Knife and make a direct connection using a cord with a modular phone plug on one end and a pair of alligator clips on the other (impossible with public telephones); or... 2.) Use an external acoustic coupler such as Epson's, which is fairly bulky, requires batteries, costs close to $200, and doesn't work very well. However, the author has noted two interesting facts. One is that the Radio Shack TRS-80 Models 100 and 200 can be used with an optional acoustic coupler consisting of a pair of soft rubber cups with transducers, which fit over the telephone handpiece and which connect to an enigmatic 8-pin DIN plug on the back of the computer; the other is that the PX-8 Modem and Multi-Units have an equally enigmatic miniature phone plug on the back, labelled "acoustic coupler." Some experimentation revealed that the Radio Shack Acoustic Coupler will, in fact, work fairly well with the PX-8. In fact, this file was transmitted with it, as a test. REQUIRED COMPONENTS 1.) Tandy/Radio Shack "Acoustic Coupler for use with Portable Computer," part # 26-3805A; list price $39.95 2.) A miniature (1/8 inch) three-circuit audio plug (Radio Shack part # 274-284 or equivalent); this is the same plug as found on the lightweight headsets used with "Walkman"(tm) type cassette players. 3.) A female 8-conductor DIN connector. This is not currently available at Radio Shack, nor at most audio stores; you'll have to go to a "real" electronics store! 4.) A couple of feet of three-conductor wire; I recommend two conductors plus a shield (e.g., microphone cable). TOOLS REQUIRED knife or diagonal wire cutter, small soldering iron, rosin-core solder Note that for all its humble appearance, the Radio Shack coupler includes an amplifier and requires +5 VDC for proper operation. By a strange coincidence, however, the PX-8 provides just that voltage at the Acoustic Coupler jack! WIRING THE ADAPTER Remove the outer insulation from both ends of the wire; strip the inner insulation from the two conductors and tin their ends, and the last 1/8 inch or so of the copper shield, with solder. Remove the protective shells or hoods from both the miniature and the DIN connector and put them "back to back" at the middle of the wire NOW to avoid forgetting them and having to un-solder one of the connectors later (here speaks the voice of bitter experience). Gently pry off the two metal shielding halves at the back of the DIN connector. Looking at the back, orient it so that the gap in the circle of pins is at the bottom. You are going to wire to four of these pins: #6, the one in the center of the plug; #2, the one directly above it at the 12 o'clock position; #4, immediately to the right of #2; and #5, immediately to the left of #2. Remember, this orientation is looking at the BACK of the DIN plug. Solder the outer shield of the wire to pin #2. This is the ground for both the signal and the 5 volt power. Solder one of the inner conductors to pin #5 and note its color; this is the "transmit" line, and will ultimately operate the transducer that goes over the mouthpiece of the telephone handset. Solder the other inner conductor to pin #4, just to the right of pin #2. This is the "receive" line that carries the signal from the transducer that fits over the earpiece of the phone handset...but it also carries the +5 volts DC from the PX-8 to the acoustic coupler. Therefore, solder an additional very short wire from pin #4 to pin #6--the one in the center of the plug. Note the color of the "receive" wire. Now move to the other end of the wire. Solder the outer shield to the "sleeve"--the section nearest the "handle" end--of the miniature plug. The "transmit" line is connected to the "ring," or intermediate section of the plug, and the "receive" line is connected to the tip of the plug. On a Radio Shack #274- 284 plug, the tip is the smallest solder lug in the center, the ring the next largest, and the sleeve the largest lug. Check all your connections, making sure that none are touching one another, and slide the hoods onto the plugs. Plug the acoustic coupler into the adapter you've made, and the adapter into the "acoustic coupler" jack on your PX-8. USING THE ACOUSTIC COUPLER Thus far, I have used the coupler only with the "Geneva Connection" software on the PX-8. Getting it to work seems to require "fooling" the software using the following procedure: 1.) Enter the "Geneva Connection" in the usual fashion. 2.) At the * prompt, enable the internal MODEM by typing PORT INT and a carriage return. 3.) Here's where we "fool" the software by letting it think it's dialling a telephone: at the next * prompt, type DIAL T 1 (or any other single digit) but don't hit carriage return yet. 4.) Put the mouthpiece half of the coupler on the phone handset and, using the dial on the phone, call the other computer. When it answers, and you hear the high-pitched MODEM tone, quickly put the earpiece of the coupler onto the phone and hit carriage return. The Geneva will dial a 1, which doesn't do anything, and if the signal level from the other computer is high enough it will print "SUCCESSFUL" followed by another * prompt. Type TERM plus a carriage return, and you're in business! In some cases, random "garbage" noise may cause Geneva Connection to "lock up" before communication is established. This can be avoided by setting parity to "N" until connection is established, then resetting as required--or can be recovered from by exiting TERM mode (using ESC key) and re-entering. The acoustic coupler is quite sensitive to extraneous noise and must be operated per the instructions supplied with it, or data errors will result. It is highly recommended that important or critical material such as programs be transmitted/received using an error-checking protocol such as XMODEM. (NOTE TO EXPERIENCED "GENEVA CONNECTION" USERS: As far as I can tell after only minimal testing, the Geneva Connection needs both to go through the "dial" routine AND a MODEM tone of sufficient level before it will put out its own tone. More experienced or proficient users than me may well be able to circumvent this. Some phone systems may also let you tone-dial through the acoustic coupler. At present, the system works well if there's a good connection, not too much noise on the line, and not too much ambient noise around the coupler--i.e., at least as well as the Epson acoustic coupler!) As supplied by Radio Shack, the Portable Acoustic Coupler has only marginal gain and requires a clear, noise-free phone line and a strong MODEM tone from the other end to work properly. Here's how its gain can be increased. REQUIRED COMPONENTS small 5 KOhm potentiometer, insulated hookup wire REQUIRED TOOLS soldering iron and solder, small Phillips screw driver, needlenose pliers. STEP 1: Peel back edges of rubber cup--this takes a little force--and slide out the plastic back part of the EARPIECE transducer on the Acoustic Coupler. It will come away from the earpiece, leaving the actual tiny transducer in the rubber part. STEP 2: Unscrew the small Phillips screw in the center of the circuit board in the plastic housing and remove it. Carefully disconnect the two polarized plugs linking it to the cable and the transducer (a small electret microphone). STEP 3: On the component side of the board, locate the 4700-ohm resistor marked R5 (last in a row of four; color coded yellow, violet, red, silver or gold). Carefully unsolder this resistor and remove it from the circuit. STEP 4: In place of the resistor you just removed, install a pair of wires and connect them to the 5000-ohm potentiometer, which will be installed on the outside of the plastic housing. (Alternatively, you could install a small trimmer potentiometer right on the component side of the circuit board, and make a hole in the housing to get at it with a screwdriver.) The potentiometer should be wired such that minimum resistance is at the clockwise end of rotation. STEP 5: Reassemble the Acoustic Coupler. TESTING AND USE WITH GENEVA CONNECTION: The idea here is to supply just enough audio so the Geneva Connection knows someone's out there, but not so much that you get distortion and data errors. Start with your new gain adjustment fully counterclockwise. Put the coupler on the phone, call Geneva Connection, command PORT INT to get the MODEM up, then command DIAL T 1 to get into dial mode. Use the phone to dial the other computer while listening on the Geneva speaker. When you hear the other computer's MODEM tone, if Geneva doesn't give you the SUCCESSFUL message in a couple of seconds, slowly start increasing the gain until it does--that's all there is to it! Crude, yet primitive--but, like most kludges, it works...