Epson TF-20 User manual

FLEXIBLEDISKUNIT
HX-20DISKBASIC
REFERENCE
MANUAL

FOREWORD
Thismanualcoversthespecificationsanduseofthehardwareand
softwareoftheTF-20FlexibleDiskUnitdesignedexclusivelyforusewith
theHX-20portablecomputer.TogetthefullestusefromyourTF-20.
pleasereadthismanualcarefullybeforeattemptingtooperatetheunit.
NOTICE:
Allrightsreserved.Reproductionofanypartofthismanualinanyform
whatsoeverwithoutEPSON'Sexpresswrittenpermissionisforbidden.
*Thecontentsofthismanualaresubjecttochangewithoutnotice.
*Alleffortshavebeenmadetoensuretheaccuracyofthecontentsofthismanual.
However,shouldanyerrorsbedetected,EPSONwouldgreatlyappreciatebeing
informedofthem.
*Theabovenotwithstanding,EPSONcanassumenoresponsibilityforanyerrors
inthismanualortheirconsequences.
*MicrosoftBASICisa trademarkofMicrosoft.
©Copyright1983byEPSONCORPORATION
Nagano,Japan

TABLEOFCONTENTS
FOREWARD.............................................................................................................i
1.INTRODUCTION..........................................................................................1-1
1.1
Sequential
Files
and
Random
Access
Files
................................................
1-2
1.2FlexibleDisks..............................................................................................1-2
2.
GETTING
STARTED....................................................................................
2-1
2.1Unpacking...................................................................................................2-1
2.2NamesofParts...........................................................................................2-2
2.3HardwareConfiguration.............................................................................2-2
2.4
Operation....................................................................................................
2-4
3.DISKS.............................................:.............................................................3-1
3.1DiskFormat................................................................................................3-1
3.2SystemandNon-SystemDisks..................................................................3-2
3.3FRMAT.SYSGENandCOPY......................................................................3-3
3.4CautionswhenReplacingDisks.................................................................3-4
3.5CareandHandlingofFlexibleDisks............................................................3-6
3.6
Cautions
on
Placement
of
Disk
Drive
.........................................................
3-9
4.DISKBASIC.................................................................................................4-1
4.1DiskBASICFeatures..................................................................................4-2
4.2BootingDiskBASIC....................................................................................4-3
4.3DiskBASICSyntax.....................................................................................4-5
4.4CommandsandStatements.......................................................................4-6
4.5DiskBASICFunctions.................................................................................4-31
4.6
COPY
Utility................................................................................................
4-36
4.7
Error
Processing
.........................................................................................
4-39
5.HARDWARE................................................................................................5-1
5.1HardwareConfiguration.............................................................................5-1
5.2InterfaceSignals.........................................................................................5-2
5.3InterfaceLevel............................................................................................5-3
APPENDIXES
AERRORCODES
BDISKDRIVEENVIRONMENTALCONDITIONS
CPOWERREQUIREMENTSANDOUTLINEDIMENSIONS
DDISKSPECIFICATIONSANDENVIRONMENTALCONDITIONS

CommandsandStatements
Directions
CLOSE...................................4-6CVI,CVS,CVD..........
DSKO$...................................4-7DSKF........................
FIELD.....................................4-9
DSKI$.......................
FILES.....................................4-10EOF...........................
FILNUM.................................4-11INPUT$.....................
FRMAT..................................4-12LOC...........................
GET........................................4-13LOF...........................
INPUT#.................................4-14MKI$,MKS$,MKD$.
KILL.......................................4-15
LINEINPUT#........................4-15
LIST.......................................4-16
LOAD.....................................4-16
LOADM.................................4-17
MERGE..................................4-18
LSET,RSET...........................4-19
NAME....................................4-20
OPEN.....................................4-21
PRINT#.................................4-22
PRINT#USING.....................4-23
PUT........................................4-24
RESET...................................4-25
RUN.......................................4-26
SAVE.....................................4-27
SAVEM..................................4-28
WHILE...WEND.....................4-29
SYSGEN................................4-30
.4-31
.4-32
.4-32
.4-33
.4-33
.4-34
.4-34
.4-35
1.INTRODUCTION
1.1SequentialFilesandRandomAccessFiles
Thereareessentiallytwowaysinwhichdatacanbeaccessed(storedand
retrieved).Thesearesequentialandrandomaccessfiles.
Asthenamesuggests,sequentialfilesarefilesinwhichthedataare
storedinsequence.Therefore,toretrievedatafromthefile,thedatamust
bereadinsequenceandunwanteddatamustbepassedoveruntilthe
desireddataisreached.Amongtheadvantagesofsequentialfilesisthe
factthat,sincethedataarestoredinsequence,theonlyrestrictiononthe
lengthofa fileistheamountofmemoryavailableonthestoragemedium.
Thesimpleconfigurationofsequentialfilesalsomakesthemquiteeasyto
understandandtohandle.Themaindrawbackofsequentialfilesisthat
becauseunwanteddatamustbe.passed,theyarequiteslowcompared
withrandomaccessfiles.Thecassettetapesusedintheexternalcassette
andthemicrocassettedriveoftheHX-20arebothsequentialstorages.
Ina randomaccessfile,itispossibletogodirectlytothelocationinthe
storagemediumwhichyouwishtoreadorwrite.Thissavesa greatdealof
timeandmakesrandomaccessfilesfastertoaccessthansequentialfiles.
However,forrandomaccessfiles,inordertobeabletolocatedataeasily,
itisnecessarythatallrecords(thebasicunitforhandlingdatainfiles)be
thesamelength.
InDiskBASIC(thenameoftheversionofBASICusedtooperatethe
TF-20),thefixedlengthofrecordsis128bytes.Tofixthelengthofthe
variablesusedina randomaccessfile,theFIELDstatementisnecessary.
LSETandRSETstatementsareusedtostoredataintherandombuffer.
Theadvantageofrandomaccessfilesisthattheyareveryfastandthe
disadvantagesarethattheyusememorylessefficientlythansequential
filesandmustbeconfiguredwithsomecare.TheTF-20canbeusedfor
bothsequentialandrandomaccessstorage.
IV
1-1

