07x09 198609 peek65

Download 07x09 198609 Peek65

If you can't read please download the document

Upload: danielep1

Post on 19-Jul-2016

215 views

Category:

Documents


0 download

DESCRIPTION

123

TRANSCRIPT

  • .... ,f'-l'"L--------------ri..::>-'r- .12-. c_ t ..,)

    J-q

    OSISIDED

    -....e- drl__l_to ..orotouble alcM4drl_

    OF THEDOUBLE

    c-"'.,~ roea.._ $ __"_"'"

    e.-e-- .J'"_I.et ror~ttJl""drl_

    .b

    The OSI disk drive selection circuitryas used on the 505 board is shown infig. 2. Other OSI floppy controllers usethe same basic circuit but you willhave to trace out the signals startingwith the PIA or get a copy of theschematic for your board. For doublesided operation the traces markedwith an 1[" must be cut and thejumpers shown in dashed lines mustbe added. The drive selection logic forsingle and double sided drives isshown in table 1. As shown in table 1selecting drive A or C will select side

    MODIFICATIONCONTROLLER FORDRIVES

    ,I~

    P'A

    with built in data separator. Duringthe past few months I have seendouble sided MPI drives advertisedfor about $89. To make the requiredmodifications you will need to removethe main circuit boar~ from the newdrive. Make note of all of theconnector positions and if need bemark them before removal. Nowremove the connectors and the screwsholding the board in place. For eithera double or single sided drive there isonly one modification required. Theline Which goes to pin 30 of the driveinterface connector (}4) is connectedto pin 3 of the 7438 nand gate shownin Figure 1. This is normally the rawdata output. Pin 1 of this nand gate isconnected to pins 5 and 9 of the74LS123 (see fig. 1) and must be cut.Make sure that the connectionbetween pin 1 of the nand gate andthe. drive separator connector remainsintact. Now you will need to removethe small data separator circuit board,Which is located at the front righthand side of the main circuit board,from your old drive. Install this on thenew drive and replace the board andconnectors. You now have a newsingle or double sided MPI drive. Fordouble sided drives the circuitry onthe OSI controller and paddle boardwill also need to be modified.

    Those who are faced with the problemof adding more drive capacity orreplacing existing drives have severalchoices available. These choicesinclude purchasing a new MPI driveand adapting your old data separatorto it, building a new data separatorand using standard 40 track driveseither single or double sided, or usingone of the 00 track double sideddrives. Some of the informationpresented here has been publishedbefore but I think it worthwhile toplace all of this information into onearticle.

    NEW MPI DRIVES

    First we will discuss the adaptation ofa new MPI drive to replace an existingOSI MPI drive. As those of you whohave 5.25" disk systems know OSIused a single sided 40 track MPI drive

    by David UvesayAve de la Resistance 6B-4920 Embourg, Belgium

    Bow to aclcl 5.25- oie 01' oe TrackDouble Sided Drives to Jour OSI

    This article will cover several sUbjectsdealing with the problem o{ 5.25"drives for the OSI. Covered will be theconversion of a new MPI drive toreplace your old drive, how to build adata separator and a motor controlcircuit to use with any industrystandard disk drive and last we willcover how to use double sided 80track drives. By implimenting thesuggestions here you can increaseyour disk drive capacity to either328K or 656K for about $300 or evenless if you only impliment part of this.

    Copo,jric}ht 1986 PEEK[U) 4n ric}hts rK4rV~~llshtd month~

    Editor: Ricbwd l. Tr.thtw.."

    DATA ~AIl:ATOIIPIG. 3

    ~tionR~tK 4ir S

  • one or two of the first drive andselecting drive B or D will select sideone or two of the second drive. Theonly problem now is that the driveselect signal for drive tWo must be theinverse of the signal for drive selectone. We have two choices. The first isto add an inverter on the paddleboard between pin 3 of the controllerconnector and pin 12 of the connectorgoing to the drive. You can use a 7438nand gate for this. Pin 18 of the OSIcontroller which was conected to pin12 of the disk drive needs to beconnected to pin 32 of the disk drive.

    The se

  • rea4y signal Ulen you can connect thisliDe to piDs 22 and 24 of the OSIcontroller, otherwise th_ piDs sbouldbe grounded.

    BUIWING THE DATA SEPEIUITOR ANDMOTOR CONTROL

    T~l

    DIIUE SELECTID. L06IC FOR lSI DISt DIIUES

    FOR SIHGLE SIDED DRIUES

    :---------------------------------------------------:

    :---------------------------------------------------:

    :---------------------------------------------------:

    :---------------------------------------------------:

    DRIUE 8

    DRIUE RlOU

    lOU

    HI6HHI6H

    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:ythe connectors to the proto board. Iused a 3'i pin right angle ribbon cableheader f~ the connector to

  • USING .,. TRACIt DOUBLE SIDEDDRIVJ;S

    ToULf:2

    -HOTE- (THROUGH COHTROlLER) lHOICRTES THAT THE SIGHAL ISnODIFIED 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 USED8Y THE DRTR SEPRARTORtnOTOR COHTftOl OR GEHERRTED8Y THE COHTROLLER .

    FUHCTlOIt

    HERD LOROLOU CURREHTORIUE SELECT 1 t 2FRILT RESETSTEPDIRECTlOItERASE EHR8I.EillITE GRTEURITE ORTRSEPRRRTE CLOCI:SEPRRRTE DRTRGHD+SU-9U (HOT USED)H.C.IHDEXSIDE SELECTillITE PROTECTRERDY DAIUE 2SECTOR (HOT USED)FRUlT (HOT USED)TRRCI: RERDY DRIUE 1SPRREIH USEDAIUE SEL 4DAIUE SEL 3noTDROHRERO DRTRSPRRE DR READY

    At tbIs point, If you'Ve decided toconvert to two .,. track driftS, yousboUId use the combination of one -4.track drive witb one .,. track drive tocopy au of your programs to dIsts Inthe ae track drive. You can tbeD makethe permenant Cbange to two 68 trackdrives. Before you can do tlIls you wI11Deed to Cbange the CREATE utility. Sotbat more tban -4. tracks can be usedpege 5 PEE(165) september, 1966

    DRIUEPIH 1

    1 H.C.2 H.C.3 (THROUGH CtltlROl.ER) II t 121 H.C.5 286 187 H.C.8 ~9 22II (TO COHTROLLER) H.C.11 (TO COHTROlLER) H.C.12 t 13 TO ALL 000 PIHS14 H.C.15 H.C.16 H.C.17 (THROUGH COHTROLLER) 818 (THROUGH COHTROLLER) 3219 2821 GROUND THIS PIH H.C.21 H.C.22 H.C.23 26~ GROUHO THIS PIH H.C.'H.C. 2H.C. 4H.C. 6H.C. 14H.C. (TO COHTROlLER) 16H.C. (TO COHTROLLER) 31H.C. 34

    OSI COHTROLLERPIH"

    SOI1E OF THE HEUER DRIUES HRUE RERDY LlltES (PIH 34)UHICH nRY BE COKHECTED TO 051 COHTROLLER PINS 28RHO 24,

    proceed to mate a copy of youroperating system disk witb yourutilities on il Now remove the -48track drive and coanect the first .,.track drive In Its place. You sbouldDOW find tbat the disk that you justmade will boot

    How tbeD POrE9931,126,P01E 1"69,121 and POlE1t15,121 . lien enter D1S1nJnr. Itau goes -'1 121_ computer WIllInlUlIIiZ'e 68 tracts.

    Now we e:em. to !be r.al heart of !bearticle. We bave anotber cboice foc tbetype of drive to use. It you would Iilteto increase your drive capecity atvery IiWe cost coosider using 68 trackdrives instead of tbe -48 track units.You can use driftS built by tbe abovementioDed manufacturers wIliCb areusuauy identified as .,. track oc 96 tpi(tracts per iJlcb) drives. These usuallycost about $18 more t2Ian tbe -48 trackdrives. n. OII1y~ tbat we Deedto make Is to modify 65J) and some oftbe utility programs 80 tbat tbeyknow we bave .,. tracks available.The 65J) memory locations to beCbanged are shown In table -4. We wI11get to tbe utility programs later.

    ..

  • change the following lines to read asfollows:

    T..ulLE3

    IHDUSTAY STAHDARD 5.25" IHTERFACE PIH DESIGHATIDH198 DIn ALI(79)28898 If T819 THEH

    288B828118 If HTB8 THEH

    28188PIH" SIGHRL TYPE FUHCTlOH

    -HOTE- ALL ODD PIHS RRE GROUHD

    T..ulLE4-

    THE FOLLOUIHG nEnORY LOCATIOHS nUST BE CHAHGED IH DOS TO USE THEEIGHTY TRAC( DRIUES. THE HUnBERS IH ( ) ARE THE DEClnAl UALUES FORPD(lHG.

    WHAT WILL THIS COST?

    Two 40 track double sided half heightdrives will cost a maximum of $160. Ifyou use your existing case for a singlefloppy system you can install two halfheight drives in it You mayor may

    SB8 (12B)S19 (121)S19 (121)

    CHAHGE TO

    SPAREIH USEDR IUE SELECT 1IHDEXDR IUE SELECT IDR IUE SELECT 2DR IUE SELECT 3nOTOR OHDlRECTIOH SELECTSTEPURITE DATAURITE GRTETRRC( 88URITE PROTECTRERD DRTASlOE SELECTSPARE DR READY OH HEUER DRIUES

    If you wish to purchase a new case itwill cost about S50 with powersupply. If you build the dataseparator yourself it will cost you amaXimum of S20 plus another S15 forthe cable to the disk drives. If youpurchase the data separator andmotor control it will be about S40 piUSthe cable. So the price range for thismodiliction will be between $2 15 andS290. If you use the 60 track drivesthen you will spend another S20 fortwo drives. This is not too bad an

    not be able to get away with usingyour existing power supply. Sinceboth drive motors can be on at thesame time the power supply must beable to furnish the power for bothdrives at the same time.You can alsoreplace the power supply with a small

    . SWItching supply.

    $18 (61)$39 (51)S39 (51)

    EXISTIHG DATA

    lHPUTlHPUTlHPUTOUTPUTlHPUTlHPUTlHPUTlHPUTIHPUTIHPUTIHPUTIHPUTOUTPUTOUTPUTOUTPUTlHPUT

    216B181211161B282221262B383231

    S26CA (9938)S2169 (188B9)S2119 (18118)

    nEnORY LOCRTIOH

    have a need for elOChanging programsthen you should keep one 40 trackdisk that you can substitute for one ofthe 60 track drives Wben you need tosend someone a 40 track disk. If youonly need to read 40 track drives thenyou can write a program in BASIC ormachine language to read a 40 trackdisk on a 60 track drive. Anotheroption would be to write a disk copyprogram in BASIC or machinelanguage to read a 40 track disk on an60 track drive. To do this the drivemust double step to move one track.

    There are three memory locations in650 which need to be changed. Thereare two ways that we can do this. Thefirst one is to poke the correct valuesinto memory from BEXEC*. The secondway is to make the changes and savethem back to disk. To do this eXitBASIC to 65D and load the track zeroread/write utility. Follow theinstructions to read track zero intomemory at $6200. Load the extendedmonitor and change the three memorylocations lis: . in table 4. Rememberyou will use ali offset of $4000 Wbenmaking the changes (Le. use S66CAinstead of $26CA). Reload the trackzero utility and follow the instructionsto write the data at $6200 back totrack zero. Remember that we willread and write 6 sectors each time. Atthis point you should have a disk thatwill boot and be able to use all 60tracks. It should be mentioned thatthe 60 track drives will step at a rateof 3 ms so you can modify the steprate in 65D if you wish.

    CHANGING 65D FOR 60 TRACK DRIVES

    28898 If T8-1 OA T8-12 OA T8>19THEH 288B8

    NOTE If you wish to use trackslower than number 13 on a data onlydisk you can change line 20090 toread as follows:

    At this point we should consider theproblems which could exist with this-ystem. The first problem is that thedisks you create in 60 track formatWIll not be readable by 40 trackdrives. If you never elOChangeprograms with others then this shouldnot be a problem. If you sometimes,page 6 PEEK[651 september, 196t.

    ARE THERE ANY DRAWBACKS TOUSING 60 TRACK DRIVES?

    You should also make the three 65Dmemory changes permenent.

  • investment to obtain 656K of diskdrive storage to replace tlle &2K tllatyou bave witll one single sided MPIdrive.

    WHAT ELSE COULD YOU OO?

    Wbat I baven"t mentioned is tllat youcould select a 3.5" drive. The 3.5"drives use tlle same interface as tlle5.25" drives and tlle controler canttell tlle difference. Anotller cboice fortllose who bave botll 5.25" and &"systems is to use tlle newer bigbdensity 5.25" drives as used in tlleIBM AT.

    You must use one of tlle two speedversions. In tlle low speed mode tllesedrives can be used to replace tllestandard &9 track 5.25" drives. In tllehigb speed mode tlley can replace 6"drives. Using tllese drives to replace6" drives will be tlle SUbject ofanotller article.

    WRITE FOR PEEK!

    Mailing Label Utility forDMS-65D

    by Ricbard L Tretllewey

    As promised, this montll I ampresenting a follow-up to tlle randomfile system for OS-65D V33 tllat Iwrote about in tlle Summer issue.You11 recall tllat one Of tlle primaryuses for database managers is formailing lists. The program presentedbere incorporates most of tlle editingfunctions of its predecessor, but goeson to add a mailing label printer and asimple report generator.

    As witll any program using data filesunder OS-65D, it is vital tllat you runtlle program "CHANGE" before youenter tlle program into tlle computerso tllat BASIC will reserve tlleappropriate amount of space in frontof tlle workspace for tlle diskbuffer(s). MAILER requires only onedisk buffer, even tllougb it doesinclude token support for a seconddata file to be opened simultaneously.

    The mailing label printer is written toallow you to print any numt>ei- of,

    1e FI1- tta i Iing Li s t I1cnJger for CI'tS-lD28 GOTO 199938 :48 fEn- Construct DeY ice 6 Orrent Track Str j ngsa c6 - ~Hct(KD:(98liH;t6t - AIONT.; .t ItlHi6/b)" sHk6)129 GOSlIJ 58: IF c6 :3' .t TlN 168139 d6 = PEE)(99QS); IF d6 = k8 TIH 159148 DISK! -so ... t6$ .... 1=3a7er .. pg$: PCI+k.'. ihlee RTl.ftl190289 fBI- Set Devica 6 I/O Poinl...-s to Indax(O)218 i = 16+bs(kO) - (Ftta(PEEK ... x - IHTCxlkt~t1868 ht = FtlaCPEEJ(C1 1687ll: dt = FttaCPEEJ(CI1715ll: ~351979 Din indexCk7). bs

  • 38e8 IF (c(RSC

  • 47. IIt'lJT "10 !hIs tho r 1.-,1 ....:lIN! "; uS41211 IF l.EJ'T$: IF (2nf no 71.7161 1$ -\I" net flit7425 PRIHT "The Icroest Ii,. .ill be"; 1lQ; "ch:roct..-s .ide"7439 AU", :PRIKT "For -.ch latlel to ~ print.d across, please7448 PRINT "'enter U. tgb Attine) to be used: PRINT7458 .lokl: FlIl k z kl YO "": PRIIIT l....1 ."; k7468 IIf'UT -Y'" Selling "; uS: PRIIIT: xp. \R.+-a; tEXT k: PRIKT7498 PRltfT Thde settings ....,1,... Q ~ .idth of; )llil7589 PRltfT: ItflJT Is this a1r'i~t -; 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

    . The display is very clean, with the topfour lines occupied by the title, theGurrent UISERT!TYPEOVER mode""tting, and a ruler WIlich shows thecharacter positions, TAB and margio

    cootinued 00 Pllfle I.page 9 PEBI651 September, 1966

  • continued from pageJsettings. The top display also in

  • function 611 board 626i

    C0xx

    Line Input

    9---__.......11

    LS___1.;.2.. 21

    13

    The 6264 uses so IiWe power (anddissipates no measurable beat). it cantake power directly from the 6ee orr, Ie board. After making theseonnections, I had only one small

    problem. One of the data lines couldn'tfunction with the added load (not>urprising considering that there are14 2 114 Chips connected to it). So Isimply connected the data input of thechip to the 012a buffer input and letthe ana's on the 6ee board bandle itI have low power 2114's on my 61ebOard, but some might not so I have

    J1.qun: I

    pin 18pin 9pin 8pin 7pin 6pin 5pi n .,pin 3pin 25pin 2ipin 21pin 23pin 2pin IIpin 12pin 13pin 15pin 16pin 17pin 18pin 19pin 2.pin 27pin 22pin 26pin 28pin 11

    J2-pin IJ2-pin 2J2-pin 3J2-pin iJ2-pin 5J2-pin 6J2-pin 7J2-pin 8J2-pin JJJ2-pin 3iJ2-pin 35J2-pin 36J2-pin 37J2-pin 18J2-pin 11J2-pin 12J2-pin 13J2-pin 28J2-pin 29J2-pin 38J2-pin 31

    Ul8-pin IIU5-pin 9U5-pin 8

    AIAIA2A3AiA5A6A7A8A9AllAllAI201010203Oi050607

    CE HOTA/UA/U HOT

    -5-5

    GHOSuppa! YOU'" localOSI Dealer cr Venda' .'

    aYore I f tile 611lloud

    Only one small modification is neededto the 61e board. Whe1I an 01 bloc.k isaddressed on the 61 e board, a gate inUO f74lS2e) provides the DD (datadirection) line. Since all the inputs ofthis gate are used. we have todisconnect one of the inputs to thegate (UO pin 13). connect one of theinputs (U 10 pin 12), and the chipselect fO the new OK (U 10 pin III toan AND gate. The output is theftconnected to the gate (UO pin 13). Therest of the connections to the 01 chipare sbown in this table:

    by Scott Lanon

    Just because the eIP/SUperboard wasdeSigned a1JlIOSt II years ago, doesn'tmean that it can't take advantage ofmany of the new cbips that are~ available. This is a simplee:zample of bow you can improve yourold computer with new technology.

    A fully popUlated 61 I board bas 402 114 static memory cbips to give thee IP atotal of 321, but still leaves 01 ofmemory space unused. This designbas other flaws as newer staticmemory chips bave been created thatbave mucb more memory to a chip,use less power, and best of all, aremuch Cheaper. The' ~4 Chip (seen inads as HM6264LP-I)) has OK by 0bits in a single 20 pin package, Whichis the equivaleftt of 16 2114's and a74lS130 in one cbip. The 611 boardprovidesall the nec

  • 7598 PRIt": Sf'" ,. l.R. (yS>: IF sr~ sf(ns): FM x = III 10 ,.7678 PR11fT "Sort ."; x; PRINT: GOSlB 981171188 PRInT: l,.-ur __ In oil len FIELD IUIlBl "; lIS7698 PRIKT: sf(x)::::WI.(.... >: IF sf

  • 28Ie8 Din Intn THEft 211M28" IIf'UT "!hot IClIIlIU&R \10" .ish t. _ .lth "; \IS28198 PfUKT: e-4.R.(~): IF er-Ufl..(y$>: IF sf(x)nf net 2t2fi828288 IIf'UT "!hot Slllllll did \IOU ....t t .....-ch for .; \IS28208 PRlrtT: s4b~; 1~(ss$hl': IF l-=>-fJ~sf(x nEH 2e28I2838e tEXT x: PRIm28318 ti = IHT( (..-ltt(tiS !1t2>: ~ TiUe c.nt.. ing28328 ItFUT ...... iCh DEVICE. I't.I'&R is this to be printed on -; \IS28338 ct.FI.ft.IJ'l PEJPer 3 bits.

    ---------a few language and logical fundJonsare being emUlated). Were talking theFrankenst.lnian variety....trying tocreate viable beings. Now that myown real computer was available I setout in earnest to devise (in ~K totalRAM) a being with the followingproperties:

    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 eacbtime be is run.O. He must be able to forget9. The program must fit 256 bytes.Ie. He must run in a ~K machine.I I. He must be expendable.12Be must install In a robot

    If the current enVironment bad tlHnacted upon befoce. SAM checked tosee if it had been used a total of 7times. If so. be repeated itautomatically. If not he went to therandom number generator and flippeda 32"sided coin. If the result of thatflip was greater than the reactionvalue, SAM went to the randomselection routine descril>8

  • 5 REM SAM by R,chard Reed 18 6OTO leeeelelI IF t12/HQ1 = ItIT(t12/tm) 1lM 2 = -2lIe Z = AND(Z): ZI = INT(Z*XI): RETURN289 JI .. AJ(GI,FI) Rtf) Nil: LI = AJ(GI,FI} Rtf) N21: HI =LI: RETlRi4el1 IF AJ(R,S) < tI2I TfN AJ(R,S) AJ(R,S) AtI> tUI41e s = s + I: IF S ) N41 TfN 5=1: R =R + I415 IF R ) 7 THEN R =ttl429 I FS / 3 - INHS/3) T.e1 489439 RETlRi590 IF AI(GI,FI) ( N2I THEN AJ(GI,FI) = AJ(GI,FI) + 32~I RETlflN690 IF PI ( 2 TfN FlETURti619 RESTORE: FOR K ttl TO ~+I: READ K$: PRINT8P1,TRB(e-~);K$;:tXT:PRINT""629 RETlflN790 BI(GI,FI) = BI(GI,FI) + I: RETlflNseee XI-a-: OOSUB 0: FI-ZI: HI-NI: JI-HI: FOR I ttl TO ~: ~(I, FI) Rtf) ttllsel9 IF AJ)JI T.e1 ..... 1: JI=RI: Gl=1: LI = AJ N2Ise29 tXT I5839 XI = NIl: OOSUB 0: FlEM IF LI = N3I T.e1 ~1905949 IF HI)ttI Atf) JI*1.452-8=Z1 00 LI=N2I) Atf) N2lS8oltIT(N2I59) TfH 5190sese XI-8: OOSUB 0: GI=2I: JI AJ(GI,FI) AtI> HII: LI - AJ(GI,FI} AtIl N21: HI-LI~eoe IF HI )' ttl TliEN ~5190 TI = FI Atf) HOT CJ(G1): KI = TI5119 LI - IHT(KI/16): M - KI - LI * 16: It - 17 - LI + M: IF N)38 T.e1 It - Nil5129 IF SA = I 1lM FlETlRi5139 All = AJ(GI,FI) AtI> 31: IF ATI = ttl THEN AJ(GI,FI) = AJ(GI,FI) + N~I~ OOSUB EI: OOSUB 500: rN = INHAJ(GI,FI) /32)514e IF LCJ ) 89 T.e1 PRltITlIf'I, 0fl$(12}: GOSlIl 698: LCI = I5159 P - P + LI: Q - Q + ": PRINT8pI, HZ, Q, P, N, M, FI, GI, el(GI,FI), DY5168 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=(AJfHl t!2I)/32: FI=U:GI=I5185 GOSlIl 5199: T2 = N: T3 = 81 * I51S7 TI(N) = TI(N) + I: TII(H) = TII(N) + BI(I,U}~190 PRINT-PI, TAB(T3); TI; T2; TAB(T3+7);81(I,U);: NEXT I:PRINT8pI,TAB(II~);U5195 NEXT U: PRIHT8P1, CIfl$(12}5299 FOR I- I TO 139: N$ - N$+-*" :HI$ - Nl$+-I-: NEXT I5220 FOR I = ttl TO HII: IF TI.(I) )ADI THEN ADI = TII(I)5225 IF TI(I) ) ADI TfIi ADS = TI(I}5227 NEXT I5239 IF ADI ( 129 TIH 53895235 01 = INT(AOI / 129) + I5249 FOR 1= IiITONII: TII(I} = INT(TII(I)/DI): TI(I) = INT(TI(I)/DI): NEXT I5399 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: END6000 DATA MOUE, POSITIVE, NEGflTIVE, lJfl..VE, + VAL, ENlJIR, REACT. USE, SIEVE19099 01=256: 01" AI(S,OI), 81(S,01): MI=I: N2=MI: 0=199: E=299: EI=70919919 ZI~23456:81-14:NI-9:N0I-I:NII=31:N2I~224:N3I~7:H4I=2SS:N9I-190919929 IIf'UT "~tput Device"; PI: IIf'UT -Maxi_ value-; TV19926 FOR 1= 9 TO 7: CI(I>=INT(I* 36.428715): PRINT8P1, TAB(7*I); CI(I};: NEXT I19027 OOTO 1004919039 FOR 1= 9 TO 7: XI=OI: GOSlIl 0: CJ;ZI;: NEXT I19049 PRINT 8PI: PRINT apl10069 GOSUB 6ee: POKE 2729, 8: OOT0:5998

    reactJ.on and added 32 to tll.e usecounter if it was not at tll.e maximum.

    Once every actJ.on SAM wouldexamine a memory location (steppedtllrough from tll.e beginning of thememory block to tll.e end, then aroundagain) to s~ if its combination hadbeen used 7 times. If not SAM xeroedtll.at location, forgetting he had everdone anything Witll. thatenvironment/reaction. Thisconstituted the complete SAM. In atypical run of 40,000 moves his "good"counter had advanced about 3-3 times!ligher than the "bad'

  • 5010 to 5030 look at au possiblereactions to see if any ~re used andif there value is greater than the lastone found. In 5032 we get a 31-sidedcoin flip, and if the reaction has themaximum usage, ~ Skip testing thecoin. Line 5040 sets some other skiptests; the test involving JI* 1.452-aexpands the acceptance/rejectioncriteria by always excluding very badreactions and always using very goodones; the test using N2/50 selects anunused reaction every 50 moves sothat SAM can learn new habits fromtime to time. Lines 5050 and 5060 getnew reactions and test them if thecoin flip warrants it

    Lines 5100 through 5160 perform themathematical calculations involved inperforming a reaction, updating thememory, printing the resUlts, andgetting another environment. One linethat needs comment is 5125. It is aconditional return that makes use ofthe lines just above it for a subroutinecall from the tabulated reportsprinted after line 5160.

    ADS

    UCSD Pascal/Foftran 8 for polledkeyboard $50, 502 board $30, D&Nproto board $20, bare M-columnvideo board $25, Sams C2-(3 manual$20. Ron Battle, 1011 Yale NE,Albequerque, NM a7106

    FOR SALE: 12 fully populated 520boards. Each provides 16K of staticRAM. Not tested. $50.00 plUS shipping.ContactP~165J

    FORTH $24.95. Utilities available filso. 'Free catalog. Aurora Software, 37South Mikhell, Arlington Heights, IL60005

    Have you got something to sell? Whynot take out a classified ad in PEEK?Ads cost 35 cents per word, notincluding price words. Copy is due30 days before the cover month.

    ATTElITIOR: DEALERS!

    PEEKI65] needsMw subscribers andyou need new customers, and togetherwe can make it happen with our ownCo-op advertising program. Thisprogram pays dealers for signing upnew subscribers with free ad space inPEEK(651. Just five paid SUbscriptionswill earn a 1/9th page advertisingcredit in PEEK(651.

    Most dealers sell their own softwarewith the systems they install. Byadvertising in PEEK, you vastlyexpand the potential market for yourproducts. And how many sales have

    . you lost because you couldn't find theapplication your customer wanted?Dealer ads can be our own YellowPages. Readers and customers win tooby increasing the number of uses fortheir equipment.

    call or write today for details andyour free promotional materials.Making a PEEK(65] SUbscription a partof every sale is painless andprofitable. This time, Co-op paysyou.

    acerowl

    page 15 PEE)[(65J September, 1986

  • PEEK [6s1POBox 586PacificaJ CA 94044415-359-5708

    Bull< RateUS postage

    PAIDPacifica, CAPermIt "92

    Zip Code g4044

    BELIVER TO:

    Ecrl norris 111188 2ti6f,JOV'"

    32ea Uashingtcn"idIW'lll,"1 ....

    GOODIES for 051 Use.s~NEIIIII1M Uncltfkiaf OSI 0..... Joyrul

    C1 P Sama Photo-Facts UanUilI. Complete schematics. scope waveforms and board photos. All youneed to be a C1 P or 511 Wizard, just

    C4P Sama PhotoFacts Manual. Includes pinouts. photos, schematics for the 502. 505. 527,540 and542 boards. A bargain at

    C2/C3 Sarna Photofacts Manual. The facts you need to repair the larger OSI computers. Fat withuseful information, but just

    $7.95 $ _

    $15.00 $ _

    $30.00 $ _

    OSI'. 5m.1I Systems Journal. The complete set. Jutv' 1977 through April 1978. bound and reproducedby 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:' Requires65U. $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, documentationshows you how 10 call from any BASIC program on any disk and return it or any other BASIC programon any diSk, floppy or hard. Most versatile disk sort yet. Will run under LEVEL I, II, or Ill. It should costmore but sanders says, ..... sell it for just...~'

    KYUTIL - The ultimate OS-OMS keyfile utility package. This implementation of Sander's SORT/MERGEcreates. loads and sorts multiplefield, conditionally loaded keyfiles. KYUTll will load and sort a keyfile ofover 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-BIC3-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