Documente Academic
Documente Profesional
Documente Cultură
T h i s s € c t i o n d i s c u s E e s t h e I / O E U b s U s t e mo f t h e O p e r a t i n g S g s t € m . T h e
I/O subsgsteft conpriEEs € rolleEtion of routines thEt allou qou
to aacess peaipheral and Iocal deviceE at threE different levels. The
CIO (Central I/O Utilitg), provideE the higheEt 1€veL tl€vice
independent Ecce65 to device6. The 6econd Ievel al!ot!6 comounication
uith the device handlers. The lou,eEt level is the 5IO (SeriaI I/O bus
Utilitq, r'outine. Ang louet level sEceEs to a device involveB the
direct reading €nd uriiting of the hard(,are registets associ€ted uith
the device.
The d:ts bqte i6 the basic unit of input/outFut. A data bgte can
rontain eithea "binai!" (non telt) info?dation, or entoded tett
in+ormation. The t€xt encodint gchemesuPPorted bg the OS i9 called
ATASCIL derived from the uordi 'ATARI ASCII. " Ho6t ATASCII codes aie
the €atre aE ASCIL t ith the prima?9 deviations being the control
codeE. Appendix D shous the ATASCII cher:cter 5et, 3nd AppenditeE E,
F, and C shou devi.e-gpecifiE i plefi6ntetions for the di6p1aq,
l e r J bo a a d , a n d p r i n t e r .
S Y S T E t IC o 1 6 5 5 5 - -
oPERATTNG Section 5
+---------+
I uEer i
+-----_--__-------i progrEo l-_____--_----------------_-+
+---------+
+--_------+ i
I IOCB.s I **lrt **+** I
+---------+ | i
++------------+
Resident I clo I +-----*---+ i
H a n dl e r I Utilitq I i DCB I *+***** I
V e c t o i T e b1 a +---*-----+ .*
++------*---__+ :l
i
+---------+ +---------+ * i
r zloc8 | i DeviGe I lDisl Filel * |
+-----:----t i T€ble i +----i l'lanag€lt l -----+ !
i +---------+
+--+-------**---+------+------+--.i--, .
i ! l i
+---------+ +-rE------+ +_-----r__+ +-------r-.i
iPtinter I i CEe5€ttel !... I I K e r r b o a i di I DiEk !
iHandler I i Handlsi I I Handter I I H a n dI 6 r i i H e n dI e r I
+---------+ +----__--_.1, l"---------+
t t :
-----+------+--*--
t---------+
I DCS l4*+ta*+***
+---------+
+---------+
I slo !
! Utilitg I
+---------+
$lher€: ---- sho{r5 e control pEth. +t{* shot s the date structure
r e q u i r e d f o l . e F at h .
The centrel I/o utilitg provideE qou 'r,ith e eingre interfa'e in u'hich
to a.cess all of the sqEtsm peiiPherel devieeE in a d e v i t e - i n d ependent
n:nner'. The mininun unit of datE tiensfer i5 the data b g t e . T h e CIO
a l s o s r . r p p o r t sf l u l . t i p 1 e b g t e t t a n E f e r s . A l l l / B o p € r ' e t i o n E a r €
perfoined on a 'raeturn_to-uEei-uhen-comPlete" baEis; there is no uag
to initiate concrr?ent "ovel.lapPed" I/O proEesseE
O P E R A T t N eS Y S T E I IC O 1 6 5 5 5 - - Section 5
CIO Design PhilosoFhg
The CIO utilitq u€s deEigned .pecificatlg to fteet the foltot ing
deEign caiteria.
Device IndeDendence
R e E o r . d _ a l i g n e de c c e s s e s e 1 1 o { , g o u t o d e e l u i t h t h € d a t E s t . e a m
at e highet level, that of the data reco.d o" "!ine o+ text. " Each
ancl evert ui.ite operation createE a single recor.d (bg detinition).
Each read operation essur€e that the follouing read operation
trrill 6ta|"t at the beginning of a re.ord. Record-aligned eccesEeg
cannot d€al u,ith pol'tions of {nore than one record at a time.
Record-aligned accasses are ugeful onlg uith text dete or. uith
bin€rq datd gusranteed not to contain the EOL character (!999) ag
Note that ang file can be acce5sed lJ6inq the bgte-align€d eEce6s
m e t h o d . r e g a r . dl e s s of hol, t h e f i l e lraE created. 8ut not ell files
can be s!creiSfullg read uEing record-aligned eccesses; the file
OPERATINGS Y S T E M C D l 6 5 5 5 - - Se.tion 5
nust contEin EOL ch€racters at the end o+ each record and at no
other qlEce.
l v l u l t i p l e D e v i E e . / F i 1 e Co n c u r r e n c U
Device Erpaheion
I IOCB 6 |
+---*----+
i l a c s T r
high eddieEs
I O16599 --
O P E R A T I N eS Y S T E F C Ss.tion 5
One IOCB ia iequired for each open device,/+ile. An{ IOCB cdn be tised
t o c o n t r o l a n g d e v i c e . / f i 1 e , a l t h o u g h I O C BO i s n o r a l l g a g s i g n e d t o
t h e 5 c . e e n E d i t o r ( E : ) . Y o u p e r f o r . , ne t g p i c a l I / O o p e r a t i o n b q :
*tac82x
CIOV
CPY l+O ; ( optional )
BII I ERROR
This eector describee €ach IBCB bqt., uith it5 fite nameand
addr€s6. Each IOCS is 16 !gtes long. Somebgtes can be 6ltsred bq
{ou 6n{l some Ere reserved for uEe bg CIO and/or the device
handlers.
T h € h a n d l e r I D i s a n i n d € r i n t o t h e s gs t e o d e v i E e t a b l e ( s e e
Seatlon g) €nd is not uEer-sIter.abl e . T h i i b g t e i s 6 e t b q C I o e E
t h e r e s u l t o f a n O P E N E o m m a n da n d i E l e f t u n c h a n g e d u n t i l t h €
device/file ii closed, at thst time CIo t itl set the bgte to $FF.
D e v i c e N u m b e r- - tcDNo t 03411
T h 6 d o v i c e n u o b e . i E p r o v i d r d b { C I O E E the result of an OPEN
conngnd and i6 not user-altereble. This brrte is uEed to
distinguish bet{reen multi.D}e deviceE of thE Eanetgpe, such as
D1: end D2:.
OPERATINASYSTEI{ c o 1 6 5 5 5- - S e ct i o n 5
command 8{te -- ICCI{D to342l
Y o u E e t t h e c o m m a n db g t e . I t 6 F e c i + i e 5 t h e c o m l n a n dt o b e
peiformed bq the CIO. Thie bgte is not altered bq CIO.
T h e C I 8 E e t E t h i s 2 - b q t e p o i n t e r e t O P E Nt i f i E t o t h e h a n d l e r ' s
P U T C H A R A C T EeRn t r g p o i n t ( - 1 ) . T h e p o i n t e r l r a 6 p r o v i d e d t o
a c c o m m o d a t et h e p e o p l e u t i t i n g the ATARI BASIC caittidge, and has
no legitimBte use in the sgEtem. This veFieble iE cet to point to
CIO's "IOC8 not OPEN" routine on CLOSE, Pourei-ur and
ISYSTEM.RESETI.
Yo! set thiE 2-bqte count to indicate the 6ize of the data
buffer pointed to bg ICAAL and ICBAH for read and ut'ite
opergtidns. lt is not required fo" OPEN. Aft€l. ea.h read or u,rit€
oper.etion, CIO rril1 set this pa?amet€r to the nuober of btJteE
actlaIlq treng+erred into or out of the data buffer. FoF
record-6ligned acceeE, the record length crn uell be less then
the buffer' length. AIEo an end of +iIe condition or an errof cen
cd!5e the brJte couflt to be leEs thsn the bu+fe. length.
O P E R A T I N OS Y S T E HC O 1 6 5 5 5 - - Section 5
40
You Eet theEe 2-b9tes. Theg rontein inforo€tion that iE
u E e d b g t h e O P E N c o m | l l s n dp r o c e 6 s € n d / o r i s d e v i c e - d e p e n d e n t .
For OPEN, t'!o bit6 of ICAXl are €1rrEg6 ugsd to specifq the OPEN
diiection aE sho{rnbelou, lrhere R i€ set to l for input (r€ad}
enable end lJ is set to l for outDUt (urite) enable.
+-+-+-+-+-+-+-+-+
i i i I rt,lrRri i
+-+-+-+-+-+-+-+-+
R e m ai n i n g B r J t e s ( I C A X S - I C A X 6 )
CIO Functi6n6
The CIO supports r'ecordE and blocks €nd the hendlerE support
Eingle bgt€6. A11 of the sgstem hendlerg suppoat one oa no.e
of the eight basic funEtiong subJect to Destriction6 besed
upon the diiection o+ data transfer (e. g. one aannot reBd date
+ron the pri.nter). Tfie baEic {unf,tions are: OPEN, CLOSE, eET
CHARACTERS,PUT CHARACTERS.GET RECORD, PUT RECARD, CET STATUS,
End SPECIAL.
O P E R A T I N GS Y S T E Mc u 1 6 5 5 5 - - Section 5
41
You 6et up the $ollorrring IOCB paraneters prior. to calling CIO foi an
BPEN operation:
COI'll"tANDBYTE = EO3
B U F F E F A D D R E S S= p o i n t e r to E d€vice,/fi1en:ne specification.
H A N D L E RI D = i n d e r t o t h e E q s t e m d e v i E e t e b l e , this i6
ug€d onlq bg CIB and nugt not be tsItered.
S T A T U S= r e E U l t o + O P E No p e r a t i o n ; E e e A p p e n d i x B f o r s l i e t
of the p06sible statu6 codes. In general, e negative Et:tus
t ill indicate a failule to open properlq.
HANDLER ID = $FF
S T A T U S= R e 5 u 1 t o + C L O S E o p e " a t i o n -
A P E R A T I N CS Y S T E MC O 1 6 5 5 5 - - section 5
O E T C H A R A C T E R-S- Read n Cherecters (8gte-Aligned Acce6E)
S U F F E RA D D R E S S= D o i r t c r to deta buf+ei.
B U F F E RL E N C T H= n u f i b e r o f b q t e g t o r e a d , i f t h i s i6 zero,
the d6te ui11 be .etu.ned in the 650A A reqister onI'J.
The CIO elters the foltouing IOCSpa.ameters as a resutt of the
O E T C H A R A C T E RoSp e r a t i o n :
S T A T U S= r e s u l t o f C E T C H A R A C T E RoSr e r a t i o n .
B U F F E RA D D R E S S= p o i n t e r . t o d E t e b u f f e r .
S U F F E RL E N o T H = n u m b e r o f b g t e g o + d a t a in bu+fef.
The CIO alterE the fo11o{ring IOCBparameter as a resuIt of the
P U T C H A R A C T E Ro9p e r 6 t i o n :
S T A T U S= r e s u l t o f P U T C H A R A C T E RoSr e r . e t i o n .
OPERATTNGSYSTET{CO16555 -- gection 5
43
O E T R E C O R D- - Re:d Up To n Characters (Record-Allgned Atce55)
C h a r . a c t e r Ee r e i e € d + r o m t h e d e v i c e / f i 1 e t o t h e u 6 e r - s u p p l i e d
buffsr until either the buffe!. is full o? en EBL €haracter i5
read and put into the buf*€r. I+ the bu+fer fill€ before en EDL
ii reed, then the CIO continueg reading chEtacter'6 frofi the
device/file until an EOL i6 read,, and setE ihe statuE to
indicete that a tiunceted i€cord u,as read. No EOL 'r,ill be lut at
the end o+ the buffer'.
B U F F E RA D D R E S S= p o i n t e i to data bu+fer'.
S T A T U S= r . s i u l t o f G E T R E C O R Do p e r a t i o n .
SYTE COUNT/BUFFER L E N G T H= n u m b e r o f b { t e i r e a d t o d t s t a
bu+fefi thi5 can be 1es6 th6n the fiarimln buffer length.
COM|'IANDAYTE = $O9
B U F F E RA D D R E S S= p o i n t € . to dat€ brJffer.
B U F F E RL E N O T H= f t a r i d u . r nn u n b e t o f b t ] t e s i n b o f f e r .
S T A T U S= r € s u l t o f P U T R E C O R Do p e r a t i o n .
B U F F E RA D D R E S S= p o i n t e r t o e d e v i c e / f i l e n € m e 6pecifiE€tion
if the IOCB is not atreadg OPEN,5ee the disEussion of the
i f t p l i e d U P E No p t i o n b e t o u .
S P E C I A L- - Specidl Function
B U F F E RA D D R E S S= p o i n t e i to a device/+ilenao€ spe.i+icetion
i.f the IOCB iE not alieedg openi Eee th€ discuEsion o+ the
implied 0PENoption belour.
O P E R A T I N eS Y S T E MC O l 6 5 3 5 - - 9ection 5
45
I o t 1 i e d O P E NO D t i o n
T h e G E T S T A T U S€ n d S P E C I A L c o m m a n d s a r e t r e a t € d s p e r i e l l t J bg CIO,
theq can uge an €l.eadg open IOCB to initiate the pr.oc€9s or th€g
can uge alr unopened IACB. If the IOCB is unopened, theh the
buffar' addre6s nust contain e pointer- to a devi€e/filenade
specification, J s s t € s f o r t h e O P E Nc o n n e n d , C I 8 | , i l l t h € n o p e n
t h a t I O C B , p e r f o r o t h e s p e c i + i e d c o m m € n da n d t h e n c t 0 6 e t h e I O C E
aga1n,
< d € v iE € ) : : = C ! D l E l K l P i R l S
{nunber} : := 1l2i3i4i5l6l7l8
<tilenane> ha6 dsvice-dependent chtsr"EcteriEtica.
<eol) ::= $98
C = Cegeette drlve
D1 throrrgh DB = FIoppg diEkette drives *
E = S c r e e n E di t o r
K = K e gb o a . d
P = 4O-tolumn or intei
P2 = 8o-colu.nn printea *
R1 through R4 = RS-23a-C int€rface6 *
S = Screen disp lag
c: CasEette
D2:8DAT File "BDAT" on disk drivE *2
D: HOLD Fi1e "HULD" on disk drive *1
11: Keqboard
1 . O p e n s t h e + i l e ' D 1 : T E S T E R '! s i n g I B C B * 3 .
?. R€ads recordg until en eiror or EOF iE reaEhed.
; 3. Close6 the file.
r I/O ECUATES
-. EOL- $98 i END OF LINE CHARACTER.
IOcA3= 93O ; 1OCB *3 AFFSET ( FRBf'l IOCB *O).
ICHID= 3O34O ; ( H A N D L E RI D - - S E T B Y C I O ) .
ICDNo= ICHID+1 ; (DEVIC€ * -- sET 8Y CIO).
ICCOT{- ICDNO+1 I COI{I{ANDBYTE-
ICSTA= ICCOtt+1 r STATUS DYTE -- SET BY CIO.
ICBAL= tCSTA+1 / EUFFER ADDRESS (LO!.,t.
ICgAH= ICBAL+1 ; BUFFER ADDRESS ( HIOII ).
- ICPTL= ICBAH+1
ICPTH= ICPTL+ 1
ICELL= ICPTH+t ; BUFFER LENeTH (LO!r).
ICBLH- ICBLL+ 1 ; BUFFER LENoTH ( HICH ).
ICAXl= ICgLH+1 ; AUX 1.
ICAX2= ICAXl+1 , AUX 2.
, T T R S T T N T T T E L T Z ET H E I O C B F O R F I L E " O P E N " .
O P E R A T I N GS Y S T E | !c O 1 6 5 9 5 - - Sertion I
47
LDA IiOPEN ; SETUP oPEN COMiIAND.
STA ICCOH,X
; READ REC0RDS.
O P E R A T I N OS y S I E M C 4 1 6 5 5 5 - - geition 5
4S
; 4!-qBL CHARACTER, LENCTHrS rN "ICALL. 3nd ,,ICBLH.,.
AND THE RECORD
, THI$ EXAHPLE
urLL Da NoTHrNewrTHTHEneionp _lUii-ileu.
K e q b o e r d H a n dl e r (K: )
OPEN
CLOSE
EET CHARACTERS
OET RECARD
GET STATUS(oul l function)
The kegbo€rd can produce ang o+ the e96 Eodes in ths ATASCII
cheraeter 9et (Eee Appendir F). Note th€t € +e{, of the teqbo6id
kerrs do not generate data at the Kegbodrd Hsndler 1eve1. Th€se
leg6 ar.e described belou:
I O15555 --
O P E R A T I N GS Y S T E I ' C Section 5
50
The 69Etem potrers up and {ril.1 €gEten r€6et to the alpha
c a p s l o E k o pt i o n
S o { r l e* e g c o r n b i n e t i o n ' a f e i g n o r e d b g t h e h t s n d l e r , s u c h e E
tCTRLI 4 through tCTRLI 9, ICTRLI O, tCTRLI 1, tCTRLI ,/, and
all teg combin€tions in that the tSHIFTI and tCTRLt te{r6 are
d e p r e s s e d s i m u l t e n e o u sl g .
The ICTRLI 3 keg generateE dn EOL Ehar.actei and r.eturng EOF statu6.
The device neDe is K, and th€ handlei iqnoreE ang device nlmber
and fileneme speci+ication, i+ inal!dad.
Theta er.e no device-depandent option bits in AUX1or,AUXA.
eET CHARACTERS
and eET RECORD
The handler retrrn6 the ATA$CII keg codes to CIO as theg €re
enter.ed, uith no faciliiq foi editing.
OET STATUS
T h e o r g o f O pe r a t i o n
o
+-+-+-+-+-+-+-+-+
l Ci S i k e g c o d e I
+-+-+-+-+-t-+-+-+
[ , l h e r e r C = 1 i f t h s C C T R L ]k e g i s p i e s s e d .
S = 1 i.f the ISHIFTI keg is preEred.
O P E R A T I N GS Y S T E MC O 1 6 5 5 5 - - Section 5
KEY CODE TO ATASCTI CONVERSIONTABLE
1C C E S C T1 S 1B 3C CAPs - -
1 D 5 3 5 3D 67 47 07
l E 2 3 2 3E s 73 53 13
lF 1 31 ?L 61 41 01
* ICTRLI 3 returns EOF 6tetuE.
O P E R A T I N OS Y S T E MC U 1 6 5 9 3 - - Section 5
Displag HandI€r (S: l
OPEN
GET CHARACTERS
EET RECORD
FUT CHARACTERS
PUT RECARD
e E T S T A T U S( n u 1 l + u n c t i o n '
ORAW
FILL
S c r e e n l ' l o de 6
TEXT I'IODE O
,IO16555 --
O P E R A T I N OS Y S T E T C Section 5
54
A pi09iam-qontfollable EUrEor shoos the destinetion of the nert
charactet to be output onto the gcieen. The curEot is visible a6
the inverEe video representetion of the current cheract€r. €t the
destinati on poEition.
T h e t e x t g r r e e n ' r i a r - o l l s , , u p t r r € r du h e n e v € r € t e x t l i n e a t t h e
bottoanroa, of the screen extendB pest thsr'ight m€rgi.n, or a text
1in€ at the bottom rou is terninated bt, an EOL. Scrillrng removes
the entire logiEEI line that st€i,ts et the top o+ the screen, and
then noves €11 subEequent lineg uFU€rd to fill io the void. The
cur.9or al.so noves upuard, if th€ logiE€l line deI€ted exceeds one
phgsicel I ine.
o
+-+-.i-+-+-+_+_+_+
i c t D l
+-+-+_+_+_+_+_+_+
l ^ l h a . eC
: is the color/character-set Eelect fi€1d
O P E R A T I N eS Y S T E I IC O 1 6 S 5 9 - - gection s
55
CoIor Character Char.acter
Value (defaultl Registel. Set
(see CHBAS=SEO CHEAS=3E?
A pFe n d i x
H)
D i s a 5 - b i t t r u n c a t e d A T A S C I I c o d e t h a t s € l e c t 6 t h e s p e ci f i c
Eh€racte. uithin the Est selected bg the C field. see AppendixE
for the giaphics repre6entations of the chafactsas,
D a t a b a e e v e r i a b l € C H B A Sl O 2 F 4 l a l l 0 ! 1 6 f o ! . t h e E e l e c t i o n o f
either of t{ro data Eets. The default vatue of +EO provides the
capit€l I€tterE, number6 €nd punctuation charecterE; the
tslternate value o+ 382 provides lourercsse letter6 ind the sDeaial
c h e r e E t e i g r a p hi c s s et .
C R A P H I C SI I O D E S ( H o d e s 3 T h r o u g h 1 1 )
D a t a g o i n g t o o r c o n i n q f r o f t t h e g r € p h i c s 6cr e e n i E r e p r e s e n t e d
as I to B-bit c o d e s e 9 s h o u n i n A p p e n d i r H e n d i n the CET/PUT
d iagr€m6 f ol lot!ing.
SPLIT_SCREEN CONFIGURATIONS
O P E R A T I N eS Y S T E MC O 1 6 5 5 5 - - $ection 5
56
To operate if| split'scfeen mode, the Screen Editor n!9t +irst be
opened and th€n the Displeg HandIe" nuEt be opened using a
s e p a . a t e I O C B ( u i t h t h e s r l i t - 6 c r e e | 1 o D t i o n b i t s e t i n A U X l) .
OPEN
T h e d e v i c e n a n e i 9 S , a n d t h e h e n d l e r i g n o r e s e n g d e v i c E n u | l l b e rE n l
f i l e n a m €s p e c i f i c a t i o n , i? included.
7
+-+-+-+-+-+-+-+-+
AUX1 r icrgt{,,lrRt r
+-+-+-+-+-+-+-+-+
7 o
+-+-+-+-+-+-+-+-+
AUXa i I mode !
+-+-+-+-+-+-+-+-+
S F E R A T I N OS Y S T E MC O 1 6 5 9 5 - - Section 5
A s a i ' e s u l t o { e v e r q O P E Ne o m m a n d ,t h e f o l l o r ! i n g Ecreen vari€b1es
ere elter.ed:
T h € t e x t c o r G o r i s e n a b l e d ( C R S I N H= O r . T h e t a b s a r s s e t t o
the defeult settings (a end 39). The coIo. registe.E are sef,
to the default vBIues (9houn in Appendix H).
N o s p e ci a 1 h a n d l e r a . t i o n s .
7
+-+-+-+-+-+-+-+-+
I ATASCII i l.lode O
.t-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
I C ! D I f , l o d e s1 , e - - C = .olor/data
+-+-+-+-+-+-+-+-+ set.
D = trun.ated AIASCIL
+-+-+-+-+-+-+-+-+
I rero tDl M o d e s9 , S , 7 - - D = color.
+-+-+-+-+-+_+_+_+
+-+-+-+-+-+-+-+-+
I zsro iD[ M o d e s4 , 6 , 9 - - D = co1of.
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
i zeio i D i Modeg9,10,11 -- D = dtsta.
+-+-+-+-+-+-+-+-+
I O16555 --
O F E R A I I N OS Y S T E I ' C Section 5
5A
PUf CHARACIERS End PUT RECt]RD
o
+-+-+-+-+-+-+-+-+
i ATASCII i Mdde O
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
I C i D I M o d e s1 , 2 - - C. coloi/date
+-+-+-+-+-+-+-+-+ se t,
D = truncated A T A S CI L
+-.ti_+_+_+_+_+-+_+
i ? iDl 6,1,7 --D
l,lode3 = color.
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
| 2 iDl l ' l o d e E4 , 6 , 8 -- D = color.
+-+-+-+-+-+-+-+-+
+-.i-+-+_+*+-+-+-+
| ? i D i t{odes 9, 10, 11 -- D = d€ts.
+-+-+-+-+-+-+-+-+
NOTE: For. all ftod€s, i+ the output deta bgte equats T9B (EOL), that
bgte {rrill be ti.eEt€d aE sn EOL chara{t€r'; end i+ the output
dsta brtte equals $7D (CLEAR) that bqt€ oilI be tr€at€d as a
\-- 9treen-E leaf char'atter.
The csigor ooves to the ne*t curEor posltion dE each deta bqte iE
t t l ' i t t e n . F o r o r o d eO , t h e c u ! ' s o r u i 1 1 s t a g u i t h i n t h e E p e c i f i e d
oargin9, +oa all other mod€s, the curgor ignores the tnar.gins.
DRAW
T h i s s p e c i a l c o m n e n dd r a u 6 e s i f t u l e t e d " s t T a i g h t r ' l i n e f t o n t h e
turrent curEor position to the location speci+ied in ROl.lCRs
t o 0 5 4 l a n d C O L C R SE O O s s I . I h e c o l o r o + t h e l i n e i 6 t € k e n f i o m t h e
laEt char€cter procesEed bq the Displ.aq H6ndler oF Screen Editor'.
T o f o r c e t h e c o l o r , s t o r e t h e d e s i i e d v € l u e i n A T A C H RI O Z F B l . A t
the co$pletion of the cofim€nd,the cursoi uill be at the location
specified 69 ROWCRS €nd CoLCRS.
FI LL
+ 1
+-------------------------------+
4 +-----------------------------+
+
+ 2
O P E R A T I N GS Y S T E HC O l 6 5 5 5 - - Section 5
60
FILDAT IOAFDI containe th€ fitl d 6 t a , a n d R O I , C R Sa n d C O L C R S
contein the EUrsor coor.dinetes of the tine endqoint. Th€ vdlu€
i n A T A C H Rt O z F B l { r i l t b e u s e d t o d r a u t h e t i n E ; A T A C H Ra l u a q s
conteinE the I€st datE read or ur?itten, so if the st€p9 above
a r e f o l l o o r e d e x a a t l . g , A T A C H Ru i l t n o t h e v e t o b e r n o d i f i e d .
Cursoa Po6ition
I n h i b i t . / E n a bl e V i s i b l e Cursoi DiEFt€g
You can inhibit the displeq o+ the text rursol' on the sEreen
bg 6ettiflg the vBriebls CRSINH tO2FOl to ang nonzer.o v€Iue.
Subsequent I/O u,ill not generate a vi5ible cul'sot'.
T e x t M a r gi n s
The text 6.regn has ure?-elterable left €nd right ftar.9ihs. The OS
6ets these otsrging to e and 39. The vari€ble LI,IARGN tooszl
d e f i n e E t h E l s f t o a r g i n , a n d t h e v a r i a b l e R H A R C NE O O 5 3 l d e f i n e s
the right margln. The leftmost ftal"gin v€1{re is O and the
O P E R A T I N GS Y S T E f {C 4 1 6 5 5 5 - - Section 5
6L
right,noEt oargin value is 39.
C ol o r Contio1
Theorg o+ Bpeiation
I h e D i s p l a g H a n d l e r a u t o r n a t i c a l l g s e t s u p a l l { n e m o r qr e E o u r c e s
r e q u i r e d t o c r € € t e a n d m a i n t a i n t h e 5 . r e e n d i E p l 6 q a t U P E Nt i m e .
The Ecreen genaration hardu:re requires that tlro di6tinEt data
areas etist fo. graphica modeE: 1) e displeg list end 2) a
screen data l.egion. A third d€ta aree must erist for text mode5.
This d€ta erea defines the Ecreen reprssentation foi ea.h gf the
t e x t € h a t ' a c t e r E . C o n E U l t t h e A T A R I H o r n eC o r n p u t e r
H a r . d u a l . el , l a n u a l f o r a c o n p l e t e u n d e r s t a n d i n g o + t h e n a t e f i a l thet
iE to fo I I orr.
O P E R A T I N CS Y S T E MC 0 1 6 5 5 5 - - Section 5
62
' The sidrplified block diagram beldur shorrethe reletionship6
betueen the neoor.g and h€id(ll€ie regiEte.s used to eet up e screen
di6plBg (urithort plaqer,/missile g?ephicE) bg the US Note that
the herdtare r.egiEter6 Ellot|, foi neng other possibilitie6.
+---+------+
+---------------+
Graphics
end/or +----------+
Tert
+-------------+
End o+ RAI'!nslno.r'g
+----------+ +---------+ :
I CHBAS=EOl--->l CHBASE +------
+---------+
+------+------+
! 9pe. ia IE andl EOOO
I Nu$bers !
I C a pi t a 1 | E1OO
! Letters I
i-------------+
! Special I EzOO
! G r a ph i E s I
+-------------+
I Lot eicase I ESOO
i Letterg I
OPERATTNOSYSTE|.ICO16555 -- Section 5
63
+---------+
icoLaRo i I cuLPFo I
= =--) I COLPFT !
i c o L o R1 i r cuLPF2 |
tcoLoR2 i i coLPF3 r
icoLoR3 i i coLBK I
ICOLOR4 i +---------+
l' O a t a b e E e v € r i e b l e s S D L S T L / S D L S T Hr o n t € i n t h e a d d r e E B o f
the current displeg 1ist. ThiE eddr€es is 6t6ied in the
herduere displeq liEt add.ess regiitErE DLISTL and DLISTH
a s p a r t o f t h e V B L A N Kp r o c e s s .
3. D a t e b a 6 e v a r i a b l e C H B A S€ o n t e i n s t h e H S D o f t h e b a s e a d d r e s E
o+ the charecter represent€tions +or the charactei date (text
m o d e so n l u l .
ATASCI I INTERNAL
coDE cooE
oo-lF 40-5F
20-3F O0- 1F
40-5F 2C-3F
60-7F 60-7F
AO-9F CO-DF
AO-BF BO.9F
CO-DF AO_SF
O P E R A T I N eS Y S T E I 1C 8 1 6 5 5 5 - - Section 5
T h e c h a r a c t e l s e t i n R U t ' li 5 o t d e r ' e d b g i n t e r n a l code order. Thr€e
consider.ations di+feI'entiate the internel Eode frodr the exteanal
(ATASCII) code:
ATASCII codeg +or. ell but the speciel grephics EherscterE uet's to
be si,mitar to ASCII. The alphabetic, numeri.c, :nd punEtuation
char€cter codes |rre identical to ASCII.
D E t a b a s e v a r i a b l e E C O L O R Ot h r o u q h C O L O R 4r o n t E i n t h e c u r i e n t
color regiiter a s 6 i 9 f l l n e n t E , H € r d 0 r B r Ec o l o r r e g i s t e r s r e E e i v e
t h e g e v t s 1 u € 6 € E p a r t o f t h e s t e q e 1 V B L A N Kp r o c e s s ? t h u 6
providing 5gnchroni:ed eoloi ch€nge6 (see ApPendir H).
l r h e n t h e D i 6 p l e g H a n d l e r r e c e i v e 6 a n o p e n c o m m e n d ,i t f i r . i t
determinsE the Ecreen node tl.om the oPEN IOCB. Tien it alloc€teE
me oiU frofi the end of RAf'ldountard (as specified bq date ba5€
v € r ' i B b l e R A M T O P ) ,f i r E t $ o r t h e g c r e e n d€te and then for the
displaq 1i6t. lhe scl'een date region iE cleBred and the diEplag
list is €r€ated if sufficient memor{ is available. The displag
list addre5r is stoi'ed to the databaEe.
OPEN
CET CHARACTERS
GET RECORD
PUT CHARACTERS
PUT RECORD
O E T S T A T U S( n u 1 1 f u n c t i o n )
S e e K e q b o a r d H a n d I e P a n d D i E p I e g H e n dl e r ' S e c t i o n E for
d i 6 c u g s i o n o f S cr e e n Ed i tor eiror stat{J9e5.
The screen Editor i.s a program thet ?ead6 keq dsta fI.om the
Kegboard Handler and sends each chsracter to the Di5pleg Handler
for' immediate diBpIag- The SciEen Editor' 315o acteptE data fr'om
g o r . ,t o s e n d t o t h e D i s p l a g H e n d l e r , a n d r e a d E d e t € f r d l n t h e
D i E g l a r j H a n d l e r ( n o t t h e K e { r b o t s r dH a n d l e r ) f o r q o o . I n f a c t ,
the !{eVbo€rdHandler, Displ€q Handler, end the Screen Editor a?e
al1 cont€ined in one monolithic hunk of code
T h e S c 1 . e e nE d i t o r u t e E t h e D i E P I a g H e n d l e r t o f e e d d a t a f l . o m
grephics €nd text sE.eens oi demend. You !5e the Screen
iditor t o d e t e ! ' n i n e u h e n t h e p r " o g i a t n! J i l 1 r e a d S c r e e n d a t € , e n d
urhete upon the E€r'eenthe deta llrill be read fron. Yot
+irst loc€teE the cui6or on the 6creen to detsrnine the 5creefl
a r e a t o b e r e a d , g o ! t h e n p r e s s t h e t R E T U R N Ik e g f , o d o t e i f l i n e
uhen the piogfem urill begin to r€ad the data indicated'
O P E R A T I N GS Y S T E Hc O 1 6 5 9 5 - - SeEtion I
66
t R E T U R NkI e g i s p r e s E e d , t h e e n t i i . e t o g i c e t l i n e G , i t h i n
Il nl :el t !t hl tE"
curEor .eEides is then made av€ilsble io the calling
program: Tt.ailing blenks in a logi.c€l line
are never returned a6
dat€, ho{rever. After. a1l of the data in the line
haE been sent to
th€ Ealler (thi6 Edn ent€il $ultiple R E A DC H A R t a T i i i i u n c t i o n s i f
de6ir€d), an EOL char€€ter is returned anO the iursor
positioned to the b€qinning of the Iogic€I rE
line foliouing the one
JUSt r.ead.
OPEN
7 o
+-+-+-+_+_+-+_+_+
AUXl i it,iRl iFi
+-+-+-+-+-+-+-+-+
cLosE
No speciel handler actions.
l:11,.-It,l th€ S.r.een Editor {,ri1l r.eturn data onlq uhen gou p!.esE the
tRETURNI tes €t the |teuboard. Houever, th. "+;;;*;
allous gou to read teri data uithout rnt;;""n;;;;. ;;"d,, opEN oprion
READ-op.retion, the Screen Ediror u,ili .;;;;;";;;. t r i i . , , J o u c o d x o a n ua
the Iogical tine in orhich the tert cursor i r i, "n. start of
is Iocsted, €nd then
tnovethe cursor to the beginning of
the follorrring logicaf line. A
read o* the l€st logic€1 iine on the screen
oriIl cau6e rhe Ecreen
data to scl dl.1.
C U R S O RU P ( $ 1 C t - - T h e c u r E o . m o v e i u p b g o n € p h g 5 i E E l l i n € . The
curEor urill u,r€p ft'om t h e top line o f t h e d i s P l a g t o t h e b o t t o l n
I ina.
C U R S { I RD O t r N ( $ 1 D } - - T h e c l r E o r n o v e 5 d o u , n b { o n e p h q s i c a l l i n e .
The cureo. rrril1 |,rap +r'om the botto.n line of the displaq to the
toD I i ne.
B A C K S P A C E( $ 7 E ) - - T h e c u r e o r m o v € € L e $ t b ! o n e c o l u n n ( b u t n e v a | .
past the bEginning of E logii€1 Iinet, €nd the charaEter at that
neu,position iE changed to a blant (S2O).
OPERATTNCSYSTET'IC016555 -- S€etion 5
6A
SET TAg (t9F) -- The Screen Editor eEtablishe6 a tab point et th€
Iogical line poEition at that the cur.sor is residing. The logical
l i n e t a b p o 6 i t l o n i 9 n o t s g n o n V n o u sd i t h t h e p h { E i c E l I i n e c o l u m n
position Ein.e the IDgicaI line can be up to 3 phgsical IineE in
length. For exarflple, tabs t€n be set at the 15th, 3oth, 49th,
60th €nd 75th char'acter positions o+ a logical line as shoo,n
belou:
Note the e++ect o* the left |nargin in defining the li.mits oS the
loq ical line.
O 2 9 19 aP 39 Scieen colufin *.
--L------+---------+__-------+---------R L/R = mergins.
TAB (57F, -- The cuisor movee to the next tab point in the
current logi€:l line, oi to the beginning o+ the nert li.ne if no
tab p o i n t is +ound. This function uilI not increase the logical
l i n e l e n q t h t o e c c o | n f i o d e t ea t € b p o i n t o u t E i d e t h e c u ? r e n t l e n g t h
(e.9. the Iogi€sl line length is 3e chars€t€rs and there i5 a tab
point at position 50)-
I N S E R TL I N E ( s 9 D ) - - A l l p h g s i t a l l i n e s a t a n d b e 1 o u , t h e P h u s i c e I
l i n e i n t h a t t h e c u r s o r r e s i d e E , a r e m o v e d d o u r nb g o n e p h v E i c a l
1in€. The Ia6t logiceL line ofl the digPIag can be trunaeted aE e
r e E U l t . T h e b l a n k p h q r i c e l l i n e e t t h e i n s e i t p o i n t b e a o | n e st h e
b e g i n n i n g o S t s t l e l ] ,l o g i r s l Iine- A logical 1in€ can be 5plit into
trro logical li.neE bg thiE p r 'ocess, the last helf of the original
l o q i c a l ! i n e b s i n g . o n c a t e n E t e du i t h t h e b l e n & p h v s i c a l l i n e
forfled at the inEert poiht.
0 P E R A T I N eS Y $ I E f . lC O l 6 5 5 5 - - Section 5
D E L E T EL I N E ( $ 9 C ' - - T h e t o q i c a l l i n e i n t h a t t h e c u r E o r r e s i d e s
i6 deleted and al1 data belou th€t Iine ie moved upuard to filt
the void. E{rptg logical lineE al'e €ieated at the bottom of the
di6plaq.
I N S E R TC H A R A C T E (R$ F F ) - - A l l p h g s i c € 1 c h a r s c t e r s a t a n d b e h i n d
the cufEor poBition on e logicel line are noved one position to
the right. The chera.tei et the €ur.sor position iE sst to blank.
The last theraEter of the logicsl line urill be !ost uhen the
logicel line is +u11 and a char€cter iE inserted. The nunbei of
phrJsiceL lines compriging e logical line can increaEe as € I.e6!1t
of this function.
E S C A P E( 9 1 8 ) - - T h e n e x t n o n - E O L c h a r a c t e r + o l l o u i n g t h i e c o d e i e
diEpleued €s date, even if it uould normallg be treated a6 €
c o n t r o l c o d e . T h e i e q u e n c e E E S C I t E S C Ir r i l l c a r r g e t h e E e c o n d ( E S C I
c h e r d ct a i t o b e d i s p l € U e d .
CET S'ATUS
The HEndler takes no action other then to set the 'tatug to $O1.
U E e r - A It e r € b I e D e t e B B s € V a i i € b 1 e s
| O16555 --
O P E R A T I N eS Y S T E i , C Section I
70
Cursor PoEition
The hone poqition (O,O) +or th€ tert uindou i6 the uppsr Left corner
o f t h € u i n do u .
N o i t n e I I q a l l t e r t { n o d ec o n t r o l t o d e s E r e o p e r ' a t € d u p o n 3 5 r e c e i v e d ,
but gometifies it i9 desit"able to h€ve the control codes displa{ed as
' if th€g ueie data ch€r.€atarE. This is done b9 setting the veriEble
D S P F L Ot O e F E l t o € n q n o n r € r o v a l u e b e + o r e o u t p u t t i f l q the detts
containing rontrol €odes. Settiog DSPFLe to zero restoreE nornal
proc€ssing o+ tert Eootrol codeE.
O P E R A T I N eS Y S T E MC O 1 6 $ 5 5 - - SeEtion S
7T
C a 5 E e t t € H a n dI e r (C: '
OPEN
EET CHARACTERS
EET RECORD
PUT CHARACTERS
PUT RECT]RD
GET STATUS (nu1l +unction r
OPEN
The deviEe nslne is C. and the H6ndler. ignores BnrJ devi€a nomber end
fi Ienaoe speciticatioh, i+ ihcluded.
O P E R A T I N eS Y S T E MC O 1 6 5 5 5 - - Section 5
+-+-+-+-+-+-+-+-+
AUX2 ict i
+-+-+-+-+-+-+-+-+
Bpening th€ caesette for ortput gener€te6 tuo closelg 6paced audibl€
ton€8, as a prompt for gou to ve"i{g that the tassett€ Plager'
iE set up +or tl,riting (as Ebove, Plus RECORD b!tton dapreEsed). Wh€n
the cassette i3 resdg, Vsu t€n Pre95 anV ke{boerd ketJ (erEept
tBEEAKI) to begin tepe uriting. There i3 no uag for the coilpute. to
v e i i f t J t h E t t h e R E C O R D9 r P L A Y b u t t o n i 6 d e p r e s s e d . I t i s p o 6 s i b I e t o r
t h e f i l e n o t t o b e ! , r i t t e n , o i t h n o i m | r | e d i a t ei n d i c a t i o n o f t h i 6 f e c t .
Ihe sgstem EometioeE e|nits urhistling noi5e5 E+ter cessette I/O has
occur';ed. the sound can be elitninat€d bq storing $OS to SKCTL tD2OFl'
t h u 6 b r i n g P O I ( E Yo u t o f t h e t u , o ' t o n e ( F S K ) n o d € .
T h e C L O S Eo f 6 t e p e u r i t e does the f o l l o u i n g :
+-+-+-+-+-+-+-+-+
I data b{t€ I
+-+-+-+-+-+-+-+-+
.t-+-+-+-+-+-+-+-+
i data b{te I
+*.1-+-+-+-+-+-+-+
CET STATUS
Theorq of 0peration
The Cesiette l{6nd}€r urriteE and reads el1 data in fired*length recor.dE
of the foamet Bhoun belour:
+-+-+-+-+-+-+-+-+
i o I o 1 0 1 0 1 i S p e e d n e a s u r e f i e n t b gt e s .
t-+-+-+-+-+-+-+-+
t o1 0 1 0 1 0 1 i
+-+-+-+-+-+-+-+-+
i control bgte I
+-+-+i+-+-+-+-+-+
i 128 i
i bqtee I
+-.t-+-'-+-+E+'+-+
i E h e ck s u m i (Menaged bq 5I0, not the
+-+-+-+-+-+-+-+-+ H E n d1 € r . )
O P E R A T I N GS Y S T E MC O 1 6 5 5 5 - - Section 3
The cootaol bqte containE one of three velue€:
F i l e S t r . u ct u r e
Iha C6s3ette Handle. {'r iteg e file to the eas6ette device uith a fil€
Ett.uctr,rr€ that is totallt, iftpos€d btJ the Handler (Boft foitnet). A file
EonsiEts of the follouinq three e1€nentE:
o An end-of-f i le fr.ame.
Stop/ltart P R W T= 3 s e E o n d s o f r n a r l t o n € .
C o n t i n u o u s F R W T= . 2 5 s e c o n d o + t n a tl t o n e .
OPERATINOAYSTEI'ICU16995 -- g€ction s
Printer" H a n d! e r (P: )
OPEN
PUT CHARACTERS
PUT RECORD
GET STATUS
OPEN
The device ns{ne is P. The Handler ignores ang device nuftber and
filenane sper ification, if included.
7 o
+-+-+-+-+*+-+-+-+
I ATASCI I
+-+-+-+-+-+-+-+-+
O p E R A T I N eS Y S T E MC O 1 6 $ 9 5 - - SeEtion 5
+-+-+-+-+-+-+-+-+
AUX? i grint node I
+-+-+-+-+*+-+-+-+
CET STATUS
+-+-+-+-+-+-+*+-+
I co|no€nd stat. i DVSTAT + O
+-+-+-+-+-+-+-+-+
i AUX2 of prsv. i + l
+-+-+-+-+-+-+-+-+
i tioeout I
+-+-+-+-+-+-+-+-+
i (un!sed) i
+-+-+-+-+-+-+-+-+
The nert brrt€ containE the AUX2 velLre froo the previoog op€rstion.
The ti.m€out bgte contains a controller provided meriouln tifi€out
v a l u e ( i n s e c o n d s) .
T he o r g o f 0 p e r a t i o n
U P E R A T I N OS Y S T E HC U l 6 5 5 5 - - SeEtion 5
77
The printer device doeE not ettEch anl si.gnificence to the EOL
character, Eo the Hendler' does the approFriate blank fill
lrhenever it cees 3n EOL.
The DiEk Fil.e ttanager EUpportE the follot ing CIO f,.rnctions:
OPEN F ILE
OPEN DIRECTARY
CLOSE
EET CHARACTERS
GET RECORD
PUT CHARACTERS
PUT RECORO
OET STATUS
NOTE
POINT
LT]CK
UNLOCK
RENA},IE
FORi.IAT
0 P E R A T I N eS Y 5 T € MC O 1 6 5 5 5 - - Sectlon 5
The Dist File I ' l e n e g e rc a n p r o d u c e t h e + o l l o u i n g errol' EtatuseE:
C I O F u n ct i o n D e E c r i p t i o n g
IIPEN FILE
I h e O P E NF I L E E o o m a n d E U p p o r t 5 t h e f o l l o r r i n g options:
7
+-+-+-+-+-+-+-+-.t"
AUX1 | tt.|tRt iAl
+-+-+-+-+-+-+-+*+
O P E R A T I N GS Y S T E MC 0 1 6 5 5 5 - - Se(tion 5
7S
O P E NI n p u t ( A U X I = $o4 )
O P E NO u t p u t (AUX1 = 9OA)
The indicated file is opensd +or outp!t sterting uith the +irEt
b g t e o f t h e + i 1 e , i f t h e + i 1 e i E n o t tocked. AntJuild-card
chatacterE are u6ed to Search fol the firBt atch. I+ the fil6
e1r'€adgeri5t6, the existing file uril 1 be delet€d before oPening
the naned file as e neu file. If the +ile doeE not alaeadq eri9t,
it !rilI be creeted.
A file oD€n€d foi' ootput rrill not aFPeal in the diiectorg until
it hes been Elosed. If en output file i5 not pl'operll closed,
$ofle o!'eIl of the sectori thet urete €aquired for it ian be lost
until the diEk is reformetted.
The indicated file is opened fot outPut 6t€r'ting uith the b!te
after the laEt bgte of the exi.6ting +i1e (that nuEt €lreadtl
erist), if the +iIe i5 not locked. Anq urild-card EhErEcter5 ar'e
used to se€rch for' the first fiatch.
O P E NU p d a t e ( A U X I = 9 0 C )
The indicated +ile (thet muEt elreadq exi6t) uill be opened for'
update provided it i 6 n o t l o c k e d . A n g u r il d - c a r d c h a r a c t e r s a t e
used to Eeafch for the fii.9t metth.
The GET, PUT, NOTEand POINT opeiations aie all valid, and can be
i n t e t ' t n ix e d e s d e 6 i r e d .
<€xteniion) | t = Z e l ^ at o 3 e l p h e n u D e r i c E h a r a c t e r s . I f t h e
erten6ion name iE (niEEing or Ie6i thdn 3
char€cterE, it Uill be padded {rith blanks, i+
it is greater then 3 cherecters, the extt a
E h a r a ct e r E u r i l l b e i g n o r e d .
<teFminatoi> : : = <EUL)[<blant>
Figure 5-1O D e v i c e , / F i 1 e n € m eS g n t a r
D1: oA|{E.SRC
D: |'1ANUAL5
D:.t{HY
D P E R A T I N CS Y B T E I 1C O 1 6 5 5 5 - - Section 5
a1
The t charerter causes the reoainde. o+ the primtsrq of erten5ion
field in that it is used to be effsctivelU padded uith ?
Ehe.ectels. F o r e r a o p l e , t ^ r H *l , i l l m s t c h W H U , W H E N . I I H A T E V S R ,e t c .
I f u r i l d c € r d i n 9 i E u s e d u i t h e n O P E NF I L E c o n | n a n d , t h e f i " 6 t fite
found (if ang, that neet6 the speci+ication uri11 be the one (and
onlq on€) opened.
OPEN DIRECTORY
T h e O P E N D I R E C T O R Yc o m n r a n da l l o u s 9 o u r s 6 d d i r e c t o r g
infornation for. the setected filena|ne(s), using normal GET
C H A R A C T E RoSr e E T R E C O R D€ o n m a n d e . T h s i n f o r . m a t i o n D e e d u i l l be
fo!'m€tted ss ATASCII iecords, Euitable for printing, a€ Ehourn
belo{t. Wildce?ding c€n be used to obtair| in+ormation foi nL,ltiple
files oi the entire dislette.
T h e O P € N D I R E C T O R Y€ o n l n € n d u s e s t h e E a m e C I O o a r a m e t e r s € E a s t a n d € r d
O P E NF I L E c o m f t e n d :
AUX1 = $06
I
1 2 3 4 5 6 7 4 9 O 1 2 3 4 5 6 7 A
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
i s i b i p r i t n e r gn e m e l e r t ibicotntiel
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
O P E R A T I N OS Y S T E MC 0 1 6 5 5 3 - - Section 5
a2
l"lher€: s = * or ' 'r rrrith * indi.€ting file locted.
b = blent.
p r i n t a i g n E t n eg l e f t - J r r g t i + i e d n E m € q , i t h b l a n t + i t I .
ert = le+t-JUstified ertension {rith bIEnt fiIt.
b = blank.
.ount = nsnber of seEtorE conpriring the fi1e.
e = EOL ( *98 ).
x
1 2 3 4 5 6 7 A 9 0 1 2 3 4 5 6 7
.i-+-+-+*+-+-+-+-+_+-+_+_+-+-+_+_+_+
i r o u n t iF R E E S E C T O R g l e i
+-+-+-+-+-+-+-+-+-+_+-+-+_+_+_+_+-+
The EOF st.tuses (tO3 end $88' sre returned as ih a nornEl data
f i l e { l ' h e nt h e l a s t d i r e c t o r g l . e c o i d i s r € a d .
The opsning of another dlslette filE uhite the diiec torg read iE
open ui11 Eaui€ s!bsequent di1.ectorq iead6 to malf!nction,6o
caie ougt be t€k€n to Evoid thi6 situation.
CLOSE
o rrr.iteE anq rEsidu€1 datE +.oft its file buf+er for that +iIe
to the dislette.
Char'a€ter"s aie obtained faon CI0 and urritten to the di5kette aE a rau,
d€t€ stream. None o+ the ATASCII control chererter.g have ang sp€ciel
signi+ican€e.
GET STATUS
S p e c i a l C I O F u n ct i o n E
T h e D F F Is u p p o r . t E € n u m b e r o f S P E C I A L c o m m e n d s , t h a t a r e d e v i c e
sFecifia. These €re erplained in the parEgrephr that follour:
NCiTE ( CBI.1I'IAND
BYTE = 925)
T h i s c o m o a n dr e t l r n s t o t h e c e l I e i t h e e r € r t d i E | ( e t t e l o c a t i o n o+
the nert bgte to be r€ad or uriitt€n, in th€ var'iab169 sooun
belou:
T h i s a o m r E n da l l g r r s g o L , t o s p e c i f q t h e e x e r t d i F t 6 t t e l o E e t i o n o f
the nert bgte to be read oi uiitten. In order to use thiB com{roafld,
the *iI6 mirgt have been open€d {rith the ,'update" option.
T h i s c o m m a n da l l o o r e g o u t o p r e v e n t u r i t e s E E e s s t o e n q
number of named files. Locked files can not be deleted, renaoed,
nol. open€d +or outpr.rt unI€5i theq are first unloc&ed. Locking a
fils thet iF elreedg locled is a velid op€ration. Th€ Handler
erpects a device/filenede EpeEification, th€n ell occurrences of
the filenaoe EDecified uill be Iocled, usino the uild-card rules.
COI'{HANDBYTE = 923
A U F F E RA D D R E S S* p o i n t e r to device/filenane speEification.
S T A T U S= r e E u l t o f L U C K o p e r a t i o n ; E e e A p p e n d i x I for a list
of possible statu6 codes.
UNLOCK
COMI{ANDBYTE = 324
B U F F E RA D D R E S S= p o i n t e r to device/fi.l.ename rpecific€tion.
S T A T U S- . e s l l t o f U N L O C Ko p e r a t i o n , s e e A p p e n d i l B f o i a
l ist o+ possi.ble status codes-
D€LETE
T h i s c o r f t | l a n da I I o { r 5 ! j o u t o d e l e t e a n g n u m b e i o f u n l o t k e d
n a n r e df i l e s f r . o m t h e d i r e c t o r q o f t h e E e l e a t e d d i s f t e t t e e n d t o
deellorete the diskette space {rEedbg the files involv€d. The
Handler erpects a devics/filenatne spe.ific€tion, then €1I
occurences of the filen€ne 6pecified uii11 be deleted, using th€
rrild*aard ruler.
COHMANDEYTE 3 921
B U F F E RA D O R E S S= p o i n t e r to device/filanane spe€i+icetion.
RENAI.lE
{ d e v i .c e s p e c ) : . { f i l e n a f l € 6 p e c > , { $ i l e n e m e s p e € X E B L >
D 1 : + . S R C ,* . T X T
D:TEI,IP,FDATA
D2: F*, F+, OLD
E U F F E RA O D R E S S= p o i n t e r to device./filentslne specifi€ation.
O P E R A T I N OS Y S T E MC O 1 6 9 5 5 - - Section 5
a6
FORi'IAT
COtlt'{ANDBYTE = aFE
B U F F E RA D D R E S Ss p o i n t e r to device EpeEi+iEEtion.
T h e o r q o f O pe r E t i o n
l . r h a nt h a b o o t p r o E e s s i s c o m p l e t e , t h 6 D i g t F i l e M E n E g € ru i l l
a l l o c a t e a d d i t i o n a l R A l , lf o t t h e . r e a t i o n o f E e c t o r b u + + e r E .
Sector. b!ff€rs are Ellocatad ba6ed uoon information in the boot
reEortd as shoun bal0{r:
Tha Disft File llanager- lsFs the Dist Handter to perfof|n all
disftette t€eds end uiitesi the DFtl.6 function iE to support end
{raintain the directorq/file/bitnap Etructur.es :E des.r.ibed in the
fol louing pege€:
- +-------_-----_-_+
' E O O Ta e c o r d i Sector 1
+---------------_+
FllS EOOT i gectoi 2 -+
= +ile
' DOS.SYS i SeEtor n +* Note 1
+----------------+ i
i Use|. i Setto. n+l -+
= FiIe
I Ar.ee i Settor' 359 ($167)
+----------------+
\: l vToc(note 2) | gertor 360 ($168)
+---------------_+
: File ! Sector 361 ($169)
= Directorq
i Secto. 3 6 4 ( $ 1 7 O)
+----------------+
. U6e? I
= FiIe
I Area I SeEtor 719 ($ACF)
+---i------------+
I unused i ge€tor 72O (izDol
A P E R A T I N OS Y S T E Hc O 1 6 5 5 5 - - Section 5
a9
Fl.|S Boot R6cdrd Forftat
T h e F l . l SB O O Tr e c o r d ( c 6 c t o r . l + 1 ) i s a 6 p e c i a l c a B E o f d i s t e t t e - b o o t e d
softuare ( s e e g e c t i o n 1 O ) . T h € f o i f t a t f o r t h e F t v l sS O O I r e c o r d i s
ihoo,n belo{|
+______-______--_+
i boot f lag = O i Egte O
+----------------+
! *sector5=1 I I
+----------------+
I boot addr€is i 2
[ = 07OO I
+----------------+
I init €ddr.€ss i
+
+----------------+
I JMP = rt4B i 6
i boot reed I
+ Eo n t i n u E t i o n +
I addres5 |
i marfileg=3 | | 9 N o t €1
+----------------+ |
I dfive bits = 1 i I lO Note 2
+----------------+ |
I al1o. dir,c * O i | 1r. Note 3
i
i boot iflage end i I
+ + i F M S
i address + 1 ! +------------- configuretion
+----------------+ i date
I boot f1a9 {} O I i 14 Note 4
i
i sector count | | 15 Note 5
+----------------+ i
I DOg. SYS | |
+ Etart ing + I
I sertor number I i
+----------------+ ---+
i code +or. 5erondi
i ph€se of boot i
Figure 5-12 F ! 1 e l v l € n € q e m e n tS u b E g E t e | n E o o t R € . o r d F o ? m a f ,
O P E R A T I N GS Y S T E I 4C O 1 6 9 5 5 - - Section 5
go
N O T E1 - Bqte I6pecifieE th6 naxiol,o nunber' o+ concurrentlV open
files to be sufport€d. Thie valle €€n renge +ro.n l to E,.
N O T E2 - 8 g t e 1 0 € p e c i + i e E t h e s p e c i + i c d i s l i d i i v e n u n b e r 6 t o b e
EUpported |Jsing a bit enEoding schene as shoun belolri
7 6 5 4 3 2 1 O
+-+-+-+-+-+-+_+-+
i i4l3!2111 uher€ a 1 indicates a sel€cted d?ive.
+_+_+_+_ii-+_+_+-+
NOTE4 - gqte 14 mugt be nonzero +or the second phase of the boot
p r r o c e E Et o i n i t i a t e . Thi6 +ta9 indiceteE that the file
_ D O S .S Y S h a s b € . n d . i t t € n to tie di5tette.
N O T EI - T h i s b { t e i 3 a i 6 i g n e d a s b e i n g t h e E e . t o . c o u n t f o r the
D O SS . YS file. It iE actualt{ en unused b{te.
The diEgram b€1orr shouE ho{, the boot gecto!' (p{r.t of +ile
DOSS . Y S l € ' l d + o l l o t r i n g g e c t o i s a r e ] o a d e d t o l r | e o o r ' ge E p a r . t o f
t h e b o o t Da o c e E s .
+----------------+ t'lenorgaddr'€5sO7OO
i data fron boot i
= E€ctor read E{ s
I res i d6nt OS I 077C
+----------------+
data +rofi r.est a77D
of DOS.SYg
i'ead bg the
= progr.em in the *
I boot sertoi. I
t !
e n d o + bo o t
FiEute 5-13 File l'l€nagenent Subs{stem goot P.ocesE tl€drorq l,lap
O F E R A T I N CS Y S T E MC O 1 6 5 5 5 - - SG{tion 5
Volufle Table o+ Contentg
+----------------+
I dit'eEtorg tgpe I BUte o Note
++---------------+
i nar ilttun (10) I 1 Note
+ sector * +
! = ozCS (hi) i
+----------------+
r i 10
= volune bit nap =
i l
+----------------+
t t
+----------------+
7 o
+-+-+-+-+-+-+-+-+
I 112 3 4 3 6 7l Bgte 10 of VTOC
+-+-+-+-+-+-+-+-+
ts f . i 1t
+-+-+-+-+-+-+-+-+
NOTE I - T h e d i r e c t o r . g t g p e b g t e m u s t e q u a l O .
NOIE - T h e f t a x i f l r u mg e c t o r n u f l b e r i s n o t u € e d b e c a u E e i t i 6
i n c o r r e c t l g 5 e t t o 7 O 9 d e c i l n e t . T h e t r u e l n a xi d u n r s e c t o r
n u f l b e r i 6 € c t u a I l g 719 fo. the DFI'{.
(1) |
+
+
(3' !
+
file (4) i
nane ! (5)
+ +
pr.im€rq (6) i
+
(7' i
+
(al I
+----------------+
file (l) |
nan€ (a) !
! ertension (3) i
i}-------------i--+
t r he r e t h e + l : 9 b r J t e h e E t h e f o l l o u i n g bits aesigned:
O P E R A T I N OS Y S T E Mc f 1 1 6 5 5 3 - - Section
94
bit 7 ! 1 if the fi le has been delet€d.
bit 6 = 1 if the +ile is in use.
bit 5 = 1 if the file i6 locked.
bit O=l i t O P E No u t put.
o
+-+-+-,}_+-+-+-+-+
I dgta ! +O
+-+-+-+-+-+-+-+-+
I file * lhi ! +123
+-+-+-+-+-+-+ +
!to.usrd pointer I +126
+-+-+-+-+-+-+-+-+
iSl bgt€ count i +127
+-+-+-+-+-+-+-+-+
--
Th€ Fllg usee the +i1e L to verifg +ile integriig. Th€ file {t
is a iedundant oiece of information. The file number fieLd
cont.i.nE the value of the di.iecto?rJ position of that fi1e. If a
ilisrEtah oEEUrsbetlreen the file,s directorg position, and the
+ i l e n u o b e r a E c o n t a i n e d i n e s c h s e c t o . , t h e n t h e D F M' r , i I l
gene.ate the errof $A4_
The foruard pointer field contalns the 1O-blt v€Iue for the
diskette sector nuftber of the nert gector of the file. The
pointer €{!€ls zero for the 1a9t s€ctor of a file_
Noh-CIA I/O
S o t n ep o t t i o n s o f t h e I / O r u b s g s t e r n a r a € c E e 6 E e d i n d e p e n d e n t l r J o f
the Central I/O Utilitg (CIO', thiE c€ction disruEse3 those
alaa!i.
A I I o f t h e O S R O Hr e E i d e n t d e v i c e h a n d I e . . r a n b e a c . e E s e d v i a
sets of v€ctorr that are part of the OS ROH. The€. vector.€
increat€ the speed of I/O oper"etions that utiliza fired devi€e
a55ignft€ntr, Euch as oLrtput to the DispIa! Handl€r. For. each
resident Handler th€,re is a Eet of vectorE order.ed as shoun
belou:
+---------------+
+- 0PEN -+ +O
+- CLOSE -+ +e
+- GET BYTE -+ +4
{- PUT BYTE _+ +6
+---------------,
+_ GET STATUS -' +8
+-___________-__ia
+- SPECIAL -+ +1O
.r---------------+
+- JMP -+ +12
+- IN IT
+- SPARE
aYlE -+
+---------------+
O P E R A T I N eS Y S T E MC O l 5 5 5 5 - - Section 5
96
VTBASE=$E4OO ; BASE OF VECTOR TABLE.
The Jl4P INIT slot in ea€h set of vectors Jumps to the Hindler
initialization entrg (not lnin!E 1).
The bese dddreEs of the vector Eet for eech of the r.esid.snt
h e n dl e r s i E s h o u n b e l o u :
R e si d e n t D i r t e t t e Hendler
C o a n o u n i c a t i o nb e t u e e n g o u a n d t h e D i s k e t t e H a n d l e r i s
effected using the Egstem/s Device Control BloEk (DCBl, th€t iE
also used for. H€ndler/SID comounication (se€ Se€tion 9). The DCB
i 9 1 a b r J t e s t o n g . S o o e b 0 t e i 6 ! . e u s e r - a l t e r . a b l e € n d E o m ea r e + o r
use bg the Diskette Handler and/or. the Serial L/O UtilitU (SIO).
You supplg the required DC! pa?eneters €nd then do a JSR
DSKINV tE433l.
U P E R A T I N CS Y S T E MC O 1 6 5 5 5 - - Section 5
Each of the DCB bgtes oill nou be desc.ibed, end the
sqsten_equate fi1€ name for e€ch ui11 be 9iven.
The Di5tette Handler setE up this bgte to contain the Seri31 Bts ID
for the dt.ive to be accessed. It is not user-3!.te.able.
T h i s b g t e c o n t a i n E t h e s t € t u s o { t h e c o t n m a n du P o n r e t u t n t o t h e
cal1ei. See AppendixC +or: li6t of the poesibte status codes
The Handler supplies this tlneo!t value (in uhole 5econdE) *or'
O P E R A T I N GS Y S T E MC O 1 6 5 5 5 - - Section 5
9B
D A U X Zc o n t a i n s t h e . D o s t s i g n i f i c a n t bgte.
Diskette H a n dl e r Command.-
C E T S E C T O R( C o m m a n db g t € = * 5 e )
The Hendler reads the EFecified eectof to qour buf+er and ietlrns the
op€ration Etatus. You s€t the follorring D C B p a r . a m € t e r . Ep t ' i o r t o
€eIling the Distett€ Handlei:
Upon ieturn +rom the sector, sEver€1 of the other DCB qarameuers
uill h a v e b e e n a l t e r e d . T h e S T A T U SB Y T € u i l l be the onlu
parameter of intereEt to gou, houever-
The H€ndler ur?ites the specified sector fron Uour buffer. and ?etuans
the operetion 6t€tus. You 9et the fo1lo{rin9 DCBparameteis prior to
cal1i ng the Di€kette Handler:
COI"IMANDEYTE = $5o.
S E C T O RN U M E E R= 6 e c t o r nunbei to uiite.
Upon return fro{tl th€ oper€tion, gever.a1 of the othe!. DCE paf€fleteis
r r i l l h a v e b e e n a l t e i e d . T h e S T A T U SE Y T E u i t l be the onl|r one of
i .n t e i e E t g o | J , h o u e v e i .
O P E R A T I N GS Y S T E MC O 1 5 5 5 5 - - Section 5
99
PUT SECTOR$,lTH VERIFY (Coonand Bgte = $57)
The Hendlcr obtEinE a 4-bgt€ 6tetus +roin the diskette controller and
p u t E i t i n s q s t e n l o c a t i o n D V S T A Tt O 2 E A l . T h e o p e r e t i o n s t a t u €
for.m€t iE shoon belou:
7
+-+-+-+-+-+-+-+-+
I Eofimand 6tet. I DVSTAT + O
+-+-+-+-+-+-+-+-+
i harduare 9tat. i + 1
+-+-+-+--r-+-+-+-+
i tioeout i
+-+-+-+-+-+-+-+-+
i ( unleed ! i
+-+-+-+-+-+-+-+-+
COI'IMANDBYTE = $53.
= diik
DEVICE NU|,|SER d.ive nunber' (1-4).
Ugon r'sturn froo the operation, g€ve.€l of the other DCE paremeters
uill h a v e b e e n a l t e r e d . T h e S T A T U SS Y T E u i I I b e t h e o n l g o n e o f
COtlf{ANDSYTE = $21.
S T A T U SB Y T E = e t a t u s o+ operati.on.
B Y T E C O U N T= n u l n b e r o f b q t e s o f b e d s € c t o r i n f E r o a t i o n in
g o r i b u { f e r , n o t i n c l u d i n g t h e ! 3 F F F Ft e r n i n a t o i . It ther.e
€le no bed EectofE, the count uill eoual zer'o.