1.2FlexibleDisks,
Flexibledisksarea lightweight,low-coststoragemedium.Whenthedisk
isinsertedinthediskdrive,itisrotatedata speedofthe300RPMbythe
spindleinthespindlehole.Accessisperformedthroughtheread/write
accessholesbytwinread/writeheadslocatedoneithersideofthediskin
thedrive.TheflexibledisksusedintheTF-20aredouble-sideddiskswhich
measure5 1/4"dia.andhaveanavailabletotalstoragecapacityof278K
bytes.Thefigurebelowshowstheexternalviewof thedisksusedinthe
TF-20.
Alongwiththeadvantagesofflexibledisks,therearecertainconditions
whichmustbemetconcerningtheiruse.Primarily,thesefallunderthe
headingofthecarewithwhichflexibledisksmustbetreated.Thedensity
withwhichdataismagneticallyrecordedona disk,whilebeingthesource
ofitsefficiencyandeconomy,isalsothereasonwhycaremustbe
exercisedinthehandlingof disks.Carelesshandlingof diskscanresultin
lostoruselessdataandprograms.
Disksarehoused' a protectivejacketthatservestocleantherecording
surfaceandprotectitfromdustandothercontaminants.Therecording
surfaceshouldneverbeexposedtooils(includingthatonyourfingers),
solventsora dustyatmosphere.Anyofthesecandestroythedataand
programsstoredonthedisk.Thesameappliestoextremetemperatures
orsuddenfluctuationsintemperatureorhumidity.Becausethedisks
recorddatamagnetically,disksshouldneverbeusedorstorednear
magnetsorina strongmagneticfield,suchasthatproducedbya
televisionset.Fordetailsoftherecordingformatandcompletewarnings
foruse,refertoChapter3,Disks.
1-2
1-3

2.GETTINGSTARTED
2.1Unpacking
WhenunpackingtheTF-20,makesurethatallofthefollowingitemsare
included.
®
Fig.2.1PackingList
AllpackingmaterialsshouldbesavedforreshipmentoftheTF-20.
2-1

2.2NamesofParts
2.3HardwareConfiguration
UptotwoTF-20floppydiskunits,eachhousingtwodrives,canbe
connectedtogetherina daisychainwiththeHX-20.InDiskBASIC,the
designationofthedrivesofthefirstunitaredrivesA andB andthoseinthe
secondunit,drivesC andD.Thedrivenamesaredeterminedbythe
settingoftheDIPswitcheslocatedinsidethehousingoftheTF-20.The
factorysettingisfordrivesA andB andtheusermustresettheDIP
switcheshimselfwhenheaddsa secondunit.Theprocedureforaddinga
secondTF-20isasfollows.
(1)Loosenthefourscrewslocatedontheloweredgeofthecoverofthe
secondTF-20.ChangethesettingofDIPswitch4 toOFF.DIPswitch4
islocatedontherear,lefthandsideofthePCboard(infrontofthe5-pin
interfaceconnector).ThelocationofDIPswitch4 isshownintheFig.
2.3.
2-2
TurnDIPswitch4OFF
Fig.2.3Right-sideViewofTF-20
WhenDIPswitch4 hasbeensettotheOFFposition,thediskdrivecan
beusedastheseconddrive.Thedevicenameswillbe"C:"and"D:".
(2)ConnecttheDIN5-pinendofcable#707tothe5-pinconnectorofthe
firstTF-20.
(3)ConnecttheDIN6-pinendofcable#707tothe6-pinconnectorofthe
secondTF-20."Daisychaining",asthisconnectioniscalled,ofthe
HX-20totwoTF-20drivesisshowninthefigurebelow.
TF-205-pinDIN
Fig.2.4DaisyChainingtheHX-20toTwoTF-20Units

