Text content (OCR)
|
hard core
THE JOURNAL
OF THE
BRITIGH APPLE
SYSoTeMms
USER GROUP
TUNE 1732 £1 VOLUME 2-No. 3
—_——
Page 2
HARDCORE - The Journal of the British Apple Systems User Group
Tune 1982
Business
Software
Recreational Software *
* Level 1 Service Centre
Supplies * Accessories
BOOKS
MORE Arrom
MICROSOuURCE
from the authors of
BENEATH APPLE DOS
# companion volume:
BAG OF TRICKS
which comes with # disk of programs. The disk contains 4 programs which are
described in detail in the comprehensive book. There is new information on DOS
nd hendholding tutorials to tke you through the use of the programs toe
Sinks, change actor ordering, etc. Much more description than BENEATH Af
00S. and easier to understand. Tha programs are:
1. TRAX dumps, examines tracks, allows you 0 look ot errors and protected
2 oy reformate one or more tracks and allows more ecient use of the ask
3 possibly the best sector editor on the market. Can be used to iranster,
DOs CPM or PASCAL hi
ALEDCAT ovtconetes bre provees of repeieing 8 Garnsged dik cetelogue, with or
without user intervention.
‘The book may be useful on its own; the disk is invaluable. Together they are not
Only a tool. but also an educat the workings of DOS
And the price is £27 including Pt
“THE POWER OF VISICALC”
VISICALC is one of the most exciting developments in computing. The manual is
{hick and meaty. but whan you hava worked through it and mastered the use of
this new language, you have # powerful too! st your disposal
‘Now with THE POWER OF VISICALC. there it » book which takes you through 2
of sxorcises on various aspects of VISICALC. which allows you to toliow
the area ‘of VISICALC functions, and apply them to specific problem solving
teamsamn
you didn’t
‘Ail exercaee ere stp Dy stp with explanations ax wall as printouts of the screen
‘8 you should see
ee FOWR CE VIAL come £8.90 nc post & packing
[aes mee tome oF, or tna oxt now 20 vee pers of
Professional
J
For everything qd as ring
Lut Computer Services Lid.
108 THE PARADE HIGH STREET WATFORD WD1 2AW
Telephone: Watford (0923) 29513
Courses °* Pascal
Interfacing * Cromemco Systems
Utilities * Colour Monitors
Enthusiasm * Sat
Open Tues
INTERFACING YOUR APPLE
Two books for extending your APPLE to interface with the
outside world,
APPLE INTERFACING by Titus, Larsen and Titus
describes circuits and the controlling software in BASIC
to allow you to build control devices, monitor external
events, build communications devices, etc. After you are
taken through the principles of interfacing to the 6502
processor, there is detail on specific problems of
interfacing with the APPLE, details of the APPLE 1/0 ports
and then 16 experinents covering Input and Output ports, D
to A and A to D conversions etc,
Price including P & P £8,30
ADVANCED 6502 INTERFACING by Holland
Practical quide to design techniques and actual circvits
for almost any situation using computer control. Covers
1/0 port design, serial communications, timers and timing,
A to D and D to 2 conversion, data acquisition, noise
illinination,
Includes comprehensive quide to 6502 family including
technical specs,
Advanced solutions to complex problews are given in an
easily understood manner, with clear and comprehensive
explanations.
Price including P & P £11.20
ALL PRICES INCLUDE VAT UNLESS SPECIFIC MENTION IS MADE. ALL PRICES
INCLUDE P&P
MICROSOURCE fei sieet
Tel: Park Street (0727) 72917
June 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 3
hardcore
THE JOURNAL OF
THE BRITISH APPLE SYSTEMS USER GROUP
P.O. BOX 174 WATFORD WD2 6NF
EDITED BY DAVID BOLTON
BRITISH APPLE SYSTEMS USER GROUP
COMMITTEE
FRANK KAY Chairman
JOHN SHARP Secretary
DAVID BOLTON ‘Treasurer
JOHN RODGER Librarian/
Information Officer
JOHN ROGERS Software Librarian
TONY WILLIAMS Membership Secretary
FRAN TEO Events Organiser
BANKERS
National Westminster Bank Ltd.,
Brompton Square, London SW3 1HH.
MEMBER OF THE
INTERNATIONAL APPLE CORE
COPYRIGHT (C) - The contents of this journal
are copyright of the British Apple Systems User
Group and / or the respective authors. However
permission will normally be granted for
non-commercial reproduction by user groups
affiliated to the International Apple Core,
provided the author and source are properly
credited.
The opinions and views expressed are those of
the various contributors, and are not necessarily
supported by the British Apple Systems User
Group.
CONTENTS
4 Editorial
4 Game Review - Snoggle Stuart Morley
5 Local Groups
6 Beginners Page John Sharp
7 Epson Printer Page Quentin Reidford
11 Now you see itu. Peter Wicks
12 Random Tiling R.A.Fairthorne
13 Integer Basic John Sharp
15 So What’s a Psuedo-Opcode Tan Trackman
18 Using DOS From the Monitor & in Machine
Code John Neenan
21 Personalised Disks Rex M.F.Smith
22 Write-Protect Tabs No More! Jurgen Wolda
23 Polishing the Apple Peter Blair
31 Shape-Draw Continued Peter Cave
33 Reader’s Letters
39 Applesoft Surgery Sharat Munjal
40 How to Supercharge your Apple Richard Teed
41 Append Hedley G Wright
43 Updating the DOS 3.2 Manual David Bolton
44 Star Trek Instructions
Cover Illustration - Some examples of the output
from R.A.Fairthorne’s RANDOM TILING program,
featured in this issue,
Page 4
HARDCORE - The Journal of the British Apple Systems User Group
June 1982
EBRITORIAL
Looking back over the eight issues so far of
HARDCORE, there has been a consistent trend of
improvement in the size and quality of the
magazine in general, There has, unfortunately,
also been a consistent trend of deterioration in
the size of the editorials, as deadlines loom with
persistent, if not monotonous, regularity. Both
these trends, I am pleased in the former case and
ashamed in the latter case to say, continue!
David Bolton
GAME REVIEW
2 KK Kk i oi ok 2 2k ok
SNOGGLE
2 KK 2k ike 2k ok
BY STUART MORLEY
Snoggle is a fast hires arcade game for
1 player, when the disk is booted on
either a 13 or 16 sector Apple the
program starts by issuing an attractive
title page, as this page is displayed
the main program loads, to the sound of
about
strange clicking noises. After
15-20 seconds the main title page is
displayed and the game commences. The
object of the game is simple , the
(denoted by a round object with a
and closes) has to
small maze as shown in
puckman (player) is
steered by four keys :- A, Z,<-3->
Up, down, left,right respectively. The
puckman must eat all of the dots in the
maze to be allowed to proceed to the
next level. However to make the game
more difficult four ghosts also inhabit
the maze, which may sound alright, but
they have a tendency to eat you if you
are not careful and bump into them !!!
You do however have at your disposal
four dots that are placed in all four
corners of the screen. These help in the
following ways : If you travel over
these dots then the ghosts become almost
invisable for about 5 seconds in which
player
mouth that opens
travel around a
the picture. The
time, if you manage to bump into them,
you eat them (it makes a change for you
to eat the ghosts - not be eaten !!!).
If you manage to eat the ghosts then you
score points - 200pts for the first
400pts for the second 800pts for the
third and 1600pts !! for the fourth.
However if you do manage to get the
better of them they will still be reborn
again in the centre of the maze. The
game consists of seven levels each
represented by a fruit which also
appears near the centre of the maze at
random times allowing the puckman to eat
it and receive more points. The first
level is fairly difficult and after
having the game for more than two months
I have still not managed to get further
than the * SECOND’ level with only
10800pts!!!. The documentation does say
that at first the direction keys aren’t
very responsive, this however as
explained in the manual is due to your
timing, you will after 10 or so games be
able to handle the puckman much better.
I have found that out of all the games I
have I always seem to come back to
Snoggle & never seem to either beat it
or get bored with it.
If you are frustrated by programs that
are not easily mastered then don’t buy
Snoggle !!!
Clee - lore teeters
3 eee ee PC CET HE CCC OB C+ OS
| t+? * +. + *
of . [| of +r ee
: :
rah zal: i
RAO Tor
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 5
LOCAL GROUPS
BASUG SOUTH LONDON GROUP
Report by Tony Williams
LETCESTER APPLE USERS
GROUP _ FOR HELP AND SUPPORT
(L.-A2U.GeHeS)
FFilisted to BASUG)>
This is a thriving group of lively Apple Users
which started nine months ago. With our
increasing membership we have now outgrown our
present premises at the ‘Leicester Computer
Centre’ and from 7th April 1982 we have been
meeting ati
The Winstanley Arms
The Glade
Narborough Road
Leicester
(Nr M1 Junction 21)
Our meetings vary in content and include
interesting discussions and speaklers,
demonstrations of software and "Help Forums",
Members’ facilities include (embryonic) software
and text libraries and discounts on computer
products,
If you are a BASUG member or an Apple User
living in the East Midlands area you would be
welcome at our meetings which start at 7.30 pom,
on the ist Wednesday of the month.
If you require further information this can be
obtained from the Secretary}
Hazel Brown
Bide Die
or
Mike Preston (Chairman) Tel. #774 a4?
CROYDON APPLE USER GROUP
May we through you kind offices provide further
details of our Group? We meet at 7.00 p.m. on the
2nd Monday of the month,
We are all professionally involved in Apples or
ITT 2020's, nearly all do some programming, but
are not impartial to producing and discussing
games programs, Recent illustrated lectures
have been on Structured Programming, Databases
and Apple Comms.
As our venue is still unsettled, readers might
care to phone me at il=*?? TH eveninas for
details,
Paul Vernon
Hon Sec,
Eagle-eyed basuggers will at once have spotted
the subtle renaming of the Raynes Park Group.
Members recently did a quick tally of themselves
and concluded that lo! they did not come from
South West London at all - but from all over,
actually. No shillyshalliers they, the modest
title of "South Landon" was assumed forthwith,
Meetings will continue to be held in the
Raynes Park Methodist church.
Worple Rd
Entrance 2nd door up Tolverne Rd
News in brief, Warren Avery has bowed out as
Chairman after a year or so’s valiant and selfless
service. Into his shoes stepped Michael Leeming,
Tony Freedman is Hon Treas. and Neil
Stephenson Secretary. I think, An Organized
bunch this lot. They already know their
Programme through to December! And here are
the dates you need to know?
8th July: Printers
9th Sept! Microcomputers in Education (Jim
Brannin)
14th Oct} Communications and Networking,
11th November: What do I do with my slots?
(ie. peripherals and that)
?th Dect Games.
South London has stabilized its meetings to the
second Thursday in every month, except August,
Neil Stephenson has promised to write a round up
of reports on meetings already held, including
Ian Trackman’s "Ins and Outs of Machine Code"
presentation on May 13,
B.A.S.U.6
SOUTH LONDON GROUP
Raynes Park Methodist Church
Worple Road
Entrance 2nd Door Up Tolverne Rd.
2nd Thursday Of Each Month at 7-30 PM
10 June BASUG Software Library.
8 July Printers,
9 Sept Micros in Education.-Jie Brannin.
14 Oct Communications and Networking.
11 Nov What Do I Do With My Slots.
9 Dec Games.
Page 6
HARDCORE - The Journal of the British Apple Systems User Group
June 1982
EEGCINNERS FACE
by John Sharp
At the end of the last Beginners Page, I posed
the problem of printing the letters of the
alphabet in pairs, AZ BY etc, Before going that
far, how are we going to print the alphabet at all
using a loop. We want to say:
PRINT "ABCDEws.WXYZ"
and the APPLE does not allow loops like
10 FOR N$ = "A" TO "2"
20 PRINT N$
30 NEXT N¢
FOR=NEXT loops only work with numbers, as the
computer can only work by countina, so we have
to find a numerical code for the letters.
APPLESOFT (but not INTEGER BASIC) has a
command to convert numbers to letters {-
CHRS(N) where N is a number or numerical
variable, IF N= 65 then CHR$(N) = "A" and so on
up to 90 when CHRS(N) = "2",
So, to print all the letters we have the simple
program
10 FORN=45 TO 90
20 PRINT CHR$(N)
30 NEXT N
If we make line 20 PRINT CHR$(N)} they will
print next to one another on the same line,
Now when we want to print not ABCDEF,.., but
AZ BY CX etc. we have two movements of the
numbers so to speak. We have to find a way to
allow the number to increase to give us the A to
Z part and at the same time decrease so that we
can run backwards, The decrease is regular} if we
look in terms of the numbers we see {-
AZ CHR$(65);CHR8(90)
BY CHR#(66);CHR#(89)
' .
:
The numbers are increasing by one in the first
column and decreasing by one in the other. The
numbers are not related to one another or are
they? If you look closely you will see that 45 +
90 = 155 as does 44 + 89 and so on, So the general
case would be CHRS(N) } CHR$(155-N),
Thus it is really quite easy, We replace line 20 in
the above program by
20 PRINT CHR$(65 + N)} CHR$(155) - N
Thanks to Vernon Quaintance for that solution,
There is another way to use a similar loopi-
10 FOR N=0 to 25
20 PRINT CHR$(65 + N)} CHRS(90 -N)
30 NEXT
Yet another way would be ‘-
10 LET M = 92
20 FOR N= 65 TO 90
30M=M-1
40 PRINT CHR$(N); CHR$(M)
SO NEXT N
This isn’t too elegant in this particular case} the
other two are better, However, if the two are not
connected we might need to use this sort of
approach e.g,
10 FOR N =1 to 10
20M=M+2
30 PRINT CHR$(N); CHRS(M)
40 NEXT N
So loops require juggling with numbers. A
training in mathematical puzzles gives one a
distinct advantage in such programming, By
seeing such connections, very succinct programs
can be obtained.
Let’s now build up a set of loops to show what I
mean.
Suppose we wish to "draw" a checkerboard using
the screen in the text mode, It would be similar
on the GRAPHICS screen,
We will use a character "*", As the screen is 24
characters high, we can use blocks of 3, Starting
with three /#’s means a loop thus}
200 FORN=1 to3
210 PRINT "*";
220 NEXT N
Now if we build three rows of these by adding:-
150 FORM = 1 to3
250 NEXT M
Remember that the loop for M must be outside
that for the N loop,
But wait a minute , this prints all in one line,
since line 210 ends ina";".
We need to send a "go back to the next line”
command before going on, That is outside the "N"
loop but inside the "M" loop. We can do this by
addingi-
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 7
230 PRINT
Now we wish to move these blocks about the
screen leaving a gap of three spaces. Adding the
lines}-
100 FOR L= 0 TO 18 STEP 4
300 NEXT L
The step 6 makes sure that 3 spaces are added as
well.
To make the movement across, we can make use
of the HTAB command instead. BUT we must
make sure that we travel the distance moved by
the N loop as well as that of the L loop,
otherwise we print on top of one another. If we
add the movement down with a VTAB, we can
remove the PRINT command in line 230,
Line 10 has been added to see the picture
cleanly, and slow it down to see exactly what is
going on as the computer is moving too fast for
the eye,
10 HOME : SPEED = 100
100 FORL=0 TO 18 STEP4
150 FORM=1TO3
200 FORN=1TO3
205 HTABL+N
207 VTAB M
210 PRINT "#";
220 NEXT N
230 NEXT M
250 NEXT L
Now we need to produce the rows, If we add
80 FOR K = 0 TO 21 STEP 3
400 NEXT K
and alter line 207 to VTABM+K
This gives a downward movement, but not the
familiar checkerboard, We need to check if we are
on an odd or an even row, to see whether we
start at the end or at the next block along. So
adding a some new lines 95/90 and altering 100
to take account of the changes gives the final
program as follows,
10 HOME; SPEED = 100
80 FORK =0 TO 21 STEP 3
85 IF ( (K/2) - (INT k/2 + .005) > 0.4
THEN A = 0: B = 18: GOTO 100
90 A=3iIB=21
100 FORL=A TO BSTEP4
150 FORM=1TO3
200 FORN=1TO3
205 HTAB N +L
207 VTABK+M
210 PRINT "#"}
250 NEXT M
300 NEXT L
400 NEXT K
450 IF PEEK (-16384) < 127 THEN 450
Thus it is quite a short program, if tackled in the
right way, with the computer doing the work, I
was once asked ta show sameone how to do this,
(not an APPLE) because despite having a 4K
machine, he had run out of memory!
What about that last line? Well leave it out and
see what happens,
EPSOM PRINTER: PAGES
by Quentin Reidford
/To ease the burden on John Sharp and the other
stalwarts in the deep south Quentin of Sheffield
has volunteered to take up writing the Epson
Pages./
As John Sharp mentioned in his article in the
February ‘82 ‘Hardcore’ the main source of
erratic printing problems lies in the use of
different PROMS on the interface card, My card
uses the ‘D’ version of the PROM and has worked
‘by the book’ - and this includes the
EMPHASISED driver submitted by John. Some
curiosities, however, include the use of TABS in
print statements. I find that I have to use the
TAB (n) mode - counting the value of (n) from the
last printed position on that line, plus the length
of any string on that line. An example of this can
be found in the useful utility by John Sharp in
the Feb, issue - the Catalog Label Printer. This
requires a variable (T) to allow tabbing,
685 T = LEN (NAME$(Z))! REM i
Tabbing constant on first field
690 PRINT NAME#(2); TAB( 80 - T)
jNAMES(Z + INT (N/Z) + Pi
Perhaps the main disappointment in the MX-80,
however, is in the distortion of graphics. The
printer, in its F/T 2 quise, will, as you know,
dump either of the Hi-res screens through
software, On the F/T 80, however, the gearing of
the print head is such that it travels too quickly
resulting, for instance, in ellipses rather than
Circles being printed, Even more irritating is the
inability to print the whole screen in the
EXTENDED mode, If anyone has any ideas that
they wish to share, PLEASE write in.
Perhaps the most newsworthy item is the
availability of the LCC 8132 EPSON EPROM from
Leicester Computer Centre,
Page 8
HARDCORE - The Journal of the British Apple Systems User Group
June 1982
This EPROM is a direct replacement for the
PROM in location 4a on the Epson Apple
interface card, I have not had time to make a
thorough review of its capabilities in this issue,
but briefly it will allow the Epson ta behave with
Programs like VISICALC, DB-MASTER and,
apparently, APPLE-SPELLER,
This is because the Prom obeys normal printer
conventions e.g, - Ctrl I 80 N and can therefore
be recognised by the software. Good news for
those who have the misfortune of having DB
MASTER and an Epson, At approx. £18,00 + VAT
this EPROM is cheaper than going out for an
Centronics,
Other features include the use of CTRL
characters instead of POKES for graphics dumps.
CTRL IG2EI <RETURN>, for instance, will
dump the contents of <G>raphics, page <2>,
<E>xpanded and <I>nversed — easier to remember
too,
The PROM comes with a slim plastic—-bound
booklet explaining the options and changes and
complete with listings for three demonstration
programs,
I have had this one in for about four hours and I
am now forced to think of plausible excuses to
give my wife that it is an essential
acquisition,,.,Seriously though, I would think that
it has to be a must, especially for those with the
Revision ‘C’ and earlier Epson PROM,
The other EPSON utility program which is on the
market is OMNIFONT, This allows the use of all
the fonts from the DOS TOOLKIT within a
printing program, with up to four of those fonts
within the same program. The disc contains a
modified driver for Apple Writer allowing the
user to print a letter in any font, either your own
or one from the toolkit. Obviously to make use of
the whole package you require both Apple Writer
and the Toolkit. The software supports
EXTENDED, CONDENSED, UNDERLINED and
INVERSE printing, although you can get some odd
results trying to justify in the extended mode,
The BASIC program’s ANIMATRIX module
enables the user to print out logos or symbols,
although you need to use the VARIABLE LINE
SPACING alaorithm to ensure that all the pieces
Join up, Any of you who have experienced the
brain-ache in converting Binary to Hex. for
Bit-image printing will appreciate this feature...
Initial versions of the program had either a bug
Or possibly only an unusual logic switch which
caused the Applewriter section to crash
Happily, later versions have cured this and the
Program works beautifully, although using the
standard program ie, without Apple Writer
option can be hard going!
Finally, for those who were lucky enough NOT to
experience any difficulty in using the ENHANCED
driver. If you have been using it to print from a
constant address of 300 at option ‘J’ then you
will find that if you change ‘J’ back to C100 your
file will be printed out in CONDENSED mode,
However it will only work AFTER you have
PRINTED in Enhanced mode first. And don’t
forget to alter your right margin !.4
Please write to me c/o BASUG and I will try to
answer any problems. PLEASE send any solutions
to problems that you have had and managed to
Oovercomer..If you DO have a problem then be
sure to include the DOS version you use and if
Possible the PROM version in your card,
My thanks to MICROSOURCE for allowing me
review copies of both OMNIFONT and the LCC
8132 EPSON EPROM.
There was a mistake in the listing of
CATALABEL program by John Sharp in
February’s HARDCORE, which a number of people
Picked up. It concerned the DATA in lines 130 &
138. I have added a few enhancements as well,
see lines 175/180/630/685/720/745} the revised
listing isi-
a: LISt
72 PRINT CHR (18) PRE Of INE
0: CALL 1002
100 DIM NAME$(105)
110 TEXT + HOME
120 D& = CHR (4)
130 FOR N = 8192 TO 82232 READ M
+ POKE N,Mt NEXT
132 DATA 169,32,160,10,32,181,1
83,96
134 DATA 0,0,1,96,1,0,17,0
136 DATA 27,32,0,33,0,0,1,0
138 DATA 0,94,1,0,1,299,216,
0
140 HTAB 15% PRINT "CATALABEL"
150 HTAB 8: PRINT "CATALOG LABEL
GENERATOR"
June 1982 HARDCORE - The Journal of the British Apple Systems User Group Page 9
160 ISECT = 82073ICMD = 8214: IBUF A470 LH$ = STR (LGTH)$L = LEN ¢
P= 8211 LH)
170 REM XXxREAD CAT INTO MEMKXX 480 FOR W = 0 TO 2 —- LiLHs = "0"
175 TEXT ? HOME ¢ VTAB 10% PRINT + LH$? NEXT
“ENTER TITLE OF DISC * "3% INPUT 4909 NAMES(N) = NAMES(N) # "+ 1
TTS Hwee"
180 VTAE 10% CALL - 868% PRINT 500 FOR M = 0 TO 30
"SET UF PRINTER AND SWITCH O 510 E = PEEK (A +3 +S «x 35 + M
N-THEN="3 PRINT "PUT DISC IN )
DRIVE AND PRESS RETURN": GET 520 F = PEEK (A +4 +9 * 35 4+ ™
A$: IF A < > CHRS (13) THEN )
180 530 IF E = 160 AND F = 160 THEN
190 TEXT t HOME $ VTAE 10: HTAB 570
13% PRINT "GETTING CATALOG" 540 IF E = 0 AND F = 0 THEN NAME
200 CMD = 1%BUFF =.33:SECT = 15% POKE $(N) =" "3 GOTO 600
ICMD,CMD 550 NAMES(N) = NAMES(N) + CHRS (
210 POKE ISECT,SECT: POKE IBUFP, —)
BUFP 560 NEXT M
220 CALL 8192 570 NEXT $
230 SECT = SECT - 1:BUFP = BUFF + 580 NEXT R
12 IF SECT > = 1 THEN 210 590 PRINT
240 TEXT ? HOME $ VTAB 10% HTAE 600 TEXT $+ HOME $ VTAB 10? HTAE
13} PRINT "SORTING CATALOG O 10? FRINT "SENDING CATALOG T
ut" 0 PRINTER"
250 VTAB 20 610 PRE 1% PRINT CHR$ (0)! PRINT
260 REM xxx FILE INPUT ROUTINE CHRE (0)
FROM MEM TO ARRAYXXx 620 POKE 1657,100
270 B = 8459 630 PRINT CHR* (14);" CATALOG }
280 N= 0 "3TT$? PRINT CHRS (15)
290 FOR R 0. TO °L4 640 N= N= 1
300 =F 650 BD = N/ 2-=— INT (N/ 2+ 40
310 02)$ IF BD > «1 THEN P1 = 1%
320 GOTO 6703 REM &*x«xODD NO OF
330 PRINT "."$ FILES Kx
340 N = N + L3NAMES(N) =" " 660 FL = 0% REM xxx EVEN NO OF FI
350 IF PEEK (A + § « 35) = 255 THEN LES
N= N= 13 GOTO 570: REM xx 670 REM x*KACTUALLY PRINTOUT#«®x«
« IF FILE DELETED THEN IGNOR 680 FOR Z= 1TON/2Z
Exxx 685 T = LEN (NAME$(Z))? REM xXx
360 TYPE = FEEK (A + 2 + § «x 35) TABEING CONSTANT ON FIRST FI
ELD «xx
370 IF TYPE < 128 THEN NAMES(N) = 690 PRINT NAMES(Z)$ TAE( 80 — T)
NAMES(ND + " "3 GOTO 390 NAMES(Z + INT (N / 2) + PA
380 TYPE = TYPE — 128%NAME$(N) = )
NAMES(N) + "x" 700 NEXT
390 IF TYPE = 0 THEN NAME$(N) = 710 FOR M = 1 TO St PRINT $ NEXT
NAMES(N) + " T"
400 IF TYPE = 1 THEN NAMES(N) = 720 PRINT CHR$ (18)3 FRE Of INE
NAMES(ND +" I" 0: CALL 1002
410 IF TYPE = 2 THEN NAME$(N) = 730 TEXT ? HOME ¢ VTAB 10% CALL
NAMES(N) +" AN ~ 8682 INPUT "DO YOU HAVE A
420 IF TYPE = 4 THEN NAMES(N) = NY MORE TO CATALOG?" SANS
NAMES(N) + " B" 740 IF ANS = "YES" OR ANS = "Y" THEN
430 IF TYPE = 8 THEN NAMES(N) = 140
NAME$(N) + " S" 745 POKE 1657,40! REM xxxRESET
440 IF TYPE = 16 THEN NAMES(N) = PRINTER -JUST IN CASE-IF NOT
NAME#(N) + " R" CONTINUING WITH FROG. «x
450 IF TYPE = 32 THEN NAMES(N) = 750 END
NAMES(N) + " B" j
460 LGTH = PEEK (A + 33 + S x 35
?
Verbatim. Datalife
disks for the
performance
of a lifetime
MINIDISKS
Verbatim, the world’s leading producer of
minidisks, makes the widest range of minidisks
available for word processing and data processing
applications. Intent on maintaining this position
of leadership, we constantly strive to make our
minidisks even better.
Each Verbatim Datalife™ minidisk is
equipped with a hub reinforcing ring to aid in
registration, reduce errors and give better alignment
repeatability. Our dual-sided, double density
Datalife™ minidisks offer users higher storage
capacity. Our new plastic box makes our minidisks
easier to use, safer and more convenient to store.
Our testing standards go beyond the industry
standard because we insist on Verbatim being the
industry standard of excellence.
Introducing
CLEANING DISKS
The Verbatim: Datalife™ Head Cleaning Disk
is a convenient, reliable, safe means of removing
up to 90 percent of debris contaminating magnetic
recording heads used in computer and word
processing systems.
The Verbatim Datalife™ Head Cleaning Kit
consists ofa durable, reusable, Lexan® jacket and
presaturated, disposable cleaning disks.
The Verbatim approach is superior to and
less expensive than other cleaning disks presently
available.
The kit, available in 8” and 54” sizes, differs
from those already available in the marketplace
in the following ways:
- The Verbatim cleaning disks are disposable.
This approach allows a fresh clean disk to
be used each time. No accumulated debris
from previous cleanings comes in contact
with the heads.
Each cleaning disk is presaturated with a
precise amount of cleaning solution. Pre-
saturation eliminates the inconvenience
associated with splashing solvents onto
a disk.
Head Gearing htt
SPECIAL OFFER TO B.A.S.U.G. MEMBERS ONLY
10 x MINIDISKEITES ¢19+SOINCLUSIVE OF
V.A.T. AND POST.
T ENCLOSE A CHEQUE MADE PAYABLE TO
B.A.S.U.G. CHEQUE No
FORWARD TO ME BY RETURN AT THE ENCLOSED
ADDRESS.
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group Page 11
NOW YOU SEE [Teese
&, he Faartieia
Farnham
Huse ey
6-11-81
Dear Sirs,
A week ago I boasted to a biologist
at my college that was enquring about a
Program to measure reaction time that it was
easy!! He said prove it, so I sat down
yesterday evening and wrote one for the APPLE
TI which I enclose:-—
© REM REACTION TIME
5S HIMEM: 24575
10 TEXT: HOME
20 START = 24576
30 COUNT = 24832
40 GOSUB 230
50 POKE COUNT,0:POKE COUNT+1,0
40 X = 3000
70 YTAB 10: PRINT "WHEN THE SQUARE APPEARS
PRESS ANY KEY"
80 FOR PAUSE = 1 TO X:NEXT PAUSE
90 GR:COLOR = 15
100 X = 2500 * RND(1)1X = X + 500
110 FOR PAUSE = 1 TO XsNEXT PAUSE
12@ PLOT 20,20
130 CALL START
140 POKE -16368,0
150 TEXTsHOME
160 VTAB 10
170 IF PEEK(COUNT)=0 AND PEEK(COUNT+1)=0 THEN
PRINT "TOO SLOW!!":GOTO 190
180 PRINT ( PEEK (COUNT + 1) & 256
+PEEK(COUNT)) * 23E - 6)" SECONDS."
190 PRINT:PRINT: INPUT "AGAIN (Y/N) "sas
200 HOME
210 IF LEFTS(A$,1)="Y" THEN SO
220 END
230 DATA
44, 16,192, 238, 0,97, 208, 11,238, 1,97,240,5,44,0,
192, 16,241, 96,234,234, 208, 246
240 FOR I = START TO START + 22
250 READ X: POKE I,X
260 NEXT I
270 RETURN
Yours faithfully,
Peter Wicks.
SPECIALIST IN
EDUCATIONAL SOFTWARE
i} Teacher's Toolkit:
‘Apple and Pet Disk £25.00
Pet Cass £20.00
German Teaching and Testing routines
Apfeldeutsch: waa ase 18.0
package Apple only £130.08
(20% discount for schools)
French/German Chip Pet £25.00
Shape Manager Apple disk £45.00
| Master Maths
GAL Maths up to" level oy og
ArT easeetes £20 |
Aristotle's Apple :
Multiple choice builder £25.00
Pilot
it ta combine
sean ete Gann £86.00
Lowbrook Tapes
Numer rams for
primary school Pet £10.00
Timetabling Book £10.95
Software for 3802, TRS80, PET,
Apple £30.00
All prices include VAT
Tel. 01-567 6941& 062882 5206
COSMOS SCREEN MIXER
HIX THE DIFFERENT SCREENS including
LO-RES, TEXT and HI=RES to produce
completely new efects,
THE SCREEN MIXER is a set of nodules
which replace three ICs on the APPLE
II motherboard, which allows mixing of
any two screens from HGR, HGR2, GR
and = GR2y TEXT! = and TEXT2y
withoutsoftware but under software
control, Does not use up any slots,
By mixing HGR screens, it is possible
to have 560 dot resolution across the
screen» You can also have 280 dots of
half tone, black or white dots in one
line,
PRICE INCL manual and software
VAT ete £36.50
FROM
MICROSOURCE
1 BRANCH RD, PARK ST
ST ALBANS, HERTS
Page 12
RANDOM TILING
by R.A. Fairthorne
Making patterns from repeated modules is a
basic technique well suited to the computer. The
modules, or ‘motifs’, can be chosen by rule or at
random. The resulting patterns are of interest
mathematically, and statistically, and are
sometimes pleasing as well, Computer graphics
experts have used this technique for quite a
time,
Here is a simple minded program to suggest
possibilities.It simulates the laying of square
tiles whose motifs and internal colouring are
chosen at random.To preserve unity in the
randomized patterns there are four sets of
motifs, each appropriate to a common theme,
The completed patterns can be stretched
vertically or horizontally. This does not affect
the number of plotted points in the original tiles,
only the distances between them and the number
of tiles in the pattern. The smaller the scale the
longer it takes, and the worse the resolution.
On the other hand too large a difference between
the horizontal and vertical scales may turn
slanted lines into almost vertical or almost
horizontal ones. Apple hi-res does not take
kindly to these except in long lengths. For this
and other reasons it is best to keep to
horizontals and verticals and slopes of 1-to-1
(as in ‘Chinese’), 2-to-1 (as in ‘Islamic’), and
$-to-1 (as in ‘Kells’) or in combination (as in
‘Star’),
Also, to avoid visual chaos, it is better to
restrict colours. Here you have the choice of
white/orange or white/green, Colours are fixed
for ‘Islamic’ at white/green. They can be fixed
for other themes by replacing the randomizing
instructions for ‘A’and’B’ in line 125 by specific
Hcolor numbers;
Subroutines are used to define the motifs, though
shape tables are the more powerful in general.
This is to make it easy for the user to modify the
program experimentally, The arrays dimensioned
in lines 10 and 15 give the coordinates of the
points to be joined in each motif, each row
representing one motif. for example ‘DIM C(2,7)’
indicates that this theme uses 3 motifs (0)1,2)
and 4 points each needing 2 coordinates} ie 8
data items for each motif. These data are given
in line 2100,
The subroutines tell how the points are to be
joined, and the colours of the different paths of a
motif, Thus line 500 is a subroutine for a single
path joining four points (if the coordinates of the
first and last points were the same it would draw
HARDCORE - The Journal of the British Apple Systems User Group
Tune 1982
a
a triangle), Line 600 uses this twice as a
subsubroutine because ‘Islamic’ motifs consist of
two joins of four points, Subroutine 700 joins
three points and two points, Subroutine 800 joins
two pairs of points.
The step size ‘S’, in line 110 and subsequently, is
the side of the basic square, For ‘Kells’ it is 5;
for the others 4,
If you wish to make patterns one at a time and
retain them for saving to disk or to ‘fill in’,
delete lines 130, 135, Then ‘RUN’ when you want
to change, ‘Filling in’ a ‘Star’ pattern can produce
interesting, if meaningless, results,
0 TEXT ¢ HOME
5 VTAB 4% PRINT TAB( 10)"RANDOM
TILING"? PRINT
10 PRINT TAB( 12)"R.AsFAIRTHORN
E"t PRINT } PRINT TAB( 15)"
FEB. 1982"
15 FOR R = 0 TO 1000: NEXT R
20 DIM K(77?
25 DIM S(3,9)% DIM C(2,7)
30 FOR I = 0 TO 7! FOR J = 0 TO
7
95 READ K(I,J)? NEXT Ji NEXT I
40 FOR I = 0 TO 33 FOR J = 0 TO
9
45 READ S(I,J)% NEXT Jt NEXT I
50 FOR T = 0 TO 2? FOR J = 0 TO
7
55 READ (I,J)? NEXT Ji NEXT I
60 TEXT ? HOME t VTAB 4
65 PRINT TAB( 17)"THEMES"! PRINT
3 PRINT
70 PRINT TAB( 12)"1. KELLS"$ PRINT
75 PRINT TAB( 12)"2. ISLAMIC": PRINT
80 PRINT TAB( 12)"3, STAR"? PRINT
85 PRINT TAB( 12)"4, CHINESE"? PRINT
90 PRINT + PRINT TAB( 18)"5S. EN
D PROGRAM"
95 PRINT t PRINT t PRINT TAR( 1
5)t INPUT "WHICH(1-5)?"3T
100 HOME t VTAB 4
105 IF T = 5 GOTO 210
110 PRINT TAB 10)? INFUT "WIDT
H OF TILE(1-7)2?"3H
115 PRINT TAE( 10)! INPUT "HETG
HT OF TILE(1-7)2?"3H
120 IF T = 2 GOTO 145
125 PRINT TAB( 2)? INPUT "WHITE
/GREEN(0) OR WHITE/ORANGE (1)
2"5C
130 VTAB 20: PRINT "PRESS ANY KE
Y TO CONTINUE, SPACE BAR FOR
MENU"? GET A$
135 IF A$ =" " THEN GOTO 60
140 GOTO 145
145 HGR t POKE - 16302,03 REM x
*xFULL SCREEN ON PAGE ONEXxx
150 REM xxxTILE LAYING«xx
155 S = 4 IF T = 1 THEN S = 5
160 FOR M = 1 TO 241 STEF S * W
June 198Z
165
170
175
180
185
190
195
200
205
210
498
500
600
610
700
710
800
810
1800
1900
2000
2100
3000
0 TO 165 STEF S$ x H
2 « INT ( RND (1) + .5) +
2*¢« C + 13B = 2 «x INT ( RND
(1) + .5) + 2 * C + 13 REM x
xXXSELECTION OF MOTIF COLOURS
xxx
REM xxXxXMOTIF SELECTIONXxx
= INT (4 x RND (1))
IF T = 1 THEN GOSUB 500% REM
MKKKELL SRKK
IF T = 2 THEN P
RND (1)) + 43
*XXTSLAMICKKX
IF T = 3 THEN GOSUB 7003
xXKSTARKKXK
IF T = 4 THEN P INT (3 x
RND (1))%3 GOSUB 800
NEXT Ni NEXT M$ GOTO 130
HOME 3 END
REM xxxSUBROUTINES FOR MOTIF
SXXKELLS*XxX
HCOLOR= Ai HPLOT M + K(P,0) x
W,N + K(P,1) * H TO M + K(P,
2) & W,N + K(P,3) &® H TO M +
K(P,4) * W,N + KCP,5) «x H TO
M + K(P,4) & W,N + K(P,5) x
H TO M + K(P,6) & WyN + K(Py
7) * Ht RETURN
A 3% GOSUE S00
A= 13P = P + 2% GOSUB 500% RETURN
HCOLOR= A? HPLOT M + S(P,0) x
W,N + S(P,1) * H TO M + SCP,
2) & W,N + S(P,3) KH
HCOLOR= B? HPLOT M + S(FP,4) x
W,N + SCP,5) x H TOM + SCP,
6) & WyN + S(P47) KX H TOM +
S(P,8) * W,N + S(P,9) & Hi RETURN
HCOLOR= A? HPLOT M + C(F,0) x
W,N + CCP,1) XH TO M + CCP,
2) * W,N + CCP,3) * H
HCOLOR= B3 HPLOT M + C(P,4) x
We»N + C(P,S) * H TO M + CCP,
6) ® W,N + C(FP,7) * H? RETURN
DATA 040453515254+5,5,05051
999492954545 40424153,4,0,5,5
2044,3,1,2,0,5
DATA 040104154+34454,054,0
939 491545050545144,3,0,4,0,0
£041,0,3,4,4,4
DATA 0425240524 44145144,252
909492404243 414 2444442424452
9943¢340424244,0,242404145354
FOR N =
A
P
INT (2 x
GOSUB 6003 REM
REM
’
DATA 042424042444442,0,2,4
0242404244405 2 424452505452
REM >> >>>>>33<4<<¢<¢<<<<¢
> <
> R+eA+FAIRTHORNE <
> <
> FEB. 1982 <
> <
POPPE PEP S<L MLK
HARDCORE - The Journal of the British Apple Systems User Group
nr
Page 13
INTEGER BASTC
by John Sharp
A number of members have written in with
questions or problems about INTEGER BASIC, In
the touching hope of cutting downon some of my
work, here is a summary of the answers which
will tell you all youwant to know about the
problem.
One of the mast frequent problems is "I can’t get
some of the Integer programs to run, They just
hana or go into monitor." This usually happens
because the program overwrites INTEGER BASIC
in RAM,
The second most popular query is that the
Integer Basic on the DOS 3.3 MASTER does nat
work,
First let me say something about loadina
INTEGER BASIC into RAM, and secondly about
how Integer Basic loads a program in contrast to
APPLESOFT,
On the DOS 3,3 MASTER which you should have
received with your disk drive, or conversion kit,
is a machine code proaram called INT BASIC,
When you boot the disk the HELLO proaram looks
to see if there is a RAM CARD (alias a Lanauage
Card) in slot zero, If there is it loads the
program into the card. If there isn’t, it does
nothing, The program is meant to run only on the
language card} if you try running it elsewhere, it
will not work. Trying ta run it elsewhere means
attempting to BRUN INT BASIC, It is possible to
BLOAD INT BASIC, and you will find it will load
at a location 1000 (hex), However, since it has
been written to run at the very top of memory,
(ive, on the lanquage card) it will not run, This
would be like renumbering a BASIC program
without renumbering all the GOSUBS, and GOTOs
etc,
So you haven’t got a language card, what do you
do, Well, on the BASUG INTRODUCTORY DISK is
a binary program called INTEGER, If you BRUN
INTEGER, when it has loaded it will then come up
with the INTEGER BASIC prompt ">" and you can
write in Integer or load a proaram from disk or
tape, If you look at where the program has loaded
(see Beginners Page in HARDCORE last year),
you will find that it too is loaded at 1000(hex),
However, it has been relocated to run there and
all the ‘Gosubs’ are correct now. But, 1000(hex)
sits in the middle of memory and this is where
problems arise,
Page 14
HARDCORE - The Journal of the British Apple Systems User Group
Tune 1982
To see what the problem is let us loak at where
programs are loaded, An APPLESOFT program
loads at 801(hex) and then 802 etc, unless of
course you tell it to load somewhere else (e.q,
above the HI-RES pages) by Poking or otherwise
altering the start of program pointers. An
INTEGER program is different. It starts at
HI-MEM and loads BACKWARDS, The end of the
program is loaded first. Now if the INTEGER
BASIC is in ROM, or on the language card then
there should be no snags because the program is
always below the INTEGER BASIC, BUT, if the
introductory disk Integer Basic is used, AND the
program is long, they collide, The actual program
loads OK, but wipes out the tail end of the
Integer Basic interpreter and although all may
seem all right initially, at some stage, the
Integer interpreter needs to use part of the code
that has been wiped out, So what happens? - it
bombs into Monitor,
Where do you go from there? On disk 11 in the
library are a number of INTEGER BASICS which
run at all sorts of places- a sort of Integer for
allcomers. They are there for tape users as well,
but I will come back to them in a moment, If you
cannot find one suitable there, then you are just
going to have to buy an Integer card or a RAM
card, Collision problems may be avoided, but you
might still run out of memory because you are
using up a sizeable portion of RAM if you are not
using the INTEGER on a RAM or ROM card,
So, that answers the problems above, There is
one more. If you have the INTEGER BASIC
PROMPT ">" and you type "FP" you will be placed
back in APPLESOFT and the APPLESOFT "1"
prompt will return,
If you now type "INT" the following will happen,
If you have a ROM card (INTEGER in ROM) then
the Integer prompt will return, because DOS
knows it is there and switches it on. If you have
a language card AND it is loaded with Integer,
the same thing will happen because as far as
your APPLE is concerned they are the same thing
at this stage, I say switch, because this is
precisely what it does. The same memory
locations are used and so the APPLE has to
switch the APPLESOFT ROMS off and turn on the
lanquage card.
If you have neither ROM nor RAM card then the
message "LANGUAGE NOT AVAILABLE" will
come up. Why, you may ask, when T just had it
working, Answer! DOS has looked up to see if you
have had a ROM or RAM card with INTEGER
BASIC on it} since you haven't got one it says sa.
You can either rerun it from disk, or you can call
the start of the program (CALL 1003 in the case
of the Introductory disk version).
There is one other INTEGER BASIC, David
Bolton’s RELOCATED INTEGER, which as a disk
version, has had the DOS modified so that when
you do type "INT" it starts up the RAM version
of Integer instead of looking to see if there is a
card there,
If you are a tape user, on your Introductory
Tapes is an APPLESOFT program which sets up
INTEGER BASIC, You should have this running
with the INTEGER prompt up BEFORE you try to
load an INTEGER BASIC PROGRAM, otherwise it
will not load. These programs are numbers 16-18
on the fourth side of the tapes,
Why use INTEGER at all? This is yet another
question, Firstly, it is a faster lanquage,
because it does not have to do so much work with
numbers, in sorting out floating paints, Secondly,
there are differences such as a MOD function
which can be useful in certain
mathematical/logical handling of data. In other
respects it is not really as useful, There is no
string handling (with LEFT$, MID$ etc)} you have
to dimension all strings} you have to be careful
because all commands on a line are obeyed even
if there is a not true condition in an IF... THEN
statement. There are a few more minor
drawbacks, which means that only the diehards
use it these days.
Finally INTEGER is spelt just so and not
INTERGER ~ a truly horrible looking corruption,
a rm S
NSC) ‘io a
* Softuare development
=
Gonsultancy
= feple specialist
J -R-Syustens
2 Rue Glose, flareenden, ferts.-
fel. @5827 5196 = John Rogers
=* Please also ask about
computer tnsurance
June 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 15
SO WHAT’S €& PREUDO-OPCODE?
by Ian Trackman
The last issue of Hard Core included a number of
articles containing listings of programs and/or
routines written in 6502 machine code,
Basic-only programmers might have had a
problem since noted none of the articles - my
own included - explained to the reader exactly
how to enter the programs into his/her Apple. In
justification, may I make three points, The
articles are just that - magazine articles -
written for computer-literate BASUG members
and are not fail-safe instruction manuals
designed for first-time users. Secondly, the
authors - if I am typical - want to put their
effort into the main content of the article
instead of writing a series of loading and saving
instructions. Finally, BASUG is now running
introductory courses on machine code
programming,
Nevertheless, having said that, I have been
asked to write this article, Its purpose is not to
teach machine code programming, but to explain
how to read, enter and save machine code
programs published in Hard Core,
The 6502 micro-processor at the heart of the
Apple responds to a series of on/off electrical
pulses, These cause it to carry out the functions,
such as addition, subtraction and comparison, of
which it is capable. The code for each 6502
operation consists of 8 bits, making up one byte,
and is referred to as an “opcode” (short for
“operation code"),
To carry out. an operation such as "Add 15 to 20
and save the result in memory location $340", we
need to give the 6502 two other types of
information, numerical values (15 and 20) and
memory locations ($340), By using the
appropriate opcode, we can tell the 6502 that the
following one or two bytes contain data - a value
or an address - relating to that opcode, rather
than another instruction. It’s somewhat similar
to a Basic command such as GET, which must be
followed by a variable name, or PEEK, which must
be followed by a memory address.
For the convenience of programmers, the binary
opcodes and data are expressed in hexadecimal
(base 14) notation. If you enter the Apple’s
Monitor with a CALL -151 and then type
F800.F87F <return>, part of the Monitor’s
opcodes and data will be displayed in hex. This is
known as a “hex dump". Each line starts with the
number of the first address, followed by the hex
values of the contents of eight consecutive bytes
of memory, There is no indication in the dump
itself as to which bytes are opcodes and which
are data, To find that out, you would need to
refer to a table of 650Z instructions and decode
each number, seeing whether it needs to be
followed by none, one or two bytes of data,
When we program in Basic, we hardly need
concern ourselves with “memory management",
that is, where exactly in the computer’s memory
the program and its variables will be stored, The
Basic interpreter takes care of that for us, In
machine code programming, there is no such
luxury. The programmer has to decide where to
store the program and its accompanying data,
making sure that it won’t be incompatible with
anything else stored in memory, So we need a
starting address or "origin" for our program,
T. Tse’s Nicelister on pages 24 and 27 of Hard
Core for April 1982 is presented in the form of a
hex dump. Its origin address is the first address
of the listing, 8000, Being machine code, this is
$8000 (hex) and not 8000 (decimal). That‘’s an
occasional trap for the unwary — location AA60 is
obviously hex, but what about 800 ? If you aren’t
certain, convert the origin into both hex and
decimal (see Hard Core of August 1981 for Hex /
Dec converters), Then look at the memory maps in
the Apple Reference Manual to see which number
~ hex ar decimal - looks more sensible,
To enter Nicelister, the first step is to give the
Monitor the starting address of the program,
Assuming that you are still in the Monitor, type
8000 } <no return>
As you are in the Monitor, don’t prefix the
number with a $%, If you do, the Monitor will
reject it, after the next <return>, with a beep,
(Not even a friendly "Syntax Error" message).
Now start key-bashing, Type in each hex number,
separated from the next by a space. Single
numbers (00, OD, 09, etc,) can by typed as 0, D
and 9. As you can enter up to 255 characters (i.e,
key-presses including Spaces) between
<returns>, you can type in several lines of hex
numbers without pressing <return> at the end of
each printed line, Don’t enter the address (8008,
8010, etc) at the beginning of each new line. For
reasons which follow, I suggest that you enter
exactly 8 lines of hex-dump at a time, As a
warning against over-filling the keyboard input
buffer, the Monitor will beep after 247
characters,
If you ignore the warning, you’ll over—write
earlier characters. After each <return>, start the
next line with a colon, to tell the Monitor that
you are continuing to put more bytes into
memory, If you forget the colon, the Monitor will
think that you are asking for a listing of the
contents of memory locations and will respond
after the <return> with something like {-
Page 16
HARDCORE - The Journal of the British Apple Systems User Group
June 1982
20- 45
F8- FC
E6- 91
and so on, If you are fast enough, press <reset>
before your original typing scrolls off the
screen, Now type a new origin address followed
by a colon, If you enter numbers in 8-line blocks,
it’s simply a matter of entering the address at
the start of the correct block, Then move the
cursor up and copy over your original typing. If
you weren’t fast enough and your original
numbers have disappeared, you’ll just have to
re-type them,
After twenty or so lines, you’ll begin to realise
that direct entry, or "hand-coding", is very prone
to typing errors. I suggest that you check your
work as you go, After every $ lines, do your own
hex dump and compare it with the printed listing,
For example, to check your typing of the first 8
lines of Nicelister, type t-
8000 . 803F <return>
If you have made a mistake in one byte, change
it. For instance, if you entered Bé as the third
byte of the third line, type !~
8012 } Dé <return>
If you have left a byte out or added an extra one
iny you can shuffle the following bytes up or
down by using the Monitor’s memory move
routine, but the quickest way is probably to
re-enter the incorrect section,
To continue, enter the address at the beginning
of the next 8 lines, followed by a colon, and type
the next block, until you have finally entered the
whole program,
You now have to save it. DOS needs to know the
origin address and the length of the program.
Fortunately, DOS accepts hex numbers (preceded
by a $ sign), The origin address is easy, As to
the length, remember that a program starting at
$800 and ending at $880 is actually $81 bytes
long, Usually the subtraction sum “end address
minus start address" should be easy to do, but if
not, you can use the Monitor’s own hex number
subtraction facility. For example, if a program
starts at $9Dé and ends at $BIF, type i-
iF - Dé
which will give you t-
=49
There is a "borrow" of $100. $B00 - $900 = $200,
so that, taking into account the borrow and the
last byte of the program, its lenath is $144. You
can now save the program by t-
BSAVE <file name>, A¢<hex origin>, L$<hex
length>
Working out hex numbers to make up a program is
a very difficult way to talk to your Apple, There
is a better method, called assembly language
programming, in which the 4502 hexadecimal
instruction codes are replaced by three-letter
mnemonics, For example, the code for the
hexadecimal command for subtraction is SBC, In
the simplest form of assembly language
programming, data (numbers and addresses) are
still expressed as hex numbers, To enter a
program, you need an “assembler” and to read it
back you need a “disassembler",
Let’s start with the disassembler, From the
Monitor, type F800L. This will produce 20 lines
of disassembled code. Apple’s internal
disassembler has worked out - from the
bit-pattern of the opcodes - which bytes are
instructions and which are data. Look at the first
4 lines :-
F800- 44 LSR
F801- 08 PHF
Fseo2- 20 47 FS JSR $F 847
F80S- 28 PLP
The first column contains the memory address,
the second column contains one, two or three hex
numbers, the third column contains the mnemonic
opcode and the fourth column may contain data,
In the above example, only the JSR ("jump to
sub-routine") opcode requires an address in the
fourth column. If you now compare this with the
hex dump (F800.F880), you'll see that the opening
addresses in the first column and the hex bytes
in the second column correspond,
So, by entering the origin address (followed by a
colon) and the hex bytes listed in the second
column, you can now enter Les Budgen’s program
on page 21 of the last issue of Hard Core, This
time, checking is easier, Not only should columns
1 and 2 match the printed listing but so should
columns 3 and 4,
Next, we can improve the method of entering the
program, Look at Les’ program. We could enter it
by typing !-
300 1 AP 4C A2 18
and so on, as explained above. Unfortunately, we
can‘t type i-
300 ! LDA #$4C LDX #$18
etc, However, there is a way. If you have an “old"
Monitor, you can use the built-in
"Mini-Assembler". If you have an Auto-start
ROM, you’ll need a copy of the re-located
Mini-Assembler from the BASUG program
library. Instructions for using it are set out on
pages 49 - 51 of the Reference Manual and I
won’t repeat them here,
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 17
When using the Mini-Assembler, it is not
necessary to type the $ sign to signify hex
numbers, although you must enter all # signs
(which indicate real numbers) wherever they
occur, You need only one space between columns
and, unlike the hex-dump method of entry, you
must type a <return> after each line, Other than
that, entering a program through the
Mini-Assembler is a case of setting the start
address and copying out columns 3 and 4 of Les’
listing.
The Apple disassembler tries to interpret every
hex byte as part of a 6502 instruction, In reality,
some programs contain variables or blocks of
data which cannot be translated in that way. If
the disassembler cannot perform its translation
properly, it produces 3 question marks. Les’
Program contains such a data block and ???
appears at $314 and $314, You cannot enter thése
bytes through the Mini-Assembler and you have
to go back to the hand-coding method. These data
bytes are always single bytes in the
disassembler listing, When you come across ???
in the listing, I suggest that you make a
temporary entry in the Mini-Assembler at that
address of the opcode BRK, which corresponds to
the hex byte 00. After typing in the rest of the
Program, you can then alter those particular
bytes to their correct values with the direct
entry method,
The "Mini" in Mini-Assembler means that it can’t
do everything that a big assembler can do, For
example, using a full assembler, we can add
comments into our programs, we can refer to
variables and address by giving them names (or
"labels" as they are called), we can enter text as
ASCII characters and we can give instructions to
the assembler as to how we want it to produce
listings of the program, Assemblers for the
Apple offer different facilities and therefore
their operating instructions (called
"pseudo-opcodes" or “assembler directives") vary
from one to another, This means that listings are
non-standard, Nevertheless, they do have many
features in cammon, so that it is still possible to
enter programs using a combination of the
Mini-Assembler and the direct hex entry method,
Look at my Apple Writer Ramcard Patcher on
pages 15 to 17 of the April Hard Core, The
listing has now expanded to 7 columns wide.
Columns 1 and 2, separated by a colon, are the
address and hex code as before, The third column
is the line number within the listing. It’s not
used by the program itself, but merely for
reference purposes when listing and editing the
program,
The next column contains an address label, It’s
somewhat like a line number in Basic and we only
use it when we need to refer to the line, such as
in a "GOTO"-type command. The fifth column
contains the familiar 3-letter opcode, It can also
hold a pseudo-opcaode, such as "ASC" in line 95,
which tells the assembler that what follows is
some text in ASCII,
Column 6 holds addresses, numbers, variables
and data and the last column is for comments,
The program itself will usually start with a block
of "equates" which assign labels to addresses
and constants to be used in the body of the
program, There will also be an ORG
pseudo-opcode, giving the starting address of
the program.
There are three ways of entering such a program,
If you have the same assembler as the author,
then just copy the listing, (Please see my
comments about < and > signs in the DOS Toolkit
Assembler in Hard Core of March 1981). If you
have a different assembler, we’ll assume you
know enough about assembly language
programming to do any necessary conversion
work.
The second method is to hand-cade the program,
Look for the origin (ORG) and then copy the hex
bytes from column 2,
The third method is to use the Mini-Assembler,
Here, you'll need to translate the labels and
variables back to hex numbers, The easiest way
is to refer to the hex bytes in column 2, You'll
have to keep in mind that in 6502 code, 2-byte
addresses are always referred to in reverse
order, so that the low-byte comes before the
high~byte.
Let’s look at my Patcher program in more detail,
It starts with a title, followed a block of
equates, then the ORG $9C00 statement at line
31, This tells us where to start assembling,
(Remember to relocate DOS before you begin !).
The first line, LDX #0, is straight-forward and
can be typed into the Mini-Assembler without
trouble i-
300 + LDX #0
In line 36, we can ignore the label "GO,LOAD"
for the time being, However, in column 6, we have
the label "TEXT", which needs translation.
(“TEXT" has nothing to do with the Basic
command TEXT - it’s just a name that I made up.)
Look across to column 2, where you'll see the
three hex bytes {-
BD 47 9C
Page 18
HARDCORE - The Journal of the British Apple Systems User Group
June 1982
The first one always corresponds to the opcode
(LDA in this case) and the next two are the
numerical equivalent of the label "TEXT".
Remembering to reverse the low-high order, you
can now type into the Mini-Assembler ‘-
LDA 9C47,X
Notice that the ",X" is not part of the label and
must be copied exactly as listed,
Another way of finding the correct value for
TEXT is to look dawn column 4 until you spot it -
on line 74, in fact. Then look across to column 1 -
there is the address again - $9C47,
The same idea is used in the next line (37), so
that you‘ll be typing ‘-
BEQ 9COD
The next line (38) is slightly different. COUT is
not a label within the program itself, but it
appears in the equates list at the top, So we type
JSR FDED
In line 42, Hard Core’s printer was left in
English character mode and so the hash signs
have been printed as pounds, That line will be
entered as i-
LDA #9C
When we reach line 74, we’ve already seen that
the Mini-Assembler can‘t cope with text, You‘ll
now have to go back to the ald direct entry
method to put in the last few bytes of the
program.
If you list the program on the screen, columns 1
and 2 should correspond, although the
disassembler will split up the text lines (75 - 80)
differently. You should also see the similarity
between the opcode and data columns on the
Screen and in the printed listing.
To close this article, let me add a tip about
loading a machine code sub-routine from Basic,
Of course, you can BLOAD it from within your
Basic pragram. However, if it is short, you may
want to POKE it in directly. There is a routine on
page 77 of the DOS Manual, which creates a
whole batch af POKE commands in your program,
A neater way is to have a loop, such as t-
10 FOR I = 768 to 780
20 READ X
30 POKE I,X
40 NEXT
S50 DATA 43,56,,,(the decimal values of the
program)
Put the machine code into memory in one of the
ways explained above, then write lines 10 ta 40
in the normal way. Now enter this immediate
command {~
PRINT "50 DATA"; } FOR I = 768 TO 780 } PRINT
PEEK(I) ","} } NEXT
The next line of your Basic program will appear
on the screen ready for you to move the copy
cursory over it, (Don’t enter the last comma.)
As I said at the beginning of this article, I have
not attempted to explain what the opcodes and
pseudo-codes do. Perhaps you’ll now be tempted
to find out !
_USING DOS FROM THE MONITOR
AND IN MACHINE LANGUAGE
By John Kleeman
The following notes refer to DOS 3.2 on an ITT
2020 with 48K. All numbers are in hex.
To use DOS commands from terminal in monitor
(e.g, CATALOG)
SEAG or A851G hooks in DOS (e.g.after RESET)
CALL -151 enters monitor for Basic
It is also necessary to (or at least it works if
you do so) 74:FF (i,e.put FF into location 76)
To trap DOS errors?
Put address of error-trapping routine in to lo-hi
format into locations 905A,905C,90SE
ne error trapping routine will then be called
with the DOS error code as per BASIC ONERR
will be in the X-register,
To suppress DOS error messages:
Overwrite A6D8:F01S
To use DOS in machine-code programs is similar
to Basic- you just preface DOS commands with
control D. Problems arise with text-files} these
can be got round by 74:0
33i8F (this is putting the character ’?’in the
monitor prompt register)
The above works through I am not always quite
sure why, in particular the use of location 76
(hex) is obscure,
June 1982 HARDCORE - The Journal of the British Apple Systems User Group Page 1?
r Z
3
Apple Panic . 14:
village Park pee
Epoch e4 £19.00
computer
services
WORD PROCESSORS
Magic Window
Zardax
Mailmerge -
BUSINESS/UTILITIES
Visicalc ...
0.8. Master .
D.B. Master Utility .
Data Factory ....
Ramex 16K Card
32K Saturn Ram Card
Locksmith 4.1 ..
The Inspector
Accu-Shapes
Expediter I! x
Zoom Grafix . x
U-280 Card £95.00
Brain Surgeon . £30.00
Tasc Compiler - £85.00
Videx Videoterm . £180.00
Dos 3.3 Toolki £40.00
TG Joystick £33.00
Softstep . £24.95
Super Disk Copy I £20.00
Memory Manager
GAMES
Bug Attack . x
Wizardry | £26.00
Wizardry 2 (needs 1) £22.00
Time Zone £54.00
Ultima ..... £21.00
Wizard & Princess £17.50
Zork Io. x
Gorgon :
Raster Blaster
Flight Simulato
We also stock the following:
Hadron £19.00
Beer Run . £18.00
Autobahn £14.95
The Prisoner .... £16.20
Castle Wolfenstein
Phantoms Five ...
Cyber Strike
Shack Attack
Sargon Il.
Cranston Manor
Firebird
Alien Typhoon ...
£17.50
£15.20
£14.00
Olympic Decathlon £14.95
Tawala’s Last Redoubt £14.95
ONION Ss scsvancosavases £17.00
Russki Duck £18.00
Pegasus II £14.95
Tigers in the Snow £22.00
Threshold ... £20.00
00-Topos . £14.95
Genetic Drift £15.20
Robot Wer £22.00
Accutrack S/S S/D £1.65 each Ribbons — all makes
BASF S/S S/D £1.65 each Print wheels.
3-M S/S S/D £1.90 each All makes plus other format disks
Dysan S/S S/D £2.30 each Monitors
Add £2 for plastic library boxes. This is just a small sample of what we have
Postage and packing FREE — please add 15%
VAT to your order.
We stock the full range of Apple related
books.
in stock — please ‘ring or write for price list
and further details. We also sell Apple 1!
carrying/flight case.
We are Consultants for small businesses.
CALLERS BY APPOINTMENT ONLY
Suite 1, 20 High Street, Highgate Village, London N6 5JG
Tel: 01-348 0306
yo2Nor THAT BUTTONS
You'LL WIPE ---
Page 20
HARDCORE - The Journal of the British Apple Systems User Group
Accutrack Disks...
Because data reliability
is the important difference
in disk construction.
Anatomy of a disk.
Flexible disks ore simple information
storage devices consisting of o
magnetic disk enclosed in a semi-stitt
protective jacket. The disk rotates
within the jocket while magnetic
recording heads on your dota or
word processing systems “read” or
“write” information on the disk’s
magnetic suface Since disk
operation is simple. it’s relatively easy
to moke one that works But building
in reliability is something else agaih It
tokes speciolized technology -fo build
disks that operate flawlessly over an
extended period of time.
What counts in
disk construction.
Key design objectives for a disk are
listed below. How well o disk
measures up to these objectives
relates directly to the throughput.
occuracy and overall costs for your
dato or word processing system No
disk measures up better than
Accutrock
* The magnetic coating must be
precisely formulated and unifarmly
applied Imperfections as small as five
millionths of an inch cause signal
dropouts, data checks and wasted
processing time as well as errors
¢ The disk surface must be
absoliWely clean. totally flat and
permanently lubricated to prevent
excessive head wear with
subsequent signal degradation and
eventual loss of information (This is
the most critical objective and the
one that’s most often compromised
BASUG BULK BUYING —SOOort PRICE FOR IOs
2
since poor operating results toke o
while to show up. It’s also the area
thot mos! effects the long term
reliability of your data.)
* The disk must be free to rotate
within its jacket without internal drag
to avoid futher dato checks.
excessive processing fimes and
errors.
* The jacket must protect the disk
from external contamination and
damage. It should also remove
microscopic particles of debris from
the disk surface before they can
domage the disk
Why you'll never find
the best disk bargain
in the bargain basement.
While there’s little opporent
ditterence between other disks and
Accutrak, the performance
differences can be substantial. Smply
stated, an Accutrack disk is premium
priced But the protection it gives
your information the reliability it
provides to your operations: and its
substantially longer life make it the
best disk buy. After all. the real cost
of your operations is constructing
ond processing the dato stored on
the disk - not the disk itself It doesn’t
make sense to trust thot data to
anything but the best disk
Accutrack
£17:50 inctFREE LIBRARY CASE !
(ADD 50p POSTAGE / PACKING)
BRITISH APPLE SYSTEMS USER GROUP
P.O. Box 174. Watford WO2 6NF
June 198Z
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
PERSONALISED DISKS
by Rex M.F.Smith
DOS 3.3 disk personalizer will add an eleven
character string of your choice to Track #2,
Sector #2 at Hex $AF, This message replaces
‘DISK VOLUME’ and is displayed every time you
boot the disk. The idea came from Windfall
January, 1982, and the information on how to
patch the disk came from ‘Beneath Apple DOS’.
The routine will relocate itself at $3000 and load
the sector at $2000, I chose these locations as
the routine to call RWTS can then be used as in
the DOS manual, page 94ff, It is probably not a
good example of how to use RWTS, It also
changes the DOS RAM image of the sector asi
found that DOS does not read the information off
the disk, but supplies ‘disk volume’ from RAM at
46011 decimal. Now when you call the catalog up,
your message will appear (for each disk until you
reboot with a different message) The
programme exits by calling the catalog and thus
displaying your message.
If you wish to patch a master disk in this way,
master the disk first and then use the routine.
To add the patch to other masters, BLOAD
‘MASTER CREATE’ and change the disk for the
master patched, then enter the monitor and type
800g to execute “MASTER CREATE’ which will
load your patched master DOS from the switched
disk, Easier still, use FID to put ‘MASTER
CREATE’ on the patched master disk, then use
that to master further copies. If you attempt to
master afterwards, the patch will be overwritten,
I have appended the monitor routines which save
and restore registers as I found the programme
slowly destroyed DOS without them. This patch
appears to have cured the problem.
1 IF PEEK (104) = 8 THEN POKE
103,03 FOKE 104,48: POKE 122
88,0? PRINT CHR (13) + CHR
(4)3"RUN DOS 3.3 DISC PERSON
ALIZER"
S TEXT } HOME
10 REM oO KOKO KOK OK OK
THIS PROGRAM WILL
* REPLACE THE WORDS
* ‘DISK VOLUME’
x WITH A STRING OF
* YOUR CHOICE ELEVEN
*
*
*
CHARACTERS LONG
911K 00K KKK OK OKO K
RM MR MMM
20
30
40
60
65
70
73
80
90
100
110
145
120
130
140
160
180
REM 000001 CK KICK COOK
* USES THE RWTS FROM
x CODE STORED AT HEX
x LOCATION 3000 AND
* STORES THE SECTOR
*x AT HEX 2000~-20FF
JOO KOK KK
KK KOK KKK 9K KKK KOK
IT CHANGES TRACK 2
SECTOR 2 BY POKING
THE USER STRING
(BACKWARDS) INTO
HEX OFFSET $AF OF
THE SECTOR STORED
2K KKK
OOOO ICCC OK OK OK
EACH BYTE MUST BE x
128 + ASC VALUE OF
THE CHARACER USED
RWTS IS THEN USED
AND REWRITES THE
DATA TO THE DISC
2K KK KKK OK KKK OK KOK
Deets sss sess e tees sessed
IF YOU USE “MASTER’*
FIRST, THIS DISC x
CAN BE USED BY THE x
MASTER CREATE PROG x
BY BLOADING IT *
THEN SWITCH DISCS x
SSeS SSS SS SS SSS SSS SS SOG
OK CCK KKK KK
AND CALL MASTER BY
800G FROM MONITOR
MASTER WILL THEN
USE THE DOS WITH
YOUR MESSAGE TO
UPDATE THE DISC
JOO OIRO KOKO KOKO KKK
DIM A$(11)% DIM AC11)
HOME t VTAB St HTAB 3% INPUT
“WHICH SLOT IS THE DRIVE IN
MMM MH
REM
*
bad
uM MH
RM MMH
REM
HN MMM M
RM MR
REM
MMM MH
REM
RM uM HM HM
MMMM
2 St
SL = INT (SL)
TE Sl LOR Sl 6 THEN 70
VTAB 7? HTAB 32 INPUT “WHICH
DRIVE IS THE DISC IN ? "3DR
IF DR « 1 OR DR > 2 THEN 90
VTAB 9$ HTAB 3% INPUT "WHICH
SLOT DID YOU LAST USE ? "3F
SL
PSL = INT (PSL)
IF PSL. < 1 OR PSL > 6 THEN 1
10
VTAB 11:3 HTAB 3% INPUT "“WHIC
H DRIVE DID YOU LAST USE ? "
3PDR
IF POR < 1 OR PDR > 2 THEN 1
30
HOME ¢ VTAB St PRINT "
“33 PRINT
"9K KK"
VTAB Si PRINT "MESSAGE (11 C
HARACTERS) ?"3
Page 21
Page 22 HARDCORE - The Journal of the British Apple Systems User Group Tune 1982
190 GET AS$tAs$( POS (A) - 24) = A
Seer IN atts eaabee 6A? S WRITE PROTECT TABS
Sealey 220 NO MORE!
200 PRINT ? INPUT "IS THE STRING
OK. P'3YS$ IF LEFTS (Y$,4 By Jurgen Wolda
= "yn 2
ot) COR Nee yet seeasin) = "": Nexr| (first printed in USER Magazin Ny 5, 81, the
Nt GOTO 160 ‘i é magazine of AUGE, the German user group,
220 FOR N= 1 TO 113A(N) = asc BUC Gla ieAEN ca
oa OOe
500 CORRE st) yetttece og N Read on all ye who are too lazy to want to carry
20 POKE ADRS +169! POKE ADRS + 1 on with the drag of removing the write protect
ie: 12 is x i tabs from disks and replacing them after your
+12
540 POKE ADRS + 2,160% POKE ADRS Cpe AU ec ee
tose 0 This contribution to the magazi i
A A igazine describes a
see Pepe Ee Ress are GRRE gt cheapo solution open to all owners of a soldering
22173 4 ’ : i .
580 POKE ADRS + 7,962 POKE ADRS + iron, a drill and a smattering of DIY skills,
8,0
: Beneath the left disk guide rail in the drive is a
pe role eens Hi a : POKE ADRS + microswitch which reads the ‘write-protect’
11, (SL x 16) oe ~ cut-out in the disk. If you break one of the wires
i : ¥ leading to the microswitch you kid the system into
oA0 mere ad ates PbS AGORE ADRS believing that the cut-out has been covered and
’
640 FOKE ADRS + 14,2: POKE ADRS + s0 writing to disk is no langer possible,
15,2 3 A ‘
5 : By now connecting this break point to a small flip
eet POKE eons pa cae SEOKE, ADRS switch on the front panel of the drive you can
912 : ; ,
680 FOKE ADRS + 18,0! FOKE ADRS + pas yourself all that sticky messing about with
19,32 %
zo) Eo BUb2eeecU eh RORE ADRS + So much for the theory, now for the brass tacks,
els
2 . 2 t “
20 ee ia peer e RRKE ADRS <r The first thing to do is systematically dismantle
7 : op the drive, That sounds worse than it is, since only
740 PORE RAORS ih 28200 ¢ POKE ADRS eight screws have to be removed in all, The first
766 “RONESABRELS 24, 60K four can be found on the underside of the drive,
765 POKE ADRS + 27,0: FOKE ADRS + Once removed the drive cover can be slid off (to
28 ‘Ot POKE ADRS Mh 29 ‘ot POKE the rear!), The next four screws secure the black
ADRS + 30,0% POKE ADRS + 31 frontal panel to the metal chassis of the drive and
0 RES 2 are located to left and right of the panel,
< 7 Unscrew these and remove the ‘In Use’ diode
786 Bee vas PG NOs EEOBROADRS light. Now drill a hole in the panel next to or
nt above the diode light big enough to take your
en) unease: SR CENE | eat Solel Switch) and ALAC. Mact salar twa wires cram o to
820 CALL ADRS 7 cm long to the switch and slip two lengths of
840 FOR N= 1 70 11 insulating sheath over eachs Now cut the wire
860 POKE 8192 + 175 + NeACND leading to the drive’s microswitch, strip both ends
870 POKE (45999 + ND AWD and solder them to the wires coming from your
880 NEXT N 4 switch, Finally push the insulating sheath over
5 A i. F; the joins. Replace and screw down the frontal
789 Sent BORE Pee ee nee panel, After replacing the diode light the drive’s
ADRS + 25,(SL x 16)! POKE AD De De Ce oe eames ee eee en
RS + 26,DR * i :
940 CALL ADRS
960 FRINT CHR (4);"CATALOG"
970 PRINT % PRINT "DO YOU WISH T
O ALTER ANOTHER DISC ?"3
950 “Ger YSt LF Ye. < > SY" THEN
1000
990 RUN
1000 PRINT } PRINT { PRINT “FROG
1010
RAMME POINTERS ARE BEING RES
Ee
PRINT CHRS 64) 3"EP™
June 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 23
POLISHING THE APPLE
(or how to construct and install a
lower case keyboard and display
unit).
by Peter Blair
The reasons.
One of the few annoyances of the
Apple II is the lack of lower case
and proper shift key operation. The
keyboard enhancer from Videx is a
possible solution but an expensive
one. Other modifications seem to
Sacrifice some compatibility with
existing programs.
The problem therefore, was to
provide my Apple with full lower
case cheaply and simply and
Preserve all the existing display
features. The circuit designs which
follow were the result. These have
been thoroughly tested and are
installed and working on my own
Apple (except the pre-revision 7
display circuit). They are simple
to construct and require no
modification of the Apple circuit
boards except the addition of a few
wires. One minor point is that
there are no true descenders
Possible because of
Apple structures the text screen,
but this does not make a lot of
difference once you get used to it.
the way the
The logical approach.
the
full
first step was to provide a
upper/lower case capability to
the existing keyboard plus a
correct shift key operation and a
shift-lock key. To simplify this
and avoid an extra switch I used
the SHIFT and CTRL keys together to
give shift—lock.
The diagram FIG.1i shows the logic
circuit used. If both the SHIFT and
CTRL keys are pressed together the
flip-flop IC2a changes its output
state. When the @ output is low the
keyboard is in normal Apple upper
case only mode.If the @ output is
high then lower case is enabled,
and the LED lights to indicate
this. In this mode the circuit
examines bit of the keyboard
output and the state of the shift
key. If bit 6 is high then a letter
key has been pressed. If the shift
input is low then the shift key has
been pressed and bit 5 is left
unchanged, otherwise bit 5S is
inverted and the letter becomes
lower case. Since pressing the
shift key changes the keyboard
encoder output, you can still
access every character on the
keyboard except three when in lower
case. These are the upper case M,
N, and P since these keys give
punctuation characters when
shifted. A software fix for this
minor irritation is given later.
6
Ignoring the fact that the Apple Display changes.
software would convert lower case
input to upper case I decided that
OLG de ,
Ic2e
f ic2e Ile
r LT
Icla'
Ice reid * oF ry Iced
(our)
2 Tap im [TCR™ a pis (ovr)
a &
‘Icib K ete Q 1
rer
Reser ei
Icle relf
DiS (im) i
eae
Page 24 HARDCORE - The Journal of the British Apple Systems User Group Tune 1982
The logic controlling the display your Apple uses the 2513 character
is shown in FIG.2. The circuit generator on the main board then
detects when a lower case letter or the display section of the new
punctuation (codes EO to FF Hex) is board should be laid out as FIG.4.
being output by looking at bits 6 Notice that the two circuits are
and S of the output data. Then if completely independent although
bit 7 is high, the logic enables a built — on the same board for
lower case character generator and convenience.
of the normal
If upper case
happens.
low then
inverse
disables the output
character generator.
is output the opposite
Finally, af Thit, *7 is
either flashing or
characters are required and the
normal generator is enabled. This
means that it is not possible to
display inverse lower case, and
flashing lower case must be done
with software, but gives absolute
compatibility with all existing
software without requiring a
display change-over switch. One
extra bonus is that POKE-ing
control character codes to the
screen produces a range of special
characters.
Construction.
The parts required are given in the
list at the end of the article.
Having obtained these, then first
you must check which version of the
Apple you have. The revisien 7
board uses a custom programmed
character generator ROM (actually a
mask programmed 2714) while the
manual gives the character
generator as a 2513 type. FIG.3
shows the complete vero-board
layout for the revision 7 Apple. If
Start
If you
by inserting the IC sockets.
do not use sockets for the
TTL then leave soldering the IC’s
until last, BUT you MUST
USESOCKETS for the character
generators since soldering their
pins will invalidate any guarantee.
Next make all the wire links using
solid core insulated wire. Then
insert the resistor, capacitors and
transistor and solder in place.
Solder connecting pins into the
board for the connections marked
SHIFT, CTRL, DLS, and DL7 (the last
two are only required on the FIG.4
circuit), and also for the LED
connections.
Using ribbon cable make up the 16
and 24 pin header plugs, and then
connect the other end of the cables
to the board. The cables will need
to be around 18" long. Note that
the plug pin numbers are giveh for
the connections from the board to
the 16 pin header, but for the 24
pin plug it is just a pin for pin
correspondence between the on-board
socket and the plug. Also, for the
24 pin plug, wires are only
required where indicated by a small
I¢e4+e
DLS
Te4d
CASE CHIP.
Ic4b IcGe ENABLE (PIN 18)
: ae
e oo
Ie4e De
| | rea Iced
howle CASE
EnaBul
(Pin 1)
D7
Fig 2.
Case SELECT LOGIC
Tune 1982 HARDCORE ~ The Journal of the British Apple Systems User Group Page 25
circle on the diagram FIG.3 or generator at location AS and
FIG.4, in particular NO CONNECTION carefully remove it. Fit this to
is to be made to pin 18 of the plug’ the new board as IC7.
in the FIG.3 version, or to pin ii
for the FIG.4 version since these The extra wires should now be
are the chip enable pins. Now make attached as follows. Turn over the
all the track breaks that are keyboard section of the Apple so
required (marked by X in the that you are looking at the rear of
diagram) but be careful not to miss the encoder board. Cut two lengths
any or to break any additional ones
since some connections are made by
direct link between IC pins. Lastly
install all the chips except IC7
which must first be removed from
the main board. Ensure that all
IC’s have the indent loacating pin
1 to the top of the board as in the
diagram.
of wire about 12" long in different
colour insulation. Locate the CTRL
and SHIFT keys. These have a common
connection which is to ground, with
independent output connections.
Trace these back to the plug
betweeen keyboard and encoder and
carefully solder one wire to each
connection at the back of the
. encoder board. On my Apple these
installation. were pin 3 for CTRL (or you could
PF connect at the slide switch
el ele Areata) toils Garand terminal), and pin 24 for SHIFT,
rs = but you should check this first.
one of siti Biots noting jwtiece Make certain that these additions
ba gi Netti - sega ball peta do not loosen or short any the
Carefully reece Vege four meres SXiSting connections: Tons the
from the bottom front edge notin cpaelay, pbeqey Somapne aus
what th beok dak N bd apes! connections unless you are using
a oil ieee! _ yee Sa nace bis FIG.4. To make these proceed as
hake een a hi -~ ent follows. Locate chip Bii on the
RERGUE hes Haas pill. abate th main board and carefully solder a
t nd. bott Ginhetly is ther ee wire to pin 12 for DLé. Similarly
eae pet as aera y Gentl connect a wire to pin 6 of the chip
pale ittay ee nt edge cd ponerse tn, at B13 for DL7. Note that pin 1 of
Keyhoard connecter eae tie aetiene «all jchipsiis | indicated by/ecwhite
kabler ements be neeKet dot on the circuit board adjacent
—— hi .
completely. Locate the character fovbbsachi p.
wae Ue
A te Ft 6 4o 4s ra 55 go gs __ 69,
oe * . a 7
. . 3 s
» ror
x x
stat Te i ~ |
went 3 * Fi x be
x . x a3 *
ay doe x wate x
LSS iE | as : ;
x 2
x x | x
he ]]z : 20
fe 1
7 x
E E | ror I | x ] ef x1] jes =
ia! z ape ei ] K ]: or ] -
on a eee <li | gece lse eel ies E
a0 : ee x 1 th iT E ho x 1!
, | fe : Pate * Bory || be
BEE : |
PEt ras 34
- Pccress ThacKs Ruin THB DRE CTION
~A_MPAESENTS A BREAK pe THE TaACK (SES TEAT)
ayeuT
Asie uit:
Page 26
HARDCORE - The Journal of the British Apple Systems User Group
June 1982
the new board
power supply case (at
of the Apple) with
cicuitry closest to the keyboard.
To do this use a couple of
double-sided sticky pads, one on
top of the other, at each corner of
the board. Make sure the soldering
on the underside of the board does
not touch the power supply case.
Plug the 16 pin header into the
keyboard socket at location A7 on
the main board making sure pin 1 is
in the right position. Plug the 24
pin header into the socket you
removed the character generator
from at location AS again getting
pin 1 in the right place.
Mount on top of the
the rear left
the keyboard
The LED must be fitted now. Connect
two insulated leads of different
colours to the LED leads. These
should be about 24" long. Note
which wire connects to the cathode
of the LED, which is the left hand
lead when looking at the indented
circle on the package. Twist the
leads together but make sure they
do not short. Gently prise up the
cover on the power on light on the
keyboard. Beneath you will see a
bulb in a mounting with four pegs.
Carefully break off the upper peg
with a needle nose pliers. Feed the
LED wires through the case top in
front of the bulb and locate the
LED against the bulb. This is shown
in FIG.5. Press the cover back in
position.
Fit the top of the case back on the
Apple making sure that the existing
keyboard plug and your additional
wires are all available. Fit the
plug from the keyboard into socket
SKTi on the new board. Solder the
SHIFT, CTRL, DL6 and DL7 leads to
the pins on the new board. Finally
solder the LED leads to the board
with the cathode going to the pin
connecting to the resistor Ri.
Testing.
to test the new
reconnect power and
If the Apple beeps then
if not you have short
circuited a power supply connection
somewhere in your additions.
Re-check your connections and make
sure all Ic’s and plugs are fitted
the right way, with no bent or
It only remains
board, so
switch on.
OK so far,
damaged
initialises
test
It
been
Apple
pins. If the Apple
correctly then you may
the board by typing something.
should appear that nothing has
changed at the moment and the
should still operate normally
and respond to control characters
as usual. If this is not so then
again a short circuit or
incorrectly fitted will be the
problem.
Ic
To test the lower case capabilities
the following two line program will
suffice:
10 X=PEEK (—16384):IF X<127 THEN 10
20 PRINT X:POKE -16368,0:G0TO 10
This will display the code of any
key pressed (with the high bit
set). Pressing SHIFT and CTRL
together and releasing them will
release the shift lock and the
codes will change. Pressing shift
will give upper case codes but will
not affect the shift lock. To lock
back into upper case press SHIFT
and CTRL together again.
To check the display,
upper case codes (224 to 255
decimal) to the screen. Flashing
and inverse modes should still work
as normal.
just poke the
The finishing touches.
as I
case
the
may
it
and
stated earlier, three upper
codes are not available when
shift is unlocked. This may or
not be an annoyance to you. If
is then a simple modification
some software will alter things
so that the upper case M, N, and P
will be given when these keys are
shifted but
“, J, and
at the expense of the
@ symbols.
To make this modification add a 1K
resistor in the position indicated
by Rx on the new board. Then
connect 2a lead from the point
marked (S) to pin 4 on the game
controller socket on the main board
(the PB2 input). This pin will now
be high when the keyboard is upper
case only and low when the shift is
unlocked. The short machine code
routine which follows will then
test this and correct the output
when necessary. The routine is
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 27
ba 40 oc) So §5 GO S$ £9.
ot I 3
x 1 prox
x 17°
x x dow 5
é . de xfl
i Ae Je * of DLS
x x HSL *
x 10
x
«
1S
20
Tia ar * Tox Du
x er
x x *
x ¥ 25
x ‘ wx !
uv
41 * : x Hy
~ x
Vv x 30
H x
4 »
a Fr
ia 4. MopiFi€o WiRnG LayouT for prs-gev.7 Appiss
M see Text
fully relocatable and should be You can now save your new version
called after reading a keypress. of TEDITOR with BSAVE
TEDITOR, A$803,L$1045
Finally I have worked out patches
for using this lower case PRINTER:
modification with Applewriter and
these are also given below. These At OF56 chanae Ei to Al
incorporate the key testing routine At 15DF change EO to Ao
so that all alphanumeric characters
v4 At 15E3 change FO to BO
are available when the shift is
Gniccrod At 15E7 change FA to BA
= At 1S5FC change FO to BO
Replace the instructions starting
Patches for use with Applewriter:
TEDITOR:
Overwrite the bytes
0808 with 4C 20 18
At $086A and $1537 overwrite the
JSR $1501 with EA EA EA (ie three
NOP’ s)
At OA12 alter the CO to
will allow the sequence
CTRL C to still perform
case change.
Using the monitor enter
following code starting at $1820
$1820:AD 00 CO 10 FB 2C 63 CO 30 OF
C9 EO BO OA C9 DD BO 04 C9 CO DO 02
49 10 C9 SE DO 02 A? DB AO O02 88 DO
FD 8D 10 CO 60
at $0806 to
20. This
ESC ESC
a correct
the
at $12D8 with the following
$12D8:29 7F Aé S7 FO 02 09 80 60 00
Now Save the new version using
BSAVE PRINTER, At803,L%1020
Lame.
Bos.
insucaren Fok Fine
Few LED. rage
~—— (BREN OFF Keak Lvs OnLy
TOGWE koom Fok LEO. )
Fig 5 LEd inocAtTeR Fitndic
Page 28
HARDCORE - The Journal of the British Apple Systems User Group June 1982
Routine for upper case M,N and P_ when shift is unlocked.
ENTRY POINT. BIT $C063 2C 63 CO Test for shift lock
3
BMI OUT 30 OF 3 Locked so forget it
CMP #$E0 c? £0 3 Lower case ?
BCS OUT BO OA 3 Branch if yes
CMP #$DD c9 DD 3 M or N keys ?
BCS CHANGE BO 04 3 Fix if yes
CMP #$CO cs co 3 P key ?
BNE OUT DO 02 3 Leave if not
CHANGE EOR #$10 49 10 3 Alter MNP codes
OouT RTS 60
PARTS LIST
Ici 74LS14 Hex Schmitt Inverter
Ic2 74LS76 Dual JK Flip Flop
Ics 74LS132 Quad 2 input NAND Schmitt trigger
1c4 74Lso2 Quad 2 input NOR gate
Ics RO-25i13 LC Lower Case Character generator
Icé 74LS00 Quad 2 input NAND gate
Resistor Ri 150 Ohms 0.25Watt
Capacitors Ci,C2,C3 0.1 uF 12volt working
Transistor @1 General purpose NPN type BC548 (BC108,BC109
also suitable.)
LED Rectangular type , colour Red (Available from MAPLIN)
Plugs Solder type Header plugs. 1 required 16 pin, 1
required 24 pin.
Sockets Low profile DIL sockets 4 required 14 pin, 2
required 16 pin, 2 required 24 pin
Note that the character generator is available from
TECHNOMATIC Ltd who advertise in the computing press.
You will also require a piece of vero-board (copper clad
type) 69 holes x 34 tracks on 0.1" matrix. This should be
available from any large electronic component suppliers.
The approximate cost of components is £15 - £16.
This journal is expensive to produce and distribute, but is
SUPPORT YOUR LOCAL ADVERTISERS !
provided free to members 8s 3 benefit of membership.
In order to afford to continue this policy we need
advertising to defray these costs.
So DEALERS ! — please advertise with us — the rates sre
and we provide a select audience of active Apple users.
and MEMBERS ! -— persuade your local desler to advertise
whenever you buy from advertisers tell them you “saw it
low
— and
in
<n
Hardcore™
—__——
———— —=
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 29
MICROS OuURCE
1 Branch Road, Park Street, St. Albans.
Park Street (0727) 72917
are pleased to announce their
appointment as distributors of
BLUE CHIP
SOFTWARE
SUPER EDITOR £22.50
Super Editor is an essential tool for anyone writing programs in
Applesoft or Palsoft. Using a simple command format, this
machine-code routine will speedily list out every program line which
contains a Basic command, function, variable or string designated by
the user. highlighting it in inverse characters. Super Editor also enables
the user optionally to substitute any other command, function, variable
OF string for the item found, whatever their respective sizes.
Remains in memory whilst programs are loaded and saved
Reduce long descriptive variable names in final versions of programs
List every occurence of a designated variable for debugging
Check all GOTO. GOSUB and THEN references before deleting a
line
Change integer arrays to real arrays and vice verso
Convert Integer programs to Applesoft and vice versa
SUPER TRACE £22.50
Super Trace is @ high-speed 6502 machine-code utility routine for
use in debugging Applesoft programs. As each of your program
‘Statements is executed, it is displayed at the bottom of the screen,
together with the values of any variable types or functions that you
may have pre-selected
Programs can be written, loaded and edited without affecting
Super Trace
Does not interfere with DOS
Can be invoked and disconnected as often as required during
program run-time
* Simple to use. Run-time control by single keystrokes
Optional display of all statements or only statements containing
selected variable types or functions
Variables highlighted in inverse dispiay and their values displayed
Normal screen display not affected
6 run-time speed settings plus instantaneous stop and single-step
Optional review of previous 10 program statements without
destruction of screen display
Also available
THE PACKING SUITE £22.50
and Symdis the Symbolic Disassembler £22.50
ANY TWO £40.00 — ALL FOUR FOR £75.00
XMON
EXTENDED MONITOR
Written by Colin Richardson
XMON extends ihe Appie ii Systam Monitor to otter a number of new commands
for exam!
ace
improved move command
TRL.R ~ — relocate machine languoge programs
comprehensive find command
plus many more
Powertul new editing teotu vided, and text page two can now be used
in'axactly the same way 98 page one. 1m “xt Dawe two-car now be
XMON comes with comprehensive documentation, making it both effective and
simple to use,
£22.00 INCL VAT
SPECIAL OFFERS
DIGITEK EXPANDER CARDS — 25% OFF
ALL PRICES INCLUDE VAT. ADD £2 post and packing per card
280 SOFTCARD
PARALLEL PRINTER CARD
‘SERIAL PRINTER CARD
BUSINESS BASIC
Now you can have APPLESOFT with the features APPLE left out
Formatted output, Programmable TAG fields, Bi-Directional Scrolling. INPUT in
strings, DISC store/recall commands giving 3 fold er jngresse end up to 3
fold apace reduction, Direct access to diac sectors,
debugging, SCREEN’ or ‘PAGE’ output, INCLUDES be MIND TRSSEMOLER
REQUIRES A 16K RAM card for use £28
EPSON OWNERS
you an APPLE owner with an MX-80 oF MX-100 printar?:
Are You having ouble Using VISICALG, GENERAL MASTER or other such
software which conflicts with your EPSON TYPE Il interface card?
Than we can help you with @ replacement ROM to go on your card which now
allows allel intertece commends to eet up your printer
correctly. For example CTRL-| 20N will get the column.
no need to POKE number "340 locations: The card supports
fault printing of page
Replecemnent ROM for EPSON TYPE Il APPLE INTERFACE CARD .. £18
COMING SOON, A BOOK TO TEACH YOU HOW TO USE THE EPSON.
OMNIDOS
OMNIDOS 1s a disk wnicn when booted allows you to make access to
16 sector disks using EITHER or BOTH formats SIMULTANEOUSLY.
+* This moons there 16 no need to use Mutfin. etc. You do not need to know
format the disk i in. YOU DO NOT HAVE TO SWITCH in eny way (sofw
hardware): the DOS d hing for You.
Bet aken up NO EXTRA MEMORY SBace
1 utility program on the disk which allows you to customise
0:
{sks which will boot on either 3.2 or 3.3 systems leaving you in a 3.2
ament,
CHANGE DOS commands, error massages, in mamory oF on slave or master
disks. Gives some program protection.
**RELOCATE OOS for example low down to leave space for s rout
memo:
e "Prepare DATA DISKS with all the Lacks evsilable to the user
#** PART INIT disks to restore DOS to a disk you have corrupted by starting to INIT
the wrong disk
** MOVE DIRECTORY to make copying difficult.
** 22 MENU OPTIONS in all
OMNIDOS DISK + DOCUMENTATION 22
TREE SORT
peed utility t0 allow you {0 add fast sorting to your
LESOFT a
tthe top of
TREE SORT is 3 hi
programs from dat
198 1000 items in § secon
can be Ascending of D
sorted in another ercay. Ze
s
800 words in 8 seconds
nding. On whole or port of an array
‘moy be included oF
excluded
Gace anti toteony bees id and
(eld ord Each ld can cary te orn specication of scancing or darcancing
Ic Valuers in the specification may be defined using simple variable
specified for rateral when two (or more) date are equi
The second array data will then be sorted to determine th fer.
COMES WITH EXTENSIVE DOCUMENTATION DEMONSTRATION PROGRAMS
complete with explanation In the manuel.
APPLE SPELLER
APPLE SPELLER between the many word processing programs for
the APPLE and the large word proce
APPLE SPELLER works with APFLEWRITER, APPLE PIE, EXECUTIVE SECRETARY.
LETTER PERFECT, MAGIC WINDOW, and SUPERSCRIBE il, to name just a few, to
Verity the spalling of your files
APPLE SPELLER comes with » 30,000+ dictionary with additional spact
8,000 of your awn wards. You can add words. delete words,
unlimited number of modified andor new dictionaries for speci ‘opplications.
qnus ne need to worry about the problems of the ENGLISH ve American
leagonaes
LE SPELLER is unbeliew
minute ith
fumber of errors
There are meny other features.
q other such programs. THIS ONE CAME OUT THE TOP IN THE SOFTALK
eviews. which is why we recommend it
SPECIAL OFFER t4ns0
THE ENHANCER
THE ENHANCER, is » board which fits under your REVISION 7 of tater APPLE
Keyboard, give you upper and lowar case with sni-key abllty, besides many
more attractive teaiu)
TOREDEFINE THE KEYBOAR
EFINE WORDS OR PHRASES USING SINGLE KEYSTOKES
**TYPEAHEAD DUFFER allows you to type in G4 characters whilst the APPLE is
ion something
TREGRAES Wr MANUAL ANO OISK OF SUPPORTING SOFTWARE
MORE FROM
MICROSOURC
Page 30 HARDCORE - The Journal of the British Apple Systems User Group
June 1982
WSF
NOW YOU HAVE AN
APPLE MICROCOMPUTER
YOU'LL NEED
OMNIS
All you've ever wished for in an
information management
system.
OMNIS sets new standards in database programs and levels of
performance that you never believed were possible on a
microcomputer
stademarks of APPLE Computer inc
+ wademark of the Regents of the
nwveraity of Caldera,
San Diego
SS i
© Regstered Trade Mark
@OmnNs js written in UCSD Pascal*. this
means a better structured, faster running
set of programs than could ever be posst-
ble using Basic — We believe that UCSD
Pascalt is the best microcomputer
language available — OMNIS proves it —
@ OMNIS js structured around powerful file
handling modules. These modules give
you the flexibility to store and retrieve
your information in the way that you
want. Full multi-key indexed access !s
available to all your database files, you say
what you. want — OMNIS does the rest
@omnis provides you with a versatile
report generating module that enables
you to define your own reports, lists, mail-
ing labels etc
@ OMNIS has unparalleled search facilities
to allow you to be selective. Those hours
of fruitless searching through rows of card
indexes becomes a thing of the past
@OMNIS lets you design your own screen
layouts for data entry and inspection
you may have up to 10 screens per file.
OMNIS has an application waiting for it in
every business, school and laboratory and
workshop. Wherever information needs to be
stored and retrieved. OMNIS Is available for
both APPLE Il and APPLE ///, We can also sup-
ply OMNIS for use on APPLE microcomputer
networks (yes. with true multi-user record lock:
ing). Trade enquiries welcome.
All registered users of OMNIS wilt be sent FREE
BACKUP disc and you will be kept informed of
all updates and upgrades. Free help will be
given to alll registered users via an OMNIS hot-
line.
OMNIS — All you ever wanted
APPLE II* version - £174.00 (incl VAT & pp)
APPLE /I//* version - £225.75 (incl VAT & pp)
BLYTH COMPUTERS LIMITED
Wenhaston, Halesworth, Suffolk
IP19 9DH
<>» 050 270 565
24 hour phone service RSs 6
G: 6 Song
p
206
LEE
HI
Tune 1982
HARDCORE - The Journal of the British Apple Systems User Group
Page 31
SHAPE—-DRAT
CONTINVED
In
the February
issue of HARDCORE we
published Peter Cave’s Shapedraw program, but
unfortunately forgot to include the program
listing, That omission is now corrected!
ILIST
10
GOSUB 4000: GOTO 1000
99 REM PLOT CURRENT FOS
1400 HELOT_X = L,Y = 2.70 X + 12y
= {70 Xe iY © 1 10 Xo 1
Pin om SW 28 Cana Grek, 2a 8
110 RETURN
199 REM DECTOHEX
200 N = OtH$ = ""
210 AX = D / 16tB = AZ &K 163D = D
- BNE N+ 1
220 IF D < 10 THEN C = D + 48:3 GOTO
240
230 C = D + 55S
240 H$(N) = CHRS (C)$D = AL
250 IF D THEN 210
260 FOR X = N T0141 STEP ~ i
270 HS = HS + H$(X)2 NEXT
280 RETURN
299 REM CALCULATE DATA AS 2 BY
TES
300 H% = D / 2563L% = D - 256 x H
%t RETURN
999 (REM. PLOT GRID
1000 IF N = NC THEN TEXT ¢? HOME
t PRINT "SHAPE TABLE COMPLET
E WITH "3NC3" SHAPES"? GOTO
3000
1010 HGR 3 HCOLOR= 7:N = N + 13T
I= ItF = 0
1020 LRi= INT (¢279 - We 4) / 2
»tUD = INT ((159 - H * 4) 7
2)
1030 FOR K = LR TO LR + W x 4 STEP
4
1040 HPLOT K,0 TO K,189%3 NEXT
1050 FOR K = UD TO UD + H x 4 STEP
4
1060 HPLOT 0,K TO 279,K% NEXT
1070 X = LR + 23¥ = UD + H * 4 -
2? HPLOT X+¥
1099 REM SAVE POINTERS TO CURR
ENT SHAPE
1100 D = I — ST} GOSUB 300:5 = S +
1199
2: POKE S,L%: POKE S + 1,H%
REM INPUT MOVES
1200
1210
1290
1300
1399
1400
1410
1420
1430
1440
1450
1460
1470
1499
2010
2099
2100
POKE 34,0? HOME ¢ VTAB 22% INVERSE
+ PRINT <2 COMMANDS -> LEFT R
IGHT UF DOWN PLOT MO
VE SEE ~> "3 NORMAL
VTAB 212 HTAB 1! PRINT "SHA
PE #"3N;" OF "$NC3" SHAPES —
"$I - ST3" BYTES USED"
VTAB 23% HTAB 27% PRINT "CO
MMAND? "3? GET AS
IF AG = “DY THEN ¥ =
C = 2 GOTO 1400
IF AS = "U" AND
Y= 430 = 0%
AS = "L" AND X > O THEN
X - 43C = 3% GOTO 1400
AS = "R" THEN X = X + 43
© = 12 GOTO 1400
A$ = "FP" THEN F = 1%
+ GOSUE 100: GOTO 1210
IF A$’ = "M" THEN F = 0%
0: GOSUE 100% HCOLOR= 7%
X,Y? GOTO 1210
IF AS = "S" THEN F = 0%
2000
GOTO 1210
REM FLOT CURRENT POSITION
YY. tet
Vo> GOTHEN:
GOTO 1400
HCOLOR=
HCOLOR=
HPLOT
GOTO
HPLOT X,Y? ON F GOSUE 100
ACJ) = F kK 44+ CRU = dt 1
IF J < 3 GOTO 1210
IF A(Z) < 4 AND AC2Z) > 0 GOTO
1500
Q = ACZ)IACZ) = OSKEEP = 1
IF AC1) THEN 1500
KEEP = 2
IF NOT ACO) THEN AS = "X"3
KEEP = OtJU = 0% GOTO 2140
REM COMPILE MOVES INTO BY
TES AND STORE
POKE I,A(0) + AC1) * B + AC
ZR O649Ts SoD ot At
ACO) = OFAC1) = OFACZ) =
= KEEPSKEEP = 0
IF J THEN ACJ - 1) = Q
Ot
GOTO 1210
REM LAST 2 BYTES OF CURRE
NT SHAPE
POKE IT,AC0) + ACL) x B + AC
2) e 6F20POKENT (+ 170s Dose -+
Zz
ACO) = OFAC1) = OFACZ) = Ot
= 0
REM DRAW SHAPE
HGR + HOME $ VTAB 22! INVERSE
TGRRENE VEETyPe “X* TO CAN
CEL ‘’E’ TO ENTER "% NORMAL
$ FOKE 34,22
Page 32 HARDCORE - The Journal of the British Apple Systems User Group June 1982
2110 HOME : HTAE Si INFUT "SCALE 4100 SCALE= 1% ROT= 03 SPEED= 25
? "SAS 5: TEXT ¢ HOME
2120 M = FRE (0) 4110 PRINT “NORMAL CHARACTERS AR
2130 IF AS = "E" THEN 1000 E BASED ON AN"? PRINT "ARRAN
2140 IF AS = "X" THEN N = N — 1% GEMENT OF 5S X 7 CELLS WITHIN
§ = § - 2:1 = TI: GOTO 1000 AN"? PRINT "OVERALL GRID OF
2150 IF A$ = "S" THEN TEXT $ HOME 7 X 8 CELLS"? PRINT $ PRINT
+ GOTO 3000 “YOUR GRID CAN BE FROM 1 X 1
2160 SC = VAL (A$)$ IF SC < 1 OR TO 69 X 39"
SC > 255 THEN PRINT "SCALE 4120 VTAB 7% CALL - 958% INPUT
MUST BE BETWEEN 1 AND 255"33 “HOW WIDE IS YOUR OVERALL GR
FOR Z = 1 TO 1500: NEXT : GOTO ID? "3;W: IF W< 1 OR W > 69 THEN
2110 4120
2170 VTAB 23% HTAB 243: CALL - 9 4130 VTAB 9: CALL - 958% INPUT
58: INFUT "ROTATION? "$R? IF "HOW HIGH IS YOUR OVERALL GR
R > 64 THEN PRINT "MAXIMUM ID? "$Ht IF H < 1 OR H > 39 THEN
VALUE FOR ROTATION IS 64"3% FOR 4130
Z = 1 TO 1500: NEXT : GOTO Z 4140 VTAB 12! PRINT "THE SHAPE T
170 ABLE CAN HOLD 255 CHARACTERS
2180 ROT= R? SCALE= SC3 HGR + HCOLOR= "
7? DRAW N AT 139,79 4150 VTAB 14% CALL - 958: INPUT
2190 VTAB 21: CALL - 848% PRINT "HOW MANY SHAPES IN YOUR TAE
"SHAPE #"3N3" SCALE ";SC3" LE? "$NCi IF NC < 1 OR NC >
ROTATION "3R 255 THEN 4150
2200 GOTO 2110 4160 VTAB 18! PRINT "THERE IS SP
2999 «REM STORE TABLE LENGTH AN ACE BETWEENS"3 PRINT ? IF LO
D SAVE TABLE WER < = 8191 THEN PRINT LO
3000 D = I - ST? GOSUE 300 WER}" AND 8191",
3010 POKE 0,L%? POKE 1,H% 4170 IF UPPER > = 16384 THEN PRINT
3020 PRINT "LENGTH",D,"$"3% GOSUB "16384 AND "UPPER
200: PRINT H¢ 4180 PRINT : VTAB 22% INPUT "WHE
3030 PRINT “BEGINS",ST,"$"33D = RE SHOULD YOUR TABLE BEGIN?
ST: GOSUB 200: PRINT Ht "3ST
3040 PRINT "ENDS",I,"$"33D = I? GoSUB 4199 REM = START OF SHAPE TABLE
200: PRINT H$ & STORE ADDRESS
3050 VTAB 8: PRINT "TO SAVE SHAP 4200 S = ST!:I = ST + NC x 2 + 23D
E TABLE ON TAPE, ENTER = ST? GOSUE 300
MONITOR (CALL-151) AND TYPE? 4210 POKE 232,L%$ POKE 233,H%? POKE
—" PRINT ST,NC$ POKE ST + 1,0
3060 PRINT " 0O.1W "3 4220 RETURN
3070 D = ST? GOSUB 200: PRINT H$" 63979 REM OOK OK KOK KKK KKK
oS 63980 REM xX *
3080 D = I: GOSUB 200: PRINT H$"W 63981 REM * SHAPEDRAW 2.2 *
” 63982 REM *X x
3090 PRINT ? PRINT "USE SHLOAD T 63983 REM x SEE *
0 RECOVER" 63984 REM * PRACTICAL *
3100 VTAB 173 PRINT "TO SAVE ON 63985 REM X COMPUTING «
DISK TYPE?-" 63986 REM * SEPT. AND DEC 80 *
3110 UTAB 19: PRINT " BSAVE ¢ 63987 REM * *
TABLE NAME> sAT3ST GLE — 63988 REM xX *
ST 63989 REM xX FURTHER *
3120 VTAB 21! PRINT "TO RECOVER 63990 REM x MODIFICATIONS BY *
USE ‘SHAPE-PROG’ FROM THE 63991 REM X *
BASUG INTRO. DISK" 63992 REM * PETER L. C
Showing the first 100000 of 158992 characters.