![]() Transfer Random Files from MZ-80K to
MZ-80B
written by M. Stickland
Source: SharpSoft User Notes , Issue No. 8, pp. 37 - 39 |
Yes, it seemed such a good idea to upgrade from the MZ-80K to an MZ-80B, because it is so easy to transfer programs using the conversion program. Or is it? Two problems arise: 1) The conversion program only works with SP-5925 cassette BASIC, not with SP-6015 or 6115 Disc BASICS. 2) The conversation program will not accept data tapes or transfer Random Access or Sequential Files from Disk. As the majority of my work has been using Double Precision DiskBASIC and Random Access Files, imagine my dismay when trying to transfer data to the B to discover that there was no way of doing it. Readers with a similar problem will therefore be interested to learn how the problem was resolved. The only way that came to mind was to read the data from the Random Access File, and to convert the data into program lines. Programs containing data that are to be converted to B format MUST be within inverted commas. The short Program listed here was therefore devised, and the records are read from Disk five at a time, listed on the screen, and the CR has to tapped six times per five records to write new lines into the program. This probably sounds a little weird, but if you run the program all will become clear. This takes about 12 to 15 minutes per block of 500 records, a convenient number to do at one time. Then comes the boring bit. The following procedure has to be followed: 1) Load Disk BASIC in the 'K' and type in the program. Save it on Disk. Substitute your Random Access File Name in lines 5200 and 6020. 2) Run the program and save the first 500 records as program lines. 3) SAVE/T in Disk BASIC. Use title such as NAMEPROG 1-500 to indicate which record numbers it contains. 4) VERIFY. Do not leave this stage out, as it will save time in the long run by avoiding checksum errors ( NOT possible with SP-6015 ). 5) Load SP-5025 BASIC into the K. 8) Load the NAMEPROG program from tape. 7) SAVE NAMEPROG to tape ( The same tape will do ). 8) VERIFY. 9) Remove disks from MZ-80FD and connect it to the B 10) Load MZ-80K to MZ-80B Text Converter into the B 11) Load NAMEPROG tape in the B and start the conversion program running. 12) When the tape stops, rewind it and insert a fresh tape in the B. 13) Continue the program. It will write to the tape in B format. 14) Load Disk BASIC SB-6510 or SB-6610. 15) Load NAMEPROGR tape-again. 16) Save NAMEPROG onto a spare disk temporarily. 17) Insert appropriate Random Access File disk in Drive 2 of Disk Unit. 18) Run program by typing GOTO 6000. 19) Repeat the above procedure, amending line 5050 so that MN is incremented by 500 each time the program is run. The above might seem a daunting task, but I have found that by doing a section or two only at a time, it is soon achieved. It also helps to have a coffee and a good Computer Magazine to read while all the saving and verifying is going on. If it is any consolation, I have never regretted the work involved, as the B is such an improvement on the K. The extra memory, the graphics and other facilities make it a delight to own. For the transfer of ordinary programs, things are much easier, except that PEEKs, POKEs and USR numbers have to be altered ( See also Issue 6 of User Notes ). USR(62) on the K should be replaced by USR(3774) on the B ( Bell ). I hope that some of the above will be of assistance. No doubt some Machine Code expert can provide a vastly more sophisticated method - How about it? One final point. If you have records on Random Access File including ASCII 34 ( Inverted Commas ) this will cause an error message when finally running the program. If this happens, type PRINT N and this will tell you the line number in which ( or adjacent to which ) the error has occurred. The " can then be converted to a more innocuous symbol ( how about a ! ) and a note made of the line number. It can then be reconverted in due course. 5000 REM PROGRAM TO TRANSFER MZ-80K |