2.4Operation
(1)DIPswitchsettingoftheHX-20
Beforestartingup,DIPswitch4 oftheHX-20mustbeturnedONIfitis
notturnedON,youwillnotbeabletobootDiskBASICeveniftheTF-20
unitsarecorrectlyconnectedtotheHX-20.
(2)TurningthepowerONandOFF
ThepoweroftheHX-20mustbeturnedONafterpowerhasbeenapplied
toalltheterminalsThepowerof theHX-20mustbeturnedOFFbefore
turningOFFthepowerofanyoftheterminals
RemoveanydiskssetintheTF-20beforeturningthepowerONorOFF.
(3)Settingdisksinthediskdrive
Theprocedureforsettingdisksinthediskdriveisasfollows
STEP1
Insertthediskintothediskdriveso thatthewriteprotectnotchisatthe
topofthediskandtheidentificationlabelisfacingright.
Fig.2.5SettingDisksintheDrive
STEP2
Whenthediskisinserted,youwillheara soundastheejectlocklever
catches
STEP3
PressthepushbuttonslowlyandcarefullytotheONposition.Thedisk
nowsetinthedrive
2-4
PushbuttonOFF'' PushbuttonON
Fig.2.7PushButton

(4)Removingdisksfromthediskdrive
Theprocedureforremovingdisksfromthediskdriveisasfollows.
STEP1
Checktomakesurethatthedriveselectindicatorisnotilluminatedbefore
pressingthepushbutton.Ifthedriveselectindicatorisilluminated,
executeCLOSEorRESETstatementbeforeyouejectthedisk.Thedrive
selectindicatorwillturnoffa fewsecondsaftertheexecutionofoneofthe
abovestatements.
Pushbuttons
selectindicators(LED)
Fig.2.8RemovingDisksfromtheDrive
STEP2
Firmlypressthepushbuttonofthediskdrivefromwhichyouwishtoeject
thedisk.ThepushbuttonwillreturntotheOFFpositionandthediskwill
beejected2-3cmfromthedrive.
CAUTIONS
1) Insert the disk into the drive slowly and carefully.
2) Check the orientation of the disk (write protect notch up, identification
label to the right) before setting the disk in the drive. (If the orientation
of the disk is not correct, the TF-20 will not operate.)
3) Always remove disks from the drive after checking to make sure that
the drive select indicator is extinguished. If you eject a disk while the
drive select indicator is illuminated, you risk losing the data stored on
your disk.
3. DISKS
3.1DiskFormat
TheflexibledisksusedintheTF-20aredouble-sided,double-density
flexibledisks.Double-sidedmeansthatdatamaybestoredonbothsides
(sides0 and1)of thedisksbymeansof theread/writeheadsoperating
throughtheaccessholes.Doubledensityreferstothedensitywithwhich
datacanbestoredonthedisks.
Therecordingsurfaceoftheflexiblediskisdividedinto40concentric
bands,calledtracks.Thesearereferredto,fromtheoutermosttothe
innermost,astracks0 to39.
Eachtrackisfurtherdividedinto16sectors.Thesearethebasicphysical
unitofdatastorageonthedisk.Atthestartof eachsectorisanareathat
showsthestartofthesectorandcontainstheaddressdataforthesector.
ThisisreferredtoastheidentificationorIDfield.TheIDfieldisfollowedby
thedatafield.Thisiswherethedatawhichtheuserwishestostoreis
actuallywritten.Theamountofdatathatcanbestoredina singlesectoris
256bytes,or4Kbytes(1Kbyte= 1,024bytes)pertrackfora totalcapacity
of320Kbytesfortheentiredisk.
2-6
3-1

Fig.3.1FlexibleDisk
Ofthistotal,tracks0 through3 (sides0 and1)areusedasthesystemarea
(fortheoperatingsystemoftheTF-20),thefirst8 sectorsoftrack4 (side0)
areusedasthedirectoryareaandtrack39isreserved.Thus,thefilearea
availablefortheuseris278Kbytes.Ifthediskisa systemdisk,theamount
willbereducedbythe8Kbytesoccupiedbythesystemprogram(which
operatesDiskBASICintheHX-20).
Foreachflexibledisk,64directoryareasarereserved.Thus,themaximum
numberoffilesthatcanbecreatedona singlediskis64However,a new
directoryareaisrequiredforevery256records(32Kbytes)ofa fileandthis
willhaveaneffectonthetotalnumberoffilesthatcanbecreated.
3.2SystemandNon-SystemDisks
ThediskswhichcanbeusedintheTF-20aredividedintosystemand
non-systemdisks.Thedifferencesbetweenthetwoareasfollows.
3-2
availableforusebytheuser.
3.3FORMAT,SYSGENandCOPY
Thesetwocommandsandoneutilityprogramareusedtoperform
necessaryoperationstoyourdisks:toformatthem,tocreatenewsystem
disksandtocreatebackupdisks.
(1)FRMAT
Beforea diskcanbeused,theaddressdatamustbewrittenintotheID
fieldandallotherdatanecessaryfordatastoragemustbepresentonthe
disk.Theprocessofwritingthisdatatothediskiscalledinitilization.Disks
suppliedbyEPSONarealreadyinitializedandcanbeusedimmediatelyas
non-systemdisks.However,disksotherthanthosesuppliedbyEPSONor
thoseonwhichdatahasbeendestroyedmustbeinitializedbytheuser.
ThisisdonebytheFRMATcommand.
Toformata disktobeusableintheTF-20,inputFRMATfollowedbythe
drivenameinwhichthediskyouwishtoformatisset.Whena diskis
formatted,allof thedataonthedisk(includingthesystemprogram)willbe
destroyed.Therefore,theHX-20asksforconfirmationbydisplayingthe
message"Areyousure?".Input"Y"fromthekeyboardifyouwishto
executethestatementand"N"ifyouwishtocancel.See4.4Commands
andStatementsfordetails.
3-3

