Disc 1. Part 1.
By C.J.Richardson. Last issue I asked for your opinions on
80 column text. Several of you have
pleased me greatly by agreeing with
Brian Raw's comments on the subject.
Brian prefers 40 column. See the
Editorial for my waffle.
The program "3to7" converts anything
into a 40 column viewable file. For the
purposes of the 8BS magazine menu, I
have REMmed out a PROCedure that asks
for a filename.
If you want to use the program for your
own purposes, it should be very easy to
adapt.
Here is the important bit! If you want
to view an 80 column article in 40
columns, move the highlight bar in the
menu to the item you want to read, as
usual. PRESS '4' instead of RETURN. The
article will then be displayed in 40
column format in mode 7 rather than 80
column format in mode 3.
Press 'ESCAPE' at any time to return to
the main menu. Press 'B' to jump back
in the text, Press 'F' to jump forward
in the text. Press any other key to
scroll the text.
Many thanks to Brian Raw for the
impovements made to the program.
To: 999 (all members)
From: D5B (Jon Ripley)
Subject: ELITE commander Judas
Judas is the ultimate E L I T E
commander!
Please make sure that the Judas file is
in the 'E' directory.
For DFS this would be the E.Judas but
on ADFS you would first have to '*CDir
$.E' and copy the Judas file to that
directory.
Enjoy!
To: 999 (all members)
From: D5B (Jon Ripley)
Subject: Basic>Text converter
This short utility converts a BASIC
file to a text file so that it can be
loaded directly into a word-processor.
Due to the way the program works it
will only work with BASIC II.
The program reads the program byte by
byte and calls the BASIC ROM to
detokenise keywords to their human
form. Line numbers are removed and
also GOTO/GOSUBS will have the line
numbers corrupted because of the way
in which BBC BASIC stores the line
pointer. However, this shouldn't be
seen as a disadvantage as in a way it
encourages the use of structured
programming as opposed to spaghetti
programming! (And anyway...who uses
GOTO now anyway?!)
Any suggestions for improvements and
changes or any other comments are
welcomed. Master version (or fully
compatible across the range) version
coming as soon as I can be bothered to
write it.
EDITOR........... I suggested to Jon
that maybe *SPOOL <name> and then LIST
would do the same job. Here was his
reply:
You suggested that *Spool <Name>,
LIST, *Spool. Would be an easier
alternative...
I can honestly say that it depends on
what kind of changes I am going to
make to the program. If it is just a
few, small changes then I do *Spool
but the *Spool method has a few
problems associated with it;
1) When a file is *Spooled for each
'Return' CR+LF is saved, some editors
have a rather annoying blank line
between every other because of this.
2) When you are editing in Wordwise or
a similar editor for a similar reason
to #1 the LF is translated to '|' and
you have to search/replace them, fine
if you don't use this character
anywhere in the program. However, if
you do use it the solution can be
rather messy.
3) It gets rid of line numbers,
another possibly hazardous (and time
consuming) thing to do in an editor.
And anyway if you are editing a large
(or small) program and you are adding
lines it is frustrating to type in
line numbers for all lines. (Worse
than being in BASIC itself maybe?!)
4) It is faster than the *Spool
method! (Among other reasons, there is
practically no screen scrolling.)
5) files can be READ into View without
the hassle that Spooled files give.
6) When using something like Wordwise,
you have to load a *Spooled file, tidy
it up, save it again, before you can
edit. (If you have sense!)
7) You don't have to delete the *Spool
<name>, LIST, *Spool, from the file!
If these aren't present then if you;
press Break and *Exec the edited
Bas>Txt'd file you just type REPORT,
and if the message isn't (C)198?Acorn
then you know an error was made when
reloading. (Not very useful most of
the time!)
To: 999 (all members)
From: D5B (Jon Ripley)
Subject: Dice game
Craps is a gambling game played with 2
dice. You have an initial stake of
£500, you can bet all or any part of
this.
The dice are thrown and if you score 7
or 11 you win. You will lose if you
score 2, 3 or 11.
If you throw a different number, then
you continue to throw the dice until
you either throw that number again
and win or throw 7 and lose.
The game continues until you have lost
all your money!
All comments and criticisms are
welcomed along with suggestions for
improvements or changes.
To: 999 (all members)
From: D5B (Jon Ripley)
Subject: Romance story
Visiting Time is a romance story that
I wrote last year after seeing the
ridiculous amounts of money that can
be earned from this type of writing. I
am not a fan of romance/love stories
and I have not submitted this story
anywhere. I would appreciate any
constructive (or destructive)
criticism regarding this story. And
whether or not you would like to see
more! If you do like it then I shall
submit it to a magazine and let you
all know how I got on! If not then
Goodbye and thanks for all the fish!
To: 999 (all members)
From: D5B (Jon Ripley)
Subject: M25! Mini-adventure
M25! is a small text based adventure
only one line long.
You are on the M25 and you have to get
off! (It is possible!...Eventually!)
If you have any comments I would be
pleased to hear them!
To: 999 (all members)
From: D5B (Jon Ripley)
Subject: Manuscript paper printer
This is a short but useful utility for
all musicians. Manuscript paper can be
very expensive but this utility can
print any amount desired at a fraction
of the cost of buying it preprinted.
Just run the program and specify the
number of staves you want printed!
Future updated versions to come. Any
comments/criticisms welcomed along
with suggestions for improvements and
changes.
To: 999 (all members)
From: K6N (Brian Raw)
Subject: Poly Picture + screen saver
I have this picture on the front cover
of a book called Regular Polytopes.
Noticing it was made up of filled in
triangles of 6 different colours I had
a go at putting it on the beeb. The
result was quite impressive I thought.
The program demonstrates a trick I
read about somewhere of redefining
all the colours as black before doing
anything, plot your picture then return
the colours to normal, giving the
appearance of instant pictures.
Last issue Chris suggested someone
have a go at a screen saver, by sheer
coincidence I had put some thought
into doing one myself. However, a PC
style screen saver would be impossible
on a beeb since a PC has more than one
screen area at its disposal, so all it
need do is switch screen areas and use
that for whatever, switching back to
the original screen after a key press.
As an alternative though, since the
main aim is to prevent burning holes
in your screen, blanking the screen
seemed a good idea.
Looking at the Advanced User Guide on
the 6845 video chip I just took the
first register R0 and poked a zero
there. Lo and behold the screen went
blank repoking it with its original
value restored the picture. The only
real complication being that R0 can
have one of two values depending what
mode you are in. R0 incidentally holds
the value of the horizontal sync
frequency.
My first attempt at doing the timing
used the T2 timer on the user port,
this caused too many interupts so
preventing most of the rest of the
system from working properly.
Plan B, using events proved more
successful. Since keypresses have to be
monitored I have also included a key
click. This also serves in telling you
it is operating. The timer is set at
5 minutes at present but may be
altered by making a new copy of SCRSAV
with an alternative setting. When the
screen goes blank, a click can be heard
every 5 minutes, this warns that the
computer is still on so you don't
forget about it completely.
To initialise it you could make the
following *EXEC file or simply include
the lines at the beginning of a
program.
*LOAD SCRSAVE
!&220=&C90
*FX14,5
*FX14,2
A%=2
Y%=32
CALL &C90
Please note though that the code is
relocatable so may be loaded anywhere
in which case you would use something
like
*LOAD SCRSAVE address
!&220=address
*FX14,5
*FX14,2
Also setting A%,Y% and CALLing address
is not strictly neccessary as the timer
will be initialised on the first key
being pressed.
N.B. If you don't like the screen going
blank you could try poking a different
value to R0, I found that poking 100
there causes snow on the screen in all
modes, this being equally good at
preventing screen burn while providing
a more visual warning.
EDITOR...... The source code is on this
disc and will run from the main
magazine menu.
To: 999 (all members)
From: K6N (Brian Raw)
Subject: C.Chapman's puzzle
To recap the puzzle, if there is
100 pounds and 100 people where
men=10 pounds
women= 50 pence
children= 12.5 pence
How many men,women and children?
The original program is fine but does
take 25000 iterations to get there.
This could be improved if you realise
that for every woman that is removed,
her place can only be taken by four
children. So the number of children
will be a multiple of 4. Subsequently,
you may step 4 on each loop, this
reduces the number of iterations by a
quarter, to 6500.
With a little forethought it can be
seen that
X + Y + Z = 100 people
and X*10 + Y/2 + Z/8 = 100 pounds
is a simultaneous equation.
Taking that X will be between 1 and 9
this can be used as a loop value.
My program to solve this produces
Men Women Children
6 75 1/3 18 2/3
7 49 44
8 22 2/3 69 1/3
which do indeed = 100 people
and = 100 pounds
Putting the further restriction in,
that fractions of people are not
allowed, then the program comes up with
the correct answer in 7 iterations.
PRESS SPACE