HP-41 MASS COPY ROUTINE - Mitchell A. Hoselton (edited 1/89 by M. Markov) A number of HP-41 users have asked how they could participate in the swapdisk program, considering the limitations of the HP-41. Their concerns were addressed in part in the SWAP08 disk, which contains an extensive library of routines that allows them to display or print the contents of HP-75 and HP-71 text files, transfering the data from tape or disk directly to a video monitor or to a printer. Also, M.A. Hoselton kindly adapted my HP-71 MCOPY71B routine to allow HP-41 users to duplicate disks almost as fast as with an HP-71. Documentation was to be published in the CHHU Chronicle. The following text is a somewhat modified/abreviated/updated version of that documentation. User instructions are available at the end of this documentation file. Because of major differences in the ways that the HP-71 and HP-41 interact with their respective HPIL interfaces, it was not possible to produce a working version of MCPY41 by simple translation. Trial and error experimentation with the flags in the HP-41 HPIL interface did eventually lead to the development of the working version presented here. After extensive investigations of his own, Michael Markov was able to come up with what seems to us to be a fairly complete explanation of why the particular flag settings used actually work. I have included Mike's comments in this documentation. MCPY41 has been most thouroughly tested on both the Steinmetz & Brown dual 5.25" drive (S&B 10162A) and on the HP9114A disk drives. In retrospect, the Steimetz & Brown dual disk drive turned out to be an unusual choice, because the dual drive system contains only one controler (that saves on cost, of course). The problem with having only one controller is that the process is slowed down considerably by the constant switching back & forth by the controller as the buffers fill alternately in the two drives. When only one of the pair in a dual drive is used with a separate drive and its own controller, the mass copy process is four to five times faster than when using both drives in a S&B dual drive. Transfers between S&B and HP9114 have been successful. NOTE: MCPY41 also works with CMT RAMDISKs, and supports transfers between HP9114 drives and CMT RAMDISKs. However, since the media have unequal storage capacity, transfers from higher capacity drives/media to drives of lower capacity exposes the user to considerable risk: files that are stored at higher addresses than the end of the lower capacity media are not transfered. Trying to access these files is likely to lead to the dreaded Memory Lost. To avoid problems of this nature, you would have to edit both Sector 0 to correct the end-of- medium data, and the directory, to remove the directory entries for the unaccessibe files. While this is possible with the HP-41, it is NOT easy. Programs such as BCOPY (HP-71) should be used for such transfers. Transfers from lower capacity media to higher capacity media can be carried out safely with MCPY41 - although you may still want to edit Sector 0 to change the end-of-medium data to use the full capacity of the medium. Also, it should be noted that MCPY41 does not use the Auto Address Unconfigure (AAU) mode to set-up the slave drive as listeners. Therefore, it avoids potential problems with the CMT RAMDISK and the CMT HPIL LCD display. Both of these device have the AAU default address of 2, which is quite proper for the RAMDISKs, since it is reserved for mass storage devices. However, the RAMDISK does not respond as either a talker or as a listener while in AAU mode, unlike the cassette drive or the HP9114 drives. Using an AAU mode address of 2 for the CMT display means that the LCD will be a listener during transfers with programs such a MCOPY71C, which slows down transfers so much that you might as well transfer each file individually! MCPY41 is a lean and dedicated routine. Its only purpose is to make exact copies of entire disks. Cassette tapes cannot be copied because the cassette drives source NRD (Not Ready for Data) frames when the drive buffer fills up, since it cannot accept more data until it stores the content of the buffer. This stops the transfer until you restart the transfer with an SDA (Ready 96, or Send DAta) frame. While this can easily be done, it requires continuous monitoring of the PIL status registers. (It is easier to have a separate special purpose program, or to use the MCOPY capability provided by the Extended I/O ROM.) No provisions have been made for orderly termination after a partial transfers. With the above mentioned drives, the listener drives stop whenever the end of the disk is reached. Similarily, the master drive stops when it reaches the end of the medium, and issues an End-Of-Transmission frame, per drive specifications. This prevents wrap-around, with data from the higher capacity drive overwriting the directory area and ruining the copy. This means that there should be no need to monitor & stop the transfer when one drive (presumably a lower capacity drive or one with a single-sided disk) stops. Note: I have heard reports that it is possible to wrap-around while in the continuous read (DDL2) mode... However, I have never been able to reproduce the effect on my own equipment. Older cassette drives appear to be culprits in the majority of reports (MM). Copying information from one mass storage device to another, as implemented by HP, typically involve copying a specific record (256 bytes) from mass storage into RAM, then to the destination record. In each case, pointers are set to the desired sectors, and the proper talker/listener modes are set. If you set-up the listener before you read the data from the talker, there is no need to copy the data into RAM - it will be automatically copied by the listener. Mass copy naturally begin at the lowest address of both the talker and listener, record 0. Thereafter, subsequent records are transfered in the same way, although there is no need to set the pointers, which are automatically advanced by the drive controller. Obviously, the transfer can be started at sector you may select with DDL3 prior to initiating the transfer(s). As written, MCPY41 only makes one copy at a time. The "MASTER" disk is assumed to be in the first mass storage device on the loop. The "TARGET" disk is assumed to be the next mass storage device on the loop, and other drives are ignored. The interested user will find it relatively simple to modify the routine to use the Nth and N+1th drives, or to make multiple copies. In this reguard, it is worth remembering that making copies with the HP-41 is almost as fast as with the HP-71. There is no need to wait for an HP-71 owner to duplicate swap disks at meetings. MCPY41 will do the job nicely. MCPY41 provides the first published means of making backup copies of disks with an HP-41. Copies are completed in under five minutes, unless you have an S&B dual drive, which takes around 19 minutes. MCPY41 breaks significant new ground among HP-41 programs in its manipulation and use of HP-IL registers. The effect of these manipulations is that the HP-41 acts like a device on the loop after it initiates the transfer. With the HP-IL interface set to "Controller Not Active / Retransmit" mode, the HP-41 does not respond to commands or service requests circulating on the loop. Neither does it source any commands or messages of its own. This suggest many interesting applications, such as sharing peripherals, etc. METHODS: MCPY41 has five main functional components. These are 1) The routine that finds the loop address of the "Master" and "Slave" drives. 2) The routine that sets-up the drive, with both address pointers set to the start of record 0 and the appropriate drive modes (DDL2 & DDT2). 3) The routine that sets-up the "controller not active/retransmit" mode. This is the heart of the MCPY41, since it prevents the normal automatic sourceing of IDY frames whenever the HP-41 is idle. 4) The trigger required to start the transfer (SDA frame). 5) Housekeeping routine that restores the HP-41/HP-IL to normal operation. These five components will be discussed in detail in the following paragraphs. LBL "MCPY41" we start by setting the HP-41 flags as we must. Most are strictly " , " personal preference. Others must remain unchanged. See below. STO d the search for mass storage devices starts here. We start with the E first peripheral on the loop and look for mass storage devices, SELECT or for Accessory ID 16. 16 FINDAID STO Y save master drive address in Y. ISG X "" F0 NOP SELECT search for slave X<>L get the 16 from LASTX FINDAID the slave drive address in X This section could be extensively modified to enhance flexibility and reliability. Error trapping should probably be included. Absent such error trapping, it is up to the user to make sure that the loop consists only disk drives, that the master disk is in the first drive, and that the master is write-protected. One approach uses the ALPHA register, by storing the addresses of all the drives as a single byte with XTOA. This would allow checking the status of each drive for no medium, and anything else you really want to check. Then, the same data would be used in the routine below (until ALENG becomes 0) to set-up the drives. UNT tell all peripherals to hush-up UNL and stop listening as well LAD make drive at address in X register listen X<>Y and the master, also LAD SDC Send Device Clear.. resets all drive pointers to 0. 2 the desired continuous write mode (to medium) DDL set all active listeners (including the master) X<>Y get master address to X reg. TAD prepare master for operation as a talker (cancels listener mode) X<>Y get the 2 back, for the desired continuous read mode (from media) DDT set mode. All that is now required to trigger the data transfer is an SDA frame. The master will then send out a byte on the loop, wait until it returns unchanged, then send the next, and the next... The process is quite fast if all the peripherals on the loop are fast. Each device on the loop introduces a delay, but all goes well if everybody keeps the same pace. However, before we send SDA, we must make sure that the HP-41 will not take over the loop the moment it goes idle, and send the routine IDY 00, as required to determine the mode of the thermal printer (Trace, normal, etc.). The trick is done by altering the contents of HP-IL registers 0 and 3. Sixteen HP-IL flags are set in a specific pattern. In register 0, SC=1 is hardwired - an HP41 MUST be the system controller. However, we can set-up the equivalent of scope mode by setting CA=TA=LA=0. The other four bits apparently do not matter, setting them to zero has not caused problems. 0 HPIL register 0 128 desired contents (1000 0000 in binary) WREG set HPIL flags 3 now, register 3 64 desired contents (0100 0000 in binary) WREG set AIDY flag We need CA=0 (controller inactive) so that the PIL will not respond to events on the loop, such as service requests or other interrupts. However, with CA=0, the PIL would automatically start sending IDY frames UNLESS the AIDY flag is set. (There is method to our madness). TA=LA=0 are the PIL requirements for automatically retransmitting frames as soon as received. We are now ready to trigger the transfer: 96 SDA frame 5 Ready group WFRM send it! We do not use the HPIL development module's SDA keyword, because that sets CA=1, which should be avoided for the reasons metioned above. The HP-41 is now available for whatever you may wish to do... provided that a) the HP-41 remains awake (going to sleep terminates the transfer), and b) you do not use any functions that involve sending data to a display or printer. You may use VIEW and AVIEW provided HP-41 flags 22 and 55 are kept cleared. This is why MCPY41 sets flag 44 (same as the non-programmable ON keyword) and clears flags 22 & 55. Yes, you really can do useful things like edit programs, keyboard arithmetic, or even run programs. LBL 03 a harmless loop that keeps you out of the "EE" routine below "COPYING" there is nothing to do until the transfer is completed. When the AVIEW drives stop spinning, then XEQ "EE". STOP GTO 03 The LBL "EE" routine is used to reset HP-IL register 0 to the more normal SC=CA=TA=1. Then the disk drives are cleared, and miscellaneous HP41 flags are reset and the program halts. You can now remove the disks from the drive. MASS COPY FUNCTIONS: Before completing the discussion portion of this report and getting on to the details of MCPY41 operation and use, I think it is worthwhile to present additional related information for the benefit of people who may want to attack the more general problems of "real" mass copy functions more along the line of the MCOPY function and beyond. This will be limited to the available means of conducting controlled data transfers. While it would be interesting to discuss more complex problems such as how to split or merge directories when using media of different capacities, it is somewhat beyond the scope of this paper. MCPY41 coaxes the disk drives into conducting the data transfer autonomously. In doing so the opportunity to monitor the transfer was eliminated. Therefore, there is no way to interrupt the transfer at a specific point to get well defined partial transfers. This is what I call an uncontrolled data transfer. In order to conduct a controlled data transfer it is necessary to use functions which are able to to monitor the progress of the transfer and programs which can interrupt those functions when necessary. Nothing as fast as MCPY41 can be put together, but for the sake of control the speed may have to be sacrificed. Specifficaly, there are two functions which can be used to conduct mass copy and/or partial copy functions in the manner just described. These are INBUFX from the HPIL development module, and XFERN from the Extended I/O module. Of the two, INBUFX is about 25% faster but has the disadvantage that a RAM buffer has to be created and so may not be generally as useful as XFERN. MCPY41A illustrates a way of using INBUFX to conduct data transfers. The mass storage search and mass storage set-up resemble those in MCPY41. The differences are instructive if you take time to study them. A buffer of 1024 bytes (ie., 4 recordds of 256 bytes each) is created. Smaller buffers could be used at the expense of speed. Then INBUFX is used in a local loop to suck four records at a time from the master disk and into the buffer. Since the target disk is in continuous write mode, it will also receive the data and write them onto the disk. There is no point in re-transmitting the data out of the buffer, since it has already been written on the destination disk. The housekeeping routine is executed after the specified number of data has been sent around the loop. As written, MCPY41A executes INBUFX 360 times (0 to 359 on the control loop), as required to mass copy an entire 5.25" disk with the Steinmetz & Brown drive. Early versions on MCPY41A actually predate MCPY41. In those days the need was to find a way, any way, to make backup copies of disks. There was no time to be elegant. The version given here has been simplified from the original and is here maily for instructional purposes. Although it will work. The idea is to focus attention on the method of conducting controlled data transfers. It is easy to modify MCPY41A to conduct transfers of either more, or less, data. The transfer rate on a dual S&B drive is 75bytes/sec. By changing the control number at line 28 and/or the buffer size at line 29, almost any number of records can be transferred. INBUFX would not ordinarily be considered a transfer function. However, all that is required to make it into one is to first create a listener on the loop and to set it to a mode that enables it to receive and store data bytes that transit the loop. As a result, MCPY41A is very similar to MCPY41, except that you cannot use your HP41 while the program is running. Also, MCPY41A will work with digital cassette drives. Like MCPY41, it makes exact copies of the master disk, even if some of the files copied are PRIVATE. To use MCPY41A to duplicate entire 3.5" double-sided disks with HP9114 drives, change line 28 to 0.615. Similarily, to duplicate entire cassettes, change line 28 to 0.217. MCPY41A Listing: 01*LBL "MCPY41A" 16 UNT 31 "COPYING" 02 CLRLOOP 17 UNL 32 AVIEW 03 " , " 18 SF33 33 LBL 01 04 RCL M 19 LAD 34 INBUFX 05 STO d 20 2 35 ISG Y 06 E 21 DDL 36 GTO 01 07 SELECT 22 R^ 37 UNT 08 16 23 TAD 38 UNL 09 FINDAID 24 X<>Y 39 CF33 10 STO Y 25 DDT 40 ADRON 11 ISG X 26 CLX 41 CLRLOOP 12 "" (F0 NOP) 27 BSIZEX 42 SF 21 13 SELECT 28 .359 43 AUTOIO 14 LASTX 29 1024 44 END 15 FINDAID 30 BSIZEX LINE 03 is a synthetic text line: F7 00 00 00 2C A4 C8 00 in hex Modules used are Extended I/O, HP-IL and HP-IL Development. Notes (M.M.): Lines 26 & 27 can be omitted Line 29 MUST be an integer multiple of 256. Otherwise, additional instructions may be required to make sure that partial records sent around the loop are stored on the target mass storage medium. MCPY41B illustrates the use of XFERN for conducting data transfers of the type already implemented in MCPY41A. The mass storage search and set-up are again slightly different from the previous programs. With XFERN, you actually control the exact number of bytes to be transfered. This is indeed the ultimate in control, but the cost is a data transfer rate of only 55 bytes/sec. MCPY41B was mostly written by M.Markov to illustrate the use of this particular transfer function. XFERN can do anything that INBUFX can do and it is much better suited for conducting partial record transfers. Therefore, MCPY41B will do anything that MCPY41A can do, and to it better - except for speed. All the comments above that apply to MCPY41A also apply to MCPY41B. The hex code for line 3 is the same for both MCPY41A and MCPY41B. MCPY41B listing: 01*LBL "MCPY41B" 14 LASTX 27 368640 02 CLRLOOP 15 FINDAID 28 R^ 03 " , " 16 SELECT 29 "COPYING" 04 RCL M 17 UNT 30 AVIEW 05 STO d 18 UNL 31 XFERN 06 E 19 LAD 32 UNT 07 SELECT 20 2 33 UNL 08 16 21 DDL 34 ADRON 09 FINDAID 22 R^ 35 CLRLOOP 10 STO Y 23 SELECT 36 SF 21 11 ISG X 24 TAD 37 AUTOIO 12 "" (F0 NOP) 25 X<>Y 38 END 13 SELECT 26 DDT To customize MCPY41B to duplicate other mass storage media, change line 27 to 630784 for double-sided 3.5" disks, or to 131072 for cassettes. LINE BY LINE ANALYSIS OF MCOPY41 01*LBL "MCPY41" to insure consistency and avoid surprizes, preset flags to a 02 " , " known setting- all flags are clear except the following: synthetic hex codes for line 2: F7 00 00 00 2C A4 C8 00 03 RCL M 26 (Audio Enable), 28 (dec./comma), 29 (digit grouping), 04 STO d 32 (MANIO), 34 (ADROFF), 36-41 set for FIX/ENG 04 display mode 44 (continuous on) 05 E begin search for mass storage device at first device on loop 06 SELECT 07 16 find first mass storage device 08 FINDAID 09 X=0? if not found, jump to END 10 GTO 05 11 STO Y save the address of the "master" drive on the stack 12 ISG X advance to the next device 13 "" F0 NOP 14 SELECT and go find the destination drive 15 X<>L get back the 16 from LASTX 16 FINDAID get the address of the destination drive, if any 17 X=Y? if there is only one drive on the loop, the address of the 18 GTO 04 destination drive will be equal to that of the "master" If so, exit gracefully, resetting flags and other stuff. 19 UNT UNListen and UNTalk all devices on the loop, as a precaution 20 UNL to protect them, and to prevent them from slowing down the data transfer. You could also introduce a routine at this point to format the target disk. This is not recommended for battery powered drives. Also, HP9114A drives do not return the correct status info to allow you to wait until the disk has been initialized. This would be done with the following instructions: LAD 5 DDL RDN TAD LBL 02 "INITIALIZING" AVIEW INSTAT RDN FS? 05 GTO 02 UNT 21 SF33 make HP-IL not respond to the HP-41. Prevents most, but not all ways of messing-up the transfer 22 LAD make both "master" and "target" drives listeners 23 X<>Y 24 LAD 25 SDC reset both drives to known condition, with pointers set to start of mass storage media. I prefer SDC to CLRLOOP because it only clears active listeners (the drives) rather than all devices on the loop. 26 2 put both drives in the continuous write mode. It is easier to 27 DDL set both than to set only the target drive 28 X<>Y now, make the master drive a talker 29 TAD 30 X<>Y and set it to continuous read mode 31 DDT we are now ready to transfer data 32 0 set HP-IL reg. 0 so that 33 128 SC=1, CA=TA=LA=SSRQ=SLRDY=CLIFCR=MCL=0 34 WREG MCPY41 will not work unless both TA and LA are clear. Also, the loop is much less likely to be disrupted by operations the user performs while a copy is being made if CA=0. For example, running CATalogues will interrupt the transfer is CA=1, but not if CA=0. 35 3 set AIDY=1, and clear all other flags in HP-IL reg. 3 36 64 37 WREG 38 96 SDA frame - send SDA without setting CA=1 39 5 ready group 40 WFRM this triggers the transfer. This demonstrates how to send any arbitrary frame out on the loop. 41*LBL 03 display message and stop. At this point, the user can use his 42 "COPYING" HP41 provided he does not try to output data on the loop. 43 AVIEW 44 STOP 45 GTO 03 46*LBL "EE" Entry point for routine that cleans-up & restores flags once 47*LBL 04 the copy has been finished. 48 UNT UNTalk the "master" drive 49 UNL UNListen the "target" drive 50 0 reset HP-IL reg. 0 for normal operation, with SC=CA=TA=1 and 51 224 all other flags clear 52 WREG 53 CF33 enable normal control of the loop 54 E find the "master" and "target" drives. Program assumes stack 55 SELECT has been corrupted by user while copying the disks. 56 16 57 FINDAID 58 LAD 59 ISG X 60 "" F0 NOP 61 SELECT 62 LASTX 63 FINDAID 64 LAD 65 SDC clear both the "master" and the "target" drives 66 UNL and UNListen both drives. 67 SF 21 restore flags for normal HP-IL operation 68 AUTOIO 69 ADRON 70 STOP R/S sends you back to the clean-up routine. Otherwise, you 71 GTO 04 could end-up running MCPY41 twice in a row... 72*LBL 05 73 END Final comments: First, the reminders. MCPY41 does not work with digital cassette drives. See MCPY41A or MCPY41B if you need to duplicate cassettes, or use the MCOPY function provided by the XIO ROM. BE SURE TO WRITE PROTECT YOUR MASTER DISK! Practice with disks which contain non-vital information before jeopardizing your valuable disks and all the files that they contain. Put a short text file at the end of the practice disk so that it is easy to check the data transfer. Initially, you may want to have several such files at strategic locations... Within the scope of its application, MCPY41 will be impossible to beat in terms of speed of copying. The competion will be in term of features. Interested programmers should work on the details of how you can transfer the contents of a high capacity disk to lower capacity disks or to cassettes, and vice-versa. An optimum speed and performance program will probably use MCPY41A type code to read the directory sectors of interest and to edit the file position pointers to match the directory on the target drive. Once the target directory has been edited / added to, transfering the file contents could use MCP41 type code to maximize speed of transfer. Because existing mass storage devices do not seem to respond the same way to all low-level HP-IL commands, it is suggested that programmers try to use the "Filbert" (Cassette drive) protocol to the extent possible. Be especially wary of using the Auto Address Unconfigure mode to set-up the drives, since some drives such as the CMT RAMDISC drives do NOT respond to the loop while in this mode. Note: See the BCOPY and APPENDCAS programs (HP-71) for details on methodology, by M.Markov. It will be interesting to try to translate one of these programs into HP-41 RPN code. I look forward to working with anyone who has an interest in pursuing this topic further. REFERENCES: 1. MCPY41 program file on SWAP03 or SWAP11. 2. MCOPY71, CHHU Chronicle, or SWAP03 disk files MCOPY71A, MCOPY71B, MCOPY71T MCOPY71C, SWAP04. See also related files SCOPE75, MCOPY75 and MCOPY75A on SWAP03. MCOPY71A works with cassette drives. 3. SB-10161/SB10162 Owner's Manual for description of device dependent commands and explanation of status byte values. See also Owner's Manual for the HP82161A Cassette Drive. 4. HP-IL Development Module Owner's Manual gives a somewhat helpful, if inadequate, description of the HP-41 HP-IL Interfaces IL registers in Appendix C. See also pg. 21 re use of SF33 and CF33 functions. Note also that flag 25 is NOT cleared on error by HP-IL Development Module functions. 5. Kane, G., Harper, S., Ushijima, d., The HP-IL System: An Introductory Guide to the Hewlett-Packard Interface Loop. Most useful for the tabulation of the bit structure of the various frames that can be sent around the loop. For these alone, it is an essential reference. 6. For HP-41 routines able to create all types of files at any address on the disk, see HP-41 MASS STORAGE UTILITIES Part I, II & III, CHHU Chronicle V1N3P12, V2N1P28, V2N3P62 or SWAP07 disk files LIFDATA, NEWMED, WRTP, SRCHX, GDIRX, DIRLX, WA, WA2, DSCUTIL1, DSCUTIL2, DSCUTIL3, DATAFLOW, QREF1 Also, see DIRLXMH, DIRHMH, DIRH, PRECX and WRTBYT on SWAP03. Various support routines are included. (The HP-41 HP-IL interface functions are not capable of creating file entries on mass storage if the file address is at record 512 or above, since it assumes the limitations of the cassette drive. These routines allow you to create the directory entries required to do the job.) WRTBYT allows you to write arbitrary bytes (up to 23 at a time) anywhere on a disk. Mitch Hoselton P.O. Box 36047 Dallas, Texas 75235 AFTERWORD: It will be of interest to some to see an example of how to use device dependent commands to set the byte and record pointers and to select the read and write modes for a partial data transfer. The routine "ABC" below was thrown together in haste one afternoon in order to get a quick copy of the end of a 3.5" disk onto a 5.25" diskette. This routine copied that portion of the data that could not be transfered with MCPY41 since a 5.25" diskette can only hold 1438 records of data. This routine therefore copies data from the "master" disk starting at record address 1439=059F hex to a 5.25" diskette starting at record address 2. With a bit of foresight, the data would have been copied starting at record 1024 (the 3.5" disk maximum address is 2463= 99F hex) to leave the maximum amount of room for a directory.. (hindsight is nice). Anyways, the routine works great and will serve as a guide for folks who have a need for such. It is included for instructional purposes only, as an example of partial data transfers. 01*LBL "ABC" 19 UNL 37 DDL Lines 11-18 position the target disk 02 SF33 20 1 38 2 located at loop position 2 to record 03 MANIO 21 LAD 39 DDT 2 (start of directory) 04 55 22 4 40 0 05 FS? 55 23 DDL 41 128 Lines 20-27 position the "master" 06 TOGF (zenrom) 24 5 42 WREG disk to record 1439. 07 CF 21 25 OUTBIN 43 3 08 ADROFF 26 159 44 64 Lines 28-33 set the byte pointer of 09 UNT 27 OUTBIN 45 WREG the target disk to byte 0. 10 UNL 28 2 46 96 11 2 29 LAD 47 5 Lines 34-35 make the "master" the 12 LAD 30 3 48 WFRM loop talker. 13 4 31 DDL 49 "COPYING" 14 DDL 32 0 50 AVIEW Lines 36-39 set the respective 15 0 33 OUTBIN 51 STOP continuous write & read modes. 16 OUTBIN 34 1 52 XEQ "EE" 17 2 35 TAD 53 END Lines 40-48 set-up the HP-IL module 18 OUTBIN 36 0 for the transfer and trigger it. The rest is similar to MCPY41. Note that MCPY41 must be in your HP41. Good luck and have fun with all this stuff. Mitch Hoselton. USER INSTRUCTIONS: 1. All battery powered devices (HP-41, HP-9114, etc.) should be connected to their rechargers or to battery eliminators to insure continuous operation and optimum performace. Battery eliminators are recommended. 2. The HP-IL Development, Extended I/O and HPIL Interface modules must all be installed in you HP-41. The loop must be continous and the first two mass storage devices on the loop must be disk drives, not cassette drives. It helps performance to have only two disk drives on the loop. 3. Make sure that the "master" disk to be duplicated is write-protected. This will help prevent loss of data if you mix-up the drives in the following two steps. 4. Place a previously initialized disk in the second drive in the loop. It does not matter what the directory size is provided that the capacity of the destination disk is equal to or greater than that of the "master" disk. 5. Place your write-protected "master" disk in the first drive on the loop. Verify that it is indeed the first drive with n SELECT DIRX AVIEW, where N is 1 if the "master" drive is the first device on the loop. You should try this for N= 1, 2, 3, etc. until you are sure the "master" disk is in the first drive on the loop. 6. XEQ "MCPY41" 7. While the copy is being made, the user may use his HP-41 to write, edit or run programs, to do keyboard calculations, provided that the programs do not use the HP-IL loop. See details in the body of this report. DO NOT TURN OFF THE HP-41 WHILE THE "BUSY" LIGHT IS LIT ON THE DRIVES. When the lights go out, your copy should be ready. 8. As soon as possible after the "busy" light go out, XEQ "EE" to reset the drives and the HP-41 for normal operation. After the "busy" lights go out for the second time, you should remove the "master" disk from the drive. 9. Select the second Mass Storage Device and check its directory to make sure a copy has been made. You can use DIR, DIRX, DIRLX or DIRH. DIRH gives you the address of the last record used on the disk, which then allows you to use PRECX to verify that the contents of that last record match that of the "master" disk. This last step is especially important if you use battery- powered disk drives, since the battery may have gone flat before the copy was completed. (It would be a nice enhacement to write a program that would do the checking for you automatically).