(2)SYSGEN
Thiscommandisoneofthetwomethodsavailableforcreatingnew
systemdisks.SinceSYSGENcopiesonlythesystemareaandfileswhose
filetypeis".SYS",itdoesnotaffectanyof theotherfilesonthediskand
canbeusedtoconverta non-systemdiskwhichyouarealreadyusinginto
asystemdisk.
Tocreatea newsystemdisk,placethecurrentsystemdiskindriveA and
thediskwhichyouwishtomakeintothenewsystemdiskindriveB.As
withtheFRMATcommand,theHX-20willaskforconfirmationbefore
executingSYSGEN.
Fordisksthatwereusedassystemdisksinanothersystem,youmustfirst
execute.aFRMATcommandbeforeexecutingSYSGEN.Ifthedisksetin
driveB isdifferentfromthediskpreviouslysetindriveB,youmust
executea RESETcommandbeforeyoucanexecuteSYSGEN.See3.4
CautionswhenReplacingDisksand4.4CommandsandStatementsfor
details.
(3)COPY
Thisisa utilityprogramthatcanbeusedtocopyfilesorwholedisks.By
copyingwholedisks,itcanbeusedtocreatenewsystemdisks.Theentire
contentsofthedisksetindriveA canbecopiedtothediskindriveB (or
similarly,fromC toD iftwo TF-20diskunitsarebeingused).Thecopy
utilitycanalsobeusedtocopysinglefilesasselectedbytheuser.See4.6
CopyUtility,fordetails.
3.4CautionswhenReplacingDisks
Beforechangingthediskssetinthediskdrive,itisimperativethatyoufirst
executea CLOSEstatement.IftheCLOSEstatementisnotexecuted,the
datainthebufferwillnotbewrittenasintendedtothecurrentdiskand
maybeaccidentallywrittentothenextdiskinsertedinthedrive.
DiskBASICprotectsdisksagainstthiskindofaccidentbywriteprotecting
allnewlyinserteddisks.Ifanattemptismadetowritedatatoa diskthat
has
been
write-protected,
a
"Disk
write
protected"
error
will
occur.
ThefunctionoftheRESETcommandistocancelthisprotectionand
preparethediskdrivefora newdisk.However,itshouldbenotedthatthe
RESETcommandinitializesthedisksystemandthatthecontentsof any
diskopenatthetimeof itsexecutionwillbelost.See4.4Commandsand
Statements.
TherearealsodangersassociatedwithrebootingDiskBASICafteryou
haveleftDiskBASICbysuchmeans asturningOFFthepowerswitchof
theHX-20orpressingtheMENU keyinthemiddleofprogram
processing.
RebootingDiskBASICwithoutturningthepoweroftheTF-20OFFor
whenanoperationintheTF-20hasbeenhaltedresultsinthesame
conditionsaswhenfileshavebeenleftopen.Therefore, insertinga diskat
sucha timeposesa similarriskofthedataonthediskbeingdestroyed.It
isa goodideatoexecutea RESETcommandafterrebootingDiskBASIC
under
theabovementioned
conditions.
3-4

