Text content (OCR)
+
a
om
Ae
4O
ba fl ace
mp
=|
=
-
~ 7
4
=»
al
A
Oo
me |
A
October 1994
o
oD
mio
DOH
B03
3D
o>
eee
a m
a eRe
EN
EST ee
SEA
eK)
£1
PR
Kee
r
—
‘i
VOLUME 4 No. 5
Page 2 HARDCORE - The Journal of the British Apple Systems User Group October
a1) HEMEL HEMPSTEAD Ad! AYLESBURY Aa05 SLOUGH
2
—~| |
== =. on
v 0 3! At oO
a 3 ‘
= A405
——“urems HOW T
& ST ALBANS.
— taat2)
FIND
wy NORTH
Z
=z
—— L
oe
Ser ux
LEE
wor
+ COLONIAL WAY
| (First gate on nght
[tux
| Seavices Limited}
Radiett Road)
~_,—+*Computer
Services [td
COLONIAL WAY, WATFORD, HERTS WD? 4AT
TEL. WATFORD (0923 7
Call in now for a
Macintosh demonstration
A special purpose language for multiple
choice tests and quizzes, questionnaires and
Computer aided learning (CAL) - €50 + VAT
time user who
‘absolutely necessary bout computers and computer
ges
iginally developed for medical history taking
has been evaluated in hosprials, schools end
t saves time and provides comprehensive,
structured records
riginal MICKIE was developed at the National
‘al Laboratory by the late Or Christopher Evans
nown as the author of The Mighty Micro’ end
The Making of the Micro’)
Full Apple implementation from
SYSTEMICS LIMITED
21-23, The Bridge, Harrow, Middiesex HA3 BAG.
Tel: 01-863 0079
FY icra easement he Noon Poca! beaten IE
[ BASF DISKS _|
- individually numbered
- 5.25" single sided, !
single density
- suitable Apple J[,//e & ///
- box contains 10 disks
1 BOX £ 15.50 NO
10 BOXES £140.00 EXTRAS
[ie PAY VAT, POSTAGE & PACKING
Send order & remittance to: |
SYSTEMICS LIMITED,
21-23 THE BRIDGE |
HARROW
MIDDLESEX HA3 5AG |
01 863 0079
Access & Barclaycard accepted |
October 1984
BASUG Ltd. is a non-profit-making
company limited by guarantee,
Basug Committee
Bob Raikes Chairman
Norah Arnold Secretary
Roger Gear-Evans Treasurer
Graham Attwood Software Library
Richard Beck Courses
Richard Boyd
KeithChamberlain
Tony Game
Meetings, Local Groups
Membership
Bulletin Board
Roger Harris Literature Library
Jim Panks Software Library
Quentin Reidford
John Rogers Special Release Software
Peter Trinder Updates
EwenWannop Prestel
Fran Teo Administrator
Yvette Raikes Hardcore Editor
Daphne Jenkins
Peter Blair &
Jim Panks Assistants
BASUG Telephone No.: Newbury {ifi))) dietiith,
Please note: This number is administration
ONLY,
Bulletin Boards ((liiitity) Stati,
Founder members of
Computer Clubs.
the Association of
OPYRIGHT (C) - The contents of this journal
re copyright of the British Apple Systems
Jser Group and /or the respective authors. |
lowever permission will normally be granted
for non-commercial reproduction by user
roups affiliated to the International Apple!
ore, provided the author and source are
roperly credited.
he opinions and views expressed are those
f the various contributors, and are not
ecessarily supported by the British Apple
stems User Group.
HARDCORE = The Journal of the British Apple Systems User Group Page 3
THE JOURNAL OF
THE BRITISH APPLE SYSTEMS USER GROUP Fe is
Chairman's Corner
P.0.BOX 174 WATFORD WD2 6NF 5 FORTH ftugh Dobbs
9 User Hostility Bob Raikes
Seth Proctor
Peter Knight
Dick Menhinick
Jim Panks
10 Assembler Review
13 Mac Notes
14 Applewritter //e
15 Epson Dx100
16 BASUG Telephone Numbers
18 Quiz Writing Hugh Dobbs
20 String Print R. C. Lowe
Software Library
22 Beginners’ Page
23 Courses
25 Local Groups
26 Book Reviews
30 Keyboard Lowercase Mod.
32 Children's Software
G. G. Wood & Elizabeth Raikes
33 Administation
34 BASIC Note
John Sharp
Dick Menhinick
Adam Broun
Education Norah Arnold
37 Lister Roger Harris
38 DS: Bob Raikes
42 Sorting R. C. Lowe
Readers’ Letters
45 Reinventing the Whee!
47 Diary
Yvette Raikes
MEMBER OF THE
INTERNATIONAL APPLE CORE
HARDCORE is produced using Applewriter
J, and printed on an APTEC Flowriter with
a Madeleine Daisy-wheel
Front Cover: An optical illusion produced on
the Macintosh by Norah Arnold,
Page &
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
Editorial
Thank you to those who responded to the
request for help with utilities. We have
Roger Harris's programming aid "Lister" in
this issue. If any more of you want to tell
us about your favourite utility - either one
you have written yourself or a commercial
one - please write in. You don't need to
write a lot, just what it does and why you
like it.
I also have some books tor review, two on
Visicalc and one each on the Apple /// and
CP/M. Any takers?
Unfortunately, the Expert Systems article
has had to be held over again but it will
appear in the next issue along with a revicw
of a commercial Expert System.
Do remember that the copy date for the
Christmas edition is earlier than usual. Please
get your items in by October 26th. We expect
To put out a bumper edition then but this
does not mean that there will be space
waiting for late entries. Please will all
those who currently have books or other
items for review ensure that these are
reviewed for the next issue or that, where
this is not possible, you have let me know.
Most of the people who donate their products
for review want to see them reviewed for
Christmas. Try not to let them down.
WANTED
Have any of you longed for a chance to be
the first to read what goes in Hardcore?
Well, here is your chance, We are looking
for a new editor of Hardcore to take over
from the end of the year. The job is not
difficult but does take up quite a lot of
time particularly in the fortnight following
copy dates. Anyone willing to take on the
job will be given the opportunity to see the
Christmas edition produced and will be given
lots of help and support during the
production of their first issue if they need
it. Anyone who wishes to apply or to ask for
further details should telephone Bob Raikes
on 0525 370621.
Lonely Apple
The following member would like to get in
touch with people who use Apple I+ or
U-computers in Norway:
ides ihans yarns
1
HID RRR
Chairman's Corner
Our new committee members are now finding
their feet, and progress is being made.
Volunteers in the Software group are
currently working on moving the Software
Library from DOS 3.2 to 3.3. The machine
Code course in October will happen, and a
Logo course is promised, Mid-Apple are
hosting a meeting with help from Richard
Boyd on Communications, and there are > new
releases in the Special Release Software
series in the course of preparation.
There have been 2 moves of note. Fran Teo
has moved recently, apologies if there has
been any delay in mecting orders etc. Those
who know Fran will realise how unsettled her
circumstances have been. We wish her the
best of luck in her new home,
The Bulletin board has also moved. Its
founding father Quentin Reidford has taken
the plunge in trying to go commercial. There
is a board still on his number, but it is no
longer the BASUG one. Tony Game has taken
over the board, and Peter Trinder has
stepped into his shoes as Press Officer. If
you have any news that may be of interest,
or an unusual application tor your Apple,
please let him know.
As you will see, Yvette is relinquishing her
position as editor of Hardcore after the
fext issue. We are urgently looking for
someone to step into the breech, Anyone
interested should contact myself, Norah
Arnold or Jim Panks, There is a great deal
of work involved, but the job is rewarding
in the personal and financial sense. Apply
NOW.
At BASUG we aim to be both amateur and
commercial. If our standards occasionally
fall below those that both you expect and
that we expect of ourselves, please let us
know. Remember BASUG is run on YOUR behalf.
If on occasion we seem not to be acting with
this in mind, please let myself or someone
else on the committee know,
WARNING.
There have been problems with the 64k
Printer Buffer Card from Peanut. It wouldn't
work with Visicalc or Logo. Peanut have
offered to fix it. Anyone else had any
problems?
Apple users need Hardcore to do it.
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 5
FORTH
A Quick Introduction to Forth on the APPLE
by Hugh Dobbs
Newtown School, Waterford, EIRE.
The computer package supplied to schools by
the Department of Education included a
variety of languages: four versions of
BASIC, Comal, Pascal, 8080 Assembler, 6502
Assembler, PILOT. This paper is a brief
argument in favour of one language which was
not included: Forth,
1 have used BASIC extensively, especially
APPLESOFT; it is an easy language to write
in, and mistakes take little time to correct
if you can find them, but most versions lack
any structure more advanced than a
subroutine, and most are interpreted and
therefore slow.
1 have used Pascal; in it, program
development is much slower since it is
compiled and there is a lot of time spent
switching between compiler and filer,
reloading source code and editing it, and so
on; Pascal programs can be highly structured
and, being semi-compiled, run fairly fast. The
UCSD version of Pascal also has the
advantage of being portable over many
different computer systems, The language is
however fussy in the punctuation it requires
and in the need for the declaration of data
types and so on.
I have also used 6502 Assembler language
extensively. It is very hard to get things
right in it; it is unstructured and has none
of the features of higher-level languages;
but it is very fast indeed when running.
Somewhere in the middle, there is a need for
a compromise, especially in applications
where computers control machinery: you need
the system to be able to make decisions
quickly, but also you need to know what each
part of your program does and to be able to
change sections of it easily without
affecting others. One suitable language is
Forth, which is fast but structured,
combines the ease of a high-level language
with the speed of machine code (very
nearly), is both an interpreter and a
compiler, and is available on a wide range
of systems. Since versions of it are in the
public domain most Forth systems are fairly
cheap (often under £50), and there is a
fair degree of standardisation with only two
major dialects and a few eccentric versions
which conform to neither.
The version I use on the APPLE is from the
Forth interest group in USA, written by
Kuntze but typed in and assembled by me, and
it still has bugs in it but is on disk no. 84
in the sottware library if anyone wants to
try it out. I am also using GraFORTH for its
turtle-graphics, and evaluating Metacrafts
FORTH which is a _—_ powerful and
well-thought-out version with overlays. 1
also have Forth running on a BBC machine (r
q Forth, Acornsoft and the JWB-FORTH ROM),
‘on Atoms (Acornsoft), on a ZX-81 (Artic), on
a Spectrum (HL-FORTH) and naturally on an
Ace, and 1 am collecting information on
other implementations.
The APPLE version starts up when its disk is
booted, clearing the screen and announcing
“THE 4TH APPLE". What follows is a
condensation of what happens in about three
periods' worth of Computer Studies (whether
at first year, second year or fifth year
level).
Forth, like any other language, has a
certain vocabulary, Unlike most other
computer languages, but like natural
languages, it grows by the addition of new
words to its vocabulary. The new words are
defined in terms of the existing words and
thereafter can be used in exactly the same
way as the older words - in fact a large
part of the Forth nucleus is made up of
words which have been defined in Forth
rather than in machine code.
Most words are defined using the Forth word
[:) (colon). A word in Forth can be made up
of any sequence of characters which does not
include a space, an ASCII NULL, or an ASCII
CR character, and here the word is just a
colon. By general agreement, when a Forth
word is likely to cause confusion in a typed
article (je. in an English sentence), it
may be enclosed in (squarebrackets). Here is
an example of a ‘colon definition’; lots
more will follow:
3 BELL 7 EMIT ;
Here the colon says 'I am going to teach you
4 new word using words you know already’. The
new word is to be called [BELL], and the
colon puts a header into the vocabulary with
the word's name BELL, a link pointing to the
most recently defined word before that, and
an address which directs the interpreter to
handle BELL as a word which has been defined
Page 6
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
using [:] It then turns on the compiler,
which processes the rest of the line, The
(7] is not found in the vocabulary, so it is
construed as a number and stored as such.
{EMIT] is a word in the Forth nucleus and is
therefore compiled. The [;] says ‘that is
the end ot the definition’, and its main
effects are to close the new definition, to
mark the new word so that it can be found in
a vocabulary search, and to turn off the
compiler, The interpreter has then reached
the end of your instruction, so it prints
'OK' and waits for you to do something else.
If you now type BELL and press ‘return’, the
interpreter searches its vocabulary
(starting with the most recently-defined
word), finds [BELL], and executes it. This
produces a number 7 which EMIT converts to
ASCII code 7 and sends to the current output
device; unless you are using a printer, this
produces a ‘bell’ noise on the speaker.
Mf you type BELL BELL BELL and press
‘return', the bell rings three times before
the interpreter responds with 'GK'. So far
the transactions look like this:
THE 4TH APPLE!
BELL 7 EMIT ; OK
BELL OK
BELL BELL BELL OK
because the interpreter absorbs your
‘return’ without actually starting a new
line.
Now that BELL has been defined it is in the
Forth vocabulary and can be used in the
definition of further words; for example,
supposing you want to produce seven bells
you could always type BELL seven times, but
you can also do
+ BELLS 0 DO BELL LOOP ;
after which
7 BELLS
will produce the desired result and give the
added benefit of being able to have 100
BELLS or even 32767 BELLS if you wish, What
happens here is that the DO...LOOP inside
BELLS counts up from 0 to whatever number
comes before it (7 or 100 or 32767), and
whatever lies between DO and LOOP gets done
so long as the counter has not reached the
limit.
Computers are often used for simulations, Not
having any special input/output hardware, I
go in for simulated simulations. For
instance, suppose I want to simulate an
alarm clock or a burglar alarm, When the
alarm goes off, a bell should ring until
someone does something about it. Something
which can be simulated by pressing a key on
the keyboard, for instance. So 1 type
+ ALARM BEGIN BELL.
- if 1 press ‘return' at that point the
interpreter does not respond with its usual
'OK' because 1 have not finished my
definition yet (no [5] yet). After ringing
the bell, it should test to see whether
anyone has pressed a key
TERMINAL
(or in some versions of Forth ?ESC, etc) -
this checks and leaves a true-or-false flag.
| want the BELL ?TERMINAL sequence to
continue until the result is true, so
UNTIL ;
completes the definition, Now typing ALARM
will set it off. The burglar alarm type
would have to be a bit more resistant to
being turned off, so I might use
: BURGLAR BEGIN BELL AGAIN 5
in which case BURGLAR will start an infinite
loop which can only be stopped by a machine
reset or by turning off the power (don't try
that until the end of the session!).
To some extent this illustrates the
structured nature of Forth; it is worth
mentioning that any branching construct such
as DO..LOOP or BEGIN...AGAIN or
BEGIN...UNTIL or IF...ELSE..THEN can only
be used within a colon definition (or
equivalent), which means that it is
impossible for branches to occur outside the
current structure (compare the typical BASIC
nastiness of GOTO from inside a subroutine
or from inside a FOR...NEXT loop). Also the
compiler checks the syntax to ensure that
the branching structures themselves are
properly constructed,
Now I want to illustrate something of the
speed involved. BASIC is relatively slow,
and probably most people have tried the
traditional APPLE squawk program
10 X = PEEK (-16336) : GOTO 10
and know how low a note that produces; even
the variant
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 7
10 S = -16336
20 X = PEEK (S) : GOTO 20
gives a note which is not high enough to be
satisfyingly musical, so most game programs
in BASIC include a machine-code routine for
producing notes. Forth is fast enough to do
it alone (if you don't mind whether the
notes correspond to actual — musical
frequencies or not). A simple square wave
output from the APPLE's speaker can be
generated by producing a series of clicks at
regular intervals, i.e. click pause click
pause ... So I define
+ CLICK -16336 C@ DROP ;
That defines [CLICK] to produce a number
-16336, go and get the contents of that
memory address (thus clicking the speaker)
and DROP that value so as to end up with
nothing (except a click).
t PAUSE 0 DO LOOP ;
That is like [BELLS] above, in that it
counts up from U to whatever number you teed
it (less 1); but inside the loop it does
nothing. So
10000 PAUSE
says 'go into a corner and count up from 0
to 9999; it takes much less time than
BASIC's FOR A = 0 TO 9999 : NEXT A.
: NOTE 100 0 DO DUP PAUSE CLICK LOOP
DROP;
That defines [NOTE] as a word which does
something 100 times; what it does is take a
DUPlicate copy of whatever number it was
fed, do that length of a PAUSE, then a
CLICK, and loop back again so that it
produces 50 complete wave cycles at some
unknown frequency.
1 NOTE
produces
type, and
1 NOTE 2 NOTE 3 NOTE
the highest possible note of this
will give a descending pattern, We can build
up a ‘scale’ by feeding a decreasing
sequence of numbers to NOTE:
: SCALE 0 20 DO I NOTE -1 +LOOP ;
Here [I] is a word which gives the value of
the loop counter (to feed to NOTE), and
since we want to count backwards I have to
use [-I +LOOP] which says ‘count down | at
a time’, rather than simply LOOP. Now try
SCALE ... then
+ DOWNSCALE 21 | DO INOTE LOOP ;
SCALE DOWNSCALE SCALE
and so on. It is not very musical, but great
fun to experiment with, Further words can be
built up using these, such as
: PRACTICE BEGIN SCALE DOWNSCALE
? TERMINAL UNTIL 5
- the effect of that
predictable. Or
should by now be
: WHISTLE BEGIN CLICK AGAIN ;
(but only at the end of the session - why?). Or
+ SQUEAK 0 1000 DO I PAUSE CLICK -I
+LOOP 5
etc. probably ad nauseam,
You can work in whatever number-base you
like. There have been numerous BASIC
programs published in the various computer
magazines (probably at least $0014 of them)
to convert numbers from hexadecimal to
decimal or vice versa, but in Forth it is
very easy:
DECIMAL 120 HEX .
will give you '78 OK', where $78 is the
equivalent of the decimal number 120:
{DECIMAL] sets the number-base to ten, and
in nearly all Forth versions [HEX] sets it
to sixteen. If you have a lot of conversions
to do, you can define a word
: TOHEX BASE @ HEX SWAP 0D. BASE ! 5
120 TOHEX
This will give you '78 OK! if you started
off in base ten, but if you tried it
immediately after the previous example it
gave you '120 OK! because you were already
in base sixteen. What happens is this: [BASE
@] gets the present number-base, [HEX] sets
the base to sixteen, SWAP lets you get at
the number you wanted to convert, and [0 D.J
prints it as an unsigned number in the range
0-FFFF. If you wanted a signed number from
-8000 to +7FFF you could use simply [.]
instead, Finally (BASE 1] restores the old
value of number-base. This word will now
convert from any number-base that you care
Page 8
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
to use into hexadecimal.
The two standard number-bases are base ten
and base sixteen; but supposing that you
want to use base two, perhaps for making
shape tables or for displaying the processor
status register or the state of an eight-bit
input port, you can define
: BINARY 2 BASE ! ;
and now [BINARY] will change the number-base
to two. So
DECIMAL 99 DUP HEX . BINARY .
will give '63 1100011 OK*, in other words it
takes the decimal number 99, makes a
DUPlicate copy of it, and displays it first
in hexadecimal and then in binary. It leaves
you in binary, so that typing
99
will give ‘99 2 MSG @# 0', which means
‘unknown word', since [99] is neither a
Forth word nor a number in base two.
It is easy to develop simple control
programs or ‘applications’ as they are known
in Forth. If for instance there is a
Digitalker card in slot 2 of the APPLE, the
following makes it produce its complete
range of words and noises:
HEX
TALK 90000 ICOAOC!
BEGIN COAO C@ 2 MOD UNTIL LOOP ;
TALK
That counts from 0 up to $8F, the range of
values that Digitalker translates. It puts
value in turn into the Digitalker
output register at $COAO ($COBO for slot 3,
etc.), which starts the noise. It then
enters a loop which scans the Digitalker
status register (also at $COAQ) until the
lowest bit becomes a 'I', which indicates
that the noise has been completed and it can
KO on to the next one.
The current disk version of Kuntze's ‘6TH
APPLE! is available trom the software
library and includes demonstration screens
on noises, a simple drawing application, the
fig-Forth screen editor (use with care), a
decompiler which handles most — ‘normal*
words, a few utility words, an assembler
which is licenced for ~—_ educational
distribution but which is insecure, and a
special vocabulary which allows Forth to
read and display the time using a Glanmire
Electronics Micro-Watch. It is public domain
‘software, meaning that you may copy it and
distribute it further if you wish (RUN NOTES
first for a notice to this effect) at your
own risk! There is one known bug in the
current issue: DRO and DRI do not do exactly
what one would expect... also be warned that
pressing reset at present kills DOS. If this
matters (FORTH only uses RWTS itself) you
can do
MON
*3EAG (reconnect DOS)
*6104G (warmstart FORTH)
If you have the disk,
12 67 INDEX
will give you an idea of what screens are
available;
12 LIST
will display
while
the contents of screen 12,
12, LOAD
will actually carry out the instructions on
that screen. All screen transactions should
be done in DECIMAL.
Before you do anything, make a copy of the
disk using the COPYA or COPY program from
your system master disk. The disk VTOC hay
been fixed so that all tracks up to track 17
(the CATALOG and VTOC track) are marked as
used, so that any Forth screens (12 to 67)
will be copied along with DOS and with the
normal DOS files that occupy the latter half
of the disk. I can supply an editor manual
if needed - no room on the disk.
For those who want a more advanced package
there are at least five other Forth
implementations for the APPLE: Kuntze has an
extended version, Cap'n Software has one,
Transforth is extended in various directions
including maths, Metacrafts is powerful but
I don't know much about it yet, and GraFORTH
is a very powerful graphics and music
language which supports recursion and allows
the creation of ‘autorun’ packages but lacks
some of the flexibility of the others (but
it has to be seen and heard... and it is not
too expensive either),
For those with other tig-FORTH systems, the
only thing above which will need changing
(apart from the Digitalker section) is
CLICK. Refer to your system manual for
information on how to click the speaker; you
will probably have to TOGGLE one bit of an
output port,
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 9
User Hostility
Why User Friendly?
by Bob Raikes.
Don't those patient, ever calm people who
never get excited or angry drive you mad?
They do me.
How much worse it is when a dumb machine is
the same. Such patience. However many times
you put the data disk in instead of the
program disk, that flaming machine simply
beeps, displays ‘Insert Program disk and hit
any key to go on and waits patiently.
Absolutely maddening.
1 would like to make a plea for user hostile
programs. No more endless prompts and quiet
patience. How about the sound of a
raspberry, followed by:
“Are you stupid or something? I said the
PROGRAM disk, you idiot",
Then if you repeat the mistake:-
"I've told you once. Put the PROGRAM
disk in now. Come on, I'm waiting".
If you make the mistake again, the program
would initialise the disk, leaving only a
file called 'SERVES YOU RIGHT" and a screen
display of ‘DAMN HUMANS',
No more of this simple prompt such as a ?
Replace this with 'WELL??" and the sound of
a tapping foot.
Some programmers have come to these same
conclusions before me I am sure, and have
worked on some very subtle ploys. The most
user hostile program I have met is an old
version of Computer Ambush. After 10 hours
playing (25 mins per turn!), it ‘crashed and
destroyed the game when I tried to save it
with 'DISK FULL ERROR'. Anybody got any
other nominations?
Small Ads
For Sale:
48k ITT 2020, Applesoft in ROM, two ITT disk
drives with controller, Ferguson 14" B&W TV,
Parallel printer card with _ additional
circuit to drive V26 serial, Transdata 300
thermal printer with keyboard, paddles and
games, £500,
Contact: Alan
plea
Duerden, i
iia; BAY
AERA E ENERO EKER RANE
Apple I+ 64k, two disks, colour card,
Centronics parallel card, paddles, docs,
etc. £300,
Contact: Derek Page on (ili ailil!% during
office hours.
errrrrrr reer etter rier eeeirirrrricers
Apple I disk drive + controller £160
APS 9" monitor £25
Various games in mint condition all at half
price.
Ring David Girdler on iis itumtet (4)
shh Ean. 1H during office hours.
AURA R EEDA R ROSSER R ARERR EERE REEEER REE ER
Neptune 64k Extended 80-column card for
Apple //e, £100 o.n.0.
Ring Brian Poulton on (iii (tii
Quick Tip
by R.C. Lowe
CONTROL CODE SPOTTING
If you want to know if the name of a file on
disk contains a control code try CATALOGing
while in INVERSE mode, it wont tell you what
the control code is or where it is but it
will tell you how many (if any) are in the
name.
EDUCATIONAL/GAMES SOFTWARE
Approximately 25 packages, used once
in original boxes with all documentation
normally only for sale in the United States
and worth about £700
need Apple JL, JL+, Applesoft 48k, DOS 3.3
//e, disk drive or Franklin Ace, disk drive
£100 the lot or will split
Contact: James Nalty, 7
Harllee:
His eesetiwvigy (LSA) cipaasiab
Mathematicians do it with tables.
Software Engineers do it in bits.
Page 10
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
Software Review
Apple Assembly Language Course
Price: £14.50
Suppliers: Honeyfold Software Ltd.
Standfst House, Bath Place
High Street, Barnet, London ENS 1ED
Reviewed by Seth Proctor
This "course" comes in a video-cassette type
box, consisting of a 5 1/4 inch disk and
book. The disk holds the assembler, which
may be used on any Apple X or on a //e, and
a "tutorial"; the book, meanwhile, explains
the codes of the Apple's processor chip -
the 6502 - with various appendices having
useful tables which are vital to
programming. But what is "assembly language”
and the "6502"?
ASSEMBLY LANGUAGE.
As most of you may be aware the Apple comes
with a standard language - BASIC, or
Applesoft. The main advantage of this
language, believe it or believe it not, is
that it is easy to read and to understand
with its instructions being rather like
English, and therefore relatively easy to
use. So to print something one would key in
"PRINT..."; to go in a loop ten times
FOR X = 1 TO 10 ... NEXT X
and so forth. However, this is not the
language of the computer, for it is, putting
it very simply, a collection of switches
(which may be on or off) with those which
run and control the Apple on a special kind
of chip - a processor chip called the 6502 -
and everything has to be scaled down to
this Tevel. So, for example, BASIC programs
are decoded into a format which the computer
can understand - that is machine code. So,
obviously, it would be better to write
programs in machine code to cut out the
decoding. Therefore why not write programs
in this code? Because it is a laborious task
whereby everything, as I said earlier, has
to be scaled down, or decoded, by the
programmer before writing the program, Even
a simple PRINT statement requires a lot of
work, so a compromise has to be reached
between legible languages like BASIC and the
iMegible machine code. This is assembly
language, whose prime advantage 1s speed,
for there is a closer relationship between
assembly language and machine code than
between BASIC and machine code. If one,
therefore, wishes to write programs where
‘speed is the name of the game (e.g. animation
or fast sorting), then one has to purchase
an assembler which allows a user to write
programs in assembly language and to decode
them into machine code, The Apple Assembly
Language Course by Malcolm Whapshott in the
Dr Watson series is one which is available
and under review now. This review - done
with a //e - is split up to cover the
package's four components - the course, the
tutorial, the assembler and the package
itself.
THE COURSE.
This makes the assumption that those reading
the book have no prior knowledge of assembly
language, so a "softly-softly" approach is
given and maintained throughout. Thus one
starts with an introductory chapter on
understanding the language, and machine
code, as well as understanding and writing
instructions, Thence to the introduction and
on through the various chapters of more
concepts which are needed to write programs,
including the necessary understanding of
binary and hexadecimal numbers, so that by
the final chapter one should be proficient
in writing machine code programs with the
assembler and knowledgeable about the
built-in subroutines on the 6502 chip. Whether
the course is fast or slow, is debateabie. |
will admit that I found it slow, but I must
point out that I have done work in assembly
language (albeit three years ago on an ICL
mainframe). However, 1 maintain that
slowness is nothing like as bad as a fast
breeze through, because the subject is quite
complex if you are a complete novice at
working in machine code/assembly language
you need to take your time and not get
dazzled and overcome by computer science.
THE TUTORIAL.
The disk tutorial consists of two main parts
= questions & answers and 4 “counter”
facility. The questions mainly ask the user
to calculate the equivalents of given
numbers in various bases - for example
binary coded decimal to decimal, decimal to
hexadecimal, etc., though not, say, binary
to hexadecimal, which may be needed by some
users. These are in addition to the
descriptive text and a few questions &
answers in’ the book. As regards the
"counter" facility, this is a — very
rudimentary, basic facility which has rows
of numbers in boxes which are in two sets -
decimal, binary & binary coded decimal, and
decimal, binary & hexadecimal, The object of
the exercise is to see what happens if one
Elite 93 Eastworth Road
Chertsey, Surre.
Software KT16 80x ,
Company
Telephone: 09328 67839
RAMVIEW
This is Elites own 80-column card for the Apple //e. It is completely
compatible with Apple's own 80-column card. The only differences are the
price and the fact that our board can be upgraded to be a 64K/80-column
card by simply plugging in 8 chips.
RAMVIEW may also be purchased from Elite Software as an upgraded 64K
board.
RAMVIEW ts supplied with an instruction manual, fs fully tested before
despatch and is backed by Elite Software's full one year's warranty.
The price of a RAMVIEW {ts £60 + VAT (£69).
The price of a 64K RAMVIEW {fs £120 + VAT (£138).
Postage and packing ts free!
Desler enquiries welcomed.
Apple is « trademark of Apple Computer: Inc.
Page 12
HARDCORE - The Journal of the British Apple Systems User Group
October 1986
'A'dds or 'S'ubracts from the decimal
number, which, incidentally, may be started
between 0 and 99 with the first set of boxes
and between 0 and 255 for the second. Methinks
it was unwise of the programmer not to allow
negative numbers in the boxes. That is to
say if one has a 0 display then when | is
subtracted the display goes to either 99 or
255 with the appropriate equivalents given. This
could be confusing, I hope that this will be
changed.
THE ASSEMBLER.
The course's assembler is very adequate and
allows the user to enter, list’ and cun
assembly language/machine code programs, as
well as to insert spaces and to move code.
Subject to my notes in "The Package" below |
must admit to being disappointed with the
assembler for various reasons:~
1) When entering assembly code labels may be
used to refer to a particular section of
memory. However, upon leaving this facility,
the assembler changes these into their
memory locations. So, for example, if a
section of code is called LOOPI and a screen
location defined as POSITION! then the entry
may look like
LOOP! STA POSITIONI
|
|
IMP LOOP!
However this could be changed to
773° STA + ha
|
IMP 773
This, 1 feel, deteats the main purpose of
using such labels - to read the listing
easily without necessarily having to refer
to peripheral codes or text, True, they help
the programmer in writing the code, but how
about reading it some time afterwards? This
is especially so with large programs which
use many subroutines. For example, one may
remember that POSITION! is the first screen
location, but not 1024, and so forth,
2) My second disappointment was that to
insert code, say omitted in the entry
facility, the programmer has to first
calculate how many bytes are needed, then
insert the appropriate space using the
insert facility, thence back to the entry
facility to enter the relevant code. All
very cumbersome and time consuming, and |
certainly found that
is better to start from scratch. An
facility would have been far better.
for small programs it
tad!
3) The assembler does not allow the user to
have comments with the entered code, which
is a great shame as machine code/assembly
language programs are sometimes long and
difficult to follow. (Having said that
please see "The Package" below).
These apart, as 1 said, the assembler is
okay and has added facilities, as one would
expect, to save and load programs (though
only using drive 1) and to go in and out of
monitor, The only problem I encountered
using these was that they were not described
in a clearly marked section, which in the
event was fairly late in the book; it may
have been better to have a ‘help' facility
on disk (to be printed to screen or paper)
or, as I said, a clearly marked section in
the book.
THE PACKAGE.
I must confess that I was disappointed with
the overall packaging of the course. In the
book there were a great number of misprints
and dropped lines (normally after subscripts
like }. Also lower-case inputs
are nbt Whsid’ despite there being two
assemblers - one each for the J and //e. This,
1 feel, devalues the course as many //e
products recognize the existence of lower-
case characters and cater accordingly. Another
problem encountered was the fact that only
drive 1 may be used, which is fine until one
exits the assembler and subsequently wishes
to re-RUN it. It needs a program on the
course disk in drive 1, otherwise the
assembler program crashes. In short one has
to go through the irksome task of ensuring
that the right disk is in drive 1 - the data
disk when loading/saving programs or the
course disk when wishing to RUN the tutor or
assembler. Another commemt to note is that
the book is not spiral-bound - unlike Apple
manuals - which may be disconcerting for
some users; I am told that this would raise
the price to an unacceptable level, so this
is fair enough. Furthermore there are no
reference cards supplied - these, 1 feel,
would be of great benefit as at some stages
of the course 1 was referring to a
program/exercise, the solution, the Apple
character-set and the Apple = screen
locations. For ease of referral the last two
could be given on cards as well as in the
given appendices. (Such "cards" need not
necessarily be expensive stiff card, a
pull-out section could do).
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 13
However, 1 have reviewed the First
Edition of the course, and by the time this
reiew is printed a second edition should be
for sale (or be imminent), This has, so I am
promised, no misprints or dropped lines and
does allow for comments in the assembler. As
regards my other comments these are being
considered for future editions. In short the
publishers are very much aware of the need
to continually improve their wares, so the
second edition should be far better than the
first - if so then the product has been
greatly uplifted and should not collect dust
on seller's shelves. (A note to our
continental member The second edition,
unlike the first, will be available on the
continent. Questions of where, please, to
the publishers).
SUMMARY.
On the whole the course is good
value-for-money, and is an inexpensive
introduction to the complexities of assembly
language. However, 1 would imagine a
would-be serious programmer may have to
invest in a more versatile assembler which
would give the useful aids mentioned above,
although not only would it be wise to see
the latest edition before looking elsewhere
but it may be best to buy this course in any
case to make sure that assembly language is
Mac Note
by P. Knight.
MICROSOFT MULTIPLAN FOR APPLE MAC.
For: Very powerful when "opened",
63 columns wide (10 char. cols.).
255 rows.
Editing quite good.
Display very good.
Against: On opening, displays keyboard
of US machines. Thus typing on bottom line
of UK keyboard produces characters displaced
one key to right AND Return key (L-shaped on
UK board) and backspace and spacebar do
other things!
Also for US a “dollar” command will
globally label all numbers in selected
column. No such choice for "
How to SUM? Not much good in M'PLAN
manual. A useful guide which one can
understand will be found in Cary Lu's "The
Apple Mac Book" - an excellent book quite
without parallel.
Lastly, why doesMicrosoftUK documentation
not include supply of a backup disk. It
Costs £25 for a replacement disk outside
warranty. This is the charge also levied by
Microsoft UK for a backup disk! Surely this
is a not-clearly-displayed cost which comes
under the Trade Descriptions Act and of
interest to Trading Standards Officers. However,
USA documentation (left in box "in error
according to UK office) tells you how to get
it for $10.
Of course, you're still stuck with US
keyboard - no E sign, etc. Who released
this package in UK? The program also does
not recognise dual disk drives - asks for
Master disk when it is already loaded in
other drive.
In returning package to P & P I said that we
could alter key caps but surely that would
infringe disk warranty, also that I didn't
know how to amend program for 2 disk drives
even if it were possible.
Where can 1 get a reliable UK-style
spreadsheet for Mac which is anglicised for
2 drives? I have hobby and business
interests waiting for me to erect a working
system about 18 cols. by 250 rows (10 char.
cols). 1 also. badly want a Tele/Address
package plus 3 - 4 option boxes so that I
can sort on name, company, telephone number,
etc.
1 suggest Microsoft (particularly UK end)
should "pull up their socks" and read recent
criticism in US press of their "Word" and
lack of a Hotline.
I have just rung Apple USA and they say they
are not doing a Mac/M'Plan despite their
C'LOE.DMO.400 which | ordered.
BEWARE!
There are disk drives appearing on the
market which use metal positioning bands to
move the head. On an Apple disk drive the
track positioning is considerably —_ less
accurate so in order to ensure consistent
booting track 0 tends to be fairly wide. This
means that a disk initialised or copied on a
metal band type of disk drive may prove
difficult to boot on a standard Apple drive. The
converse does not apply.
Computer Operators do it in shifts.
Database programmers do it with relations.
Page 16
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
IMPORTANT NEWS FOR APPLEWRITER USERS +
bu Dick Menhinick (with a Little help from Apple UKI)
The following instructions if
carried out accurately, will allow
your copy of Applewriter //e to be
modified to enable the NUL
character (Decimal 0) to be sent to
your printer.
NUL cannot normally be sent from
Applewriter since the NUL code is
not accessable from the keyboard.
Unfortunately, NUL is needed in
many printers (Epson FX80, Taxan
KP810) to activate functions such
as underscore, super and supseript,
proportional spacing etc. In the
case of the Canon PW1080 and Taxan
KP810 near letter quality (NLQ)
printers the absence of NUL is
particularly irritating since it
without it, the second (optional)
NLQ typeface cannot be selected
(there are 14 different NLQ
typefaces available for the Taxan
KP810 nowt).
The following instructions apply
only to Applewriter //e. They
modify the program to enable the
‘Delete’ key on the Apple//e
produce a NUL code wnen in
'Control-V' mode. Delete worke
normally unless Control-V has been
pressed
(This hae been printed on a Taxen
KP610 with the standard and
italic NLQ typefaces, using
Applewriter //e )
General instructions are in
this typeface.
You type the inatructtons
printed tn thie typeface
1. Boot your DOS 3.3 master disk
2. Remove the write protect label
from your Applewriter //e disk.
Put the Applewriter //e disk in
your disk drive and close the
drive door.
3. Now type the following lines,
each followed by the RETURN key.
BLOAD APWRT) [E
CALL -151
1CK2:KA EA EA EA
3EBA:EA EA EA EA
3D0G
UNLOCK APWRT][E
BSAVBE APWRT][E;A$1900,L$2F56
LOCK APWRT)[E
BLOAD APWRT)(F
CALL-152
1D01:EA BA BA BA
4033:KA KA BA EA
3D0G
UNLOCK APWRT](F
BSAVE APWRT][F,A$1900,L$30D1
LOCK APWRT) (F
That completes the
modification, Fit a new
write-protect tab to your
Applewriter diskette.
You should now Boot the Applewriter
disk and give it a try! Remember,
to get the NUL character from the
Delete key you will need to have
pressed Control-V first , but as it
will be part of a longer commana
string for the printer you would
normally have done that anyway!
Now, a short demonstration of what
can be done with # Taxan KP610 now
that we can awitch typefaces!
Taxan Plain typeface
Taxam outline typerace
axan Gothic tppetace
Taxav Hpcex rywreSave
Taxan Handwatting!
Toxan KPBold typaraca
Toxen Toll
tupeface
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 15
Epson DK IOO
The Epson DX100 Printer and Keyboard.
A review by J. W. Panks.
Epson have for some years been connected
with dot matrix printers. These have been of
good quality and reliable. They were
probably the first company to introduce
printers at a price that most users could
afford. In recent months Epson have
announced many new products. These have
included computers, printers and plotters. One
product that has been added to the range is
a Daisy Wheel Printer called the DX100. This
has been overshadowed by the other products
and has not been widely advertised.
The Epson DX100 is in fact a Brother-
manufactured printer similar to a Brother
HRIS. It is designed to be a low cost, high
quality printer with dual use as a computer
printer or a typewriter. It is available
with either a Centronics or — RS232C
interface.
The printer is built on a chassis which
appears to be very strong and is encased in
plastic which is a similar colour to the
Apple beige. The top lifts up to provide
easy access to the ribbon and daisy wheel. The
print head is pulled across the platen by
the usual wire cable type mechanism. It
appears to be capable of this job and should
prove reliable. The electronics are at the
feat. of the machine under the platen. The
tear panel has D-type plugs for the printer
interface and for the optional keyboard. Also
provided is a DIN type socket for the
optional sheet feeder. Dip switches have
usualy been hidden inside the machine; on
the Epson they are placed on the rear panel,
which makes changes to them very casy. There
are two provided. The first selects the
language of the daisywheel; the second is
used to sect page lengths. They are well
documented in, the manual. On the front of
the machine is a group of switches that
allow Line Feed, Top of Form, Copy,
Selection of Line and Pitch settings.
The printer is designed for medium use, and
would be ideal in the home or for light
office use. The print speed is slow in
comparison with other more expensive daisy
wheels or dot matrix printers. | have timed
various print times for text and the average
speed is 13 characters per second, The print
head is bidirectional and coupled with the
3k buffer provided as standard makes the
printing of single pages fairly quick. Longer
articles take time and if you need the
computer back whilst long articles are
printed you will need to acquire a large
buffer.
The noise is acceptable providing the
printer is positioned on a surface that does
not vibrate, and is solid. | placed the
printer on a fairly shaky table and the
machine nearly threw itself on the floor. It
does tend to shake, although putting some
foam underneath cuts the noise and shake in
half.
The features ofe the machine are very good
and are not found on some that cost well
over £1000, It will print at 10, 12 or 15
characters per inch with Proportional
spacing if required, The appropriate daisy
wheel will be needed to get the best from
the different pitches. Double strike, shadow
printing and underline are also available. Two
colour printing can be done when the printer
is used with a computer; when a keyboard is
used the red print becomes a corrector
providing you change the small ribbon.
The machine has a very useful copy facility
which uses the 3k buffer to copy documents
without the computer being tied up. | found
this useful when writing similar letters to
many people, and I think that it is cheaper
than using a photocopier. The letter is
loaded into the printer buffer and then you
use the copy key on the printer to print it
out. If you run a small business this would
be useful coupled with the optional sheet
feeder.
The printer has a useful top of form key
which allows you to load single sheets to a
pre-determined position by simply placing
the paper and pressing the TOF button, The
next time you press the button it ejects the
paper. Other commands that can be entered in
off line mode are line spacing and pitch. These
can also be set by software from within
programs.
Other features include auto underline, auto
strike out, super- and subscript, half line
feed in both directions and the setting of
print head movement to 1/120th of an inch.
Line spacing can be set to 6, 4 or 3 lines
per inch by using the front panel or from
software. The line spacing can be set in
increments of 1/48th of an inch trom
software, which could make it easy to use
the printer for graphics.
The Epson is compatible with Wordstar and
uses standard Diablo protocols. | have used
Page 16
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
it with Applewriter Il, Format 80, Letter
Perfect, Wordstar and Zardax with no
problems, If you wish to use it in
Proportional Mode you will have to configure
your program to the printer. On some this is
easy, on others it may take some time. If
you ‘really need proper proportional spacing
you would be wise to get advice before
buying any particular program,
There is an optional extra 48 character
keyboard for the Epson which turns the DX100
into a super typewriter with all the latest
fancy electronic typewriter facilities,
including auto correction. The keyboard
plugs into the rear of the printer and can
remain there when the printer is being run
by a computer; there is an on/off switch on
the keyboard. The keyboard is a standard
QWERTY keyboard with optional keyboard
overlays selected from a switch. This allows
the use of different daisy wheels. Other
features included are pitch and line spacing
switches. The keyboard has adjustable feet
for angle and this can be set at 15, 10 or >
degrees, Some of the keys not normaly found
on a keyboard are super- and subscript keys,
correction and relocation keys (used for
auto correction), express return key (and
back space) and a code key. The code key
allows the setting of decimal tabs and line
indents.
The keyboard allows automatic correction in
the line that you are typing and it also has
a 48 character buffer. The keyboard is ideal
for those that like myself find setting up
the computer for text entry a waste of time
when only a small letter or label is
required. It also has the tendency to stop
the wife moaning about spending more money;
she understands a typewriter but is not
interested in learning the word proccessor. That
is the only problem with the keyboard. My
wife constantly outruns the buffer. It would
appear that the printer can handle data from
the computer quicker than the keyboard. This
has the tendency to cause major problems
with fast typists. They find it hard to slow
down to the speed of the print head and as
they rarely Jook at the keys or the typing
they find that they have lost many
characters. However I find the keyboard
excellent but I only type at 20 - 30 words
per minute.
As I said previously the machine is really a
Brother in disguise and therefore Brother
ribbons and daisy wheels are required. There
are a fair number of daisy wheels available
for the DX100 but they are fairly expensive
at roughly E18 each. Therefore if you need
Plenty of different types you should bear in
mind the cost of the daisy wheels. Printer
ribbons are better priced and you can get
one for between £3 to £4 depending on the
Supplier. You can get Single Strike ribbons
which produce perfect copy although they
don't last long and Multi Strike which
produces reasonable copy but lasts five
times as long as single strike. Nylon
Ribbons which are similar to normal
typwriter ribbons in a cassette are
available but the print quality is only fair
and quickly becomes poor after use.
The documentation that accompanied the
printer was adequate without being too
technical, The machine tested was a sample
machine and the actual documents supplied
may be improved on the production model.
Other add-ons include a sheet feeder and a
tractor unit. These are fairly cheap
compared to other printers. | have not tried
them out but if the quality is as good as
the printer then they would be a good buy,
providing you can justify their use.
My conclusions are that this printer is a
high quality printer at a reasonable price. The
speed is not very impressive but for a fast
daisywheel you will pay a lot more. If you
want top quality, coupled with medium use,
without paying a fortune, this printer is
for you.
I must thank EPSON (UK) and in particular
John Sharp for allowing me to use the
printer. It has been enjoyable and 1 will
now be able to produce an Applewriter
Glossary file for the Epson DX100.
IMPORTANT
PLEASE NOTE
There aré two major telephone number changes
for BASUG. Please alter these numbers in
your books (or wherever you keep them). These
numbers are valid as from NOW.
ADMINISTRATION (Fran Teo)
Newbury | (lit) Wei
BULLETIN BOARD (Tony Game)
Felixstowe | (jiittit)
@ Runs BASIC, CP/M. PASCAL
@ = Multi-operating systems
@ large software range
@ Twin built-in disk drives
@ 64K RAM expandable to 192K
DERING PC2000
A new concept
64K RAM, twin disk drives
£795
Complete business system
with ftware,
Phone (0924) 499366, ext. CC
Telex 83147 VIA OR,
a
Page 18
HARDCORE * The Journal of the British Apple Systems User Group
October 1984
Quiz Writing
Writing A Quiz Program In BASIC
by Hugh Dobbs, Newtown School, Waterford
A number of my students have been seen
expending great efforts on writing quiz
programs to baffle their friends; I was
alarmed to see how much of the work was
unnecessary, and tor the past few weeks we
have had an intensive course on the subject. As
observed, a typical program would run like
thist
10 PRIN
FRANCE"
20 INPUT A$
30 IF AS = "PASS" THEN GOTO 60
40 IF AS <> "PARIS" THEN GOTO 10
30 PRINT "RIGHT"
60 PRINT "WHAT IS 32 + 45"
70 INPUT AS
80 IF A$ = "PASS" THEN GOTO 110
90 IF AS <> "77" THEN GOTO 70
100 PRINT "RIGHT"
110 oeoe ETCooee
WHAT IS THE CAPITAL OF
I have of course
syntax errors and standardised the line
numbers, but the overall structure is as
shown. A little calculation shows that for a
100-question quiz one would need 500 lines
of BASIC code, including 200 GOTO
statements, any one of which might be to a
wrong line number -- for example, did you
notice that line 90 there should end with
"GOTO 60! so that the question gets asked
again? [ call that the Hard-Work Version
(HWY).
removed numerous
Clearly it would be much better if all that
testing and branching could be done just
once; so I introduce the Subroutine Version
(SV):
10 GOTO 1000
100 PRINT QS;
110 INPUT AS
120 IF AS = "PASS" THEN GOTO 150
130 IF A$ <> R$ THEN GOTO 100
140 PRINT "RIGHT"
150 RETURN
1000 LET Q$ = "WHAT 1S THE CAPITAL
OF SPAIN"
1010 LET RS
1020 GosuB 100
1030 LET Q$ = "WHAT IS 5 TIMES 7”
1040 LET R$ = "34"
1050 GOSUB 100
1060) JonsETCZ.:
"MADRID"
Calculation here indicates that for a
100-question quiz you need 307 lines of
BASIC, with a total of 3 GOTOs; and whereas
you have 100 GOSUBs they are all identical
so that any mistyping should be obvious. The
subroutine is placed ahead of the main
program for two reasons: first, most
versions of BASIC search through from the
start of a program for the line number
addressed by a GOTO or GOSUB (which takes
longer for later lines in the program),
whereas the RETURN already has the absolute
address of the GOSUB which called it on the
stack and does not have to search for it;
and second, when you LIST the program the
bit that does the work is displayed first,
which is almost certainly what you want,
The difference between these two versions
becomes more obvious when you get
dissatisfied with the way the program works
at present and want to add facilities to it. One
obvious deficiency is the lack of scoring. You
decide to keep a score, which means setting
up a counter and adding one to it for every
right answer, and then printing the score at
the end. On the HWV this involves adding the
following lines:
5 LETS = 0
55 LET S
9998 PRINT "YOUR FINAL SCORE
9999 END
1s "38
. for a total of 603 lines so far; the SV
only requires:
3 LET S
145 LET S = 5
9998 PRINT four’ FINAL SCORE IS "
9999 END
.. for a total of 311 lines. But perhaps
you would like the score to be printed every
time you get the answer right; to do this
with the HWV:
57 PRINT "YOUR SCORE SO FAR IS "
107 PRINT "YOUR SCORE SO FAR IS
157 ....ETC....
s+ only 99 of these, making 702; while for
the SV:
147 PRINT "YOUR SCORE SO FAR IS "3 S
s+. Suffices, making 312 in all.
This looks pretty good, but further savings
are still possible depending on the
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 19
abilities of your dialect of BASIC. So far I
have been assuming a fairly minimal
Microsoft BASIC, and the two programs will
run with minor changes on most machines,
Some BASICs such as Sinclair and Atom BASICs
allow a ‘computed GOSUB' -- that is, they
allow 'GOSUB <expression>' as well as 'GOSUB
<line__number>'. (For the Apple use
ON...GOSUB or one of the & extensions to
BASIC). With these the whole program can be
inverted:
40 LET'S = :
20 LET Q =
30 GOSUB 1000 +Q* 30
GO IF Q$ <> "END" THEN GOTO 70
50 PRINT "YOUR FINAL SCORE IS "; S;
" OUT OF "; Q
60 END
70 LETQ=Q+¢+1
380 PRINT "QUESTION "; Q
90 PRINT ey
100 INPUT A:
110 IF AS = "PASS" THEN GOTO 30
120 IF AS <> RS THEN GOTO 90
130 PRINT "RIGHT"
140 LETS =S+1
150 PRINT “YOUR SCORE SO FAR IS "; 5;
"QUT OF "3 Q
160 GOTO 30
1000 LET QS = "HOW MANY CORRECT ANSWERS
ARE ALLOWED FOR IN THIS TEST"
1010 LET R$ = "JUST ONE"
1020 RETURN
1030 LET Q$ = "WHAT IF THE COMPUTER'S
ANSWER IS WRONG"
1040. LET R$ = "TOUGH"
1050 RETURN
1060 ...ETC..
4000 LET Q$ = "END"
4010 RETURN
This version has a total of 318 lines, and
will run more slowly than the SV, but it has
an advantage if you are very short of memory
space: 'GOSUB 100! will take up more memory
than 'RETURN': Sinclair, 5 bytes as against
1 (think); Atom 5 bytes ('GOS.a') as
against 2 ('R.); thus saving 400 or 300
bytes on the latter part which more than
makes up for the extra lines. Of course both
BASICs mentioned require further lines for
dimensioning string variables, etc. and the
Atom will refer to $Q rather than QS
throughout.
Other BASICs have READ, DATA etc., which
allow of further improvement:
10 LET S = 0
20 LETQ = 0
30 READ QS, R$
40 IF Q$ <> "END" THEN GOTO 70
50 PRINT "YOUR FINAL SCORE IS "; S;
" OUT OF "; Q
60 END
70 LET Q=Q¢
80 PRINT "QUESTION “
90 PRINT QS;
100 INPUT AS
110 IF AS = "PASS" THEN GOTO 30
120 IF A$ <> R$ THEN GOTO 90
130 PRINT "RIGHT."
140 LETS = S41
150 PRINT "YOUR SCORE SO FAR IS "; S
160 GOTO 3:
1000 DATA "IS THERE ANYTHING TO BE
GAINED BY USING DATA STATEMENTS",
"YES"
1010 DATA "WHAT IS THAT", "BREVITY"
1020 ....ETC..
9999 DATA "END", "PHEW"
3 Q
That brings the total down to 117 lines,
including the printing of the question
number which was not part of the first two
versions. Further space can be saved by
packing more than two DATA items per line,
but I don't recommend it until the program
is fully debugged as the layout used makes
it very easy to see which question has which
answer, and to check question number Q you
simply work out Q*10+990 and LIST that line:
Most versions of BASIC will allow you to
leave out the quotation marks around the
DATA items, but this can give rise to
invisible errors as follows: if you type
1050 DATA what is 7 + 8, 15
and press the space bar before pressiny
<return>, the instruction READ QS, RS will
pick up what you would expect for Q$, but R$
will be the three-character string "15 ",
and the victim who types "15" in response
will be marked wrong. Incidentally the
reverse may also apply: if the correct
answer is "15" then "15 " will be wrong. This
does not usually apply to spaces at the
start of a string... Anyway, only remove the
quotation marks after the program is working
Properly, and only then if you are short of
Space for the later questions. The invisible
errors can be brought out in APPLESOFT by
using INVERSE before LISTing the DATA
section; they can often be produced by
careless editing.
Finally, perhaps your computer has disks. A
quiz program is an example of serial data
Processing, and can easily be rewritten to
take its input from text files on disk. Since
Page 20
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
all the disk operating systems | have met
have been different (!) I shall just give an
example using APPLESOFT and DOS 3.2 of
3.3.02
10 LETOQO- 0
20 LET S = 6
30 LET DS = CHR$(4)
40 PRINT “WHICH QUIZ WOULD YOU LIKE ";
Su
60 PRINT DS; "OPEN"; FS
70 PRINT DS; "READ"; FS
80 INPUT QS
90 IF QS <> "END" THEN GOTO 120
100 PRINT DS; "CLOSE"
110 PRINT "YOUR FINAL SCORE IS "3 35
“ OUT OF "3 Q
11> END
120 INPUT RS
130 LETQ=Qe 1
140 PRINT DS
150 PRINT "QUESTION NUMBER "; Q
160 PRINT QS;
170 INPUT AS
180 IF AS = "PASS" THEN GOTO 70
190 IF AS <> R$ THEN GOTO 150
200 LETS -S+1
210 PRINT "RIGHT. YOUR SCORE SO FAR
1S. *3 S
220 GOTO 70
This takes only 23 lines, but of course you
still have to write the questions and
answers. To do this you can use any suitable
text-editor, such as the APPLE DOS Toolkit
editor (BRUN EDASM). Type in questions and
answers alternately, finishing up with END
in place of a questions
WHAT IS BLACK AND Gt
OVER
N AND READ ALL
A MONITOR
WHAT IS THE SOUL OF WIT
BREVITY
END
Obviously this program can be used with any
number of different quizzes, simply by
writing different text files to go with it,
so it is worth while building as many
improvements into it as you can. Perhaps you
would like the screen cleared before each
question... perhaps you would like
unnecessary spaces removed trom answers
input... perhaps you would like the program
to present a menu of the quizzes on the disk
and allow the victim to choose one by simply
pressing a key... perhaps the victim should
only be allowed three attempts at a
question... perhaps the victim should be
allowed to escape without attempting all 100
questions... it's up to you.
String Print
by R. C. Lowe
In response to Word Wrap by Tony Game in the
August Hardcore, here is a shorter faster
routine that does the same thing. When
compressed, it only uses a few lines. | have
altered this routine that | have been using
for some time so that it is compatible with
Word Wrap.
The only problem that | have found with it
is that, as it is recursive, it will run out
of stack space if the string to be printed
is too long or if the line length is set too
short.
30 REM STRING PRINT NS
60 IF LEFTS (NS,1) = " " THEN NS -
RIGHTS (NS, LEN (NS) - 1): GOTO 40
50 IF LEN (NS) < PL THEN PRINT NS:
RETURN
60 5 = PL
70 FOR PS = PL TO! STEP - 1
$0 IF MIDS (NS,PS,1) = " " THEN S
= PS:PS = |
90 NEXT PS
100 PRINT LEFT$ (NS,S):
110 NS = RIGHTS (NS, LEN (NS) - S)
120 GOSUB 40
130 RETURN
by Jim Panks
All 3.2 software disks have now been
distributed and when they are returned the
3.3 will be sent out. If you have ANY
difficulties ring your respective manager,
the address and phone number is in the
manual supplied,
Also:- Any members wishing to help in the
software library should get in touch with
the software group manager at the P.O. Box
or ring the number on the back of the
membership card. Although we have quite a
few helpers we will not turn anyone away. The
more helpers the better.
NEW DISKS.
New Software Disks are being released, These
will include a very fast disk copy program. Full
details will be published prior to Christmas.
FORMAT-80
FOR THE APPLE ][ AND //e
Format-80 is simple to use. Text entry 's as easy as using a typewriter. Editing and formatting is achieved with single
key strokes. "’D" for delete, “|” for insert, “J” for justify, “C” for centre, etc. Easy to remember commands because they
make sense.
What you see is what you get. Format-80 performs virtually any editing and formatting function you can imagine, and
displays on the screen the text exactly as it will print out.
It supports all Apple compatible printer:
Format-80 also includes a sophisticated mailing list, which comes complete with full sort and selection capabilities.
The program resides entirely in memory, including the mailing list. All drives are free for text and mailing list
data
It comes complete with a tutorial manual and a concise, easy to use reference manual, plus a handy user reference
card, and is supplied on a standard DOS disc. The disc is not copy-protected,
System requirement:
64K APPLE]| //e, and most Apple compatible machines.
Disc Drive.
80 Column Card. (supports most 80 column cards)
Also available as an upgrade to existing users of Format-80, including revisions to the reference manual, details of new
features, and upgraded software.
Ramview: 80 column board for the //e, upgradeable to 64K.
PRICES Format-80: £129.00
Upgrade: £25.00
Ramview: £80.00
ELITE SOFTWARE COMPANY,
93 Eastworth Road, Chertsey, Surrey, KT16 8DX
Tel: 09328 67839
Page 22
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
Beginners’ Page
MORE PEEKING AND POKING
By John Sharp
In the last HARDCORE we began to look at
PEEKing and POKEing. Before continuing it is
worth a few minutes to consider how to save
yourself a lot of work when you have a list
of POKES to enter into a program. If they
are in a sequence as is most likely, why not
let the computer do the work and use a loop
to do it:
10 FOR N = 768 TO 776
20 READ P
30 POKE N,P
40 NEXT
50 DATA 1,32,221,221,206,0,3,248,96
It will not have made much less work in this
case but it will do so when there are many
more POKES to do.
Now so far we have been mainly POKEing. How
can we use PEEK in a program to let us do
something constructive? One way might be to
see if you have an APPLESOFT or PALSOFT
machine, ic. an APPLE or an ITT2020, One
way is to look into a location you know to
be different; lan Trackman suggests location
62447, If you PEEK (62447) and get @ number
other than 0 then you are running on an
Applesoft in ROM machine.
PEEKing Is often useful to find out other
things in programs. It could be used to find
out if you are in FLASHING or INVERSE or
NORMAL mode when you want to PRINT a new
string. This uses the location we dealt with
last time. For example:-
10 X = PEEK(50)
20 IF X = 255 THEN PRINT "YOU ARE IN
NORMAL MODE"
30 IF X = 127 THEN PRINT “YOU ARE
FLASHING AT ME!"
40 IF X = 63 THEN PRINT "YOU ARE INVERSE"
This may not be a common occurrence but it
could be useful if you were printing in
different modes and wished to know which one
you used last. Another case might be to test
which key someone had pressed last. If you
PEEK (-16384) then the value you get will
get will be the ASCII value of the key
pressed. This is illustrated by = the
following:
10 FOR N = 0 TO 1000
20 X= PEEK( -16384)
30 IF X > 127 THEN PRINT CHRS(X);: POKE
~16368,0
40 NEXT N
The POKE -16368,0 is to reset the switch to
read the next character typed in . You could
use it to see which was the LAST CHARACTER
typed on the keyboard, or indeed if any had
been typed in whilst the program was
running, without having to rely on the key
being pressed at a specific time when the
program requests it.
This suggests the following program for a
simple reaction timer.
10 TEXT : HOME
20 FOR N = | TORND (3) * 4000 : NEXT
30 PRINT "READY"
40 FOR N = 1 TORND (3) * 4000 : NEXT
50 PRINT "STEADY"
60 FOR N TO RND (3) * 4000 : NEXT
70 PRINT "GO..
80 POKE -16368,(
90 FOR N = | TO 300 : X= PEEK ( -16384) :IF
X > 127 THEN GOTO 110
100 NEXT
110 PRINT "YOUR SCORE WAS
"CAN YOU MAKE IT LARGER
120 END
1000 -N ;
A tew comments would help those who do not
understand, Lines 20, 40 and 60 put a random
delay into the program between each
statement, The resetting of the keyboard in
line 80 stops you cheating by pressing a key
before the "GO" comes up.
POKING THE HI-RES SWITCHES.
Have you ever tried to play a game and found
instead of the correct graphics page the one
from the graphics game you played before
comes up. This is particularly common with
the Integer games on the Software
Distribution Library Disks. It means the
switches are set wrongly for jumping between
the various pages. These are POKE switches, If
you read the APPLESOFT MANUAL it is
confusing to say the least. An easier
summary as follows is not foolproof because
the switches are interdependent, but it
usually works.
POKE -16304,0 ....TEXT TO GRAPHICS
POKE -16303,0 ....GRAPHICS TO TEXT
POKE -16302,0 ....GRAPHICS & TEXT TO
FULL GRAPHICS
POKE -16301,0 ....FULL GRAPHICS TO
GRAPHICS & TEXT
POKE -16300,0 ....PAGE 2 TO PAGE |
POKE -16299,0 ....PAGE 1 TO PAGE 2
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 23
POKE -16298,0 ....LO-RES SWITCH
POKE -16297,0 ....HI-RES SWITCH
The last two are the most relevant ones if
you have the trouble with being in the wrong
type of graphics. Just press CTRL-C and type
in the relevant POKE followed by a RETURN
and rerun the program,
THE ESCAPE KEYS AND OTHER EDITING
FACILITIES.
If you are a beginner you have probably
glanced at the REFERENCE MANUAL and
thought "Yes I'll look at that some other
time, maybe in a few years time", Well there
are some pages you might understand that are
not in hieroglyphics. For example the pages
on the ESC codes for moving the cursor on
pages 34 and 35. Althoughmost AUTOSTART ROM
users are familiar with ESC IJKM they are
not always aware of the ESC DBAC set. They
give you similar movements, but with one
difference. If you press ESC ABCD then the
hext key you press actually works. It is not
a "get you out of using the ESC key
sequence". If you are a poor typist and are
continually mistyping CATALOG titles, you
probably use the ESC IJKM keys to run up the
Catalog and then along the row with the ->
key. How many times do you forget to press R
for the RUN twice or use some other means of
getting out of the ESC sequence only to find
youhave typedUNM YPROGRAM andhad SYNTAX
ERROR come back at you. Well if you get into
the habit of using ESC D as the last ESC
character to move the cursor onto the line
you want, there should be no such trouble.
Whilst on such facilities, do you know how
to slow down or temporarily stop listings. A
slow listing can be achieved by typing SPEED
= 180 or some other number less than the
normal 255. When you then LIST the letters
will come out slowly. The lower the number
the slower; with SPEED =! they take a very
long time. Remember to reset to SPEED = 255
before you run the program.
To slow the listing down so that a few lines
come up at a time before stopping, use CTRL
S. Type LIST and press RETURN as normal,
then put one finger on the CTRL key and keep
it there, Then press the S key. Each time
you press it the listing will either move or
Stop. In order to get back into BASIC type
CTRL C. THIS WILL NOT WORK ON AN APPLE
WITHOUT THE AUTOSTART ROM (including
the ITT 2020) or if you are listing an
INTEGER program,
Courses
Following the review of one of their courses
in the last issue, we have heard trom the
University of Salford, They run three Apple
Il courses:
The Apple for beginners.
Getting more from your Apple.
Machine code programming on the Apple.
Their next courses run in January, April and
July 1985 and during 1985 they are prepared
to offer a discount of E10 per course to
BASUG members.
Two books based on the courses are duc for
publication soon, They are "Getting the most
{rom your Apple II/Ie/Ilc" (Addison-Wesley)
and "Machine-level programming on the Apple
Ii/lle" (Prentice/Hall). There is a disk
associated with each book.
For further information please contact:
Conference Office
Maxwell Building
University of Salford
Salford
MS 4WT
Telephone: 061-736 5843 extension 449.
Assembly Course.
BOOK NOW
for
APPLE ASSEMBLY LANGUAGE COURSE
October 20th
County Hall, Central London.
A tew places still left.
See separate application form.
BASIC programmers do it but get it wrong.
FORTH programmers do it in reverse (polish).
BBC Micro users do it down a tube.
Sinclair users can't do it without peripherals.
Sinclair users can't do it - full stop!
STOCK CLEARANCE
In order to make room for new stock the following items are offered
for sale at lowest ever prices. Everything must be sold so any offer
made will be considered.
N.B. VAT INCLUDED IN ALL PRICES!
USED HARDWARE
APPLE Il EUROPLUS £275
APPLE DISC DRIVES FROM £145
CONTROLLER CARD £40
PARALLEL PRINTER CARD £35
SERIAL PRINTER CARD £30
COMMS CARD £30
DIPLOMAT COMMS CARD £50
SMARTERM 80—COL £75.
DIGITEK 80-COL £75
DOS 3.2 CONTROLLER CARD £20
PAL CARD £25
ITT 2020 £195
ITT DISC DRIVE (APPLE COMPATIBLE)
£125
MONITORS FROM £35
VARIOUS PRINTERS FROM £145
APPLE POWER SUPPLIES £50
110V POWER SUPPLIES £30
GAMES SOCKET EXTENDER f4
ORBIT ACCOUNTS PACKAGE £200
APPLE Il CARRYING CASE £35
APPLE Il CARRYING BAG £5
COMPLETE APPLE II SPARES KIT INCL.
MOTHERBOARD, KEYBOARD,
POWER SUPPLY, DISC DRIVE, ALL
ROMS, RAMS & TTL CHIPS, SERVICE
MANUAL ETC. £750 OR WILL SPLIT
Ile PADDLES €15
APPLE II PADDLES £5.
Ile 80--COL CARD £50
APPLE I| AUTO-REPEAT KEYBOARD
MOD £10
MODULATOR £10
APPLEBAG £7.50
DUST COVERS FROM £4.50
DESKTOP WORK STATION WITH 4
SWITCHED 13A SOCKETS £20
NEW 13A PLUGS £7.95 for 20
SILENTYPE PRINTER £30
APPLE I] MANUALS £3 EACH
VERSAWRITER GRAPHICS SYSTEM
£60
KOALA TOUCH-PAD FOR Ile £45
ALF MUSIC SYNTHESISER £95
USED SOFTWARE (ALL ORIGINAL)
ADVANCED VISICALC £100
VISICALC £50
DESKTOP PLAN £15
FORTRAN £40
WORDSTAR £90
MICROSOFT CP/M AND MANUALS (NO
CARD) £25
WORD HANDLER II £25
STAR TEXT (40/80 COL) £50
MAGIC WINDOW (40 COL) £45
MANY GAMES HALF PRICE — ‘PHONE FOR DETAILS
SPECIAL OFFER FLOPPY DISCS
BULK PACKAGED (NO SLEEVES OR LABELS) DOUBLE SIDED/
DOUBLE DENSITY 5.25” DISKETTES. 5 YEAR GUARANTEE
100 OR MORE
10-99
£1,00 EACH
£1.25 EACH
SLEEVES AVAILABLE AT 10p/DISC EXTRA
ADD £1.80 P&P
ALL PRICES INCLUSIVE OF VAT
BARCLAYCARD
ACCESS
BERKSHIRE MICROS LTD — BRACKNELL (0344) 484423
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 25
Local Groups
Herts & Beds Group.
Come and join us.
October 2nd - Macintosh Demonstration. A
look at some of the software.
November 6th - Which DOS? A look at ProDOS,
Fast DOS, Diversi-DOS, etc. Why not bring
your favourite DOS ‘to tell us about?
December 4th - Communications. A look at
ASCII Express and Prestel editing in colour
on the Apple.
If you have any ideas for future meetings or
can contribute to those above ring Norah or
John Arnold on (ssi: sratbilll,
Berks and Hants Group.
This meets on the 2nd Monday of each month
in FURS Building, Reading University at
7.30, Please note the front door will be
locked at 7.45 for security reasons. There's
no bell!
Meetings commence with coffee and members'
problems, followed by a “formal lecture”
(how formal depends on the speaker!) and
question time, and will wind up with general
chat time when members can seek help or
merely chat to one another. We'll probably
adjourn to the nearest pub around 9.30.
We don't intend to be excessively parochial
and stick strictly to Apple hardware and
software - there's interesting software
available elsewhere on other micros too,
We brainstormed at the August meeting and
came up with a list of possible meeting
subjects, such ast
Shopping basket (add-ons, ctc), Assembly
language, Low-cost spreadsheets, Which
database?, Low-cost in-house hardware
repairs, etc., How the bit-copiers copy,
Inter-Apple Communications, How to avoid
costly errors, Parlez-vous Pascal(e)?, Other
languages, Word processors, Graphics, There
must be many other subjects of interest to
us all.
October meeting (8th) - Databases. What are
they? Some examples.
November meeting (12th) - Home servicing and
repairs. Tell us about that strange fault
and how you fixed it or ask how to fix one
you haven't solved yet. —_— Preventive
maintenance, rather than fault correction,
And so on.
WHERE'S THE FURS BUILDING?
Contact: Bob Mould, ‘if
(toon grb (Bh
Tied invaasieneald HRA
triage: Waedlly,
fh RTS. AUGER:
for a map.
peewrrerrerrrrrrrttrttrttttti titi iid
St Alb
Other addresses: ery, A405
O)
Herts Group meets at:
The Old Schoo! mt
1 Branch Road
Parkstreet Village Aaos
St, Albans oi Perk
Essex Group el a
Ist Wednesday 6
"Tree Top Hotel" Drench Re
Epping Rastett \\ ra
Essex Group wate St
Alternating 3rd Wednesdays
Havering College of Technology
Hornchurch
and
ITEC
Harrow
Contac
Abe Savant (fi) Wail) (47H,
MID-APPLE, for Birmingham and West Midlands.
Contacts:
Bill Watson on Hiiitinwili
or Mel Golder on (fi) ‘te
dl ( (HHH) 3
:
Kent Group is peripatetic
Check with Jim Panks on
or with Dougal Hendry on iit
mi)
nb
Croydon Group's meeting place:
The Shirley Poppy
Wickham Road
Shirley
Check with Paul Vernon on (lil
7 Bil
FORTH programmers do it on a stack.
Visicale users do it on spread sheets.
COBOL programmers do it with a lot of words.
LOGO programmers do it with turtles.
Pascal programmers do it methodically.
Page 26
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
Book Reviews
Title: Applesoft Language
Authors: Blackwood B. D. & Blackwood G. H.
Publisher: Howard W. Sams
Price: L11,85
Paperback, spiral bound, 9° x 6", 274 pp.
First publ, 1981, 2nd edn, 1983
Reviewed by Brian Whalley
The first edition of this book was briefly
reviewed for Hardcore in December 1981, but
it is difficult to know just how the second
edition differs from the first since there
is no comment in either the Preface or the
Introduction, and no special foreword to
this edition. The original review commented
on the lack of Index, and this has been
remedied. Surely this alone isn't the reason
for the price going up by just over 50%
(from the original £7.65) in only two
years?
George Blackwood claims in his introduction
that the book is for beginners, for those
who “want to learn how to program ... and
have no opportunity for formal instruction",
and who have "very little comprehension of
computer programming". The chapters are
termed "Lessons": Lesson 1 teaches the
reader to load and save programs to tape,
whilst Lesson 2 covers booting the disk
operating system, loading and _ saving
programs, and other DOS operations (such as
CATALOG, RENAME, LOCK). Each lesson starts
with a useful "Vocabulary" of the terms to
be covered, but a genuine beginner who needs
to learn the fundamentals may be feeling
somewhat confused even as soon as the second
page of Lesson 1, from reading the first and
last of the twelve definitions for this
opening chapter:
"CRT - This abbreviation stands tor cathode
ray tube. The picture tube in your
television is a CRT. The CRT can be used to
isplay the output from the typed-in input
to your Apple computer".
"VDM - This abbreviation stands for video
display module, which is an electronic
screen for displaying data or information",
The second definition in the Vocabulary
section for Lesson 2 would rapidly produce
indigestion in any but the most enthusiastic
of novice readers:
“DISK or DISKETTE - A magnetic disk is a
storage device that consists of a flat
circular plate coated on both sides with
some material (Mylar) that can be
magnetized. The Apple Il uses a_ single
density, soft sectored, 5 1/4 inch diskette
as its virtual storage medium.The isk
has a storage capacity of 118,000 bytes in
the 3.2 disk operating system, and 146,000
bytes in the 3.3 disk operating system. The
DOS 3.3 will store between 100 and 120 pages
of normal text..."
» and it continues with figures for
tracks and sectors and allocations for data
and the directory. The Vocabulary does not
define byte, sector or track, nor do those
words appear in the book's index.
The Blackwoods do appear to subscribe to
tidy screen displays, with details of HOME,
HTAB, VTAB and TAB as carly as Lesson 4.
Lessons 5 and 6 hurry the reader along to
descriptions and discussions of variables
and the precedence of arithmetic operators
respectively. Lesson 8 plunges the reader
into Relational and Logical Operators,
whilst Lesson 9 introduces Problem Solving
and Flowcharts - which seems a curious point
at which to introduce a definition of
"hardware":
"HARDWARE - This is the name for all the
physical units of a computer system. Hardware
is made up of the apparatus rather than the
programs".
Lessons 12 and 13 cover single and double
subscripted variables whilst Lesson 14 on
String Arrays helps us to print on the
screen various bits of the memorable
sentence “HI SUE" before we settle down to
the detailed flowcharting and code writing
to solve a real problem: "to input three
lines of variable length separated by a
delimiter (;) to allow any length of name,
any length of street number and address, and
any length of city, state and zip code up to
255 characters each". Is that immediately
clear? If so, then perhaps a misprint has
crept into this review: What, then, are we
to make of this curious book? To be fair to
the authors, there's a good deal of common
sense in it, and clear explanations of some
of the complexities of programming. To be
fair to potential readers, however, the good
material needs careful seeking, and there's
a great deal to confuse and dismay the
newcomer to programming. The semi-
experienced microcomputer owher could be
helped forward provided that he or she is
blessed with patience, and the ability to
tolerate some very curious bits of English
that are more Blackwoodian that American,
but this is NOT a beginner's book, unless
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 27
that beginner is very serious indeed and is
deprived of access to the many better
introductory books available to the Apple
user.
Title: Apple BASIC Made Easy
Authors: Gardner D. A. & Gardner M. L.
Publisher: Prentice-Hall
Price: £14.35
Paperback, 9" x 7", 246 pp.
Reviewed by Brian Whalley
This is an attractively produced book for
the beginner in BASIC programming. David and
Marianne Gardner are justified in their
claim that the book "will teach you how to
write BASIC programs on the Apple II or
Apple Il Plus" and that there is no need to
know anything about computers or to have any
mathematical skill. The newcomer with an
Apple, the Apple manuals, and the will to
follow the book carefully, can certainly
achieve the two goals that the authors set
down of learning to program well and having
fun doing it. There are some good diagrams,
and a sprinkling of cartoons which are
likely to appeal to the excited younger
programmer even if not so much to the
anxious adult!
The book starts fairly conventionally with
an introduction to the keyboard, PRINT
statements, and the use of NEW, RUN and
LIST. Chapter 4 has a quick look at
graphics, whilst Chapter 5 returns the
Treader briefly to hardware matters: the use
‘of the disk drive or the cassette recorder. The
topics which follow are found in any BASIC
programming book: variables, FOR... NEXT
loops, IF statements, sound effects and
subroutines, GOTO, strings and string
variables, and the rest. There are, however
some interesting features. Each chapter, for
instance, is carefully structured, starting
with an introduction to what it covers and
ending with a clear summary of what has been
learned, to which is appended a set of
exercises. The exercises are nicely devised
to provide interest for programmers of
pretty well any age or background, and offer
genuine problems without posing frustrating
difficulties. Many of them could be of
considerable value in any course in BASIC
programming, whatever make of system is
used, and are much more stimulating than
some other so-called exercises I've seen
perpetrated on beginners.
Another interesting feature is a description
of what the Gardners call "pseudocode",
which is in effect a form of flowcharting
but without its air of threatening
technicality. Examples of simple program
outlines are presented, along with a full
Program listing and a diagram to link the
two, for example:
LINE NO. PSEUDOCODE
5-30 Set the graphics screen and color
35 For repetition = | to 10
40-90 Bounce ball from left to right
100-160 Bounce ball from right to left
165 Next repetition
170-190 Reset text and clear screen
200 End
Smaller parts of programs are expanded in
pseudocode:
For DOT = 39 to 0 step -1
Plot a green dot in position DOT,O
Pause
Erase the green dot at DOT,O
Next DOT
It's not a new idea, but it's well used by
the Gardners, and not overdone.
Sound effects and hi-res graphics are well
Covered without getting too elaborate. There
is a useful chapter on PEEKS, POKES and
CALLS - the chapter summary consists of a
list of those specifically covered, but I
would like to have seen that supported by a
fuller list, perhaps as an Appendix.
The book does in fact have five Appendices.
The first covers disk initialisation and
program transfer, and the newcomer to disk
drives will find it useful in this easily
located position. Appendix B is a
shape-table generator which certainly works:
it includes routines for disk and cassette
Storage and recovery of shapes, though I'm
at a loss to understand why the routine to
DISPLAY a shape after BLOADing or SHLOADing
requires a back-track to Chapter 26, The
third appendix consists. of a clear
description of the order in which the Apple
carries out arithmetic processes, and an
explanation of scientific notation which is
clear if you are sufficiently motivated to
concentrate hard. The final two appendices
are a list of Reserved Words, and a Summary
of Commands which could have been improved
by including page references. There is a
comprehensive: if slightly patchy Index.
This is a useful addition to the books on
Applesoft programming. Some of, the sample
programs are rather unimaginative, and some
could work rather better, but that's true of
some quite expensive software! I would like
to have seen rather more attention given to
Page 28
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
good screen layouts, but that also is true
of many professional programs, For example,
it's disappointing and/or frustrating to.
find that the oft-used demonstration of a
Bouncing Ball performs merely across the top
line of the screen; to find line 120 listed
as "FOR PAUSE = | TO 25: REM NEXT PAUSE"
when "NEXT PAUSE" should be part of the
program (as in a Correct partial listing six
pages earlier); to find curious line number
Sequences such as 160, 162, 165, 170; and to
find the program using GOSUB 900 when Line
900 is a REM statement,
1 continue to be puzzled at the variations
in price amongst paperback microcomputer
books of similar size and quality of
production; this. one —is__ surprisingly
expensive. However, it is a book that most
beginners of any age would find both
instructive and interesting, and one from
which teachers of programming could garner
some useful approaches.
Title: The Apple House
Author: John Blankenship
Price: £13.95
Publisher: Prentice/Hall
Paperback : 6.5" x 9" : 153 pages
Reviewed by Jason W. Smith
If you ever dreamed of having your house
controlled by your Apple, then this is the
book to buy! It details how to use your
Apple in conjunction with various pieces of
hardware to control your home for you.
It makes very interesting reading for both
the technically-minded and the not so
technically-minded Apple owner, as it opens
up some very exciting possibilities tor you
and your Apple. After all, imagine talking
to your house and having it respond by
turning on or off the stereo or television
and such-like things. Wouldn't it be fun to
be able to have lights turned on as you
enter a room or turned off when nobody is
around? Maybe you have often thought it
would be nice to have a phone-answering
machine but didn't buy one because of the
financial outlay. It could be accomplished
using your Apple and two old tape recorders.
What about a real-time clock, burglar alarm,
speech synthesis and voice recognition. John
Blankenship covers all these topics in great
detail throughout this book to give a
complete and workable intelligent home-
control system which can all be controlled
by your trusty Apple Il.
All these facilities certainly sound very
exciting, but there always has to be some
minor requirement that you must fulfil, and
the requirement for this book is that you
should at least have some general knowledge
of electronics as a minimum, Many of the
pieces of equipment needed can be purchased
from various sources (a list of vendors is
given at the back of the book), but if you
happen to like construction projects, and
aren't too bad with a soldering iron, you
can save money by building some sections
yourself, Complete schematics are given tor
some of the more appropriate areas. There
are a few bits and pieces in the book that
cannot be purchased anywhere and if you want
them, you will have to make them yourself. The
author recommends a number of appropriate
books on the subject of hobby electronics
and the Apple J.
The home control system described in the
book has five basic functions. These are:
Voice request, Phone control, Security
Management, Event timing and the monitoring
of movement throughout the house. The VOICE
REQUEST module allows communication with the
computer using a wireless microphone. With
this module you can control the lighting,
ask what time it is, turn on the security
system, turn appliances on and off and much
more. The PHONE CONTROL module will turn the
Apple into an intelligent answering machine. It
also allows you to contact the computer trom
a distant location by phone and request
information on the status of your house when
you're not there or instruct the computer to
Perform some operation such as turning
lights on or off, The module for SECURITY
MANAGEMENT monitors doors and windows and,
because the system is intelligent, you could
have it phone a neighbour if it detected an
intruder. EVENT TIMING provides a means of
establishing a list of events that need to
occur on an ongoing basis. For example, the
Computer might wake you at seven o'clock on
weekdays but let you sleep until ten at
weekends. The heating should be turned down
or off when no-one is home and then back on
just before someone arrives home. This
information is held in tables which can be
edited depending on how your lifestyle
changes. The INTERNAL MOVEMENT module
watches various sensors to keep track of
where people are in the house. This
information is used to decide what lights
should be turned on or off as people enter
or leave rooms, John Blankenship states that
it is possible to use these modules alone,
all together or with the addition of some of
your own, This is due to the flexibility of
the software provided, which is written in
Applesott,
The book is divided into four parts, Part 1
NEW DERING 10MByte
HARD DISK DRIVE
FOR APPLE COMPUTERS
= only £1095
10 MBytes formatted capacity
4 times faster than floppies
Full back-up CP/M software included
Runs with DOS 3.3 and CP/M
Error-free data transfer
Up to 5 MByte size CP/M files
Contract maintenance available
. new DERING HDI hard drive offers a massive 10 MByte storage
capacity for all Apple'and Apple compatible computers at an unbeatable
ia Price. |t comes complete with Keele Codes CLIP back-up and compress
software for CP/M,
gi or 7" Gene ‘ : card, controller, power supply, cased ready
lex IA OR, Attn. It is the work horse of any system.
Page 30
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
is an introduction and an overview of the
entire system. Part II describes all the
hardware that will be required to make the
system operational. Pieces of hardware that
cannot be purchased are examined in greater
detail than off-the-shelf items, Part Ill
pertains to the actual program coding used
to implement each program module. I must say
that the main BASIC program is well
structured and easy to follow, but I do not
like the idea of program lines ascending in
increments of one, two and sometimes five as
this could be rather tiresome to type in.
Luckily you can purchase an un-protected
disk with all the software in the book for
$12.50, Part IV shows you how to put the
hardware and software together to create
your Apple-controlled house.
In summation I must say that I did find the
book clearly written with no obvious errors
in the text or in the programs supplied. This
book has inspired me towards the idea of
having the Apple controlling various things
in my home. It is not a very large book at
only 153 pages, but it certainly contains a
great deal of information on turning your
house into "the first Apple house on the
block".
Title: Using the UCSD p-System
Authors: K.Buckner, M. J. Cookson,
‘A. 1. Hinxman, A. Tate.
Publisher: Addison-Wesley Publishing Co.
Price:
3
Reviewed by Adam Broun.
This is a book aimed at "guiding the
complete beginner through aspects of the
(UCSD) system necessary for it to be used
safely and sensibly". It deals with the UCSD
system as a whole, examining the filer,
editor, and other parts of the system,
without being too specific about either
language or machine. Of course, when one
sees UCSD written somewhere, mentions of
Pascal are never far behind, and the second
part of the book relates to Pascal, insofar
as it applies to the UCSD system.
My biggest worry about the book, which
stayed with me the whole time I was reading
it, was that I could never be sure at whom
it was aimed. The first chapter is entitled
"Basic concepts of computing" and goes on to
provide a fairly standard, if rather
convoluted introduction to the concepts of
information storage, memory, etc., including
explanations of how to put disks into
drives. Subsequent chapters go on to using
the system in great detail, and throw jargon
about like it was going out of style. For
‘example, in chapter 4, which our computer
novice has been told to turn to in order to
adapt the system to his computer, he is
casually told of "A miscellaneous
information file (SYSTEM.MISCINFO)
containing the terminal character sequences
needed to perform various output operations
and the character sequences to be
interpreted on input as requesting some
operation".
The book continues by giving thorough, if at
times confusing, expositions of the rest of
the system, and includes a few real pearls
of wisdom, such as hints on how to undelete
files. However most of the information
covered is also in the standard Pascal
manuals, and usually the manuals are a good
deal easier to read, especially since they
are Apple-specific. The book attempts to
cover USCD implementations for several
machines.
To sum up: the book tries to do something
very difficult, and probably fails - that
is, to get a complete novice to computing to
start off on the UCSD p-system. It may,
however, be useful to the more experienced
user in providing a condensed summary of the
system,
Finally, a warning to those who still have
the old version 2.1 system: Many of the
features described in the book are not
available on the older systems, and a brief
summary of these is given in an appendix.
Keyboard
lowercase Mod.
Apple Il+ keyboard - Lowercase modification.
by Dick Menhinick.
Some months ago, I reviewed a book called
‘The Apple Il Circuit Description’ by
Winston Gayler in Hardcore. In this review
1 mentioned a section in the book which
described how Apple had allowed for upper
and lowercase operation in the Rev 7 (two
part) keyboard encoder but had tailed to
tell anyone about it!
Since then, a number of BASUG members have
approached me and asked for details on how
the Apple Il+ keyboard can be modified to
make use of this feature so I decided to
modify my own keyboard and write the process
up for Hardcore.
The KR3600 chip which Apple use in the
October 1984
HARDCORE - The Journal of the British Apple Systems User Group
Page 31
keyboard encoder has 9 outputs, of which
only 7 are used, Bits 5 and 6 are normally
the two most significant bits of the
keyboards output ASCII code. However, this
chip has been preprogrammed with two sets of
codes, and if bits 8 and 9 are substituted
for bits 5 and 6 respectively, the other key
code set may be accessed.
If you remove and examine your keyboard
encoder board and compare it to
figure 1, you should be able to identify
the two 'bow-ties' or — 'butterfly-pads!
adjacent to the RESET/CTRL-RESET slide
switch. These sit above and below six holes
which are laid out to accept another slide
switch of the same type as the RESET switch,
Examination of the circuit board, shows that
the two ‘butterfly-pads' connect the data
bits 5 and 6 with the outputs 5 and 6 on the
encoder chip. However, if the other two
contacts (the ones not connected to the
‘butterfly-pads') are examined, you will see
that these are connected with the encoder
chip outputs 8 and 9,
Now, if you carefully cut the copper track
between the two ‘arrow-heads' of both
butterfly pads = and fit a suitable
double-pole double-throw —(d.p.d.t)_ switch
you will have the facility to switch between
the standard Apple 'uppercase-only'
keyboard, and a full upper and lowercase
keyboard where the 'shift' keys work
correctly! figure 2.
I fitted my switch off the board using long
connecting wires, so that 1 could mount it
through the metal baseplate of my Apple just
under the keyboard. This removed the
Necessity to open the lid cvery time I
needed to change the position of the switch.
Software-Support. Of course, as soon as
I had modified my keyboard I wanted to try
it, so, after carefully reassembling the
machine | switched on, loaded DOS and tried
to type some BASIC lines in lowercase. It
didn't. work!
"Rats! I must have the switch in the wrong
position" [ thought. I switched to the other
position, 1 tried a couple of PRINT
Statements - it didn't work!
44% 4!@** Apple!!!" 1 expleted!
One of my greatest strengths is my
unswerving ability to recognise when I am
beaten. So I gave up and did something else.
A few days later, I decided to have a look
at the latest messages on the Bulletin
Board, Out came my trusty ‘ASCII Express!
disk and | booted up, dialed 0742 667983 (as
it was) and waited. Up came
the header and the greeting, and the
acknowledgements, and the waffle and ... and
we and... at last came the invitation to
log in. I typed in my name.
IT WAS IN LOWERCASE ON THE SCREEN!
The dreadful
Berk!" I mused.
thought then struck..."¥ou
In case you are now wondering what the hell
I am going on about, I should point out that
the good-old-trusty Apple Monitor keyboard
input’ routine converts all lowercase
keyboard codes into uppercase! Of course
this routine is used by Applesoft which
explained my earlier frustration.
The solution seemed too easy! So you will
find, that unless you are using a
case-sensitive screen editor like P.L.E you
cannot put lowercase prompts into your
programs! However, if you have a GET
Statement or are PEEKing the keyboard
register you will get the lowercase you
richly deserve.
The following programs will accept lowercase
from the keyboard. This list only mentions
the programs that I have personally tried -
there are undoubtably many more.
Mousepaint, ASCII Express, P.I
Magicalc (The Spreadsheet),
P.PS.file, P.F.S.reports.
o9 GPL Bay
icro-Painter,
The two illustrations were drawn
using
‘Mousepaint! on an Apple I+.
Cut putter fu
at both post!
figs
Eom oe eos oe a
_oUpper lowercase mode
[__p Original ‘caps-tock’ mode
tone
Page 32
HARDCORE - The Journal of the British Apple Systems User Group
October 1984
Children Software
LETTERS AND EARLY READING.
by G.G. Wood.
The recent challenge by Norah Arnold cost me
many late evenings. Her request for
children's programs encouraged me to
complete a program for letter awareness and
early spelling.
1 started nine months ago with the Big
Letters program by lan Trackman which came
‘on my Basug Introductory Disk. It was easy
to add a patch so that any key pressing was
echoed on the screen as a large letter. My
three year old daughter was very happy
pressing keys and recognising the letters:
"M for mummy, D for daddy", she would shriek
after finding them on the keyboard. The
initials of her name all gave great
excitement and real learning. She rapidly
became fluent in all the letters, and spent
many happy sessions on my knee gaining
confidence and reinforcement of her Alphabet
Books. She still loves to type random letter
groups and ask me to say them.
"BUT", said my wife, "what about lower case
letters", "What indeed", 1 answered, as
Ian's program is only upper casc.. Well,
the first modification had been easy and lan
used a good modular layout with plenty of
comment, so fond parent decided to further
child's education.
First figure out the method of encoding
letters (it's not x,y as a mathematician
would assume), then develop a keyboard
routine which emulates the case switching
method of apple writer, then realise I need
descenders so extend the letter array trom
5*7 to 5*8, then selective erase to stop
descenders interfering with the line below. lan
really knew what he was doing to implement
only upper casel!
This took many tong evenings and somewhere
on the way 1 got fed up with the 30 second
wait while the program loaded its arrays
every time it was RUN. This turned into a
real challenge, | finally solved it using
the keyboard value as a pointer in the
‘expression:-
ON key
Showing the first 100000 of 153023 characters.