David G. Wiseman

PutriDos Users' Column


			PutriDos Users' Column
		     presented as a public service
			        by the
			PutriDos Users' Group
		     (reprinted from APA-L 999)

Q.	Sometimes when I am typing in a command the system just up and
does something I didn't really want it to do, right in the middle of
while I'm typing.  It's almost like some people I know who are
constantly jumping to conclusions.  What should I do?

A.	I can't really help you on your choice of friends, except to
recommend hanging out at chess matches and other places where people
are accustomed to thinking things through before acting, but your
problem with PutriDos sounds like you have the Guess-Ahead feature on.
The system constantly scans the console input buffer until it sees
something that has a reasonably high probability of being the
beginning of a command line, then it goes ahead and does the most
likely thing.  Guess-Ahead is intended for those people who always do
the same thing in the same way and are too lazy or impatient to want
to type the entire command line.  If you tend to use options other
than the default or to specify long lists of input files it is not for
you, and you should turn it off.
	Guess-Ahead can be turned off by entering "GUESSAHED OFF"
except that if it is already on it will not expect to be turned off.
It will, naturally, assume you want to turn it on and will intercept
you halfway through the turnoff attempt with an error message stating
that it is already on.  There are some simple hex patches you can make
to fix this, but if you do not care for that sort of thing the easiest
thing for you to do may be to take your system disk to the next
PutriDos Users' Group meeting, put it in Drive B of a system of a
system already booted with it off, and then type "GUESSAHED OFF B:".
This will set your disk to boot up with Guess-Ahead off.

Q.	Some of the software I've been using doesn't work right.
Garbage gets read in from files that look OK when I list them, and
other garbage gets written out into files that have nothing to do with
the program being run.  Help!

A.	The software you're having problems with was probably
developed on some other system using so-called "random file access"
which really wasn't random at all.  The problem is that the people who
ported it to PutriDos didn't read the fine print.  If they had, they
would have known that the PutriDos random file read and write actually
are random.  To read or write sectors of their own choosing they
should have used the Read Selected Sector and Write Selected Sector
functions instead of Read Random Sector and Write Random Sector.
	There are several possible remedies.  One is to type in
"SECTRVEW ON" before running any of the problem programs, causing
any attempt to read or write random sectors to halt.  The random
sector number is displayed and the operator may then override the
random choice by entering (in hex) whatever sector is desired.  This
works, but the resulting disruption of the calling program's screen
displays can be annoying.  It also requires careful note-taking on the
part of the operator.
	If you have the source for the problem programs you can go
through and change the offending Read and Write Random Sector
function calls to Read and Write Selected Sector as appropriate.  If
you don't have source you can try to hand disassemble the code,
although this can get tricky.
	Another possible remedy is to patch the operating system so
that any call to Read or Write Random Sectors is treated as the
corresponding selected-sector call.  This usually works when the
programmer intended a selected-sector function and passed the intended
sector number without realizing the function would use it only to
seed the random number generator.  The disadvantage of this approach
is that programs that actually desire random-sector input or output
will not operate properly.  A majority of the adversely affected
programs will be games, so if you are a business user this may be OK.
	For any of the above remedies, your local PutriDos Users'
Group can help you with simple hex patches.

Q.	My system suddenly vanished (Poof! into thin air!) while
running a program.  How do I get it back.

A.	The program listing you included with your question is in
PutriDos Basic(also called SeaBasic) and uses the GOSUB statement
several times.  The problem is that the progammer who implemented the
GOSUB statement didn't know it meant "GO to SUBroutine" and instead
treated it as "GO to SUBmarine"  Your system is therefore on board a
submarine somewhere at sea.
	If it went to a U.S. Navy submarine you should have gotten it
back by now.  Our naval personnel have orders to enter a RETURN
instruction which will cause the machine to appear back home again.
If it is on a submarine of one of our NATO allies or some other
friendly power you will eventually get it back, but it will take a
while because it has to go through that navy's lost-and-found plus
customs and several layers of paperwork.  However, if it is on a
Soviet sub(or one of their allies) you are Out Of Luck, as they tend
to keep any item of western technology they get their hands on.
	A revised version of PutriDos Basic is in the works, with this
bug (among others) corrected.  Until then, try and avoid the GOSUB
statement.  If you find the GOSUB absolutely necessary, your local
PutriDos Users' Group has some simple hex patches which, while not
perfect, may help to some degree.

Ha, ha, ha. Take me back to [ the alphabetic list ] [ the date-ordered list ].