/### Plus D Corner 05 Status: 07.09.97
Dear PLUS D friends, today we are finally going to get down to "brass tacks". Most of you surely know that the +D has commands and some useful tricks that are not in the manual. Occasionally, something has been written about this here and there. For example, there is "Hidden Secrets of the Plus D" by Miles Kinloch (I can't help it, but whenever I research for the +D Corner, this man from Scotland crosses my path!). Another important source is, of course, FORMAT, the club magazine of INDUG, and also AlchNews.
I have decided to pick up one or two things and pass them on to you in the context of the +D Corner. Most of the contributions from the mentioned sources are very "technical," sometimes without commentary, and often in English. I claim that for many, that is reason enough not to deal with these things. That is a pity, because many tips are really useful. And not just for programmers who can improve their programs that way! Therefore, where appropriate, I will provide the whole thing with examples and additional info. Enough talk, let's go!
"AUTOLOAD" and "+SYS 2a"
As you surely know, these are two special files. One is the system file that is loaded with RUN after switching on the computer. The second is a BASIC program that is loaded after the system file has been loaded. This could be, for example, a LOADER for a word processing program that is to be loaded immediately. If AUTOLOAD is not only to be loaded but also started immediately, you have to add LINE. So for example: SAVE d1 "AUTOLOAD" LINE 1.
It is not in the manual that the file does not necessarily have to be called "AUTOLOAD". Only "AUTO" is important. The rest does not matter! The same applies to the system file. Only "+SYS" is important, the rest doesn't matter here either! Perhaps you wondered about the example CAT on page 9 when studying the manual. File number 1 is named "+SYSTEM" there. By the way, in the MGT manual (ISSUE No2, JUNE 1988), the example CAT is on page 6. Examples: "AUTOTASW", "autoMATIK" or just "AUTO" as well as "+sysTEM", "+SYS 2Afix" or just "+sys". Giving the system file different names can be very useful if you use different (e.g., patched) system files. As can be seen in my examples, lower-case letters can also be used.
LINE
You can still start programs that were not saved with LINE immediately after loading: LOAD p1: RUN (ENTER) instead of LOAD p1 (ENTER) and then RUN (ENTER). I don't see any advantage in that, but it works anyway. A few more examples: LOAD d1 "NAME":RUN, LOAD p1: GOTO 2, LOAD d* "NA*":GOTO 10.
MACHINE CODE FILES WITH AUTOSTART!
The +D offers the possibility to start CODE files automatically after loading. This way you can save a BASIC loader. To explain how it works, I will quote a part of the German translation of the report "Hidden Secrets of the Plus D":
By adding a third parameter, a CODE file can be
automatically started after loading, e.g.,
SAVE dn "filename" CODE 300,12345,320
or LOAD dn "filename" CODE 30,12345,320
First, a 12345 byte long code file is saved
from address 300, and it should start automatically
after loading from address 320. Then the file is
loaded and started in this way. This feature can
be very useful for utilities that are located in the
screen memory, as a further call is unnecessary
due to the third address.
Such an autostart can of course be prevented again.
A good address for this purpose is 82, a ROM
address that contains a RET instruction.
The following example suppresses the autostart
of a program located in the screen memory:
LOAD dn "filename" CODE 16384,6912,82
End of quote. The original English text is by Miles Kinloch, by the way. I recommend just trying it out!
MOVE
Here, too, I would like to first quote from "Hidden Secrets of the Plus D":
This command can take four possible forms,
where only two of them are mentioned in the
manual. The complete set of possibilities is:
1. MOVE dn "filename" TO dn "filename"
2. MOVE dn "filename" TO #a
3. MOVE #a TO dn "filename"
4. MOVE #a TO #b
In all cases, the first file (stream) is read
byte by byte and written into the second
file (stream). For options 2 and 4, a CLOSE #
command is required after the command is
completed. It must also be mentioned that the
MOVE command is only intended for copying
OPENTYPE files. For all other files,
SAVE E. TO must be used. The reason lies in
the structure of the PLUS D files.
End of quote. I would like to supplement this with a few practical examples. But first a bit of info: Anyone who copies a DISK under G+DOS with the help of WILD-CARDS (see below) should remember that OPENTYPE files are not copied. The error message "File NOT FOUND" only appears if no other files (BASIC, CODE, etc.) meet the typed condition. Otherwise, you might not notice at all. You just wonder why copying was so fast. By the way, there are various copy programs that copy OPENTYPE files. Anyone using BETA DOS doesn't know this problem anyway. I claim that in "normal household use" none of you will use OPENTYPE files. Or will you? However, there are at least two application programs that use OPENTYPE. That is TASWORD 128 and TASWORD PLUS TWO, each in the PLUS D version. "What's that got to do with me? I don't have these programs!" you might say. And then you get the latest PD software list from someone as an OPENTYPE file and can't do anything with it. Or can you? Yes! You can! And now it finally gets practical: With MOVE d*"filename" TO #2 I can redirect this file to the screen and read it! That's great, but with a 32-character display, it doesn't look very nice. If you have a printer, you're fine: with MOVE d* "filename" TO #3 it goes to the printer. Note: Allegedly, you can set the left margin when printing to "0" with POKE @9,0. It doesn't work for me. Why could that be?
WILD-CARDS
The meaning of the WILD-CARDS is explained in the manual, but I see time and again that some people do not know how to use them correctly. As a rule, these are those who work on one of the more modern (V?) computers. The "?" basically always replaces only one character in the file name. For example, we only have the following four files on the disk: TEST1, TEST2, REST3, and PEST4. The incorrect use of "" can become a nasty trap here! Example: `ERASE D1 "EST"or also"EST". The character that is replaced by "*" and everything that comes after it in the file name is ignored, meaning in our case ALL four files would be deleted! Entering any characters after a "*" is therefore complete nonsense! In our example, you can enterERASE D1 ""instead.ERASE D1 "?EST?"would also delete all the above-mentioned files because all four files fulfill this condition!ERASE D1 "TEST"or"TEST?"deletes the files TEST1 and TEST2. How do I now most easily delete REST3 and PEST4 without also deleting TEST1 and TEST2? That only works with two separate commands! But we can still use WILD-CARDS:ERASE D1 "R"andERASE D1 "P". By the way, anyone who often has to delete many files with different file names knows that this is very tedious. There are some disk utilities for this. Also Public Domain and Freeware. Am I boring you? In any case, I am now certain that none of you will type a command likeCAT 1 "EST".CAT 1` would have been enough, right?
Now something that is not in the manual: WILD-CARDS can also be used in the LOAD and MERGE commands! This can be very useful to save typing work. Sometimes you also don't know the exact file name anymore. If we want to load our CONFIG program, for example, then LOAD d1 "C*" is much shorter than LOAD d1 "CONFIG". The disadvantage is that if several programs on the disk start with "C", the first file in the catalog that meets the condition is always loaded. In our example, the condition would be "C". Then you just type `LOAD d1 "CO"` to narrow things down further. It just depends on what and how much is on the disk.
Furthermore, you can also use WILD-CARDS in the CAT command (it's in the manual!). CAT 1 "T*" for example. You can get the free storage space on a DISK (Number of Free K-bytes) very quickly with CAT 1 "" "" (read correctly, four "quotation marks"!). That basically means nothing other than "do not show me any file names". CAT 1 "" does not work, by the way!
The Plus D offers the possibility to load files with LOAD pn. "n" stands for the number in the directory. Directory = disk content list. So e.g., LOAD p1. What is not in the manual: VERIFY pn and MERGE pn also work! ERASE pn unfortunately does not. But perhaps that's a good thing. The danger that you would delete something you didn't want to delete is quite high.
CAPITAL D
After various commands, a CAT is automatically executed when using a capital "D". Examples: SAVE D1 "TEST", ERASE D1 "TEST", ERASE D1 "TEST" TO "TEST2" (RENAME FILE). I could be wrong, but I don't think that's the case with BETA DOS. In any case, it is usually more of a hindrance than a help. But there is also a remedy here: POKE @1358,195: POKE @1359,1148. With the well-known SAVE d1 "+SYS 2a" CODE 8192,6656 you can save the modified system file to the disk. Whether this works the same way with the various known "patches" (e.g., G+DOS FIX) or what other effects it might have, I have not checked.
VARIOUS INFO
I am pretty sure that the latest G+DOS is version 2a and I also dare to claim that no one in the German-speaking area owns or uses an older version. Load your CONFIG program once. Then BREAK and ENTER. In line 1 you should then see, among other things: "V2.3 Feb1989". By the way, version 2a has absolutely nothing to do with the ZX Spectrum +2A! Does anyone of you use a different G+DOS version? The latest RO...
The ROM version of the +D should be 1a. That is important if you want to use BETA DOS. See BETADOS manual page 1 (INTRODUCTION). The ROM version appears briefly on the SCREEN when loading G+DOS with RUN.
For anyone having difficulties with the English +D manual, help is at hand! Heinz Schober from Dresden was kind enough to translate it into German. The manual is available as a text file and should be obtainable from any good PD service! Heinz was also kind enough to translate the text file on BETA DOS BUGFIXES/ENHANCEMENTS (see +D Corner Part 3). I have the translation in handwritten form. When I have the time and inclination, I will type up the text.
Here is another tip from Peter Rennefeld: When connected to a +2A/B or +3, the Plus D hangs somewhat in the air. Because of this, pressing the snapshot button can cause system crashes. Peter told me that he routed a push-button to the outside for that reason. Personally, I am not a tinkerer and therefore simply stuck a few extra rubber feet under the +D to compensate for the height difference. A thin paper notepad pushed under the Plus D does the trick just as well, though.
So you've typed in a miles-long program and finally want to save it to disk, only to realize that you forgot to boot the +D system with RUN. What now? With RUN 19 you can boot retrospectively! But watch out! There must not be an autoload file on the DISK! Otherwise it will be loaded and the program in Spectrum RAM is gone! Line 19 must of course not exist in the typed-in program either. Logical, right?
Sometimes you want to boot a different +sys file with RUN. If G+DOS is already in the +D, that notoriously doesn't work. With POKE @7652,0 you trigger a +D RAM reset. Experience shows that such pokes are hard to keep in mind. Besides, the typing work is annoying. Anyone who does this more often should save a self-starting Basic file with a short file name to disk that contains this POKE:
10 POKE @7652,0
SAVE d1 "R" LINE 10
For me, "R" stands for RESET; you can of course pick any other short name. With LOAD d1 "r " you then have a +D RAM reset very quickly. But that only makes sense if you really want to boot a different +sys. To simply boot an AUTOLOAD file, you can also just enter LOAD d1 "auto*" (ENTER). If you get used to always saving special files like AUTO and "R" in the exact same order (same directory number) on your disks, you get the advantage of being able to load them very quickly with the LOAD px command. "x" stands for the directory number here.
Nele Abels-Ludwig writes in a letter to the editor (Spectrum Profi Club 4.97) that it is not always sensible to equip a +2A/B with an old 128K ROM. You lose access to the parallel interface and the comfortable Basic commands for controlling the RS232 interface. I would like to say that I made this statement specifically in the context of the Plus D Corner. For the Plus D, this modification tends to bring advantages. Anyone who does not need or use the serial and printer interfaces of the +2A/B is definitely well served by this conversion. Whoever has a +D will probably prefer to use its printer interface anyway. After all, it is only logical that special or rewritten +D programs will also use this interface for printing. The 128K mode (+3DOS) can indeed be utilized well with an attached +D using the well-known POKEs, but it still has disadvantages (e.g. the RAMDISK syntax). As I already wrote, there is also the option of installing two ROMs switchably. Please don't see all this as a justification on my part; I am very happy about every reaction to what I write. Can you actually not use the serial interface at all after the conversion? I have never looked into that. What do I always say? It just completely depends on what you want to do with the Spectrum!
Finally, something regarding Part 4 of the Plus D Corner. I tested it: The +D, how could it be otherwise, also runs on a 16K Spectrum (tested on an ISSUE 3)! There are many more tips concerning the +D and I actually wanted to write even more. But I'm afraid that I'll never finish then. So I'll call it a day for now. Bye!
Guido Schell, Auf dem Stocke 37, Löhne
Phone 05732 8769
— Sorry Guido for reformatting the text a bit, but I haven't written a WORDMASTER to Tasword II converter yet, and so I have to do everything manually, which sometimes takes up a lot of time, and tomorrow is the meeting in Stuttgart! L.C.D
Share your thoughts about the article