Edited by
C.J.Richardson.
Welcome to 8BS issue 28 which is again
packed to overflowing with all sorts of
text articles and software.
What must have struck you immediately
is the brilliant new menu system. This
has been totally re-written by Steven
Flintham who very kindly (and amazingly
rapidly) re-worked the menu for us. He
has left in all the features of the old
system so all you have to do is press
f0 to find out how to access them.
Please examine the structure of the
menu program and compare it with my
higgledy piggledy botch on issue 27.
Please don't credit Steven with the
choice of colour for the menu. His
program allows for a wide choice of
varied colour and my first few attempts
may be a bit gory. It doesn't help when
you are colour blind.
Sadly (I think) space precludes my
usual waffle file this issue, so you
will find my comments lurking around
the odd spare line here and there
instead.
Before continuing, two important
points:
1. How to submit Text The following guidelines have been laid
down by Daniel Shimmin. I repeat them
for you:
To make my job easier, please send all
text messages to me under the following
filenames:
999 Messages/info/adverts/questions
for all members
ARTICLE Text for the mag
ART2 Further text for the mag
COMMENT Comments on software etc.
DOCUMEN Textfile for the mag containing
info on a program submitted
DOCU2 Further textfiles of info
MESSAGE A message to me specifically
!<ID> Private message
If there is more than one message in
999 or COMMENT, join all the files
together and separate them clearly.
Private messages will be sent only to
the member with this ID. Do not send
private message unless the message is
actually private. Otherwise everyone
else may miss out.
PLEASE QUOTE YOUR USER ID IN ALL
CORRESPONDANCE!
2. is being edited by MYSELF
So send off your submissions, discs
and 50p's to:
The deadline for issue 29 is August 16.
The issue date is August 25th (ish).
You will notice that this is a very
slightly reduced period between issues.
The reason for this is the fact that as
I write this, on 21.5.93, issue 28 is
almost full, there is still a month to
the deadline! So if your submission is
not on this issue, fear not, it is
already on issue 29!
In two parts. The part you are reading
now is section 1. Select section 2 by
pressing BREAK now. Or type *thi2 from
Basic. When using the mode converter
you will be asked whether you want part
1 or part 2.
An arena for you to display your
eloquence. Come on, let's have some
controversy!
In two parts.
From other members and myself.
Comments on programs.
Gleaned from questionnaires completed
by members.
Yes, I know, most of you have sent in
questionnaires, but one or two could do
with updating and there are some
members that seem to have slipped
through the net.
YJ2 (Andrew Snodgrass) must have burnt
a few gallons of midnight oil compiling
this alphabetical list of everything
that has ever appeared in 8Bit software
up to issue 27.
YJ2 has also sent this, a bit of
information on how to use the above
catalogue plus more information about
previous 8BS issues.
483 (Daniel Shimmin), now he is taking
it easy (joke Daniel), has found a bit
of spare time to write this article.
Just the sort of thing that everyone
seems to have been asking for.
27N (John Ilsley) has been the most
vocal member (in the past) regarding
the quantity of text issue. The issue
itself caused a good bit of discussion.
Now he apparently contradicts himself
with a short series of large articles
on electronics. This first part covers
the basics. Equipment, components and a
foretaste of future articles. I have
recently ventured in to the highly
dubious (sometimes hairy) art of poking
bits of wire into my computer and
waiting for the fizzle, coaxed by John.
Now it's your turn.
John has sent two AMX pictures to go
with this article. I have written a
program which will read these in for
you. It is a bit slow but does the job.
Select AMXprt from the utilities menu.
By Mick Needham.
By: 3PM (DP-J)
Use: Random numbers
Program name: Ftbl
Associated program/file/s: None
Language: Basic
General info: Text by 3PM
Ftblpls Issue 26 program by Roy Dickens
for anyone interested in the algorithm
he used. It concerns the bit of Roy's
program that generates random numbers
and prevents duplicated numbers
appearing in the output. As a new
number is generated a nested loop is
employed to look at all the previous
numbers to see if a duplicate has
occurred. Working through the loops on
paper shows that its not quite as
simple as it looks, so the demo
confirms that bit for you. But you
still need to be interested enough to
analyse it, otherwise don't bother.
In related problems of selecting,
shuffling, sorting, combining etc it is
often necessary to ensure that memory
and speed are not inefficiently used.
In Roy's case of selecting about 11
from 58 items it's not important so
I've simply used his algorithm out of
interest in the general approach to
these kind of problems.
Instructions: CH. "Ftbl" and use fkey9 repeatedly.
fkey8 to LIST. The REMs show whats
what. The original line nos are
retained with extra test lines
indented.
Duplications produce (see white dr nos.
) TWO decrements of dr from within the
en loop except when the duplicated nos
happen to be contiguous, when only ONE
decrement is made. Do a few runs if
necessary to see this. You will also
see that in the former case, by
carefully comparing the magenta and
cyan lists, perfectly valid random nos.
get rejected as well as the duplicated
ones. If you now add en=dr as above to
line 2030 and run it again only single
dr decrements are made. This saves both
on loop cycles and, since less random
nos. are generated (no spurious rejects
), there is less probability of
duplication anyway. This is apparent
from repeated running and noting the
trend of loop counts in the two cases.
The difference is more obvious with
more Selections (try 21).
Why use a different, albeit neat, two
array method to do the same job at
lines 1430 to 1530 and why not just RND
(58) at line 1500?
By: 483
Use: Questionnaire
Program name: Quesair
Associated program/file/s: QUEST (data)
Language: Basic
General info:
I include the questionnaire on this
issue. If it is a while since you
filled one in or if you have not filled
one in. Would you please do so. The
information that you give is VERY
helpful and determines the direction
that 8BS will take.
Instructions: Read the info obtainable from the mag
menu. Then copy the program "Quesair"
onto a blank disc, run it. Previously
Daniel has included your old data file
on the disc. I have NOT done this. It
does not matter, the program will
create a blank data file called QUEST
ready for you to fill in. Send this
data file to me and I will use my new
software to produce a white rabbit from
it.
Sent in by: 27N
Use: Various
Program name: 27N4
Associated program/file: None
Language: Basic
General info: 27N sent me a large collection of
programs. Here are four very short ones
that I put together. Examine the
program itself. The totally separate
routines run from 10, 2000, 3000, and
4000 respectively.
By: 2J3
Use: Reads an AMX screen
Program name: AMXprt
Associated program/file/s: DRAW1 DRAW2
Language: Basic
General info: This program reads in the two AMX
screens that John Ilsley sent in to
accompany his teach yourself
electronics article.
By: L1J
Use: Mode conversion
Program name: MoConv (4 files in one)
Associated program/file/s: Henry1
Language: Basic : L1Jinfo
General info:
I have put four files into one so that
they would fit on this issue. They run
from a separate menu. Please read L1J's
info file.
By: L1J
Use: Disassemble machine code
Program names: UDA19 UDA70
Associated program/file/s: L1Jinfo
Language: Machine code
General info:
Please read L1J's info file
By: 27N
Use: Menu system ADFS and DFS
Program name: NewScan
Associated program/file/s: None
Language: Basic
Instructions: Read the REM lines at the start of the
program. This program scans the screen
to retrieve filenames. The program then
waits for you to enter a two digit
number which is the code for the
program to be loaded. Or enter one of
these keys:
A - Access one or all files. Reversing
the current 'lock' status.
D - Delete a selected file. You have
TWO chances to abort.
$ - Select DIR $ in ADFS and in DFS.
P - Printer dump of the screen.
(You may call your own dump here).
* - OSCLI command
Q - Quit from program.
S - Change sides or drive of the disc.
DELETE - If you enter the wrong first
number, You can delete it and start
again.
By: 3PM (DPJ)
Use: Utility
Program name: Altrit
Associated program/file/s: None
Language: Basic
Info: By DPJ
Altrit was written for a specific job
but is offered here as a utility
algorithm which can be adapted to other
use. It allows changes to be made to
the value of a selected parameter(s)
during run-time via the usual keyboard
input prompt.
Altrit is applicable when the program
output is related to sequential events
and has parameters subject to
unpredictable change. For example, the
interest charges payable on a loan will
reduce (predictably) month by month as
the debt is paid off, but also depend
(perhaps unpredictably) upon the
interest rate charged. So we set up a
program which makes the calculations
monthly with a pre-determined fixed
interest rate. If this rate changes
unpredictably we need to make a direct
input of the new rate at the
appropriate time. Simple enough? An
input prompt and some program
reorganising to use the original rate
prior to that month and the new rate
subsequently. Or is it? What about
several (how many?) changes and maybe
some of them back dated?
Also we don't want to keep repeating
the keyboard inputs each time a re-run
is required (for what-if? purposes)
particularly if there are several
changes.
Altrit is a simple algorithm to deal
with the above type of requirement. It
stores the inputs in an array and
re-cycles (not re-RUNs which would lose
the data) the program in such a manner
as to update the value of the selected
variable over a contiguous range of
applicability and not elsewhere. This
can best be seen by CHAIN "Altrit", and
following the example:-
Note that a back-dated change at month
4 automatically changes the appropriate
subsequent months but has no effect on
month 18 et seq which coincidentally
had the same pre-change value(10%).
Also note that all calculated values
are correctly updated in the simple
running total used for illustration.
This kind of job can of course be done
on a spreadsheet but would require a
considerable amount of messing about
to re-specify the 'box' contents every
time a change is made. Ughh. So it may
suggest some practical applications.
Altrit can, with re-definition of the
array data storage sequence, cater for
more than one parameter change. To use
a particular application for periodic
reference or updates, the array data
will need to be saved to disk and
provision made for re-loading it. I am
currently attempting a perhaps novel
way of doing it for this type of job.
By: 3PM (DPJ)
Use: Illustration
Program names: OSCLI
Associated program/file/s: None
Language: Basic
Info: By DPJ
Here's a problem for you:Question:
How does one dump the keyboard buffer
DURING a Basic progam run?
I don't mean display it as for
P.?buffer or flush it as in Osbytes &0F
/&15, but such that it behaves as
normal keyboard input. Was never told
about Basicus Interruptus and have not
found an appropriate OS command. Yet it
seems such an obvious requirement. Why
am I not seeing it, I ask myself?
Better start delving into IRQ vectors I
suppose.
I have written a little 'commedia dell'
arte' to illustrate the problem it can
cause. CH."OSCLI" and then study the
listing. fkey8 to List, fkey9 to Run.
Pity I do not have a suitable Overture
to accompany it, but then it may
obscure the point even more. And OSCLI
is a bit of a brew on its own! Its
really just a question of order. On the
Master 128 it ends with 'syntax error',
which I thought rather appropriate. A
bit of Beeb AI? I wonder how long it
takes an 8BS fan to spot the reason for
this?. Could offer a prize (free ticket
to the show?) but I suppose they'd only
cheat.
Did you know that while OSCLI and
*FX138,0,etc will each cope with 255
chars. that OSCLI"FX138,0,etc" will
only take 31 including the carriage
return? Never seen it documented and
it threw me. So I need an answer to my
original question and/or a way of
getting round the 31 limit implicit in
DEF PROCim thereby allowing 'im to be a
bit more articulate. Seriously, I need
it for another idea currently on the
stocks. Which raises the point that it
will be Issue 29 before the possibility
of a response from the membership.
Edited by
C.J.Richardson.
By: L1L
Use: Competition entry
Program names: 1.EPSON 1.BORDER
Associated programs: 1.Picture
Program: EPSON SCREEN DUMP
Info By L1L
Program: 1.Epson
This is a simple screen dump program
for Epson compatible printers. It is
similar to a program I remember reading
once but I can not recall where from.
It is quite slow. In an attempt to
speed things up I tried some FOR...
UNTIL loops.
I was unsuccessful in speeding up the
program, perhaps someone else might
like to have a go at it. Although it
can be put into one line of code I have
broken it down into separate lines, so
you can see how it works. Also supplied
is a screen with which to test the
dump, under the filename '1.PICTURE'.
Program: 1.BORDER
This program is written on one line. It
draws a border around a text string in
either Mode 0 or Mode 1. It first asks
for the mode, then the text string,
and then the x & y coordinates.
A simple program, but it might come in
useful for someone.
By: YJ2 (Andrew Snodgrass)
Use: Text display
Program name: Shadowr
Associated program/file/s: None
Language: Basic
Info By YJ2
This is a program which (in any
graphics mode 0,1,2,4,5, can produce
shadowed text. Most of the functions
which the program provides are
documented in the program through the
display which it creates.
The variable "offset" at the beginning
of the program is a constant which I
have used to place the shadowed text
(offset) characters from the text
above.
The last two parameters of the
PROCedures could be altered so that
(for instance) the shadowed text is 3
characters away in the X direction and
8 (being extreme) character away in the
Y direction.
By: YJ2 (Andrew Snodgrass)
Use: Enter a combination number
Program name: AccCode
Associated program/file/s: None
Language: Basic
Info By YJ2
A while back (actually after I had
written this program) somebody asked
for a security program - here is my
version. In this program (note again
pattern fill used - may only work on
Master or with GXR ROM) the screen is
covered in a patterned background. In
the centre of the screen is a countdown
showing you how much time you have
remaining to find the password (1 min
at start - also note shadowed box
procedure). Below are the combination
numbers - these can be altered (arrow
indicate present number) using the
cursor keys to move the arrow left and
right. The up and down cursor keys
cause the number above to either rise
(up arrow) or fall (down arrow).
To confirm the code you have "dialled"
press <RETURN>. The program checks the
value on the counter when either you
press <RETURN> or the timer reaches 00
(zero). If the code is correct ACCESS
GRANTED is printed on the screen - if
not ACCESS DENIED is printed.
It has to be noted that this is only a
skeleton program and as such could
quite easily be read by anyone who
knows how to LOAD"" a program. It is
suggested therefore that if you want to
use the program seriosuly that you
1) change the access code (presently
12345 and contained in a DATA
statement).
2) protect it (possibly scrambling it
using a MC program, preferably
with another password - see past
"Micro User"s) in any way you can.
A "hard break" could be issued by the
program after a user has been denied
access / or when the program is listed.
N.B. to be truly protected the file
would have to be encrypted (as
suggested above) and the disc the
program is on made unreadable by *CAT
(*.) and sector editors alike.
The sad fact is that however
protected a program is, somebody else
will always be able to hack it.
Editor... The more heavily protected it
is the greater the pleasure on
circumventing it.
By: 20G (Roy Dickens)
Use: Useful tax data
Program name: Tax-Ins
Associated program/file/s: None
Language: Basic
Info By 20G
This month I have enclosed a program
that was put in the mag last year, the
Income Tax and Nat. Insurance data. It
was data for 92/93. I have now updated
it for 93/94.
By: YJ2
Use: Picture
Program name: Conpic
Associated program/file/s: none
Language: Data
By: 204 (Carl Wheat)
Use: Card Game
Program name: Clear35
Associated program/file/s: Part2
Language: Basic
Instructions are included in the game.
Sent in by: 19F
Use: Music
Program name: Bach1
Associated program/file/s: None
Language: Basic
By: 2J3
Use: Competition entry
Program name: CJR
Associated program/file/s: None
Language: Basic
General info:
These programs were written by "poking"
each byte into place as the Basic
editor will not allow entry of lines
this length (there are 238 bytes in the
line but 311 ASCII characters!). If
anyone expresses an interest, I will
release the program that wrote this
program.
Instructions: Catch the falling objects using the bat
at the bottom of the screen. Move with
"<" and ">"
If you examine the listing you will
notice that there is another line which
I include as a second "pointless"
entry. Can anyone make a one liner take
up more room on the screen than this?