Вы находитесь на странице: 1из 16

PEEK [65]

The Unofficial OSI Journal


September", 19&6
Volume 7lfumbef 9
Column One
InsideThis Issue:
DSDD Disk Interface
DMS65D Mailer
U-Word. anewword proc.
Add BKto your C1 P
(S)elf-(A)ware (M)iao.
AD$
page 2
page 7
page 9
page 11
page 12
page 15
It's bard to beIie'fe UIis issue is. 90
DeIU' and yet 90 far to beiDg OIl
9ClMdule. Still, Ule respoDSe to Ule
_ issUe was gratifying and I
hope it lias reDeWld everyone's
CODfIdeDoe In Pm.
As I write Ulis, Apple Computer lias
just announced its newApple I1gs. For
lhoee of you wIIo bavn't read about it
yft, Ule I1gs is a 65(&16-baged
system U1at is designed to be
ccmpetible wiUl 9Kof ftlsting Apple
II 9Oftware, but adds Ule of a
16-bit CPU, 256K of RAM, a
detatebable keyboard Ule now-
otlIigatory mouse, a bigb-re90IUtion
grapbics chip, and Ule 15-voice
EnsoDiq SOWId chip, I mention U1e I1gs
DOt to debete Ule virtues or viceS of
Ule machine, but instead to !rigbligbt
Ule opandlllg Interest In Ule new
microprooessor it employs and U1at
Ule &-bit OSI community is beginning
to dillc:ov.
Again, verf 900D every OSI owner wi1I
bave U1e opportunity to upgrade Ule
bRiDs of bis system to a more
prooessor and I Intend to
keep PI!EI:l651 Intimately Involved
wiUI UIis e'VoIution. WbiIe Ule new
65&'2 and 65&16 wi1I run our Uldent
6582 9Oftware, Ulere isD't a lot of
90ftware aftilable to take advantage
of UIe new chips' abilities. That means
UIe OSI community wi1I again bave to
band togetb to prOTide its own
solutions.
WbetJler you call UIem bMlbilsts,
per9ODll1 computer or ?ideo
UIe CI,IC"iIC& community
simply isD't large enougll or
etIU1usiastic enoogb to provide a
vendor a reasonable return on new
9Oftware. VIIless Ule software wi1I aI90
appee1 to Ule seria1 system 1IIlIfket,
you aretl't goiDg to _ a new
oommerdaJ product. It __ to me,
tbefore, U1at _ are beck to a
situation wtlere tbe wi1I be no
90ftware unless tbe are enough
bardware purchases to warrant it, and
tbe won't be enough bardware
purchases if tbe is no software.
C1elIr1y tbe lias to be someUIilIg to
get U1e ball rolling.
To belp t1lings out In Ule "lideo
1IIlIfket, _ are an once again
iJldebted to Paul CbidIey of Ule
Toronto-based IIlItl' group roSIE for
de'Veloping a new CPV board U1at uses
UIe 65&16. FOI" Ule bigb-.nd users, an
immi1lent announcement wi1I bring .
you aIoDg as weU, alUloogb I aped
Ule divergence In 65U1651> software
Ule communities to
iIlcnase, ratb Ulan dimifIish.
For my pert, I bave oommitted to
prodUoe a versiOII of my AShl-Plus
assembler fOl" the 65&16.llut to really
make UIis chip attractive, tbe must
be more Ulan just an assembler.
Tberefore, I propote U1at Ule new 651>
project I bave been touting be sIIlfted
to specifically designed as a 16-bit
operating system. Stan<I up and be
beard now, people. Take Ule time to
write ill wiUI your COIIIIIletIts,
and opiDiOIIS or UIis
project wi1I Ia!lgUisb and die.
PIeeae cbeck out Ule mailing label on
UIis issue. As noted In Ule Summer
issue, an subecribers <:Urretlt U1rougb
June of 19&6 bad 2 ema monUls
ackIecI to UIeir sub9cliptiolls, Some
people's subeatptiOn wi1I bave
"fired despite UIis esteDsion, for
many otber'S, UIis is UIeir last issue. In
any event, if your subscription. is
about to ellpite, JlI- don't wait for
Ule reminder postcard to r_. It
wi1I be some time before I can do
anoUIer mailing and UIis may cause
you to miss an issue if you negIt to
renew now, So take a moment and see
WIlen your sub8cription "fires. Tour
support is very much appreciated.
Lots of good stuff ill UIis issUe. Among
otIler UIings, Scott Larson shows us
boW to add &It of RAM to Ule CIP, J
bave iDduded Ule mailing label
program .for my DMS651> 90ftware
presetlted ill the Summer issue, as
weU as a product description of the
new word-proces9Of from SotToudI,
Dllve Uvesay pregents bis new disk
iIlterfaoe U1at aJJows you to connect
Ule n.-r bigb-density mini-floppies
to your system (Wbich be is offering
fully assembled for $501, and Richard
Reed gives us SAM, Ule Self-Aware
Miaocomputer. Enjoy!
.... ,
f'-l'"L--------------ri..::>-'r- .12-. c_ t ..,)
J-q
OSI
SIDED
-....e- drl_
_l_to ..or
otouble alcM4
drl_
OF THE
DOUBLE
roe
a.._ $ __"_"'"
e.-e-- .J'"
_I.et ror
l""
drl_
.
b
The OSI disk drive selection circuitry
as used on the 505 board is shown in
fig. 2. Other OSI floppy controllers use
the same basic circuit but you will
have to trace out the signals starting
with the PIA or get a copy of the
schematic for your board. For double
sided operation the traces marked
with an 1[" must be cut and the
jumpers shown in dashed lines must
be added. The drive selection logic for
single and double sided drives is
shown in table 1. As shown in table 1
selecting drive A or Cwill select side
MODIFICATION
CONTROLLER FOR
DRIVES
,
I

P'A
with built in data separator. During
the past few months I have seen
double sided MPI drives advertised
for about $89. To make the required
modifications you will need to remove
the main circuit from the new
drive. Make note of all of the
connector positions and if need be
mark them before removal. Now
remove the connectors and the screws
holding the board in place. For either
a double or single sided drive there is
only one modification required. The
line Which goes to pin 30 of the drive
interface connector (}4) is connected
to pin 3 of the 7438 nand gate shown
in Figure 1. This is normally the raw
data output. Pin 1 of this nand gate is
connected to pins 5 and 9 of the
74LS123 (see fig. 1) and must be cut.
Make sure that the connection
between pin 1 of the nand gate and
the. drive separator connector remains
intact. Now you will need to remove
the small data separator circuit board,
Which is located at the front right
hand side of the main circuit board,
from your old drive. Install this on the
new drive and replace the board and
connectors. You now have a new
single or double sided MPI drive. For
double sided drives the circuitry on
the OSI controller and paddle board
will also need to be modified.
Those who are faced with the problem
of adding more drive capacity or
replacing existing drives have several
choices available. These choices
include purchasing a new MPI drive
and adapting your old data separator
to it, building a new data separator
and using standard 40 track drives
either single or double sided, or using
one of the 00 track double sided
drives. Some of the information
presented here has been published
before but I think it worthwhile to
place all of this information into one
article.
NEW MPI DRIVES
First we will discuss the adaptation of
a new MPI drive to replace an existing
OSI MPI drive. As those of you who
have 5.25" disk systems know OSI
used a single sided 40 track MPI drive
by David Uvesay
Ave de la Resistance 6
B-4920 Embourg, Belgium
Bow to aclcl 5.25- oie 01' oe Track
Double Sided Drives to Jour OSI
This article will cover several sUbjects
dealing with the problem o{ 5.25"
drives for the OSI. Covered will be the
conversion of a new MPI drive to
replace your old drive, how to build a
data separator and a motor control
circuit to use with any industry
standard disk drive and last we will
cover how to use double sided 80
track drives. By implimenting the
suggestions here you can increase
your disk drive capacity to either
328K or 656K for about $300 or even
less if you only impliment part of this.
Copo,jric}ht 1986 PEEK[U) 4n ric}hts

Editor: Ricbwd l. Tr.thtw.."
DATA
PIG. 3
4ir S<rf_
us $22
$38
Ell'". $42 $48
Othtr For.ign $47 $48
4n ... for ont IJ'" a ... ..
.. us cIofl.-s. For Nc:lc issutS,
or othtr information, ....,.1\. to:
PEIC(U}
P.O. Box:586
C4 94844 . 415-359-5788
Htntion of products bIJ tnd. _ ..
mattrul or contilntcl htr...... no
constitutK Mdorstmtnt of tht product or
products lMj this magiZ.... or tht pcm1tslltr.
i

u.
1''1< _Juat (or 6 ,.a
po_ltl_
pul_ at U. pin.
u. p---<
-- ---<"1-10
u 7"38
U 7".21
I" I - C(JJoMaCTOll TO C'QIIfT'aOLL.. BOAltDl
,)2 - TO'LOI"'PY CA.....
page 2 PEB(65) september, 1966
one or two of the first drive and
selecting drive B or D will select side
one or two of the second drive. The
only problem now is that the drive
select signal for drive tWo must be the
inverse of the signal for drive select
one. We have two choices. The first is
to add an inverter on the paddle
board between pin 3 of the controller
connector and pin 12 of the connector
going to the drive. You can use a 7438
nand gate for this. Pin 18 of the OSI
controller which was conected to pin
12 of the disk drive needs to be
connected to pin 32 of the disk drive.
The se<:ond choice is to use the fault
reset driver in the OSI controller
circuit which is not used. This driver
is shown in fig. 2. The input should be
connected to pin 13 of the nand gate
(U5A) which driVes the driver for
select drive I line. The line coming
from pin 14 of the PIA will also need
to be cut Now pin 4 of the OSI
controller connector will need to be
connected to pin 12 of the disk drive
cable connector and the connection
between pin 12 of the disk drive
connector and pin 18 of the controller
connector removed. Pin 18 of the
controller connector now needs to be
connected to pin 32 of the drive
connector. Table 2 shows the final
connections. If you build the motor
control circuit described later you will
only need to make the changes for
conversion to double sided drives
without making the changes needed to
add the inverter for drive select 2.
USING INDUSTRY STANDARD 5.25"
INTERFACE DRIVES
Now what options do we have? The
first thing is that we will use an
indUStry standard drive. Almost all of
the 5.25" drives on the market today
use the same interface. The only
differences you will find are that
some drives have more user installed
options available than others. Table 3
shows the pin asignments for the
5.25" interface. The OSI MPI drive had
the industry standard interface with
two changes. Instead of using pin 30
as the read data line it became the
separate clock line and pin 34 became
the separate data line. Some history is
perhaps in order. The first disk drive
that OSI offered in 1976 was the GSI
model 105. The 470 board was
designed to interface to this drive.
This. is the reason that some of the
lines of the drive controller such as
fault reset are no longer used. The fact
.that this drive and the latter Siemens
and Shugart 8" drives also had data
separators meant that OSI never did
develop an interface board that
included the data separator. As the 8-
drives all used AC motors they ran
continuously and when OSI came out
with the 5.25" drive systems they
never bothered to provide any control
for the motor and had to use a drive
with a built in data separator. It may
also be that they decided to let the
motor turn constantly to increase the
access speed. So much for history but
thats how we became stuck with
today's problems with the disk drives.
DATA SEPARATOR
If we're going to use the industry
standard interface we will need to
build a data separator. There have
been several articles published in
PEEK(651 on building data separators
all of which should work. In fig. 3 is
another data separator circuit which is
the one used by Siemens on the 8"
drives. The timing values have been
adjusted to conform to the 5.25"
timing requirements. This separator
uses fewer components than most of
the others that I have seen and works
fine. You can adjust the timing by
connecting pin 9 of the OSI controller
to pin 30 of the data separator. Adjust
the potentiometer for a 6 microsecond
low pulse at pin 1of the 74121.
DRIVE MOTOR.CONTROL
I would suggest that you build a disk
motor on/off control circuit unless you
want your drives to turn continuously.
The motor control circuit is shown in
fig. 4. The motor control has been
set-up so that anytime a head load or
step pulse is detected the one-shot
will trigger for about 5 seconds.
Anytime a new step or head load
pulse is detected the one shot will
retrigger for the 5 second period. In
this way the motor will stay on if the
drive accesses severa1 tracks in
succession. The second one-shot is
used to inhibit the output of the index
pulse until the motor has had time to
come up to speed.
.JI-S iTiP
,oo.
.12_'6 IJTQIa QIIII
+5
<Ii) .. CUT Pc. 011 "lTqt
CUT .". IDal' Dvaa
_ _ _ ADO "* oouea..a alD80 DIllvas
U 14Lae6 u.. '6.
U 7.Lal U u '.311
y+5
4101\
I
'--------+--<.U, \\- -<
In general, almost all of the disk
drives available will start in -5
seconds or less. We therefore need to
inhibit the index pulses for about -5
seconds. If you wish, you can
. experiment with less delay to provide
. for quicker access. In some cases you
can decrease the delay to around .25
second. If you wish to have
your motor on continuously for faster
access then a switch can be added as
shown. This switch can be located
either in the computer or on the disk
drive case.
THE OTHER DRIVE SIGNALS
The connections between the OSI and
the disk drive are shown in table 2.
Note that if you have a drive with the
page 3 PEEJ:165) September, 1986
a
rea4y signal Ulen you can connect this
liDe to piDs 22 and 24 of the OSI
controller, otherwise th_ piDs sbould
be grounded.
BUIWING THE DATA SEPEIUITOR AND
MOTOR CONTROL
~ l
DIIUE SELECTID. L06IC FOR lSI DISt DIIUES
FOR SIHGLE SIDED DRIUES
:---------------------------------------------------:
:---------------------------------------------------:
:---------------------------------------------------:
:---------------------------------------------------:
DRIUE 8
DRIUE R lOU
lOU
HI6H HI6H
HI6H
lOU
lOU
HIGH
HI6H
FOR DOUBlE SIDED ORIUES
II
HIGH
lOU
II DOH'T CARE
:---------------------------------------------------:
HIGH HIGH lOU LOU ORIUE R
lOU HIGH HI6H lOU ORIUE 8
HIGH lOU lOU HI6H DRIUE C
lOU lOU HIGH HIGH DRIUE 0
PIR PIH : COHTRDllER PIH .:
:----------------------------------: DRIUE SELECTED:
: PIH 8 : PIH 15: J2-l : J2-18:
PIR PIH : CDHTRDllER PIH .:
:----------------------------------: DRIUE SELECTED:
: PIH 8 : PIH 15: J2-l : J2-18:
HEAD LOAD CONTROL
I 'WOuld recommend that you epoJ:y
the connectors to the proto board. I
used a 3'i pin right angle ribbon cable
header f ~ the connector to <IisIr. drive
This alows you to eesily replace the
cable. The 'i78 pf capacitor In the data
separator cir<:uit shoud be a stable
type such as a silver mica unit
II you WisIl to build your own data
seperator and motor cootrol you can
bui1d ODe using a smaI1 prototype
board about 'i. I 3". The biggest
problem is that the Molez COIlIleds
for the connection to the OSI use a
.156 spacing between pins. Tou can
drill new boles in your prototype
bovd to match. Tou will find that you
can WIe some of the ezisting holes if
you eD1arge them. II you use the
standard conneetors as used on the
computer boards you will need to
straighten the leads so that the
connector Is at right angles to the
board. Moles also builds a version 01
the QOlIIlector with straight leads.
-HOTE- fOR DOUBlE SIDED DRIUES
DRIUE R DRIUE 1 SIDE 1
DRIUE 8 DRIUE 2 SIDE 1
DRIUE C DRIUE I SIDE 2
DRlUE 0 DRIUE 2 SIDE 2
In gelMfai there are two types of head
load cootrol f ~ 5.25 drives. Some
drives such as the hlPl use a head
load solenoid and have optiolls f ~
head load with motor on ~ head load
with drift select. Others such as
Taudon and Panasonic load the head
Wben the drift d ~ is c1ose<I and
dont have a head load solenoid. Some
of the newer drives have other
options such as using pin 2 wIIich Is a
spare ~ pin 'i the In Use !iDe to load
the hea4. All of the newer drives (if
they haft head load 9OIenoI<Is) also
have the load head CODSlant, with
motor on and with drive select options
f ~ loading the head. ~ those wbo
don't WisIl to build thelr own
separator and motor control I will
have OIM available assembled and
tested without <IisIr. drive cable but
with a headet" for the drive cable. This
wI1l sell f ~ 11Ddef $'i8 piUS about $5
f ~ airmail shipping.
DRIVE SELECTION
Now that _ have the problem of the .
data seperator taken care of what do
_ do about the drive. For someone
looting for a bargin in <IisIr. drives you
should be able to find some single
sided Tandon 188 drives as used in
the early IBM Pes. Most of these _e
removed and replaced with double
sided driV" a few years ago. It you
look In the ads in Byta magazine you
will find many double sided half
height 5.25 drives advertised t ~
under $98. Suitable drives are
idenWied as 'i8 track double sided.
Some known drives wIlich CODform to
this are Teac FD-55B, Shugart SM55,
Mitsubishi 'i351 and Qume 1'i2.
Panisonic and others also build drives
Whi<:h can be used. It you wish to use
two of these double sided drives you
will need to modify the circuit of your
<IisIr. controller board as described
earlier. It you built the motor control
circuit then it must be CODfigured as
shown in fig. 'i t ~ double sided
operation. The first drive must be
set-up as drive one and the second
drive as drive two. The manual that
you should have obtained When you
got the drive will explain how to do
this.
,
pege'i PEU(651 september, 1961>
USING .,. TRACIt DOUBLE SIDED
DRIVJ;S
ToULf:2
-HOTE- (THROUGH COHTROlLER) lHOICRTES THAT THE SIGHAL IS
nODIFIED 8Y THE DRTR SEPRARTORIftOTOR CDHTROLLER.
051 ClIITIlOlLER - 0151: DllIUE COIlItECTllIlS RHO FlIiCTllIlS
(CllltFlGURED FOR IIWllE SIDED ORIUES)
(TO ctlHTRllLLER) lHOICRTt:S THRT THE SIGHfl. IS USED
8Y THE DRTR SEPRARTORtnOTOR COHTftOl OR GEHERRTED
8Y THE COHTROLLER .
FUHCTlOIt
HERD LORO
LOU CURREHT
ORIUE SELECT 1 t 2
FRILT RESET
STEP
DIRECTlOIt
ERASE EHR8I.E
illITE GRTE
URITE ORTR
SEPRRRTE CLOCI:
SEPRRRTE DRTR
GHD
+SU
-9U (HOT USED)
H.C.
IHDEX
SIDE SELECT
illITE PROTECT
RERDY DAIUE 2
SECTOR (HOT USED)
FRUlT (HOT USED)
TRRCI:
RERDY DRIUE 1
SPRRE
IH USE
DAIUE SEL 4
DAIUE SEL 3
noTDROH
RERO DRTR
SPRRE DR READY
At tbIs point, If you'Ve decided to
convert to two .,. track driftS, you
sboUId use the combination of one -4.
track drive witb one .,. track drive to
copy au of your programs to dIsts In
the ae track drive. You can tbeD make
the permenant Cbange to two 68 track
drives. Before you can do tlIls you wI11
Deed to Cbange the CREATE utility. So
tbat more tban -4. tracks can be used
pege 5 PEE(165) september, 1966
DRIUE
PIH 1
1 H.C.
2 H.C.
3 (THROUGH CtltlROl.ER) II t 12
1 H.C.
5 28
6 18
7 H.C.
8
9 22
II (TO COHTROLLER) H.C.
11 (TO COHTROlLER) H.C.
12 t 13 TO ALL 000 PIHS
14 H.C.
15 H.C.
16 H.C.
17 (THROUGH COHTROLLER) 8
18 (THROUGH COHTROLLER) 32
19 28
21 GROUND THIS PIH H.C.
21 H.C.
22 H.C.
23 26
GROUHO THIS PIH H.C.'
H.C. 2
H.C. 4
H.C. 6
H.C. 14
H.C. (TO COHTROlLER) 16
H.C. (TO COHTROLLER) 31
H.C. 34
OSI COHTROLLER
PIH"
SOI1E OF THE HEUER DRIUES HRUE RERDY LlltES (PIH 34)
UHICH nRY BE COKHECTED TO 051 COHTROLLER PINS 28
RHO 24,
proceed to mate a copy of your
operating system disk witb your
utilities on il Now remove the -48
track drive and coanect the first .,.
track drive In Its place. You sbould
DOW find tbat the disk that you just
made will boot
How <10 we set au or tbIs up? First of
au you must bave ODe -48 tract drive
available. ThIs mould be set up as
drive ODe. It you have an OS! MPI
drive you wI11 Deed to modify it to
provide tbe raw data to pin 38 of !be
drive. It you look at the drive
controUer board you wI11 find tbat pin
38 goes to a 70436 nand gate. In the
OS! versloll tbe traoe from pin I or tbe
7-436 WIlid1 goes to pin 5 and 9 of a
7-4LS123 bas been cul We Deed to
remove !be small data separator from
tbe disk drive and reconnect the cut
trace.
It you __able to Inltiallze a disk In
121_ 68. track drive you can now"
\
Anotber easier way is to remove tbe
data separator and jumper pin 3 of
!be data separat.oc c:oonedorto pin 5.
Wltb tbIs ebange made !be drive wI11
DOW output tbe rawdata at pin 38. At
tbis point you sboUId connect the
drive to the new data separator and
computer and attempt to bool It
nerytblng was dooe cocrectly it
sbouJd bOOt. It au goes weU you can
connect !be .,. track disk drive. set It
up as drive 2 as Instrucled In the
manual. R.ooot and try to InitillliZ'e
tbe .,. tRek drive. n. first side of
the 68 track drift wI11 be devloe 8.
Enter D1srrSE 8" .RETURlI> tbeD POrE
9931,126,P01E 1"69,121 and POlE
1t15,121 . lien enter D1S1nJnr. It
au goes -'1 121_ computer WIll
InlUlIIiZ'e 68 tracts.
Now we e:em. to !be r.al heart of !be
article. We bave anotber cboice foc tbe
type of drive to use. It you would Iilte
to increase your drive capecity at
very IiWe cost coosider using 68 track
drives instead of tbe -48 track units.
You can use driftS built by tbe above
mentioDed manufacturers wIliCb are
usuauy identified as .,. track oc 96 tpi
(tracts per iJlcb) drives. These usually
cost about $18 more t2Ian tbe -48 track
drives. n. OII1y tbat we Deed
to make Is to modify 65J) and some of
tbe utility programs 80 tbat tbey
know we bave .,. tracks available.
The 65J) memory locations to be
Cbanged are shown In table -4. We wI11
get to tbe utility programs later.
..
change the following lines to read as
follows:
T..ulLE3
IHDUSTAY STAHDARD 5.25" IHTERFACE PIH DESIGHATIDH
198 DIn ALI(79)
28898 If T8<13 OA T8>19 THEH
288B8
28118 If HT<I OA HT+T8>B8 THEH
28188
PIH" SIGHRL TYPE FUHCTlOH
-HOTE- ALL ODD PIHS RRE GROUHD
T..ulLE4-
THE FOLLOUIHG nEnORY LOCATIOHS nUST BE CHAHGED IH DOS TO USE THE
EIGHTY TRAC( DRIUES. THE HUnBERS IH ( ) ARE THE DEClnAl UALUES FOR
PD(lHG.
WHAT WILL THIS COST?
Two 40 track double sided half height
drives will cost a maximum of $160. If
you use your existing case for a single
floppy systemyou can install two half
height drives in it You mayor may
SB8 (12B)
S19 (121)
S19 (121)
CHAHGE TO
SPARE
IH USE
DR IUE SELECT 1
IHDEX
DR IUE SELECT I
DR IUE SELECT 2
DR IUE SELECT 3
nOTOR OH
DlRECTIOH SELECT
STEP
URITE DATA
URITE GRTE
TRRC( 88
URITE PROTECT
RERD DRTA
SlOE SELECT
SPARE DR READY OH HEUER DRIUES
If you wish to purchase a new case it
will cost about S50 with power
supply. If you build the data
separator yourself it will cost you a
maXimum of S20 plus another S15 for
the cable to the disk drives. If you
purchase the data separator and
motor control it will be about S40 piUS
the cable. So the price range for this
modiliction will be between $2 15 and
S290. If you use the 60 track drives
then you will spend another S20 for
two drives. This is not too bad an
not be able to get away with using
your existing power supply. Since
both dri ve motors can be on at the
same time the power supply must be
able to furnish the power for both
drives at the same time.You can also
replace the power supply with a small
. SWItching supply.
$18 (61)
$39 (51)
S39 (51)
EXISTIHG DATA
lHPUT
lHPUT
lHPUT
OUTPUT
lHPUT
lHPUT
lHPUT
lHPUT
IHPUT
IHPUT
IHPUT
IHPUT
OUTPUT
OUTPUT
OUTPUT
lHPUT
2
1
6
B
18
12
11
16
1B
28
22
21
26
2B
38
32
31
S26CA (9938)
S2169 (188B9)
S2119 (18118)
nEnORY LOCRTIOH
have a need for elOChanging programs
then you should keep one 40 track
disk that you can substitute for one of
the 60 track drives Wben you need to
send someone a 40 track disk. If you
only need to read 40 track drives then
you can write a program in BASIC or
machine language to read a 40 track
disk on a 60 track drive. Another
option would be to write a disk copy
program in BASIC or machine
language to read a 40 track disk on an
60 track drive. To do this the drive
must double step to move one track.
There are three memory locations in
650 which need to be changed. There
are two ways that we can do this. The
first one is to poke the correct values
into memory from BEXEC*. The second
way is to make the changes and save
them back to disk. To do this eXit
BASIC to 65D and load the track zero
read/write utility. Follow the
instructions to read track zero into
memory at $6200. Load the extended
monitor and change the three memory
locations lis: . in table 4. Remember
you will use ali offset of $4000 Wben
making the changes (Le. use S66CA
instead of $26CA). Reload the track
zero utility and follow the instructions
to write the data at $6200 back to
track zero. Remember that we will
read and write 6 sectors each time. At
this point you should have a disk that
will boot and be able to use all 60
tracks. It should be mentioned that
the 60 track drives will step at a rate
of 3 ms so you can modify the step
rate in 65D if you wish.
CHANGING 65D FOR 60 TRACK DRIVES
28898 If T8-1 OA T8-12 OA T8>19
THEH 288B8
NOTE If you wish to use tracks
lower than number 13 on a data only
disk you can change line 20090 to
read as follows:
At this point we should consider the
problems which could exist with this
-ystem. The first problem is that the
disks you create in 60 track format
WIll not be readable by 40 track
drives. If you never elOChange
programs with others then this should
not be a problem. If you sometimes
,
page 6 PEEK[651 september, 196t.
ARE THERE ANY DRAWBACKS TO
USING 60 TRACK DRIVES?
You should also make the three 65D
memory changes permenent.
investment to obtain 656K of disk
drive storage to replace tlle &2K tllat
you bave witll one single sided MPI
drive.
WHAT ELSE COULD YOU OO?
Wbat I baven"t mentioned is tllat you
could select a 3.5" drive. The 3.5"
drives use tlle same interface as tlle
5.25" drives and tlle controler cant
tell tlle difference. Anotller cboice for
tllose who bave botll 5.25" and &"
systems is to use tlle newer bigb
density 5.25" drives as used in tlle
IBM AT.
You must use one of tlle two speed
versions. In tlle lowspeed mode tllese
drives can be used to replace tlle
standard &9 track 5.25" drives. In tlle
higb speed mode tlley can replace 6"
drives. Using tllese drives to replace
6" drives will be tlle SUbject of
anotller article.
WRITE FOR PEEK!
Mailing Label Utility for
DMS-65D
by Ricbard L Tretllewey
As promised, this montll I am
presenting a follow-up to tlle random
file system for OS-65D V33 tllat I
wrote about in tlle Summer issue.
You11 recall tllat one Of tlle primary
uses for database managers is for
mailing lists. The program presented
bere incorporates most of tlle editing
functions of its predecessor, but goes
on to add a mailing label printer and a
simple report generator.
As witll any program using data files
under OS-65D, it is vital tllat you run
tlle program "CHANGE" before you
enter tlle program into tlle computer
so tllat BASIC will reserve tlle
appropriate amount of space in front
of tlle workspace for tlle disk
buffer(s). MAILER requires only one
disk buffer, even tllougb it does
include token support for a second
data file to be opened simultaneously.
The mailing label printer is written to
allow you to print any numt>ei- of
,
1e FI1- tta i Iing Li s t I1cnJger for CI'tS-lD
28 GOTO 1999
38 :
48 fEn- Construct DeYice 6 Orrent Track Str j ng
sa c6 - - AIONT.<gTR$(o6-I-kh). 10.2);
68
199 fEn- Get Record t&r6 for o.vi C8 lt6
118 i6 bodf .. .t ItlHi6/b)" sHk6)
129 GOSlIJ 58: IF c6 :3' .t TlN 168
139 d6 = PEE)(99QS); IF d6 = k8 TIH 159
148 DISK! -so ... t6$ .... 1=3a7er .. pg$: PCI<E 988:J.kB
'58 OlSl(!-co 3a7p-" t6$ .. -.1-; POCE 9894, FltI(e6)
169 i6 - .. bs(k6); ih - IHT(i/pg): it- - ih*pg
178 PCI<E ip<kO>. i 1: POCE ip<kC'+k 1. ih
175 p(J(E op(k[). il: POCE op(k6>+k.'. ih
lee RTl.ftl
190
289 fBI- Set Devica 6 I/O Poinl...-s to Indax(O)
218 i = 16+bs(kO) - (Ftta(PEEK<9884 - sHkO*ts
215 ih =IHT(i/pg): it =i - ih*PO
229 POKE ip<k6),il: POKE ip<k6>+k1,ih
m f'!I(E op<kO),II: Pac:E op<koml,ih: fE11..Rf
278
388 AEn- Fetch Record Device 86
31B GO:SlE 189:FOO k ::t kl TO nl: i6 = bodf + .i6Ck)
339 GO:Sl.S 299: U+UTak6,a$<k): tXT k: fTl.Ri
348
489 REn- Put Record ClJ t to DeYi ce *6
.,9 GOSI..m 198
.29 k = k1 TO nl: iO = bodl + rO-k1>*,..U + lOCk) :GOSle 28B
.39 PRIHTakO.a$<k): tXT k: PETI.R'I
4<8
700 PEn- Record Contents
119 PRIHTadv Ma- TABCk4) MFi.ld No.8-. TAB(32); -Contents-
728 PRINT: Foo k k 1 TO nf '
7.l8 TfflCk4l; n$Ckl; TfflC32l;o$Ckl: IXT k: PAltlT"""
149 FETlRl

899 Fn- no i n I18nu


818 :
828 PRIHT !(29); &Ck9.kB); MDMS-6SD Data File ManoQer-
839 PRINT &CkS,k2); -<I)
848 PRINT -(2) Print Moiling labels
M
841 PRIHT &CkS.k4); -(3) Report I..riter
sse PRINT &CkS,kS); -<.) Edit a ONS-6S0 Kaster File-
9Be PRINT &(k9.k7); -Vou- Ololce -;: II'flIT y$: k :: Ufl....Cy$): TPIP 8
Q19 PRIHT 1(28);: IF k :: k9 1lH no
929 IF k(k1 OR k)k3 OR kolNTCk) T1t1 828
938 ON k GOTO 2988,7888,28888,4888
00ll :
Ieee k8=8: kl=1: k2=2: k3=3: k.:4: kO=O: k7=7: k8=8: k9=9: kt=19
1918 oo=ASCC-A-): az::A$CC-Z-): a9=ASCC-B
M
): a9=ASCC-g-): kh=189
1928 pg-256: hex$--9123456789abcdd-: sx-16: tt-32: di-I1897
1030 p(J(E 2972,13: PC<E 297tl.13: fDt- Disable eo-a " Colon
1949 DEF FHaCx) := kt*IHTCx/g:) + x - IHTex/g)*g:
lese DEF FHbCx) 5x.IHTexlkt> ... x -
1868 ht = FtlaCPEEJ(C1 1687ll: dt = FttaCPEEJ(CI1715ll:
1979 Din indexCk7). bs<k7). beCk7), 5tCk7)tCk7), cuCk7), dfCk7)
1888 Din ip<k7), opCk7), fSCht). utCht)
1898 bsCkO) :: PEEK(8998) + :REn- Buffer Slcrt Adli"'ess
I lee bs<k7) - PEEK(9996) + PEEJ(C9997>*pg
1119 beCkll):: PB(Cge08) + fn- Buffer End Address
1128 beCk7) - PEEJ(C0988) + PEEJ(CQ890>*pg
1138 ts - CbeCkO) - bs<k6: pg$ I1ID$Chex$, ls/pq+kl, k1>
1149 dtS : RIGHTSCSTR$(dt+kh). k2) + -. M
1159 ipCk6) :: 0132: opCk6) : 0155: ipCk7) 0213: opCk7):: 9238
1168 G010 889
1m
2999 Rtt- 0 i rectCf"\l p,.. inter
28 19 GOSlII GOSlII 11188
2829 PRINT 1(28); "OirectCll""\t-: eRIKT
2838 fOR k - k8 TO ht: IF lDt<I$Ck k9 T1H 2888
2848 PRINT TABCx'19); LEFT$Cf$Ckl,k5l;
2941 p z k8: IF k ) kO THEN p : k7
2858 PAltlT TfflCxOl9'p>; RSCCMIO$(f$Ckl, k7, kIll;
2851 P = 12: IF k ) k9 THEM p =18
2868 PRIHT RSCCRIGHT$CI$Ck), k1;
2879 x :: )( + kl: IF )( :: k3 TtEJ1)( :: k8: PRInt
2988 IXT k: PAItlT: PAItlT
2898 ItfI'UT -Press cRETlRl> to Continue -; y$
2189 PRIHT H28);: 0010 B89
2119 :
38ee REtt- Create Olarocter Record
3918 FOR 1 :: kl TO nl: o$Cf) z .-
3929 FOR k- kl TO IICf) - k1
3838 c :: INTCRNQ(kl) A$C(MZ
3649 IF c z) a9 fN) cc:aQ THEN 3979
385B IF c - )QCI flit) c(-m; TtH 3979
page 7 PEEJ:[651 September, 1966
38e8 IF (c(RSC<-g OR <c>ASC(z THEn 3831
3lJ18 "'(1) a$(1) + Ofl$<c): ltEXT k, f: lIEMM _:
_ fEll- Edi t IJtHl:lD """tor Filo
4911 GOSI.8 1_
<M2I PRJm '(28) ;-ms-liD nast... FU. Edltar-:",UfT
_ PRINT "< tl Add a _ -.."
_ PRINT "(2) ... Old __
_ PRINT "(3) Doloto a Ilocord""
as_ PftItrT '''(4) Ft.,,", to l1ain n.nu-
-- PRINT: IIAIT " Your Cholco -; \1$: k UIL<\I$)
44178 IF k (k1 IJI k>k4 IJI k () nfT(k) TlEIl 4828
.... CIt k OOTO .. ,ee. 4488. 4898. 4988 _:
4" REI! Add a-"
41" IF tn rr no ",um "'FILE FlU... : B09l8 OOTO 4828
4121 FIJI k kIlO nf: PRINT
4131 PRINT "Ent.. "; nS<k): PRINT TfII<k2);
4'''' FOR 1 kl TO 'J(k> - k1: PRIIfT ---;: rXT J: PfUnT
41,. IHPUT "'<k): I LEn<"'(k
.. 1M JF 1 ( nOt) TlEN tXT k: GOro 41.
4178 Plltllf -roo llKl '": PRINT: GOlO 4131
4188 PRINT H29); " .-; rlm<k.);-tt.e"; .. : PRINT
4191 FOAk kl TO nf: PllINT k; TfWI<k4);n$<k); TfWI(32);o$<k): IEXT k
4211 PllINT: IIAIT """0 Those ftlriltlt 0; \1$: \1$. LUTS<\I$+" ",kll
4218 PRINT: IF \1$ ."y" TIH 43IlI
4221 IIAIT """ch ano did you ....t to etlango " ;\1$: k UIL<\I$>
4231 IF k'kl IJI k'nf TlEIl PRIIIf"IIIlT 71": PRIIIf: GUIO 4188
4248 PRINT "Ent.. -;ntCk): PAIKT rfBCk2);
4Z58 FCi' 1 ., kl TO tlCk) - kl: PRlm---;: rXT I: PI'UrtT
4268 IHPU Ta$<k): 1 lEN<a$<k: IF 1 ( fl<k) THEH 4181
4278 PRINT -TOO lOttO": PRINT: ooTO 4241
4281 :
4388 tn. tn + kl: r6 = t,. :GOSlB 488: GOTO 4828
4381 :
_ fII- an Old Ilocord
44 .. PRIm: PRlm"File Contains"; tn; "RecordCs)": PRIHT
4428 IF t_1 TIIl PRllIf"1Il fBXRJS ... FlLE",OO&Il _:GOT1l 44121
4421 PRINT -( t> Edi t "-c:crd tbIber"
4422 PAt", "(2) Edi t by Sec:rd1ing Fi Ie": PfUm
4423 IHPUT" Your Choice "; uS: k = U!L(\I$>: PRllIf
4424 IF k(kl m k>k2 OR koIHT<k) 1lJt 4419
44Z' CIt k OOTO 443111, 4618
4438 JI'PUT "loIlich fEaR) PUEER did UOU .cwlt to see "; uS
++Ie PRIHT: k-uFl..(y$): IF k(kl m k>tn OR knlHT<k) TIE" 4438
"':J8 rO k: GOSlII 3811
4468 PRI", I (28);; du PEEK(8003): GOSlIl 78B
+488 ItAI1' "Did 'JOU Mrlt to change this rOr"d "; vS
4491 PRINT: IF LUTS<\I$." ",kll <> -V" TIH
4588 IHPUT "Ent.. tho FIELD IU&ft you ....Ied to etlango -; uS
4518 PAlm: k-ufl..<VS): IF kckl (J=I Ck>nf) (II kuJtfHk) no
PRINT -Enl.. "; nS(k): PRIIIf: PRIIU TfIl(k2);
4_ FIJI I - kilO fl(kH<I: PRINT "_A;: ltEXT 1: PRINT
IPFUT as<k) :PRIKT: 1 lEJ'ICa$<k: IF lCfJ(k) T1EJI 4:x.e
4_ PRINT "TOO UIIl'": PRINT: GOTO 45211
45IiI GOSI.8 _: 0010 44121
4m :
4688 Secrch Fn. for Edi ling
4611 GOSI.8 _: PRIIIf
4621 IHPUT "..,ich FIELD tuIIER did \IOU ....t to M<rch in "; uS
4638 PAINT: IF k'kl OR <k>nf) m kuIKT<k> TlH 4618
4&41 PRINT -_t STltIItO did \IOU ....t to find In -; nS(k);
_ IHPUT ";uS: PRINT: l=I.EJi(ss$) , IF 1.f1(k) TIIl 4678
46e8 ..,um-TOO LOtIl ! -: 0IJ9l.E: 68lJ88: ooTO 4618
4678 sf k: 51 lDI<ssS)
4611 GOTO e-: "-oue this if Sew dew FAIL
4075 FCfI re k 1 TO tn: 80StB 388
4679 x ., LEH<a$<sf: FOR 1 kl TO x
4688 IF HIDS<a4<.O, I .. sl) - sst 11Jt I.,.;: f'XT I: ooTO 4181
4081 ltEXT I
_ lEO ,-6, PftINT"STftIHG /tOT FlUQ": GOSlB _: GOTO 4821
4111 PRINT!(28);: 00SUl _
labels across each page (j.e. I-up,
2-up, 3-up, etc.). In addition, you may
choose tile Dumber of fiel<ls to be
printed on _ch une of each label, a
character to be printed between each
field Oilte tile comma betwieetl CITT
and STATE fie1<Is), and wbere on etIch
page tile labels are to be printed.
lbe setting for tile character to be
printed between each field is bandied
at line Dumber 719'. Sometimes you
may want to be able to print more
tIlan a single character between each
field. To do so, you will have to
modify botIl UIis input routine and tile
output routine at line Dumber 791&
Don't forget that in order to print au
.SPACE>s, your input routine will have
to recognize a null entry as being au
.SPACE,s and that It will bave to asl<
for tile Dumber of tIlem to be printed
or Impllm011t some otber form 01
delimiter.
I know one of tile hardest parts 01
decipberlng someone else's program Is
trying to figure out wIIat eacb
variable represents. In MAl LER, I
bave tried to use variable names that
belp describe tIleir function, even
tIlougb tIley're only 2 characters long
For nample, "Dr is tile Number 01
LInes on each label, "ac" is tile number
of labels to be printed ACross each
page, and so on.
BotlltIle mailing label printer and tile
report writer suffer from a poor
selection of terminology I have be011
prone to. When tile program asks if
you want to do any "sorts-, It ree1ly
means to ask it you want tile program
to search each record for a string in a
selected field. This "sorting" aJIows
you to print only seJecte<l records
from tile tile, Instead of relying solely
on a range of record numbers.
a1t1lougb you can certainly do that as
well.
.n producing PEEX(f>5L I use a
program similar to UIis one to print
out tile mailing labels. lbe best advice
I can give you is to make several runs
that print only a single page of labels
so tIlat you can figure out tile proper
settings so that tile printer doesn't
stray from tile labels. UDtiI you get it
down to a routine. in my experience
irs au a matter of tria1 and error. ,
page & PEEJ:165J september, 1966
lbe report writer portion of tile
program is structured id011ticaJJy like
tile mailing label printer. You can
select tile range of record numbers to
be printed, and select to do "sorts". I
bid planned on making it more
sophisticated, but it does complim011t
tile mailing label printer in its present
form in that you can produce clean
file dumps from your database.
HAVE YOU
RENEWED YOUR
SUBSCRIPTION?
Missantssue!
RenewNow!
47. IIt'lJT "10 !hIs tho r 1.-,1 ....:lIN! "; uS
41211 IF l.EJ'T$<Ij$+- ",kl) <> "y" THEIl _
4131 x rO: 1"6 tn: ttEXT 1"0: r6 = x: 80m 44M
4748 :
..- fEll-- fIarok a .....-0 far PaleUGft
4818 PRIm fU. ccnlal,."'; tn; wrec:ar"d<.>"; PftlnT
4821 IF _ TJeI lIlSlII _: 1lOT0 _
4838 JNlUT ,...ich fEaR) tIllER did 'PI to ..1....; ....
4848 PRIIIT: k-.<uS): IF k<kllll k>ln 1Il k<>llIT<k) TIEIt_
4858 r6 k: GOSlIl 381: a$<kl) = -'P": 006lIl _: GOYO 482lI
_:
4988 IEIt- CI_ IJlS-IO _tor Fil.
4911 DISK 901,k8: oodf bodf + <_I)
4928 16 bsCkfD + kg: Ih. Ufle I&/pg>: II 0 - lh"pg
4038 POCE: op(kf), i 1: PeE: op(k,6)ttc., i ih
._ PRIIIT_, oodf: DISK cl_,k6: FUt
4958 :
6888 F.t lMuice 116 Seard'a Routi,..
6818 r6 Itl: GDSI,E: 188: Pat- Initialize Point.. to EICIF
f>iI28 TIH' 6288: DISK find, ssS
68:. i6 PEK(ip(k,6 + - bs(k6) - kt
6848 10 10 + (Ff'ICI(I'Ek<....>>-st<kD ts
6858 r6 IKT i6-bodf>/rl) + It 1
68!52 GOStB 381: 1 - LfIt<aI<sf
6B68 FlIl k kl YO 1
6878 IF rttD$<c4(sf),k._l) uS 1lEJI UQIiJ
6888 tXT It: r6 :0 r6 + k t: 00St.B 188: 0010 M28
6898 k I: !EXT k: PEEJ8!l93l: 006lIl 188
6 198 1tFUT "Is thi 5 U. ClOI""r'eCt reeard .. ; tj$
6118 IF LfFT$(y$+- ",kl)o"..f TtJt r6. r6+k1: GOSlB : 001.. e.e2I
6138 nw I: GOlD 4468
6148 :
6288 TIH' I: PRIIIT "SlRIIIlIllY FllJI)": 006lIl _: OOTO 482Il
6219 :
7888 FI't- nailing LaM) Printer
7811 PRJrtT "Mailing ldM-1 Print.... : PRlttT: GOSlB 13881
7829 ItfllT ,. IMIr'IY 1......i II .. printed ac:ross .. ; 'It
7831 fRUO': oc=(.R.(y$ ) : IF ac<k1 (II QC:<> InT(ex::) T1I't 1821
78SI ItflUT .... .any li"-S .ill b.- p"'inted on each lab" .; yS
7868 PAlm: nl-ufl.<y:I>: IF nl<kl OR nl>"f Tltt 7858
7878 Rat- sepcrcltian ch;rQct..
DIn If(nl), l$(nl,k2) ,pI(nl,Ge), ta(ac)
1898 FOR In a k 1 TO nl :PRlrtT -LIM: ; In: PRIKT
7188 flokl: f2=k8: f3=k8: f_1
7118 ItFUT ........... Fln.Ds .ill M printed an this Ii,. "; '"
7128 PRIm: Jf<ln)ctlfl.(yt>: IF IHlnnf THEJt 711.
7121 IF I f(]n) = kI 11Pt 7258
7138 FOR I kl m HUn): PRlm.;I: PRIKT: 00St8 .11: PAIHT
7148 IIf'UT -Field _ .; uS: PRIIIT
7159 f2 UfI..(yS>: IF (2<ld (It f2>nf no 71.
7161 1$<ln.kl) =1$<ln,kl) + nlD$<SlR$<f2l, k2l
7178 IF I-I flln) TIH 7288
7188 1$(ln,kl) l$<ln,kl) + -,.
1198 PRltIT -Enter the: ch;rQct... that .111 be: used to Apar"'Gt.-
7101 ItflUT this fi.ld U. ,.xt one -'-' it is printed -;y$
7192 l$(ln,k2) - l$(}n,k2) + lEFTS(yt... "', kl)
7288 PRlIlT: !EXT 1
7258 tXT In
7268 PRIKTH28): MIl k8
7278 FlIl In - kl TO nl: PRIIIT In;- ";: IF !f<ln_ TIJl PRIIIT:OOTO 7481
7298 )Cf)""kl: xl-kl: tt-.... : IF )f<ln>-k8 1lIt PRIHl: GOTO 7378
729lI __ "
7388 0 - ASC< nlD$<I$<ln,kl), xp, kl)l
7318 XI' - lICp"tk I: IF c - ASC(, .) no ?:Me
7328 x x*kt + URL(CHR$(c: IF XI' LEn(lS(ln.kl lHE" 7388
7348 t$ t$ + nthe): 11 a II + fl<x>-tcl: IF Jcp > LEltO$<ln,kO) no 7368
7301 t$ t$ nIOS(IS()n,k2), XI, kl); xl xl+kl; 11 11+k1: 7298
7368 PRIIIT 1$ .
7378 IF 11 ) .. TlJf ad J)
7481 rEXT In: PRINT
7418 IHPUT -Is this aJrl9ht "; y$
7429 PAUll: IF l.fTS(lJI." ,k1> (> -\I" net flit
7425 PRIHT "The Icroest Ii,. .ill be"; 1lQ; "ch:roct..-s .ide"
7439 AU", :PRIKT "For -.ch latlel to print.d across, please
7448 PRINT "'enter U. tgb Attine) to be used: PRINT
7458 .lokl: FlIl k z kl YO "": PRIIIT l....1 ."; k
7468 IIf'UT -Y'" Selling "; uS: PRIIIT: xp. \R.<uSl
7478 IF xp (z xl nrt PRim-roo FM Lur: PflUff; GOTO 7)8
7488 taCk) xp: xl .. la(k>+-a; tEXT k: PRIKT
7498 PRltfT Thde settings ....,1,... Q .idth of; )llil
7589 PRltfT: ItflJT Is this -; y$
7518 ",UIl: IF LEFT$(yt+" .. , kU U -lJ" TID 7423
PRINT "ta eany lines should t. skipped oft.. eoc:h.
7538 IIt'lJT "I_I '- boon prinled <i . bol-. 1....lsl "; uS
1548 PAUll :sk IF sk () kB net 7578
II'F'VT -Are: you you IUlt 8 11 nIlS skIpped -; y$
7561 PRltfT: IF lEFT$(ldS.- -,k J) () .y. TtEtt 7S28
7578 PIAl"' "There QI"'el"; tn; records in - i fS: PRltfT
7588 ItFUT "Enter U. FctIIJ tullER you ,.ish to start .ith .. ; uS

