Things to do With TK2

See all articles from Sinc-Link v10 n2
Author(s): Hugh H. Howie
Publication: Sinc-Link
Pub Details: Sinc-Link v10 n2 (Volume 10, Issue 2)
Date: March/April 1992
Pages: 24-27

A SHORT LECTURE WITH SOME EXPERIMENTS FOR YOU TO TRY

The first thing I want to make clear is that this little bit of a lecture is not for the guru, but rather for the many who have never really tried a lot of the TK2 tricks available. I do not know them all myself. So lets get on with the job and try a few.

W A R N I N G————————–

The following experiments may entail the changing of various components, such as Cumana and TK2 and Trump Card, but is not essential, just so that you understand what is going on. So I must re-issue the warning that every time a component change is made, the QL system should be shut down entirely, and restarted from scratch.

Don’t worry if you do not have all the add-ons I mention, just experiment with what you do have and I am sure you will find something of interest somewhere. Good Luck.

********* IN ALL EXPERIMENTS USE COPY PROGRAMS AND NOT THE ORIGINALS.

To conserve space/time I am not going to use <ENTER> after each command, I am going to presume you know to do this automatically.

We will start with some directory control functions which show where things can be found, and how to find what they are and how to change them.

BARE BONES 128 QL

With the ‘bare bones’ QL we will find on power-up that mdv1 will spin a few seconds. After all, we only have microdrives to work with.

We will install TK2 in the ROM port at the back, and we know that there are lot of extra commands now available that were not there before, so lets type in EXTRAS, and see what we get; about 120 commands on screen. One of those will be DLIST so we will type in DLIST, and we will see on screen the directory defaults, and they are indeed

MDV2_ MDV1_ SER

The meanings of those defaults are:-

MDV2_ (default directory for data files)
MDV1_ (default directory for executable programs)
SER (default destination)

INSTALL CUMANA

