★ APPLICATIONS ★ DIVERS ★ SPECTRUM TO AMSTRAD (YOUR COMPUTER) ★ |
Transplant surgery - a great success | Spectrum to Amstrad Part II - completing the transplant |
In this, the last of a two-part article, Richard Sargent finishes explaining how to transfer Basic and data files between these two popular machines. At the Spectrum end, the Spectrum control program is shown in listing one*. Re-set the Spectrum and enter and RUN listing one. Then LOAD the Basic program you intend to transfer. Find the top of the Basic program by: PRINT ((PEEK(23628))*256) +PEEK(23627)If the value is less than 39000, a single pass transfer using listing three at the Amstrad end should work. A value of between 39000 and 50000 will probably still allow a single pass but with listing four in control at the Amstrad end. A value over 50000 indicates that the program should be split in two and transferred in two passes, with the listing four control program on the receiving end.Take this opportunity to make an ordinary LIST of the program to see if it has long lines, such as a single PRINT statement which writes messages to an entire Spectrum screen. Split them so that none is more than 255 characters long. Also scan the listing for graphics and user-defined graphics -they are also likely to be inside PRINT statements. Cosmetic patterns If they are important, they will need to be transferred in the [xxx] format explained, so that they , can be deleted or changed as appropriate in the Amstrad. If they are merely cosmetic patterns there is a quick way to erase them. Changing the “0” byte at 61532 into a “1” will instruct the transfer program to change all Spectrum characters having codes of 0-31 and 128-164 into an upside-down question mark symbol which a word processor at the Amstrad end can remove or change easily. The upside-down question mark is stored at location 61533 and you can POKE in a different symbol there if wish. The manual adjustment of the Spectrum line length to 255 characters or fewer is not essential, since the transfer program will detect long lines and insert a carriage return after 255 characters. Location 61529 holds the 254 value. It can be changed with a POKE. The significance of line width is explained later. The Spectrum has many quirks and patching into the LLIST and LPRINT ROM routines is not so straightforward. Thus the transfer control program does not really interact with LLIST and LPRINT. Rather it takes a back seat while LLIST and LPRINT go through their pre-allocated paces. The transfer control program is somewhat quirky, in that it does not re-set itself automatically, so that always before a LLIST you must type RANDOMIZE USR 61440. Also it must have a special marker placed at the end of the listing so that it knows when the listing has ended and can save the final segment to safety on the tape recorder before the Spectrum operating system clears the screen holding the final segment. This marker is the copyright symbol followed immediately by upper-case X. The last line of the program to be transferred should thus have REM © X typed into it. Copyright-X LPRINT: You can use purpose-written programs containing LPRINT to send portions of data, such as the contents of arrays, to the Amstrad. Here are three ways of sending the contents of A$ and B$: 10 RANDOMIZE USR 61440:LPRINT A$;B$“©X” |
Anyone interested m the first part of this article can obtain a copy of the January issue by sending £1.50 to the Back Issues Department, 79-80 Petty France, London SW1H 9ED. |
Your Computer
|
|