SPUADSRIP' PtOGIAIf
OSI-cALC bas bten a maash bit 11.
at PEEXI65J. Written eatlfely in BASIC
by Paul Chidley of. TOSIE, Ule program
gives you a 26 column by 36 row
sprea<lsbeet wiUl many features. Don't
let tbe fact tllat it's written in BASIC
1001 you. It's VERY FAST.
Each cen caD contain ten Oeft or right
Justified) or Oumer1c data lin f10lltiDg
point or doUar format) or a formUla
wtlich computes its results bage<I on
tile COIItents of. Ul. other <:eUs.
Formulas caD perform addition,
subUactiOll, multiplication or division
using ceO contents and/or olllllel'ic
constants. caD be stored
on disk, and tbe program does very
nice printing too.
'1SI-<:ALC requires of memory
,n<! OS-65Jl VB. Specify vide<> or
;erial system and mini-floppy or 6'
disks. Price $Iue plus $3.7\1
shipping ($ 137\1 total)
U-Word: A Preview
by Richard L. Tretlle_y
U-Word is Ule oewest wwd processor
for .seTiai systems fUIUling under
OS-65U. The program's main claim to
fame is tbat it runs on virtually any
65U-<Ompatible system including
Level 3, Portland boards, lIDd
(reportedly) DeDver Boards. 10 fact,
tllat's WIly Softouch wrote it in tbe
first place. They Deeded a wwd
prooessor that would run on a
Portland board for a customer.
U-Word displays the ten on Ule
screeD elIactly as it wiD appear on
paper. The ten is stored in memory,
so document size Is limited. The
current version has a buffer that is
approllimately 1 long. That's
enough to store 3 or pages of
single-speced text. TM actual figure
varies depending on the Dumber 01
lines and the IeDglh of each one.
. The display is very clean, with the top
four lines occupied by the title, the
Gurrent UISERT!TYPEOVER mode
""tting, and a ruler WIlich shows the
character positions, TAB and margio
cootinued 00 Pllfle I.
page 9 PEBI651 September, 1966
continued from page J
settings. The top display also in<:lud",
a prompt to enter<ESC, 1" to get belp.
Entering tbat command Mings up a
menu screen tllat sbows all of tbe
commands tbat are available. Entering
one of tbe commands brings up
anotber screen whicb describes tbat
command
MOVing tbe cursor is accomplisbed
using tbe TAB, HOME, and arrow keys
or by using one of tbe two-keystroke
commands. The program can be
configured to use just about any
terminal. If your terminal supports it,
you can program your function keys
to replicate tbe command sequences,
or tbe program will allow you to alter
tbe command sequences to suit your
tastes (altbough tbe version I used;.
didn't support this leature).
In reviewing tbe program, I entered
about two screens wortb of text.. The
program performed smootbly bere,
quickly handling word wrapping
when necessary. To test tbe program's
editing abilities, I tried moving tbe
cursor witb tbe arrow keys and typing
over and inserting text at random
rates and intervals. I am not fond of
tbe way tbe DELETE key is bandIed. If
tbe cursor is at tbe end of tbe line, tbe
program backspaces and tben deletes.
But if its in tbe middle of text, tbe
character under tbe cursor is deleted.
Nitpicking. perbaps, but I didn't leel
comfortable witb this. The program
also tended to lose keystrokes when
inserting text near the start, altbough
that is understandable to a certain
extent.
searching for words was very fast.
The program also allows you to
immediately jump to tbe start or end
of tbe text, or page forward and
backward one page at a time. In fact,
all cursor movement was quick,
smootb, and easy.
saving or loading text to or from disk
is easy, you just issue tbe disk
command, enter tbe name of tbe til.
you want to use and tben press ''Y". I
would have liked to bave had tbe
ability to select tbe disk drive bere
too so as to be able to keep multiple
copies of documents, but tbat feature
isn't available.
Soltoucb is releasing what they call
version I.e of U-Word, planning to
add features as demand lor tbe
prodUct dictates. Future versions will
support block operations, search and
replace, and merging witb OS-DMS
data liles. Soltoucb considers this
release to be about 6e:c of what tbe
final product will be, and have priced
it accordingly. As each new version is
released, current owners will be able
to upgrade lor tbe cost 01 tbe number
of steps tbey're buying, to a final
estimated price of S395.88 (from Its
current $237).
Overall, U- Word performed well. The
on-line help screens made it easy to
use even tbough I didn't have any
documentation to guide me. The
program's compatibility and flexibility
are sure to make it popular, especially
witb tbose who bave been locked out
01 word processing by incompatible
hardware. Best 01 all, at $237.88, its
priced rigbt.
Rnally! An OS-65U based word processor that's
fast. easy to use. user configurable. actively
supported. and available now! .
SOFTOUCH. Inc. announces the release of
"U-WORO" for Ohio Scientific Challenger and 200
series computers. This powerful word processor
works on single user, timeshared. and
multiprocessed ["Portland board") computers,
Very fast editing [mAchine code)
Printer selectable at time of printout
On-line help screens
Menu-driven configuration
"U-WORO" Version 1.0 is available NOW for $237
00
3120 Far Hills Avenue. Dayton, Ohio 45429
[513] 299-3473
page Ie PEEJ:(651 September, 1966
function 611 board 626i
C0xx
Line Input
9---__.......
11
LS
___1.;.2.. 21
13
The 6264 uses so IiWe power (and
dissipates no measurable beat). it can
take power directly from the 6ee or
r, Ie board. After making these
onnections, I had only one small
problem. One of the data lines couldn't
f unction with the added load (not
>urprising considering that there are
14 2 114 Chips connected to it). So I
simply connected the data input of the
chip to the 012a buffer input and let
the ana's on the 6ee board bandle it
I have low power 2114's on my 61e
bOard, but some might not so I have
<Rcluded a table of the data inputs of
all the data lines in case some have
more trouble than I did. If your data
comes back with bits missing, simply
di=nnecl the appropriate line from
12. and connect it to the input pin in
the table beloW;
cr 626i pin 21
DO Ul3-pin 2
01 U13-pin 12
02 Ul3-pin 5
03 Ul3-pin 9
Oi Uli-pin 2
05 Uli-pin 12
06 Uli-pin 5
D7 Uli-Din Q
Page 11 PEEJ:1651 September, Iq/lf>
J1.qun: I
pin 18
pin 9
pin 8
pin 7
pin 6
pin 5
pi n .,
pin 3
pin 25
pin 2i
pin 21
pin 23
pin 2
pin II
pin 12
pin 13
pin 15
pin 16
pin 17
pin 18
pin 19
pin 2.
pin 27
pin 22
pin 26
pin 28
pin 11
J2-pin I
J2-pin 2
J2-pin 3
J2-pin i
J2-pin 5
J2-pin 6
J2-pin 7
J2-pin 8
J2-pin JJ
J2-pin 3i
J2-pin 35
J2-pin 36
J2-pin 37
J2-pin 18
J2-pin 11
J2-pin 12
J2-pin 13
J2-pin 28
J2-pin 29
J2-pin 38
J2-pin 31
Ul8-pin II
U5-pin 9
U5-pin 8
AI
AI
A2
A3
Ai
A5
A6
A7
A8
A9
All
All
AI2
01
01
02
03
Oi
05
06
07
CE HOT
A/U
A/U HOT
-5
-5
GHO
Suppa! YOU'" local
OSI Dealer cr Venda' .'
aYore I f tile 611lloud
Only one small modification is needed
to the 61e board. Whe1I an 01 bloc.k is
addressed on the 61 e board, a gate in
UO f74lS2e) provides the DD (data
direction) line. Since all the inputs of
this gate are used. we have to
disconnect one of the inputs to the
gate (UO pin 13). connect one of the
inputs (U 10 pin 12), and the chip
select fO the new OK (U10 pin III to
an AND gate. The output is theft
connected to the gate (UO pin 13). The
rest of the connections to the 01 chip
are sbown in this table:
by Scott Lanon
Just because the eIP/SUperboard was
deSigned a1JlIOSt II years ago, doesn't
mean that it can't take advantage of
many of the new cbips that are
available. This is a simple
e:zample of bow you can improve your
old computer with new technology.
A fully popUlated 61I board bas 40
2 114 static memory cbips to give the
e IP atotal of 321, but still leaves 01 of
memory space unused. This design
bas other flaws as newer static
memory chips bave been created that
bave mucb more memory to a chip,
use less power, and best of all, are
much Cheaper. The' Chip (seen in
ads as HM6264LP-I)) has OK by 0
bits in a single 20 pin package, Which
is the equivaleftt of 16 2114's and a
74lS130 in one cbip. The 611 board
providesall the nec<:esary signals for
the cbip and is very easily connected
to its 41 pin socket to fill the last OK
space to give the e IP a total of 4911:.
This cbip has dropped in priC!,. over
Iee:l in the past year, and is available
from JDR Microdevi<:es, Jameco and
other major companies for only H or
$5. The only other materials needed
are a 20 pin DIN socket for the chip, a
pin DIN plug for /2 on the 61 e
board, and a 74lSeo for a small
amount of decoding.
.,
7598 PRIt": Sf'" ,. l.R. (yS>: IF sr<k1 m SF' >tn 111'1 7581
7lll!ll1,.-ur "ntOf' the PCOIlD IUIlBl you olsh to"" olth; lIS
7618 PRIItT: .. = lft..(uS>: IF "(51'" m er>tn nEtt
7628 ns k8: ItFUT "Did VC"I .ant to do crIY sorts "; \IS
7fi38 PRInT: IF LEF1$<\j$+. ., k II () "y- net 773lJ
1648 ltFUT "Ho. ....., sorts did you -ant to do "; y$
7fl<58 PRInT: IF nsok8 net 7li28
7fl68 DIn sf(ns): FM x = III 10 ,.
7678 PR11fT "Sort ."; x; PRINT: GOSlB 9811
71188 PRInT: l,.-ur __ In oil len FIELD IUIlBl "; lIS
7698 PRIKT: sf(x)::::WI.(.... >: IF sf<xHkl (FIi sf(xnf 1lJt 7678
7789 PRIHT "Search for ..t STRlftG in -; .... (.f(x;: II'F'UT" "; y$
nil' ",Uff: SS$(x) .. \1$: 1 l.fl't(ss$(x: If 1 .) fl(sf(x 1lJt 7711
77:28 tEXT x; PRI",
7738 ItFUT "'Enter the DEUICE tt..I&R fer this printing .; y$
7748 PlUnT: dol 2 WL'IIS) III PEEJ8993): P/I RI...". echo to consolo!
7158 r"6 ,. r: xl = III
77Illl _ 3118: IF at'k II -P" net 7IH8
77lil IF .... k8 net GOSlIl 7911: roTO 783ll
Tn8 got..pau": Fill k k I TO ...: I_'n$<k: 12"lD!<at<of<k)
7781 FtfI J a III TO 12
779fl IF nl!lS'at<Sf<k, J. 11> ss$'k) net 781.
18llll1EXT j: got."fail: llOTO 71128
7818 J 12: IEXT j
7828 IEXT k: IF go$="poso" net _ 7911
7838 IF XI ) ex: net oost.B 7888: xl- k 1
7848 IF r6 () .. ltD r6 tit r6 + Ill: 0010 7M8
785e IF xl () k 1 nJt GOSlB 7888
78C8 11'PUT "Press <fTlIIt) to conti,.. "; v$: fUI
7878 Print lGbtls
7888 FOR 1 kl TO nl: FtFt k kIlO ac::
789ll pt <I ,kl ": IEXT k: PRIIfTSd.I: IEXT I
7988 Fill I k 1 TO ok: PRlnT_: IEXT I: P1I.AI
7918 :
7911 Fill In' kl TO nl: IF If<lnl. k8 1IEJl 7919
7912 JCP. kl: xq III
'N13 x - kit
7914 C R$C<nl!lS<I$<ln,kll, xp, kIll
7915 xp. xp + kl: IF c. ASC(",) 1lJt 7917
79115 x g lfMl.t + lft.(0fl$(e:: IF XI) < LEH<1$<ln.k1 1'1" 7914
7917 pt<ln,xll pt(ln,xll + at'x): IF xp ) LIt<l$<In,kll) net 7919
7918 pt<ln,xll = pt<ln,xll + nl!lS<I$<In,k2l ,xq, kll: xqa>cqtkl: roTO 7913
7919 tEXT In: xl xl + Ill: FTlRt
1998 DO
7999 :
_ fEI't- Dlsplaw Fi.ld5
... "um 1(28);"File: "; 1t: PRIHT
8811 PRInT " S"; TR8<k4l; "Fiold _"; TR8(32); "Longth": PRInT
8829 FlIt k. - kl TO nf: PRINT k; 'TM(k4); n$(k>; lf1i(34); fl<k>-kl
8838 IEXT k: FlET\II1 _:
11188 s kl:REJ1- Gathr Directory
I11IU FOR k kit TO ht: utOl) - k8: f$(k,...... : tEXT k
11185 OISKI"... 2079=" + dt$ + RllJfT$IST!lS<o),kll
t 111. FOR i di TO di + perk' STEP k8: IF PEEI{( i> e net 11158
11128 st .t - Fl'tca(PE(K(i+k7
11138 Fill j k8 TO kS: f$'ot). fSlot) + OM<PEEK<I+j: IEXT j
11148 f$<ot> f$<st) + OMlst> + OM<st)
11146 FOR k st TO et: ul(k). kl: tXT k
l11se IEXT I: IF _1 GOTO 11185
11.08 FlET\II1
11178 :
13888 fElt- ap.n Q I:I't&-6eO I'tastar .File on Oeu i c:e 6
1381. T1W _: __
13828 Itf'lUT '"'File ..... "; f$: PRlHT: IF UH<f$k5 1lEJt 13828
0838 IF Ltt(ft)<k:S lln f' .1$ + " ": 0010 13838
f$ f$ + "8: OISK open, kb, f$: T1W 8
.... s\(k6) Ftkt<PEEk(9882: .t(k6> F1'la(PEEI(9113
_ 1_9: 00SlIl 218: 1,.-urllk6,_f
_ i6a2ll: 00SlIl 21.: I,.-urOk6,badf
13188 ;6-31: 00SlIl 218, I,.-urOk6,r1
13118 ;6-42: _ 218: I,.-urOk6.....
13128 i6-53: GOStE 218: nf-k8
13138 ,k: n1 c nf+kl
13148 16 ,PEEl9132) + PEEJ9133)Opg) - bs<k6)
13158 i6 i6 +( f1'Io( PEEJ(98IM) ) - Fl'tca( PEEI(9882 ,. ts
131151 IF' 16 ( bodf THEn 13138
13178 IF PEEJ_, PEEJ9882l net 13198
13198 OISKI"'c:a 3a7e-- + RICJfTt<STR$(F1'tliI(PEEK(9882),k2) + ... f '"
13108 i6 53: OOSUB 218: DIn
132elt Fm k- III 10 nf: nOll: i6<k)al:I: i-i+fHk): rXT k
132 t8 tn lKTHeed'-bodf)/r' I ): JlETlRt
13228 :
28e8I REJf- Report Iori t..
28818 PRInT -lI1S-lQ Roport Uri tor": PRInT: 00SlIl ,_
28921 I tFtST "Ent.8r ttw 11TLE fOIl" thi s: MlpClf"t ... ; tit
28838 PAInT, IlOSUl 8811
28948 Itt:\fT "t;ow IICIn\.I FIEl.DS i 11 be pr i nled on each Ii,. "; y$
?AA58 PRIHT: ac=4.R..(yS>: IF QC(kl CR net 2ge48
page 12 PEU!65J September,
SAIl tile (S)eU (Anran
Ul)ierOCOlllputer
by Richard EReed
In the misty winter dawn sbinJng
tbrough the tawdry ghetto windows 01
his lab the scientist (obviously mad)
stoops over u.. tangle of \!/ires and
boards on u.. operating table. HIs
fingers can be seen hovering above
the calerpi11an, c1ickJDg
toggle switches and closing
momentary contacts. In the early
morning sti11ness his leverish voice
echoes,.. pontificating like GOD as tbe
customary lights (albeit tiny) lIash olf
and on in sync with his actions.
"Clear his experience banks!!r (clear
the memory..'>
-Start his character records" (Set some
counters to zero.J
"Initia1ize the life (Turn it on,
you dummy...>
There" is a lIurry 01 activity among the
lights. The haggard and unkemptlorm
arises in triumph.
"'He wwks!He's WQrlcing! Ha ha ha ha
ha! He's working! II"
"SAM is bornr (to nobody) -LooIc at
him,--he wwks!!r
Nine days belore I had myseU
in the run-<lown room on motel row in
Fresno, with an OSI bare board,
a couple 01 bread boards lrom Radio
Shack, some LEOs, switc1les, a bag 01
ICs, and the intention to create SAM. I
added some junk lood and drinlcs, and
lor a _k and a ball I lost traclc of
time while I attempted to put my
ideas in si1icon and electric lields.
I confess! I was an OSI addict from
tbe word go. I bought one of their lirst
bare boards and Ies to populate it I
had already acquired my 6502 lroni
MOS Technology as soon as they
announced it lor an unbelievable
$2500. 1 learned to program in
machine language while waiting 10f'
tbe boards to arrive, and decided to
Whet my slci1ls with an ambitious
project.
Jamal., an AI lAlrtificiaJ
Olntelligence lreak (not the AI that is
being ol as such today, Where
28Ie8 Din In<oe). to<oe)
28871 .cI ka: FtIt )( a k 1 TO 01::: PRINT "Cl.rf'oent TM is-; IG
_ PRIIlT: _ .11: PRIIlT
2IIN8 PRInT -Enter the fJa.o rt..nIER tot" posl tlon x' .....
211. ItFUT uS; PRI",; laUFl.<yS): If l<kl M l>nt'nitt 2Iiea
28118 PRJHT -Enter the TM SrTltIJ tot" position-' x' - -.
28128 IIf'UT \IS: PRIIlT: la<x>' l.fL<\IS>: IF ta<x>.:...lIIl28135
28131 IF tab:) ao TID Plum -100 FM LEFT": GOTO 28118
21130 In<x)" 1: t -= nUn(x: If t > lEJ't(n$(l 1lJt at,.
28136 t lE"<nS<I
28148 .a ta(x) + t: tEXT w; PRIKT: _
28141 PRUtT -Page Width Is art'8'IU\I .. ; J:-
28142 IIf'UT Did \IOU ....t t. ctalgo thio .; \II
28143 PRlffT: IF LEf'11(y$+- -.k 0 () loy" 1lEM 29t58
28144 IIf'UT Enter __ PAGE ulDrn "; \IS
PRIIlT: x = '""-<\IS>
2IH6 pe x
281:l8 PRUIT 1$; " _lai ...; tn; records.": PRllfT
281M) II'F'UT -Lhlt AECCJI) KIllER \IOU wish to stcrt .ith "; \IS
28178 PRlttT: sr=UFL(uS>: If sr(kl CR If'>tn THEft 211M
28" IIf'UT "!hot IClIIlIU&R \10" .ish t. _ .lth "; \IS
28198 PfUKT: IF er<:sr CR .-)tn nEJi 2'8188
28288 ns=t<8: IIf'UT "Did \IOU ....t t. do ...." ....ts "; \IS
29218 PRIIlT: IF LEFTt<\II" " 1> () v lIIl 28318
28228 IIf'UT __.... ts did \IOU t t. __ '; \II
28238 PRIIfT: ... = '""-<lIS>: Din 55$< >, 01<... >
28248 Fm x kl TO M
PRIm' Sot"'t ; x: PlUKT: oos:ta 8111: PRlffT
28268 1tFt1T -Sort i" whi ch FInn I'I..KIER .. ; yS
28218 PRlHT: sf(x>-Ufl..(y$>: IF sf(x)<kl CR sf(x}>nf net 2t2fi8
28288 IIf'UT "!hot Slllllll did \IOU ....t t .....-ch for .; \IS
28208 PRlrtT: IF nEH 2e28I
2838e tEXT x: PRIm
28318 ti = IHT( (..-ltt(tiS !1t2>: TiUe c.nt..ing
28328 ItFUT ...... iCh DEVICE. I't.I'&R is this to be printed on -; \IS
28338 ct.FI.ft.<lIS >IJ'l PEJ<<ll'Xl >
28348 II" = .1: _ 294:l8
28358 flit r6 51'" TO .-: 00Sl.III 388: If llJ1 2&428
283li8 IF ... = k8 lIIl 28418
21378 fOR x a kl TO ns: 11 .. lEHK.5S(x;
28388 Flit J = k I TO )2: IF "IO$<a$<Sf<x. J. 10 -= ss$(x) TItI 2e488
28398 !XT j: x--ns: IXT x: GOTO 28428
2&488 j a 12: tIEXT j; tEXT x
28418 G05lIl 2852lI
29428 IXT r6
28438 ltflJT -Pr-ess to continue "j tJt: PUt
28448 :
29458 fRIHTO<tJ.0II$<l2>; TIII<.....8);"-;pn: fRlllT_
28408 PRUtT8dV, T,..(\I >; tit:
28478 FIJ'l I k1 TO "": PRIIlT_, ._.;: IXT I: PRIIfTOdv
26488 FOR 1 k1 TO oc: PRltfTtldv. TFI1(la<l; n$<ln(l;: tXT 1
28498 PRUfT8(tv: Hit 1 kl TO 1*: PRIKT8dv. ---;: IXT I: PRlrtT-o"
28Sll8 I. = k8: II" pn+k I: ITlftI
28518 :
28S28 FOOl = kl TO ao: fRllfT_, TIII<la<I; ..<In<I;: IXT I
28538 MIKT8(Iv: Ie: lc+k1: IF le)68 T1tt GOSl.& 28458
28:l48ITtftt
28S58 :
_ IIf'UT "n-IYe <AIB/C/D> '; lIS: lIS - LEFT$<""' .,.1>
58818 PRIIfT: <: "" A5C(y$): If C)czz TlEJt c : C - tt
59821 IF eCCIQ It e)ASC(-D) 11 tt5I888
5B838 DISK!",. - DRS(c): Fll.R1
58848 :
598BI fJt- Show F i I. Hot FOII'd
PAIIfT: PRInT FIL: ';'$;' rtDT F<Jtn).: PRInT
5B828 :
59l)9g Abor't!
_G05lIl_: ....
50818 :
68888 FIJ'l k I TO 3888: IXT k: ITlftI
SAM fUlfWed nery speclficaUon. A!J
origiDaIly CODceived. bis !MtIS8S and
bis coin-flip decisioDs came from a
fr..-runnlng counter I Installed at
Hex. Tbe highly erratK TIL
gated dock ran at about 33MHz. SAM
operated in a wOOd of 256
enVironmental situations (one byte's
W\>rth). and could act on each of these
in 0 different ways. His actions
affected a good and a 'bad counter
Wbictl tracked his progress.
A loot at the random number counter
gave him an enVironmental situation.
He then went to a 21t b1oct. of memory
and ezamin8<l 0 bytes to see if be had
dealt with that environment befoce.
(Each pag. of the 21t block epresented
a response. wlIIethe ndiViduaIbyte
represented an environmenl) In that
location two things woere stored: the
value of the environment- reaction,
and the number of Urnes it was used.
After his elllUllinaUon SAM blew
wIlethet" any reactions had been tried,
and (if so) which one had the bigh8st
value
If no reactions wwe tried. SAM went
to the random number generator to
get one. By maslting off the bigb order
5 bits be selected one of behaViors.
Eacb behavior consisted of performing
an Eldusive-{)R between the
enVironment and one of 0 arbitrarily
cbosen bytes. The result was diVided
into two nybbles. The upper
bits gave a value of e to 15 whicb
could be added to the good counter.
The lowoer nyble was adcled to the bad
counter. The were combined to
yield a value from e to 31. This was
stored in the low occler 5 bits of the
appropriate memory locaUon. Eacb
time this particular reaction was used
'.-jr was added to the byte (up to a
maiDmiUil" of 7 uses). This
incremented thelit>Per 3 bits.
---------
a few language and logical fundJons
are being emUlated). Were talking the
Frankenst.lnian variety....trying to
create viable beings. Now that my
own real computer was available I set
out in earnest to devise (in total
RAM) a being with the following
properties:
I. He must start with no knowledge.
2. He must bebave randomly at first.
,
J He must learn to survive.
He must develop habits.
5. He must have virtue and Vice.
6. He must behave unpredktebly.
7. He must develop differenUy eacb
time be is run.
O. He must be able to forget
9. The program must fit 256 bytes.
Ie. He must run in a machine.
I I. He must be expendable.
12Be must install In a robot
If the current enVironment bad tlHn
acted upon befoce. SAM checked to
see if it had been used a total of 7
times. If so. be repeated it
automatically. If not he went to the
random number generator and flipped
a 32"sided coin. If the result of that
flip was greater than the reaction
value, SAM went to the random
selection routine descril>8<l above. If it
Wll. "",aller. he repeated the old
page 13 PEEl:lfi51 september,
5 REM SAM by R,chard Reed
18 6OTO leeee
lelI IF t12/HQ1 = ItIT(t12/tm) 1lM 2 = -2
lIe Z = AND(Z): ZI = INT(Z*XI): RETURN
289 JI .. AJ(GI,FI) Rtf) Nil: LI = AJ(GI,FI} Rtf) N21: HI =LI: RETlRi
4el1 IF AJ(R,S) < tI2I TfN AJ(R,S) AJ(R,S) AtI> tUI
41e s = s + I: IF S ) N41 TfN 5=1: R =R + I
415 IF R ) 7 THEN R =ttl
429 I FS / 3 - INHS/3) T.e1 489
439 RETlRi
590 IF AI(GI,FI) ( N2I THEN AJ(GI,FI) = AJ(GI,FI) + 32
RETlflN
690 IF PI ( 2 TfN FlETURti
619 RESTORE: FOR K ttl TO READ K$:
629 RETlflN
790 BI(GI,FI) = BI(GI,FI) + I: RETlflN
seee XI-a-: OOSUB 0: FI-ZI: HI-NI: JI-HI: FOR I ttl TO FI) Rtf) ttll
sel9 IF AJ)JI T.e1 ..... 1: JI=RI: Gl=1: LI = AJ<I,FI} AtI> N2I
se29 tXT I
5839 XI = NIl: OOSUB 0: FlEM IF LI = N3I T.e1
5949 IF HI)ttI Atf) JI*1.452-8=Z1 00 LI=N2I) Atf) N2lS8oltIT(N2I59) TfH 5190
sese XI-8: OOSUB 0: GI=2I: JI AJ(GI,FI) AtI> HII: LI - AJ(GI,FI} AtIl N21: HI-LI
IF HI )' ttl TliEN
5190 TI = FI Atf) HOT CJ(G1): KI = TI
5119 LI - IHT(KI/16): M - KI - LI * 16: It - 17 - LI + M: IF N)38 T.e1 It - Nil
5129 IF SA = I 1lM FlETlRi
5139 All = AJ(GI,FI) AtI> 31: IF ATI = ttl THEN AJ(GI,FI) = AJ(GI,FI) + N
OOSUB EI: OOSUB 500: rN = INHAJ(GI,FI) /32)
514e IF LCJ ) 89 T.e1 PRltITlIf'I, 0fl$(12}: GOSlIl 698: LCI = I
5159 P - P + LI: Q - Q + ": PRINT8pI, HZ, Q, P, N, M, FI, GI, el(GI,FI), DY
5168 tI2 = tI2 + I: LCI = LCI + I: GOSUB 488: IF Q ( TV THEN
5165 DIM TI(32): DIM TII(32}: PRINT8P1, CHR$(12}
5189 SR=I: FOR U= ttl TO N41: FOR 1= ttl TO TI=(AJ<I,U>fHl t!2I)/32: FI=U:GI=I
5185 GOSlIl 5199: T2 = N: T3 = 81 * I
51S7 TI(N) = TI(N) + I: TII(H) = TII(N) + BI(I,U}
PRINT-PI, TAB(T3); TI; T2; TAB(T3+7);81(I,U);: NEXT
5195 NEXT U: PRIHT8P1, CIfl$(12}
5299 FOR I- I TO 139: N$ - N$+-*" :HI$ - Nl$+-I-: NEXT I
5220 FOR I = ttl TO HII: IF TI.(I) )ADI THEN ADI = TII(I)
5225 IF TI(I) ) ADI TfIi ADS = TI(I}
5227 NEXT I
5239 IF ADI ( 129 TIH 5389
5235 01 = INT(AOI / 129) + I
5249 FOR 1= IiITONII: TII(I} = INT(TII(I)/DI): TI(I) = INT(TI(I)/DI): NEXT I
5399 FOR I = ttl TO HII: PRINT 8P1,1; TAB(5}; LEFT$(N$,TI(I}}
5319 PRINT 8pI, TAS(5); LEFT$(HI$,TII(I: NEXT I: POKE 2729, 14: END
6000 DATA MOUE, POSITIVE, NEGflTIVE, lJfl..VE, + VAL, ENlJIR, REACT. USE, SIEVE
19099 01=256: 01" AI(S,OI), 81(S,01): MI=I: N2=MI: 0=199: E=299: EI=709
19919
19929 IIf'UT Device"; PI: IIf'UT -Maxi_ value-; TV
19926 FOR 1= 9 TO 7: CI(I>=INT(I* 36.428715): PRINT8P1, TAB(7*I); CI(I};: NEXT I
19027 OOTO 10049
19039 FOR 1= 9 TO 7: XI=OI: GOSlIl 0: CJ<I )=21: PRIHT8P1, TfIl(7*I>;ZI;: NEXT I
19049 PRINT 8PI: PRINT apl
10069 GOSUB 6ee: POKE 2729, 8: OOT0:5998
reactJ.on and added 32 to tll.e use
counter if it was not at tll.e maximum.
Once every actJ.on SAM would
examine a memory location (stepped
tllrough from tll.e beginning of the
memory block to tll.e end, then around
again) to if its combination had
been used 7 times. If not SAM xeroed
tll.at location, forgetting he had ever
done anything Witll. that
environment/reaction. This
constituted the complete SAM. In a
typical run of 40,000 moves his "good"
counter had advanced about 3-3 times
!ligher than the "bad'
<500000/150000), and his "habits"
were fairly well established, ie: 93ll of
!lis actions were on fixOO memory.
SAM's design has proven to be very
flexible. A new environment can be
added Witll. the addition of 2K of RAM
and a liWe overhead program to
switch between environments. He can
have 62 environments in a 64.1{ RAM
The complexity of the environment or
the reactJ.ons can be altered virtually
by changing the memory allocated to
thE>m
Installation WlUlln a robot merely
involves substJ.tuting sensory input
for the random generator, and
to motor devices instead of tht'
numeric reactions. In a simple
scenario SAM could receive energy for
"watering" plants. When his watering
can got low, he could receive -points"
for fetching more water. When
power was low he could switch back
to getting points for watering plants
If he were turned loose With either
the water in his bucket and power in
his battery, and these
were prOVided in his environment, he
would soon teach himself his chores
and manage to the plants
watered and his power up.
While SAM was originally written in
machine language, and his current
version is propriatary information I
am not free to share, I have written a
BASIC version which operates almost
identically With the original SAM but
which offers greater ease of user
modification, greater Simplicity of
understanding, and more extensive
reporting of what has happened. That
listing is included for anyone who"
page 14 PEEK(65) september, 1986
may Wish to experiment With SAM
themselves.
Lines 10000 to 10060 define
variables and set up the output
deVice, the total count SAM is
expected to attain, and 8 random
reactions. Lines 100 and 110 are the
random number generator. Nll is the
current event count, and every 1000
moves it selects a new random seed.
contains the maximum value to be
returned. is the new random
number.
200 gets the reaction value and the
use counter in Jll and respectively
a flag to show prior usage.
The subroutine at 400 to 430 operates
the memory "sieve-. Line 400 has
been modified to clear only the use
count rather than the whole byte for
reporting purposes. This fact has not
been used to modify the operation of
SAM. 410 cycles the lower address
byte, and when necessary, the page
number. 420 resets the page number
if the cycle has gone full circle. Line
415 was added to speed up the sieve
a little. Lines 500 and 510 increment
the use counter if it is less than
maximum.
The main program begins in line
5000, which picks up an
"environment" from the random
number generator. Subroutine calls
and line calls are named variables
because of the increase in speed of
execution. Subroutine Dis the random
generator. Xll is the size limiter, Zll is
the returned number, and Fll is the
environment variable.
5010 to 5030 look at au possible
reactions to see if any ~ r e used and
if there value is greater than the last
one found. In 5032 we get a 31-sided
coin flip, and if the reaction has the
maximum usage, ~ Skip testing the
coin. Line 5040 sets some other skip
tests; the test involving JI* 1.452-a
expands the acceptance/rejection
criteria by always excluding very bad
reactions and always using very good
ones; the test using N2/50 selects an
unused reaction every 50 moves so
that SAM can learn new habits from
time to time. Lines 5050 and 5060 get
new reactions and test them if the
coin flip warrants it
Lines 5100 through 5160 perform the
mathematical calculations involved in
performing a reaction, updating the
memory, printing the resUlts, and
getting another environment. One line
that needs comment is 5125. It is a
conditional return that makes use of
the lines just above it for a subroutine
call from the tabulated reports
printed after line 5160.
ADS
UCSD Pascal/Foftran 8 for polled
keyboard $50, 502 board $30, D&N
proto board $20, bare M-column
video board $25, Sams C2-(3 manual
$20. Ron Battle, 1011 Yale NE,
Albequerque, NM a7106
FOR SALE: 12 fully populated 520
boards. Each provides 16K of static
RAM. Not tested. $50.00 plUS shipping.
Contact P ~ 6 J
FORTH $24.95. Utilities available filso. '
Free catalog. Aurora Software, 37
South Mikhell, Arlington Heights, IL
60005
Have you got something to sell? Why
not take out a classified ad in PEEK?
Ads cost 35 cents per word, not
including price words. Copy is due
30 days before the cover month.
ATTElITIOR: DEALERS!
PEEKI65] needsMw subscribers and
you need newcustomers, and together
we can make it happen with our own
Co-op advertising program. This
program pays dealers for signing up
new subscribers with free ad space in
PEEK(651. Just five paid SUbscriptions
will earn a 1/9th page advertising
credit in PEEK(651.
Most dealers sell their own software
with the systems they install. By
advertising in PEEK, you vastly
expand the potential market for your
products. And how many sales have
. you lost because you couldn't find the
application your customer wanted?
Dealer ads can be our own Yellow
Pages. Readers and customers win too
by increasing the number of uses for
their equipment.
call or write today for details and
your free promotional materials.
Making a PEEK(65] SUbscription a part
of every sale is painless and
profitable. This time, Co-op pays
you.

ace
rowl

page 15 PEE)[(65J September, 1986


PEEK[6s1
POBox 586
Pacifica
J
CA 94044
415-359-5708
Bull< Rate
US postage
PAID
Pacifica, CA
PermIt "92
Zip Code g4044
BELIVER TO:
Ecrl norris 111188 2ti6
f,JOV'"
32ea Uashingtcn
"idIW'lll,"1 ....
GOODIES for 051
NEIIIII
1M Uncltfkiaf OSI 0..... Joyrul
C1 P Sama Photo-Facts UanUilI. Complete schematics. scope waveforms and board photos. All you
need to be a C1 P or 511 Wizard, just
C4P Sama PhotoFacts Manual. Includes pinouts. photos, schematics for the 502. 505. 527,540 and
542 boards. A bargain at
C2/C3 Sarna Photofacts Manual. The facts you need to repair the larger OSI computers. Fat with
useful information, but just
$7.95 $ _
$15.00 $ _
$30.00 $ _
OSI'. 5m.1I Systems Journal. The complete set. Jutv' 1977 through April 1978. bound and reproduced
by PEEK 1651. Full set only
$15.00 $ _
TermiNI Extenaion. Paclulge lets you program like the mini-users do, with direct cursor positioning,
mnemonics and 8 number formaning function much more powerful than a mere "print using:' Requires
65U.
$50.00 $ _
RESEQ BASIC program resequencer plus much more. Global changes. tables of bad references.
GOlUB, & GaTOs, variables by line number, resequences parts of programs or entire programs.
handles line 50000 trap. Best debug tool I've seen. MACHINE LANGUAGE - VERY FASTI Requires 65U.
Manual & samples only, $5.00 Everything for
Senders "'chine L.8nguage Sort/Merge for OS-65U. Complete disk sort and merge, documentation
shows you how 10 call from any BASIC program on any disk and return it or any other BASICprogram
on any diSk, floppy or hard. Most versatile disk sort yet. Will run under LEVEL I, II, or Ill. It should cost
more but sanders says, ..... sell it for
KYUTIL - The ultimate OS-OMS keyfile utility package. This implementation of Sander's SORT/MERGE
creates. loads and sorts multiplefield, conditionally loaded keyfiles. KYUTll will load and sort a keyfile of
over 15000 ZIP codes in under three hours. Never son another Master File.
Assembler Editor & Extended Monitor Reference Menual (Cl P, C4P & caP)
65V Primer. Introduces machine language programming.
C1P, elP MF, C4P, C4P OF, C4P MF, cap OF Inlroductory Manuela ($5.95 each, please specify)
Besk; R.terence MenUIII - (ROM, 650 and 65U)
C1P, C4P. caP User' Ma.......t. - ($7.95 each, please specify)
How to program M;crocompulers. The C3 Series
Profe.sional Computers let Up & Oper.llons M.nual - C2-0EM/C2-0/C3-0EM/C3-0/C3-NC3-BI
C3-C/C3-C'
TOTAl
$50.00 $ _
$89.00 $ _
$100.00 $ _
$6.95 $ _
$4.95 $ _
$5.95 $ _
$5.95 $ _
$7.95 $ _
$7.95 $ _
$8.95 $ _
,---
Cll Residents add 6J Sol" Tax , _
C.O.D. orders add $1.90 , _
,-=3::.:.7.=-0_
Postage & Handling
TOTAL DUE , _
POSTAGE MAY VARY FOR OVERSEAS
____________ Stale Zip _
Name
Street
City