3.5CareandHandlingofFlexibleDisks
Asmentionedearlier,thenatureofflexibledisksrequiresthattheybe
handledwitha certainamountofcare.Pleasereadcarefullyandobserve
thebelow-listedprecautionstogetthemaximumuseandservicelifefrom
yourflexibledisks
1Nevertouchthemagneticrecording
surfaceofthedisksTheoilfrom
fingerprintsona diskcancausedata
errors
Nevercleanthediskswithalcohol
freonorothersolventsThedataonthe
diskscanbelostifthediskisexposed
tothefumesofvolatilesubstances
A
A
Storeanduseyourdisksawayfrom
magnetsandmagneticfieldssuchor
thosecreatedbya TVNeverholdyour
diskstogetherwitha magneticpaper-
weightExposuretoa magneticfield
cancausethemagneticallyrecorded
dataonthedisktobelost
Althoughflexibledisksareflexibleand
canbeeasilybenttheyshouldnever
bebentinhalforfoldedDoingsowill
renderthemuseless
6Neverusepaperclipstoholdyour
flexiblediskstogetherThiswillalso
distorttheirshapeandbea sourceof
errors
Becarefulwhenwritingontheiden-
tificationlabelsofthedisksDonotuse
aballpointpenorpenciltowriteonthe
labelsaftertheyhavebeenaffixedto
thediskA felttippencanbeusedin
sucha caseandwillnotdamagethe
diskprovidedthatyoudonotpresstoo
hardwhenwriting
Donotuseanerasertoerasethe
identificationlabelsThiscreates
gummyresiduethatcandamagethe
disks
9Placetheidentificationlabelcorrectly
intheupperright-handcornerofthe
diskDonotaffixnewlabelsontopof
oldonesTheclearancesinthedisk
driveareminimalandthiscanbea
sourceoferror
10Setthedisksinthedriveslowlyand
carefullyForcingthedisksorhandling
themroughlycanruinthemforuse
3-6
3-7

11.Alwaysusetheprotectiveenvelopes
providedwiththedisksTheseen-
velopesprotectthedisksfromdust
andscratches
12
Storethedisksverticallyinthestor-
ageboxDisksthatareleftlyingabout
willwarpandeventuallybecomeun-
usable
13Avoidsuddenchangesintemperature
(morethan20°Cwithinanhour).
3.6CautionsPlacementofDiskDrive
TheTF-20isa precisioninstrumentThefollowingcautionsshould2se
observedconcerningitsplacementanduse
1.Donotplacethediskdriveneara heatsourceorwhereitwillbe
exposedtodirectsunlight
2Avoiduseorstorageofthediskdrivewhereitwillbeexposedto
extremetemperaturesortoextremetemperaturefluctuations.
3Whenusingthediskdrivecontinuouslyfora longperiodoftime,pay
carefulattentiontotheambienttemperature
4Toprotectthediskdriveagainstoverheating,ithasbeenprovidedwith
ventilationholesAlwaysusethediskdriveina well-ventilated
environmentandbesurethatnothingisplacedontopofthedriveand
thattheventilationholesarenotblocked
ThissideUP
Ventilationholes
Fig.3.2PlacementoftheTF-20
Avoiduseofthedisk
drive
inaveryhumidatmosphereorwhereit
will
be
exposed
tooilyor
metallic
dust
TheTF-20iscomposedofprecisionpartsPlaceitwhereitwillbe
protectedfromshockandexcessivevibration
PlacethediskdriveasshowninFig3 2 Donotplaceitonitsside.
Positionitasnearthehorizontalaspossible
TheTF-20maymalfunctionifitisplacednearmachinerythatgenerates
astrongmagneticfieldDonotexposethediskdrivetomagnetsor
magneticfields.
3-8
3-9

9DonotuseanACoutletwhichisbeingusedforequipment(suchas
largemotors)thatgenerateselectricalnoise
10Usea commercialAC100VpowersourceIfthevoltageistoohighor
toolow,itcanbea sourceofmalfunction
11WhentransportingtheTF-20,alwaysinsertthetransportprotection
sheetsinthedrivestoprotecttheread/writeheads(Inanemergency,
flexiblediskscanbeusedforthispurpose,althoughthereisa strong
riskthatthediskswillbedamaged) Alwaystransportthediskdrivein
thepackinginwhichitcame
Headprotectionsheets
Fig.3 3 TransportingtheDiskDrive
4.DISKBASIC
DiskBASICisanexpansionoftheROMBASICwhichisnormallyusedto
runtheHX-20Theinterpreterforthisexpansionissuppliedasthesystem
programonthesystemdisk
WhentheTF-20isconnectedtotheHX-20,startingupBASICwillcause
theexpansioninterpretertobeloadedfromthediskintotheRAMofthe
HX-20Then,untiltheHX-20returnstothemenu,theexpansion
interpreterwillfunctionalongwiththeinterpreteralreadyintheROMto
effectthenecessaryprocessingforI/Otothedisksandforthenewly
addedcommands,statementsandfunctionsofDiskBASICTheproces-
singofthepreviouslyexistingfunctionscontinuestobehandledbythe
interpreterintheROM
3-10
4-1