We decide to install DISK drives, so we need an interface, and the first one I came across was Cumana. This fits into the expansion port at the left of the QL, and we do that now, still leaving TK2 in the ROM port, and switch on again (I TOLD YOU TO SWITCH OFF FOR CHANGES!

DATAD$ PROGD$ DESTD$ If at this point we were to type PRINT DATAD$ we would be told MDV1_ If we tried PROD$ or DESTD$ we would be told mdv2 or ser. This means three commands to fine out the three defaullts, luckily there is a command which is easier to use, and tells all at once. No we do NOT have to type PRINT, just DLIST on its own.

DLIST Type DLIST and we find that we are still defaulting to:-

MDV2 MDV1 SER…….

FLP_EXT Type in the Cumana command FLP_EXT. This activates the 30 or so extra commands in Cumana, if we then type in DLIST, we now find defaults of:- FLP1_ FLP1_ SER. So it is not TK2 which has changed the defaults but Cumana, after all it IS a disk interface!

Have you noticed something there? Cumana on installation defaults to MDV, but after it has been activated by FLP_EXT the defaults are changed to FLP. Thus is answered the question someone asked me.

As a matter of interest, if we were to remove TK2 and leave Cumana by itself we would find that Cumana had about 34 extra commands, and that in conjunction with TK2 the total command available would be in the order of 124. So Cumana only adds a couple of commands to TK2. Conversely, Cumana is basically composed of TK2 commands.

REMOVE CUMANA & INSTALL TRUMP CARD

On power-up we will find that FLP1_starts to spin, because that is where Trump Card naturally defaults, but if we ask for DLIST we will find the command ignored, because with Trump Card the TK2 extra commands are not available until activated. So type in TK2_EXT, (different from the Cumana FLP_EXT) but has a similar result as it will bring in all the extra commands in Trump Card and TK2, but now there are in the region of 140 extras Commands available. Try DLIST now and we are again given:-

FLP1_ FLP1_ SER

The important thing about all this is that TK2 defaults to FLP1_ at all times unless otherwise designated. Say we want the directory of flp1, we would normally type DIR FLP1_<ENTER> but now all we require is:- DIR <ENTER> There are many other TK2 shortcuts available.

CHANGE DEFAULTS

To change defaults we could use the commands:-

DATA_USE device       (where device is new default device required)
PROG_USE device         "     "    "  "     "      "       "
DEST_USE device         "     "    "  "     "      "       "

Those NEW defaults would remain till a reset, or power was turned off.

DLIST in this case would show the new defaults.

While we are on this thing about defaults. We know that TK2 defaults to FLP1_, and that the DESTINATION default is ser, so let us assume that your printer is on, check it now, let us see just what happens if we type in WCOPY <ENTER> no more, just that. Answer “Y” to the first question (selection) and your flp1_ will run as also will your printer, and you will have a print out of the LISTING of your selection. Try it. I will have more to say on WCOPY later.

WSTAT STAT Those two commands are very similar. The first WSTAT will provide the statistics of all the files on the specified device, including date entered on that device, or copied to that device.

STAT will give you the status of the disk ONLY, in number of sectors. Please remember to specify device if not FLP1_. With STAT you have the status of the device without waiting for a lot of files to flash past, and pounding away at CTRL+F5 when the scroll wants to keep going. (The ‘W’ means wild card selection)

DIR Once TK2 has been activated, all commands are directed to FLP1_, so there is no need to type in FLP1_ when a directory is wanted, all that is neded is to DIR <ENTER> and you will get the directory of flp1_. Of course if it is any other device you are addressing then you must designate the device.

When I am writing letters and saving them to disk, I use the two initials of the person I am writing to, so that my letters to George Bernard would all look something like this GB052191 which means George Bernard May 21st 1991. All those letter titles would be jumbled up on the disk, and to sort them out is so easy with TK2: just type DIR FLP2_GB, and a couple of seconds later all files on that disk starting with GB are on screen.

To take this one step further, DIR will isolate documents ending in _DOC if that is your desire, or _DBF, or _T87. You will note I use the full extension of underscore plus letters. This is to call emphasis to the correct manner of use in this case. Say you wanted to isolate the _DOC files the command would be DIR FLP2__DOC. Please note that there are two under-scores in that command. Look close — and try this out for yourself. The reason for this is that when QDOS adds the label to the title it also adds the underscore, so it is essential to add the underscore to the command.

DIR SER Here is another dandy. If you wish to get a print-out of the directory, try this:- DIR SER This will send the directory of FLP1_ to SER. If you play with this a while you will find many strange things going on, and please don’t ask me what as I am just playing with it myself!

EXTRAS ser Will put to the printer all the EXTRA commands available, yes I know it is in one long list, but at least you can see what you really have available.

WDEL Is the same as DELETE except you are given the selection A/Y/N/Q meaning All Yes No Quit.

VIEW This is very handy if you wish to have a quick look at a file without loading it. VIEW title or VIEW device title, will put on screen most files, including machine code files.

WREN The time may come when you wish to consolidate a number of disks into one to save space, and still be able to say which file came from where, and in some cases you may wish to re-form the original file. This is a simple operation.

To rename a number of files with a prefix of ABC, the command would be:- WREN FLP2_,FLP2_ABC_ Watch that last underscore. Also watch out for that comma between the FLP2_ and FLP2, very important. The file mentioned a while back, GB052191, would now be ABC_GB052191.

If you wished to return to the original titles, the command would be :- WREN FLP2_ABC_,FLP2 (watch the comma after the second underscore) and the file ABC_GB052191 would now be back to GB052191. All other files with ABC would be changed accordingly.

WCOPY The same applies to WCOPY, you can copy from one disk to another very quickly, adding the ABC_ as above at the same time. (Don’t forget the underscore!) It is also easy to copy SELECTED FILES to be transferred to another disk. To copy all the files you could answer ‘A’ at the prompt, to copy selected files you would answer ‘Y’ or ‘N’ at the prompts. For speeding up the experiments, you could do this in RAM, and get results and see the results very quickly, saving wear and tear on disk and drives.

ALTKEY Someone mentioned to me the other day that he never could get the ALTKEY to work for him. The problem was that he was not using the ” ” quotes when trying to set up the Altkey codes. Say you wanted to put DIR FLP2_ on to Altkey D, The way to do it would be to type in:- ALTKEY “D”,”DIR FLP2_” Then every time you pressed the ALT + D you would get a directory of flp2_. To cancel this command you would type in ALTKEY and that should cancel it. ALTKEY remains till a power off or reset is performed. It is a easy to program a few of the most common used Altkeys into your BOOT program, thus making them available each time you load your program.

I started out to mention a few things and in the course of reading the manual to make sure I had everything as it should be (I think), in the process I found out a lot about TK2 that I did not know before, so while you folks out there are trying those few ideas for yourselves, I am off to other things. There is a lot more good stuff in the TK2 manual, but it is not the easiest thing to read. However, I would like to think you would take another look at it, just for fun.

Sometimes I think we rely too much on someone else telling us How to……. Goodness knows there are enough How To…. books on the market. We should be finding out more for our own selves. This way we would learn the hard way, which is also the best way to remember not to step in a puddle, (you get your feet wet) your mother told you not to do it, and the first thing you did was go out and try it. What happened? you got your feet wet! And Boy! wasn’t that wonderful feeling? Getting your feet wet I mean, not in learning your mother was right. So go ahead, try some of that TK2 stuff…Get your feet wet! Have fun.

If you still need some help with TK2, don’t ask me, I am just starting to get my own feet wet.