Trump Card User’s Guide

See all articles from Update July 1990
Author(s): Tim Stoddard
Publication: Update Magazine
Pub Details: Update July 1990
Date: July 1990
Pages: 39-43

INTRODUCTION

I have been using three TRUMP cards now for about a year and a half now, and I have noticed that there is no real ‘USER GUIDE’ available. The very small manual that comes with the TRUMP card outlines the syntax ( sometimes incorrectly ) but gives very few examples. These series of articles will bring to light some of the very powerful features of the TRUMP CARD and TOOLKIT II via real usable examples. The articles may be assembled into a user guide at some future time, if enough interest is shown.

I welcome all critiques and suggestions. I want this user guide as accurate as possible. Feel free to write via UPDATE MAGAZINE or my home. If you wish an answer please include S.A.S.E. envelope.

Tim Stoddard
[address omitted]

[CompuServe, GEnie and Prodigy IDs omitted.]

A note before we begin: In this series I will sometimes use more than one consecutive underscore. These are hard to see, so please bear with my LQ500 printer and watch the length of the underscore! Examples:

_      ( 1 underscore )
__     ( 2 underscores )
___    ( 3 underscores )

DIRECTORY CONTROL

ONE of the more powerful UNIX-like features of QJUMP’s TK2 supplied with the TRUMP CARD is it’s handling of file names as a directory structure. For instance, consider the file name FLP1_EDT_BIN. BIN is an acronym for BINARY. Some software companies will also use EXE ( an acronym for EXECUTABLE ), or in Digital Precision’s case: TASK. In any case, this extention is added on to indicate that this file is an executable program. To start this program without TOOLKIT II you would need to key in:

exec flp1_edt_bin <ENTER>

QJUMP’s TOOLKIT II has commands that set default directories, and all file commands have been enhanced to use these defaults. You could use the default by first setting it using the command:

prog_use flp1_ <ENTER>

Then, all that needs to be entered to start EDT is:

exec edt_bin <ENTER>

Using QJUMP’s short EXEC name of EX you only need to type in:

ex edt_bin <ENTER>

There are two other defaults that can be set: 1) where data is read from and 2) where data is written to. These two defaults are used by such commands that have a source and/or a target file spec. Examples would be:

copy source,target
dir source
load source
view source

The source file spec is set using the command:

data_use flp2_

The target file spec is set using the command:

dest_use flp2_

NOTE that these three defaults are looking for directories and not files. TK2 automatically adds an underscore to the directory named. For instance, executing:

data_use flp2_t

actually implies a path of flp2_t_, and you can verify that this is the case by executing:

dlist

which gives the current paths for all three defaults. You will see that the trailing underscore was added by TK2. As an example:

data_use flp2__doc

would seem to imply that you would ‘select’ all files ending in ‘_doc’. This is almost true! Remember, TK2 adds the trailing underscore to make the path actually ‘flp2__doc_’ and this would also select a file named ‘doctor_txt’.

NOTE: The two underscores together imply a wildcard match with anything.

For example the following files are in RAM2_:

net_doc
doctor_txt
test_txt_doc

data_use ram2_   is executed.
dir  doc         is executed, implying a path of ram2_doc_
                 The single underscore between ram2 and doc
                 implies NO wildcard match and so the
                 selection MUST BEGIN with 'doc'. The
                 following prints out:

doctor_txt

dir _doc         is executed, implying a path of ram2__doc_
                 Use dlist to check the path. The double
                 underscore will match a file spec with 'doc'
                 anywhere in it. The following prints out:

net_doc
doctor_txt
test_txt_doc

The target default file spec, dest_use works the same way as the data_use but describes the target file spec. For example executing:

dest_use flp2_      sets the target file spec to flp2_

wcopy               ( implies wcopy ram2_ to flp2_ ) will
                    copy all our above files from ram2_ to
                    flp2_. NOTE that I did not have to
                    describe a source and target. WCOPY used
                    the defaults we set with data_use and
                    dest_use: ram2_ & flp2_.

Now adding a source modification:

wcopy doc           ( implies wcopy ram2_doc_ to flp2_ ) will
                    copy only doctor_txt to flp2_ since only
                    that file begins with 'doc'.

wcopy _doc          ( implies wcopy ram2__doc_ to flp2_ )
                    will copy all three example files to
                    flp2_ since they all contain 'doc' in
                    their file names. REMEMBER the double
                    underscore signals a wildcard match!

Adding a target modification will allow coping and renaming:

wcopy doc to xxx    ( implies wcopy ram2_doc_ to flp2_xxx_ )
                    will copy ram2_doctor_doc to
                    flp2_xxxtor_txt.

wcopy _doc to _xxx  (implies wcopy ram2__doc_ to flp2__xxx_ )
                    copies all our files changing the 'doc'
                    to 'xxx'.

wcopy _doc to xxx   ( implies wcopy ram2__doc_ to flp2_xxx_ )
                    copies all three files while renaming the
                    'doc' to 'xxx' AND because the target
                    modifier has no double underscore ( no
                    wildcard ): any of the filename to the
                    left of the match will be truncated! Our
                    three files would copy over as:

ram2_net_doc --> flp2_xxx
ram2_doctor_txt --> flp2_xxxtor_txt
ram2_test_txt_doc --> flp2_xxx

Note: this last operation would cause us to lose the file originating as ram2_net_doc since ram2_test_txt_doc would also be copied over as flp2_xxx overwriting the first copy over.

You are not limited to a one-for-one text match for example:

wcopy _doc to _x

causes the three files to copy over as:

flp2_net_x
flp2_xtor_txt
flp2_test_txt_x

And…

wcopy _doc to _1234567

causes….

flp2_net_1234567
flp2_1234567tor_txt
flp2_test_txt_1234567

Interestingly, although the manual does not cover this, adding further concurrent underscores does help us! For instance:

wcopy __txt         ( implying ram2___txt to flp2_ ) NOTE the
                    THREE concurrent underscores above! This
                    would copy over only files with 'txt' in
                    the second position! These files would
                    copy to ram3_:

doctor_txt
test_txt_doc

wcopy ___doc        ( implying ram2____doc to flp2_ ) NOTE
                    FOUR concurrent underscores above! This
                    would copy over only files with 'doc' in
                    the third position! The only file to meet
                    this requirement is:

test_txt_doc

Try some of the other file commands now and experiment!

dir
dir doc
dir _doc
dir __doc
dir __txt
dir ___doc
wstat __txt
wdel __doc

A variation of the default target file spec command dest_use is spl_use. Its only difference is that it does not add the trailing underscore to the default file spec. Its intended use is to set the target default to a device such as: ser1 or n2_ser1. You are not restrained from using a file name, however. For example:

spl_use flp2        Use command dlist to verify that there is
                    no trailing underscore.

then....

wcopy               Will produce error message 'not found'
                    since a device MUST end with an
                    underscore.

spl_use flp2_test
wcopy               These two commands will now copy and
                    rename all files originating in ram2_ to
                    flp2_test!!!

AND the intended use....

spl_use ser1        Sets the destination to serial port #1.
wcopy               copys all files to that serial port.

Navigation is straight-forward and as the manual states it. Those commands are:

ddown name          Down one level to name. Use Dlist to
                    verify.
dup                 Up one level.
dnext name          Up one level, then down to 'name'.

dlist               Prints the current defaults to channel#1.
dlist #channel      The same, but to a specified channel.
dlist \name         DOES NOT WORK!!! Gives error message 'bad
                    parameter'.

The \name parameter, although it does not work with dlist, is a very handy parameter! Try this with a printer attached to ser1:

dir \ser1
wstat \ser1
jobs \ser1

and if you have the HOT KEY system…..

hot_list \ser1      Works great!!!

file names also work……

dir \flp2_list      Copies the directory to file 'list' on
                    flp2_.

dir \flp2_list,flp1_
                    Copies the directory of flp1_ ( not
                    default of ram2_ ) to file 'list' on
                    flp2_. NOTE THE COMMA separating the name
                    parameter from the requested device.

Finally, there are functions that allow your SuperBasic programs to use the set defaults.

datad$              returns the data default
progd$              returns the program default
destd$              returns the destination default

ED NOTE: Tim Stoddard’s TRUMP CARD MANUAL began in the January 1990 Update Magazine with PART 1. Other parts will continue in coming issues of Update Magazine. I consider Tim’s manual to be one of the most important series of articles ever done for the Sinclair QL. The Trump Card System has so very much power that is not articulated in the tiny manual supplied with the hardware. Even so, the tiny Trump Card Manual has much information, albeit brief. My Trump manual has been “blown up” to full page size, which is really the only way to digest the information. Tim’s articles in January Update, this one, and the continuations, will open up the gate for us to learn much more about the use of the built-in tools of the Trump System. If you dont have the January issue of Update, you may order it along with the 1990 year series of 4 issues ($18.00 to: Bill Jones, 1317 Stratford Ave., Panama City, FL 32404)