To: 999 (all members)
From: K6N (Brian Raw)
Subject: Macro Assembler Manual
I have just had a horrendous Saturday
at the computer / printer trying to
get a hard copy of the disk based
manual on the Macro Assembler BBC-8.
While it appears that a print out
program is also provided on the disk
I can only assume that it is written
in the said assembler that I have yet
to sus out (not yet having a manual).
A quick VDU2 *TYPE MANUAL1 resulted in
no line feeds *DUMPing the file showed
&0A,s only as end of line markers, so
thinks I, a program to send &0D,s
instead of &0A,s is required.
After a test sample run it was obvious
that it was expecting to be printed on
foolscap paper (11") at 6 lines per
inch 66 lines per page, apparently
this is a common format, unfortunately
I'm using A4 size (12").
So thinks I, adjust the program to add
extra lines (6) to the end of each
page counting the &0D,s as they are
printed.
So printer ready and RUN, all seems
fine, UNTIL the last page
for some reason the file was split in
two yes but half way down the middle
page, that is the other half being at
the start of MANUAL2.
The cure for this is beyond the scope
of this article but I did eventually
manage to print MANUAL2 on the reverse
side of MANUAL1.
Finally I thought I would write the
sadly missing program to do the job
should anybody wish to do the same,
see PMANUAL.
I am wondering however if you would
have done something similar or did I
miss something ?
To: 999 (all members)
From: 20G (Roy Dickens)
Subject: LOTTERY PROGRAM INFO.
I was wondering what to do for the
Christmas issue until the lottery
raz-a-ma-taz started in full flow.
Then I thought, let's have one of our
own. So the LOTTERY program began to
take shape. To have a bit of fun with
this program I had to keep the odds of
winning good or we would all give it a
miss. (It's only points that we would
be winning not real millions!). You
have a good chance of winning the
jackpot on this lottery so keep at it.
So to give us a chance there are only
a few numbers to select. Two could
play, one having a bank of smarties,
match sticks or real pennies. The other
with spending power with the same
currency. If any of you would like to
cheat (you don't want to really do
you?).There is a top line secret 'dot'
on the mark your playslip screen. This
special code will give you the first
random number. See if you can work it
out. If not all will be revealed in
the next issue. Put your order in NOW!
ALL THE BEST, ROY
To: 999 (all members)
From: K2K (Peter Davy)
Subject: Palindromic Numbers
I was interested in Daniel Shimmin's
program PalinCu in Issue no.38 which
searches for palindromic numbers which
have palindromic squares and
palindromic numbers which have
palindromic cubes. I was prompted to
have another look at my Palindromic
Numbers program in Issue no.35 with a
view to modifying it to look at cubes
as well as squares. The outcome is the
program LAPPY2 to be found in the
Utilities section of this disk.
When the program is RUN, a stream of
palindromic numbers for squaring and
cubing scrolls up the screen. Each
time the square or the cube is
palindromic the square or cube is
printed on the screen and is also sent
to the printer. Multiple precision
arithmetic is used to calculate the
squares and cubes which can therefore
be very big numbers way above the
customary nine digits for the BBC. The
program can be RUN until the number
for squaring and cubing reaches
999999999.
I have RUN the program for about 24
hours during which time the number for
squaring and cubing went from 11 to
332424233. The highest palindromic
square found is 40004000900040004
whose square root is 200010002. The
highest palindromic cube found is
1331000399300039930001331 whose cube
root is 110000011.
The things which Daniel noted from his
limited data continue to apply to the
extended run. All 67 of the
palindromic squares found have an odd
number of digits. All 22 of the
palindromic cubes found have a cube
root whose square is also palindromic.
I know from having run the previous
version of the program to the bitter
end that there are no more palindromic
squares produced when numbers from
200010002 to 999999999 are squared. In
view of the finding with smaller
numbers that a palindromic cube is
always associated with a palindromic
square it is very unlikely that a
palindromic cube will exist for
numbers in the un-explored range
332424233 to 999999999. But what if by
some quirk there is a lone palindromic
cube in that area? Think of the
pleasure in finding it! Anyone who can
spare their computer for 24 hours or
so can explore the range 100000001 to
999999999 by altering line 20 of the
program to D%=9 and deleting line 60
before running.
Of the 22 palindromic cubes found, 9
have an even number of digits and 13
have an odd. An odd number of digits
in the root produces an odd number of
digits in the palindromic cube and
likewise with evens.
Do I hear someone wondering if there
are any palindromes which give a
palindromic answer when raised to the
fourth power!
To: 999 (all members)
From: K3T (NEIL TAYLOR)
Subject: MILEAGES FROM OS MAPS
Programme Title: "OSMAP"
This is a no frills program which I
have translated to run on the BBC from
a program which ran in 1k on my
Sinclair ZX81. Needless to say it
does not contain a digitized road map
of the U.K., but uses trigonometry and
the Ordnance Survey national grid six
figure references to measure the
linear distance between two points.
Through experimenting with recording
actual journey mileages and looking at
the range of percentage increases over
the linear distances I discovered that
I was beginning to fairly reliably
predict the actual length of a
journey, sometimes hitting it spot on
or within a few tenths of a mile in a
journey of 100 miles or so. Compared
with adding the mileages between two
arrows on a road atlas, which always
leaves you guessing for the minor
roads, this program I found to be
quick and more accurate.
Line 120 contains my own figures for
the minimum and maximum percentage
increases (likely range), and line 130
contains the mean average from all my
recorded journeys. I suggest using
these figures as a starting point, but
your own geographical location, and
choice of roads is bound to yield
different results. If the program is
used intelligently as a guestimation
aid, then with a bit of experience you
will be surprised by how much utility
it can actually have.
I apologise to purists for my hybrid
ZX81/BBC BASIC. This is my first bit
of programming on the BBC, and I just
altered it enough to get it working. I
would love to see someone dress it up
nicely and put it in "proper" BBC
Basic. Continuous update of range and
average, and the use of standard
deviation to refine the likely range
would seem worthwhile.
Most road atlases have the national
grid. A simple clear plastic overlay
could make the 6 figures more
accurately definable. The 10
kilometre grid squares need to be
divided into a further 10 X 10 squares
to give the second figure, and from
there it is easier to guess the third
figure as one would when using a
1:50,000 map. Read figures across
the top or bottom of the map first,
then the ones down the side.
The 100 kilometre grid letters I
suspect may only be found on the
Ordnance Survey Atlas, and their other
maps.
PRESS BREAK