4.1DiskBASICFeatures
Allofthecommands,statementsandfunctionsofROMBASICarestill
availableforuseinDiskBASIC.Inaddition.DiskBASICaddsthefollowing
features
(1)I/Otodisks
ThedevicenamesforthefirstTF-20connectedare"A:"and"B'",and
thosefora secondTF-20,ifconnected,are"C."and"D.".Thesedevice
namescanbeusedforanyoftheROMversioncommandsand
statementsrelatedtoI/O.TheonlyexceptionistheLOAD?command.
(2)ProtectSAVE
WhentheP optionisspecifiedina SAVEstatement,theprogramsaved
willbeprotectedfromlistingandsaving
(3)FeaturesaddedtoROMBASIC
CommandsandStatements
*DSKO$
FIELD
*FILNUM
*FRMAT
GET
KILL
LSET,RSET
NAME
PUT
*RESET
*SYSGEN
WHILE...WEND
*FeaturesuniquetoHX-20Disk
Functions
CVI,CVD.CVS
*DSKF
*DSKI$
LOC
LOF
MKI$.MKD$.MKS$
4.2
Booting
DISK
BASIC
(1)Hardwarechecklist
BeforeattemptingtobootDiskBASIC,makesurethatthefollowing
hardwareconditionshavebeenestablished.
•DIPswitch4 oftheHX-20isON
•Daisychaincable#707iscorrectlyconnectedtotheTF-20andthe
HX-20
•Powerisappliedtoallperipheralequipmentbeforethepowerofthe
HX-20isturnedON
Aftermakingalloftheabovechecks,carefullysetthesystemdiskindrive
AWhenyoudoso,theindicatorlampontheTF-20willturnonandoffand
DOSwillbeloadedintotheRAMoftheTF-20Next,startupBASICinthe
HX-20Theindicatorlamponthediskdrivewillagainturnonandoffand
DiskBASICwillbebootedintheHX-20WhenDiskBASIChasbeen
successfullybooted,thedisplayoftheHX-20willlooklikethis.
DISKBASICV-1.0
Copyright1982by
Microsoft& EPSON
P1:0 Bytes
4-2

(2)Problemsinbooting
If,insteadofDiskBASIC,youfindthatyouhaveactivatedtheROMBASIC
oftheHX-20(thatis,ifthedisplayisthesameasisalwaysdisplayedwhen
youstartuptheHX-20),orifthemessage"CANNOTLOAD"isdisplayed,
thesourceofthetroublecouldbeanyoneofthefollowing
(a)A non-systemdiskhasbeensetindriveA
(b)TheHX-20andtheTF-20arenotproperlyconnected
(c)Thereisa malfunctionintheTF-20
Ifthemessage"OUTOFMEMORY"isdisplayedandROMBASICis
initialized,thismeansthattherearetoomanyBASICprogramsand/or
RAMfilesstoredintheRAMandthereisnoarealefttoloadDiskBASIC
NOTE:
To start up BASIC in the HX-20 in order to boot Disk BASIC, any of the
methods normally used to start up BASIC is fine You can press the [2] key
to select BASIC from the menu, or you can select one of the BASIC
programs from the menu You can even use the Monitor K command to
enter BASIC directly when power is applied Disk BASIC can be loaded
correctly regardless of the method used to start BASIC.
4.3DiskBAS'Syntax
Filedescriptor
Filedescriptorsfordisksareexpressedinthefollowingformat.
"[<devicename>:][<filename>]"
(a)Devicename
InDiskBASIC,inadditiontothedevicenamesthatcouldbeusedinROM
BASIC,youcannowusedevicenames"A","B","C."and"D" to
specifythedisk
TF-20(1)Left-handdrive"A" (defaultdevice)
Right-handdrive"B"
TF-20(2)Left-handdrive"C"
Right-handdrive"D"
InDiskBASIC,thedefaultdeviceisalwaysdriveA Theonlyexceptions
areFRMATandLOAD?ThedefaultdeviceforFRMATis"B" andthe
functionoftheLOAD?commandremainsunchangedfromROMBASIC,
either"CASO" or"CAS1" willbeselected
(b)Filename
FilenamesinDiskBASICareexpressedinthefollowingformat
<filename>[.<filetype>]
AsinROMBASIC,<filename>isa stringwitha maximumlengthof8
characterscomposedofanyofthecharacterswithcharactercodesinthe
range1 to254withtheexceptionsof period[ ],colon[ ],parentheses[()]
andquestionmark[?]
<filetype>whenusedforanydeviceotherthanthediskisa stringofup
tothreecharacterscomposedofthesamecharactersetthatcanbeused
inthespecificationofthefilenameHowever,ifthespecifieddeviceisone
ofthediskdrives,charactercodesinwhichthevalueoftheMSBis1
cannotbeusedinthe<filetype>Ifsucha characterisused,theMSBwill
bechangedto0
4-4
4-5

4.4CommandsandStatements
ThecommandsandstatementsusedinDiskBASICareasfollows.
Toclosefile(s)
CLOSE
[[#]<file
number>,[#]<file
number>...]]
CLOSE#3
CLOSEclosesa filespecifiedby<filenumber><file
number>isthenumberunderwhichthefilewasopened
Thefilemaythenbereopenedusingthesameora different
filenumber,likewise,thatfilenumbermaynowbereusedto
openanyfile
ACLOSEstatementwithout<filenumber>closesallfiles
openedatthetimeofexecutingthestatement# before
<filenumber>maybeomittedNotethatENDandNEW
statementsalwayscloseallfilesautomaticallybuta STOP
statementdoesnotcloseanyfiles
Whenanoutputfilehasbeenopened,thefilemustbe
closedinordertocorrectlycompletetheoutputprocessing
ofthedataremaininginthebufferAfterCLEAR,LOGIN,
NEW,DELETE,WIDTH,LOAD.RUN,orMERGEisex-
ecuted,ora programisedited,allthefilesbeingopenatthat
timewillbeclosed
(SeeOPEN)
DSKO1
Towritedatadirectlytoa disk
DSKO$<drivename>,<trackNo.>,<sectorNo.>,
<stringexpression>
DSKO$"A:",1,5,A$
Thiscommandisa diskoutputcommandtowritethe
contentsof<strmgexpression>toa specifiedlocationon
thediskinthedriveindicatedby<dnvename>Datawrite
isinunitsofonerecord(128bytes)andisphysicallywritten
tothefirstorsecondhalf(128bytes)ofa singlesector.
Thelengthfor<stnngexpression>is128charactersIfa
stringlongerthanthislengthisused,thefirst128bytesof
datawillbeacceptedandtheremainderwillbeignoredIf
fewerthan128charactersareinput,anFCerrorwilloccur.
Tostoredatawhichislessthan128bytes,theremaining
bytesshouldbepaddedwithdummydata(OOH)asisdonein
thefollowingprogram
5CLEAR500
10H*="12345fc"
20ft$=
re
o*"A;
",8,
18-A*
<dnvename>canbe"A","B","C" or"D"
<trackNo> canbeanyintegerfrom0 to39
<sectorNo> canbeanyintegerfrom1 to64
NOTE:
In this command, <sector No > refers to a logical sector (the
amount of data transferred in a single logical I/O operation) or
one record (128 bytes) As the length of the physical sectors
is 256 bytes, <sector No > 1 indicates the first half of the
first physical sector, <sector No > 2 indicates the second
half of the first physical sector, etc This pattern is continued!
in the following manner
4-6
4-7

PhysicalSector<sectorNo>
SideO
Sidel
1Firsthalf
Secondhalf
2Firsthalf
Secondhalf
16Firsthalf
Secondhalf
1Firsthalf
Secondhalf
16Firsthalf
Secondhalf
1
2
3
4
31
32
33
34
63
64
(SeeDSKI$
FIELD
Todefinethefieldoftherandomfilebuffer
FIELD[#]<fileNo.>,<fieldlength>AS<string
variablo[,<field|ength>AS<stnngvariable>...]
FIELD#1,20ASA$, 35ASB$
Beforedatacanbewritteninto(PUT)orreadfrom(GET)the
randomfilebuffer,theFIELDstatementmustbeexecuted
<fileNo> isthenumberspecifiedbytheOPENstatement
whenthefilewasopenedand<fieldlength>isthenumber
ofcharactersassignedto<stringvariable>Thetotal
numberofcharactersassignedas<fieldlength>bythe
FIELDstatementcannotexceed128Ifitdoes,a "Field
overflow"errorwilloccur
(SeeOPEN,GET,PUT,LSET/RSET)
4-8
4-9

INPUT#
To reada singleitemofdatafroma sequentialfileandassign
ittoa variable
INPUT#<fileNo.>,<variablelist>
INPUT#1,A,B$
<fileNo> isthenumberusedwhenthefilewasopenedfor
inputbytheOPENstatement<variablelist>liststhe
variablestowhichthedataistobeassignedHowever,the
typeofthevariablesmustmatchthatofthedatawhichis
assignedtothemTheformatofthedataitemsinthefilewill
varydependingontheinputdeviceFordevicesotherthan
thediskdriveseeBASICReferenceManual
Whennumericdataisinput,space,CR(ODH),LF(OAH),etc,
atthebeginningofthelineisignoredandanyotherinitial
characteristakenasthestartornumericdataNumericdata
isdelimitedbyspaces,CR(ODH)orcommas[,] When
stringdataisinput,space,CR(ODH),LF(OAH),etc, atthe
beginningofthelineisignoredandanyotherinitialcharacter
istakenasthestartofstringdataWhentheinitialcharacter
isa quotationmark["],alldatauntilthenextquotationmark
willbereadasa singleitemofstringdataWhentheinitial
characterofthestringisnota quotationmark,thatstringis
delimitedbycommasorCRIftheendofthefile(EOF)is
reachedbeforethestartofnumericorstringdataread,anIE
willoccurIfEOFisreachedinthemiddleofdatareadthat
dataitemwillbedelimitedatthatpointAlso,ifanattemptis
madetoreadinvalidcharactersintoa numericvariable,or
invaliddelimitersareused,a BDerrorwilloccur
(SeePRINT#,LINEINPUT#andOPEN)
KILL
Todeletea filefromthedisk
KILL<filedescriptor>
KILL"B:TEST.BAS"
<filedescriptor>mustindicatea diskfileA KILLstatement
shouldnotbe executedfora currentlyopenfileIfitis,the
resultscannotbe guaranteedA KILLstatementiseffective
foralltypesofdiskfiles(BASICprogram,BASICdataand
machinelanguageprogramfiles)
LINEINPUT#
Toreadanentirelinefroma sequentialdatafiletoa string
variable
LINEINPUT#<filenumber>,<stringvariable>
LINEINPUT#1,A$
LINEINPUT#inputsanentirelineofcharacters(255
charactersmax) uptoa carriagereturnfroma sequentialfile
withouttheuseofdelimitersandassignsitto<string
variable>
<filenumber>isthenumberunderwhichthefilewas
opened
byan
OPEN
statement
<string
variable>
isthe
variablenametowhichthelinewillbeassigned
LINEINPUT#isespeciallyusefulifeachlineofa datafilehas
beenbrokenintofields,orifa BASICprogramsavedinASCII
modeisbeingreadasdatabyanotherprogram
(SeeINPUT#)

LIST
Tooutputa programlisttothespecifiedfile.
LIST<filedescriptors[,[<linenumber>]
[-[<linenumber>]]]
LIST
"B:TEST.ASC",
30-80
ThefunctionofLISTwhenfollowedbya filedescriptoristhe
sameasASCIIformatSAVE.Whena stringorstringvariable
isusedtospecifythefile,itmustalwaysbeenclosedby
doublequotationmarks.
LOAD
Toloada programfileintothememory.
LOAD[<filedescriptor>[,R]]
LOAD"B:PROG1.ASC"
Thiscommandloadstheprogramfilespecifiedby<file
descriptor>intothememory.WhenLOADisexecuted,all
openfilesareclosedandallcurrentvariablesaredeleted.
However,ifthe<R>option(i.e.,loadandrun)isusedwith
LOAD,allopenfilesareleftopenandtheprogramisrun
immediatelyafteritisloaded.
If<filedescriptor>isomitted,thefirstfileofthedefault
deviceisloaded.LOADretainstheprogramscurrently
residinginthememoryuntilthespecifiedfileisfoundand
actualloadingbegins.
BeforeexecutingLOAD,usetheSTATcommandtocheck
theareacurrentlyloggedin.
AttemptingtoLOADinanareawhichhasbeennamedbya
TITLEstatement,willresultintheoccurrenceofa PP
("Protectedprogram")error.
(SeeSAVE.)
LOADM
Toloada machinelanguageprogramfileintothememory-
LOADM[<filedescriptor>][,[offsetvalue][,R]]
LOADM"B:ABC"
Thefiletobeloadedshouldbea machinelanguageprogram
filecreatedbythemonitorfunctionortheSAVEMcommand.
If<filedescriptor>isomitted,thefirstfileofthedefault
deviceisloaded.
<offsetvalue>isaddedtothetopaddressspecifiedbythe
SAVEMcommandandloadingbeginsattheresulting
address.
Ifthe<R>optionisspecified,afterthemachinelanguage
subroutineisloadedintothememory,programexecution
beginsat<executionstartingaddress>specifiedbythe
SAVEMcommand.If<R>isnotspecified,theHX-20
returnstoBASICcommandlevelafterthemachinelanguage
programhasbeenloaded.
However,witha SAVEMcommand,thecontentsofthe
memorycanbecreatedasa file.If<R>isusedwitha
LOADMcommand ina caseotherthanmachinelanguage
programfile,theCPUwillinterpretthisfileasa machine
languageprogramfileandwillexecuteloadingaccordingly.If
thishappens,theBASICprogramsandRAMfilesmaybe
destroyed.Pleasebecarefulwhenspecifying<R>option.
<offsetvalue>cannotbespecifiedwhenthemachine
languagesubroutineisnotrelocatable,i.e.,ifitcannotbe
executedwhenitisloadedata locationdifferentfromthatat
whichitwassaved.However,astheCPUperformsnocheck
todeterminewhether<offsetvalue>ispermittedornot
theremaybecasesinwhicha fileismovedtoa different
addressbythe<offsetvalue>eventhoughthefilecontains
thememorydata.
WithLOADM,"COM0:"cannotbespecifiedasa device
name.
(SeeSAVEM.)
Other manuals for TF-20
1
Table of contents
Other Epson Storage manuals
Popular Storage manuals by other brands

Imation
Imation Apollo Expert 1.5TB Specifications

HP
HP StorageWorks 4000/6000/8000 - Enterprise Virtual... release note

HP
HP StorageWorks P2000 Deployment guide

Lista
Lista L1006 Safety and assembly instructions

HP
HP StorageWorks 4000/6000/8000 - Enterprise Virtual... release note

QNAP
QNAP TS-464U user guide

EMC
EMC D860 Archiver Installation and setup guide

SanDisk
SanDisk SSD Installation guide and warranty

NewerTech
NewerTech miniStack Assembly manual & user guide

Nexsan
Nexsan Unity2200 quick start guide

Fujitsu
Fujitsu Eternus DX80 S2 Configuration guide

Organized Living
Organized Living freedomRail installation guide