Atari 800 Operating System Manual, Part 2 Of 4

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Atari 800 Operating System Manual, Part 2 Of 4 as PDF for free.

More details

  • Words: 29,294
  • Pages: 68
5

I /O SUBSYSTEI'I

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 of routines thEt allou qou I/O subsgsteft conpriEEs € rolleEtion levels. The to aacess peaipheral and Iocal deviceE at threE different provideE the higheEt 1€veL tl€vice CIO (Central I/O Utilitg), 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 r'outine. Ang louet level sEceEs to a device involveB the Utilitq, 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 (non telt) info?dation, or entoded tett rontain eithea "binai!" 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, i plefi6ntetions for the di6p1aq, F, and C shou devi.e-gpecifiE l e r J bo a a d , a n d p r i n t e r . The \Etiucture

o f t h e I / O 6 u b s g s t e m i 5 s h o u r no n t h e f o l l o { t i n g

oPERATTNG S Y S T E t IC o 1 6 5 5 5 - -

Section

5

page.

+---------+ I uEer i progrEo l-_____--_----------------_-+

+-----_--__-------i

+---------+ +--_------+ i I IOCB.s I **lrt **+** I +---------+ | ++------------+ Resident I clo H a n dl e r I Utilitq V e c t o i T e b1 a

i

I I

+-----*---+ i DCB

I *+*****

+---*-----+

++------*---__+

r

:l

i +---------+ i DeviGe i T€ble

zloc8 |

+-----:----t

+-rE------+

iPtinter iHandler

I I

t

i | !

.

l

i

+_-----r__+

+-------r-.i

i CEe5€ttel !... I i Handlsi I I Handter I +---------+ +----__--_.1,

t t---------+ I DCS +---------+

+---------+ * * lDisl Filel +----i l'lanag€lt l -----+ +---------+ i

I i

+--+-------**---+------+------+--.i--, i ! +---------+

.*

i I

: -----+------+--*--

I K e r r b o a i di I H a n dI 6 r i

I DiEk i H e n dI e r

! I

l"---------+

l4*+ta*+***

+---------+ I slo ! ! Utilitg +---------+ $lher€: ----

I

sho{r5 e control pEth. r e q u i r e d f o l . e F at h .

+t{*

shot s the date structure

Note thE +oI Iouing: o

Tfie Kegboard/Displag/Scr€en

o

The Di6tette

o

The DCB is

Figure

5-1

Editor. Handl€r,s don,t

hsndler cannot be Eel led dit.ectlg

shoon turice in

the diagrao.

L/O Subsgste.n Structufe

Flou Diagram

APERATINOSYSTEiI CO16555 --

S€rtion

g

use SIU.

from CIO.

C F N T R A LI / O U T I L I T Y in u'hich provideE qou 'r,ith e eingre interfa'e The centrel I/o utilitg d e v i t e i n d ependent to a.cess all of the sqEtsm peiiPherel devieeE in a b g t e . T h e CIO n:nner'. The mininun unit of datE tiensfer i5 the data a r € 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 perfoined on a 'raeturn_to-uEei-uhen-comPlete" baEis; there is no uag to initiate concrr?ent "ovel.lapPed" I/O proEesseE iE e sequential I/O is organized bg "fiIes,'t uhere a file co]lection of date bgtes. A +ile ctsn oi nag not contain tertual " uhere a date end it ren oi rnaqnot be org€nired bg "records, r'ecord is e Eontiguous group of bqtes terdinated btJ an EOL (End of L i n e ) c h a ? a € t e r . s o { n e f i l e s a r e B g t r o n U m o uuEi t h a d e v i c e ( a 9 o i t h the giinter end the Screen Editor), uhila otheF devices can tontain disk drive). file6, eeEh urith e unique nane (as trith the m!ltiple CIO €IIorrs qou to Ecce95 up to eight independent device/fiIeE e t o n e t i m e , b e r a [ r s e t h e ? e a r e e i g h t I / O C o n t r o l B l o c t s ( I O C E ' E) i n the 6gstem. Each of the IOCB's can be e53igned to Eofltrol anv deviae/+i1e be.€u9i there Ete no preferiad eEsignlnentg, excePt that I O C B* O i e e E E i g n e d t o t h e S c r e e n E d i t o r a t p o u e r - u p a n d ! i q s t e m r e 9 et . gou +irst eet up €n I{ICB for the OPEN To acce69 a peiiphei'al, rommand,th€t supplies the sgstem neme for the devic€ to be D :S T A R S eccesged (e. g. K:, +or the teUboeid, P: , fol' the print€r, ' S T A R S ' . t h e ClO, etc). You then calI for a diekette file naned telling i t t o e r a m i n e t h e I O C B t o + i n d t h e O P E Ni n f o i ' | n a t i o n . C I O r€turns e stittug attempti to +ind the specified device/file.nd b g t e i . n d i c a t i n g t h e E U c c e E Eo f t h e s e a r c h . I f t h e s p e c i + i e d devire/file can be +ound bg CIO, then CI0 5toreE Eontrol information in the lOC8. The IOCB is nou, uged for as long aE thEt file iE open. Onc€ € *ile is open, it can then !e €cc€96ed using deta-r€ad or deta-{'l ite tgpes o+ comm€ndE; in gener.€1, reading qan pioceed until there i6 no noae data to read (Ehd of Filet and uaiting E€n pioaeed until there is no more fiediuD to store dEta on (End of Medium), although neither reading nor tr.iting need procaed to that point. The reeding €nd ufiting of data geneiallg occurs into and out of user-6upplied data buffe.s (although e EpeEial cE6e ellouinq 9ingle bgtE tren6{err using the 6902 A register is ptovided}. l",henthete are no {nore €caesries to be peiforltred on an open gou perfoi|n the cl06e opeiation. This device/file, a c c o o pI i s h e s t u o f u n E t i o n g o

1+ teicrinete5 and oekes permanent €n output for diskette end ca6sette).

o

It

releeses thet

IOCB to be u6ed for

O P E R A T t N eS Y S T E I IC O 1 6 5 5 5 - -

file

(egsential

another I/O oDeiation. Section

5

CIO Design PhilosoFhg The CIO utilitq u€s deEigned .pecificatlg deEign caiteria. o

The transfer

o

Sqte-at-a-time, supporteal. lt!1tip1e

o

Error

of d€t€

to fteet the foltot ing

devi ce independ€nt.

nu 1t i p l e b ' J t e a n d r ' e r o r d - a I i g n e d

device/file9

hEndling is

ecceE€e9 ara

.an be acce5sed aonEUrrentlg.

largelq

devic€ independent.

N e q ,d € v i c e h € n d l e r 6 c e n b e e d d e d u i t h o u t RAH.

alter.ing the Eqstem

Device IndeDendence CIO !rovides devire indepeodencebq havihg e Eingle entrg point for. al1 deviceE (End +or all operations) snd bg heving a device_indspend€nt €alling sequ€nce. Once a device/+ite is opened, d€ta tran6fers orrur {rith no regard to the actuel devire involved. Uniform ruleE +or hEndling bgte- 6nd iecord-oriented datE trans+e.s atlot, the ectuel deviEe Etor'€9e $loct sizes to be transparent to gou.

Data AccesE l'lethodg The CI8 sllports record-e1itned.

tuo file

access methods: b{te-aligned

€nd

BVte-€1igned accegsaii allou qou to tieat the devi€e/fiI€ as a sequential bgte €tr.eaft; €ng ntJlnbei of bqtes can be re€d or {'r itten snd the +o11or!ingoperation uiII continue ohere th€ pr.ior one left o + f . R e c o r d 6 6 r e o f n o c o n E e q u s n a ei n t h i i o o d e , a n d r e E d E o r rrriteE cen enconpassfiu1tip1e i€€oid$ i+ desired. 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 m e t h o d . r e g a r . dl e s s can be s!creiSfullg

can be acce5sed lJ6inq the bgte-align€d eEce6s of hol, t h e f i l e files lraE created. 8ut not ell 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 other qlEce.

the end o+ each record and at no

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 Up to eight device/+i1€s can bs accessed concu.rentlg e a ch o p e a et i n 9 i n d e p e n d e n t l q o f t h s o t h e r s .

r . r s i n gC I 6 ,

Unif ied Er.ror Handling All error detection and ?ecov€rg arccursu,ithin the CIO sub6gstem. The 6tetus in+orrhetion that reacheE 9ou is in the fo?n of a status bgte foi ee€h device,/+i1e. Error codes are devi.e independEnt 69 ftuEh a5 poiEible (see Appendix B).

Device Erpaheion Devi€es ar.e tnoun bq sinqle .haracter neftei such €s l( or p, and a number of deviEe hendleis aie part of the residsnt Egsten ROM. Hou€vet, additional devic€ handlers can be added to the sqgte'll using the RAf'|-aa3ident device tsblei this i6 norrflallU done at pouer-up time as {rith the di6|(ett€ boot tr.or€6c, but can be done et ang poinf, in tifie.

CIO Cilling

l.lechanisir

The input/ostput contr.ol bloct (IOCB' iE the pr.im€rq paraneter paEsing str'ucture bet{r€en gou and CIU. There are eight IOCB.g i n t h e s g s t e m , a r r a n g € d l i n e a r . l g i n R A t . !e s B h o { r n b e t o u r : +--------+

lou

addre96

[O34O]

l I o c E 0 r +--------+ I I O C B1 t +------*-+ I IOCB 6 | +---*----+

i l a c s T r high eddieEs

Fi 9 ut'e 5-?

CIO CElling

Me€htsnisil

O P E R A T I N eS Y S T E F C I O16599 --

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 : Inieating

appropriate

p€r€meters into

o

Putt ing the IOCBnumbei tianes 16 into

o

Perfortaing

an IOCBof {our

choosing

the 65Oe X i€gister

a lrSR t o t h e C I O e n t r g p o i n t

CIOV tE456l.

CIO returns to tjo! qrhen th e oPer€tion is coftplete or if atl e?tor u,aE enEounte?ed. The o p e r a t i o n s t a t u E i s i n t h e I O C E u 6 e d , a 9 uell a5 in the 650! Y regi ster. Th€ 6902 Eondition cod€s uill a1!o refl€ct th€ velue in the Y register. ln EomeaaseE a data bgte uill be in the 6902 A !.e9ister. T h e X r 6 9 i s t o f u i l l reoain !nahanged for a l I o p € r e t i o n s a n d c o n d i t i ons. An exa|rrtle is shou,n belo|,:

I o C B 2 X= 6 2 0

;

INDEX F6R IOCS {+?

*tac82x CPY BII I

CIOV l+O ERROR

; ( optional )

This eector describee €ach IBCB bqt., uith it5 fite nameand addr€s6. Each IOCS is 16 !gtes long. Somebgtes can be 6ltsred {ou 6n{l some Ere reserved for uEe bg CIO and/or the device handlers.

Hand16r lD --

bq

ICHID tO34Ol

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. St€tus

--

ICSTA to343l

The CI0 conveUe operation statug to gou uith the coo{rand 5tetuE bute as a result of eBch and everg CIO call.. Each and everq CIO ra11 updateE the co$nand statu5 bqte. The ,noEt signi+ic€nt (6ignl bit i.s a one for erroi conditions and zero fot non-error conditiong, and the reln€ining bits repr.eEent an error' nunber. See Appendir B for a liEt of status iodes. Bu*fe.

AddreEs --

ICBAL t0344l

and ICBAH tO349J

You Eet this 2-b{te pointefi it iE not alteied bg CIg. The point€r contain6 the eddre6s of the beginning (Iou addressl bu f f e r t h a t : o

ContainE date for

read and urite

oper.Etions

o C o n t a i n E t h e d e v i c s / f i l e n a f l r €s o e c i f i c a t i o n €omnand, the pointer

Yo! can alter PUT Address -*

of a

sor the OPEN

at ang ti.ne.

ICPTL t0346l

and ICPTH to347l

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. Bu+fei

Length,/BUte Count --

TCBLL IO348l and ICELH t03491

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. Auxilierg

Info.mation

--

ICAXl tO34Al and ICAXa I0348]

O P E R A T I N OS Y S T E HC O 1 6 5 5 5 - 40

Section

5

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 +-+-+-+-+-+-+-+-+ ICAX1 is not alter.ed b! CIO. You 6hoold not alter once the device/+ile is o!en.

ICAX1

The remaining bit6 of ICAXl efld a1] o+ ICAXz contei.n onlq device-dependent data and are explained later in this section. R e m ai n i n g B r J t e s ( I C A X S - I C A X 6 ) The h:ndlei reseives the four .emeining bUt€s fo!'pr.oce€iing the I / O c o m n a n df o r C I B . T h e r . e i E n o + i r e d u s e f o r t h e 6 e b q t e s . T h e ! 3re not u6er-Elter€b1e ercept a5 specified bq the pa.ti.cular devi€e {tesrriptionE. These bgtes uill be Feferred to B6 ICAX3, I C A X 4 . I C A X Sa n d I C A X 6 , e l t h o o g h t h e r e € t ' s n o e q u a t e s f o r t h o s e names in the OS equate file.

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 M- -

AsEign DeviEe/Filename

to

IOCB and Reedq for

Acc€EE

A device/+ile mu6t be opensd before it tan be €cceEEed. Thig proce6g lin&9 e specific device lOCB to the apprdpriate handler.. initieliz€E the device/file, initiali!es all CIO options to the control varieble€, and peises device-6pecific device hand1€r.

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 BPEN operation:

CIO foi

an

COI'll"tANDBYTE = EO3 B U F F E F A D D R E S S= p o i n t e r A U X l : O P E Nd i r e c t i o n

to E d€vice,/fi1en:ne

bits,

specification.

plus deviEe-dependent in+ormation.

AUX2= devic€-dependent informat i on. A f t e a a n O P E No p e r e t i o n , oarEmeter.5:

CIO ni11 have altered

the +otlouring tOCB

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 , ug€d onlq bg CIB and nugt not be tsItered. D E V I C E N U I ' I B E R= d e v i € e n u f t b e r t a k e n * r o o Epecifiration and muet not be altered.

this

i6

the device/filenade

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. P U T A D D R E S S= p o i n t s r . t o t h e P U T C H A R A C T E RrSo o t i n e devica handler Just opened. It

is

F e c o f l m e n d e dt h a t

thi6

sointer

C L D S E_ - T e r o i n a t e A c ( e s s t o D e v i c e / F i l e

for

tne

not be !6ed.

and Releaie IOC8.

You iEsu€ a CLBSE coltlnandafter 9ou ere through :tcresEinq a given device/fi1e. T h e C L O S Ep r o c e E E c o n p l e t e E € n U p e n d i n g d s t a uriite6, goes to the device hsndle" for anV device-ipecific actions, end then releaEes the IOCB. You set the +olloning

cIo:

IOCEpa16flete? prio.

to calling

COttl.lAND BYTE = $oC The CIO alters the +ollorring IOCB perameters as a re6ult C L O S Eo o e r . e t i o n : 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 P U T A D D R E S S= p o i n t e r

to

"IOCB not OPEN" routine.

A P E R A T I N CS Y S T E MC O 1 6 5 5 5 - -

section

5

of the

O E T C H A R A C T E R-S-

Read n Cherecters

(8gte-Aligned

Acce6E)

The Epecified nuflber of cher€cteis are read *roln th€ device/fi1e to the usef-supplied bsffer. EOL .haracters heve no ter|l|ination featll.eE urhen ssing thiE function, there c:n be no EOL. or |n€ng EOL'8, in the buffer after oper.€tion cornpletion. There iE a speEisI Eese provided that passes s Eingle b{te of dat6 in th€ 6$02 A tegi5ter ohen the bu+fei lenqth i6 Eet to zero. You Eet th€ +ollolring IOCBpaiameters priof

to celling

CI0:

cOtt'IAND SYTE = $O7 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 the d6te ui11 be .etu.ned in the 650A A reqister The CIO elters the foltouing 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

i6 zero, onI'J.

IOCSpa.ameters as a resutt

of the

o f C E T C H A R A C T E RoSr e r a t i o n .

EYTE COUNT/EUFFERLENoTH = nu ber of b{tes r.ead to the b u f + € r . T h e S Y T E C O U N Tu i 1 1 a l { r , a g e e { u e 1 t h e E U F F E RL E N O T H ercept uhen en el.ror or an end-of-fi1e condition ocrur-E.

P U T C H A R A C T E R-S-

trrite

n Characters

(9gt€-Aligned

AcceEs)

T h € G p F c i f i e d n u n b e r .o f c h e r e c t e r s e r . e t r i t t e n froft the uEer-supplied b!+far to the deviEe/+ile. EOL charscterE have no buffer termineting pr6pertieE, eltho[r9h theg have their st€nderd ft,1eaning to thE davice/fiIE r.ereiving themi no EOL,s dte generated bg CIO. There is a 5p€riE1 c5se thEt allous a Eingle rharacter to be patsed to CIO in the 6902 A "egister it the buffei tength is You E€t the follouinq C H A R A C T E RoSp e r a t i o n :

IOCBparEo€te.is prior

to initiating

the pUT

CATHAND SYTE = $OB 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 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

of the

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 before en EDL read and put into the buf*€r. I+ the bu+fer fill€ 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'. You set the follduing

IDCB peraneters prio.

CIO:

to calling

col'll"lAND BYTE = 9O3 B U F F E RA D D R E S S= p o i n t e i

to data bu+fer'.

B U F F E F L E N C T H= & a x i m u m n u { n b e i o f b { t e s th€ EOL charactei,. The CI0 aIt€r'5 the +ollouino G E T R E C O R Do p e i a t i o n : S T A T U S= r . s i u l t

to r€ad

(including

IOCB paraoeters as e l"EeLrltof the

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.

F U T R E C O R D- -

t'h'ite Up To n Character'6 (Reco.d-AIigned

Access'

Cha.a.ters are ur.itten froft the us€r-supplied buffer to the device/file until either the buffer iE emptg or an EOL character is uritten. 1f the buf+et i5 ernptied uithout t iiting en EOL ch6racter to the deviEe/file, send €n EOL after the then CIO uiIl l a E t l ] s e i - E U p pl i e d E h a r e c t e f . You set the +ollouing

tOCBparameteis prior

to calli,ng Ctg:

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 . The CIU alt€r'r

the fol1o!,in[

S T A T U S= r € s u l t

IOCE taraneter

o f P U T R E C O R Do p e r a t i o n .

OPERATINGSYSTEM CO16t95 -44

€s d resolt

Section

5

of

the

G E T S T A T U S- -

Retuin

Device-Oependent Ststus

B!tes

The devire contfoller i 6 B e F t a S T A T U Sc o r n n € n d , a n d t h e control.lei returnE four b{tes of Etatus informEtion thEt are stor€d in DVSTAT [O2EAL Yo[, Eet ths folIo{ring

IOCDpar€neterg piior

to catting

CIO:

COMMAND BYTE = $oD 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 . A f t s r a e E T S T A T U So p € r € t i o n , Pefametefs:

CIO r/iIl

have altered

S T A T U S= r . e s u l t o f e E T S T A T U So p e . a t i o n i a Iist of the po6gible Etatus codes. D V S T A T= t h € f o u r - b g t e

S P E C I A L- -

'_

regponse froo

the +oI1olrino

see Appendir I

fo.

the device controller.

Specidl Function

Ang codoand bgte value greater than SOD ir treated bg CIo a9 E s p e r i a l c a E E . S i n c e C I O d o e s n o t * n o u ,0 r h a t t h e f u n c t i o n i s , C I O tiansfers control to the device handler for complet€ proae€6ing of the ooeration. The uier E€tE the follouing c a l l i n g CI O :

IOCB paraoeterE prior

to

COHMANDEYTE > $OD 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. Other IOCBbgteE can be set Lrp, depending !pon the 6pecific S P E C I A L c o m m a n db e i n g p e . + o r o e d . Afte.

a S P E C I A Lo p e r . a t i o n , C I O u i l I

paf:ttneteaB:

have altered

S T A T U S= r e s u l t o f S P E C I A Lo p e r a t i o n ; Iist of the posEible statuE cores_

the +ollouing

5e€ Appendir I

+or a

Other bUtes csn bs €lter.ed, dependihq upon the Epecific SPECIAL c olhftand.

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,

Device/Fi lenaoe Srecif isEtion Ae pErt of the OPENEoilnend, the IOCB buffer eddregg parafieter points to a device/+ilenefle 6p€cification, thet is a stiing o+ ATASCII rieractefg in the follotllina foroat:

< s p e c i f i c a t i o n > : | = 4 d e v i c e l f < n u n b e r > l :t . i + i l e n e o e ) l < e o 1 > < d € v iE € ) : : = C ! D l E l K l P i R l S {nunber} : := 1l2i3i4i5l6l7l8 ha6 dsvice-dependent chtsr"EcteriEtica. <eol) ::= $98 Th€ follouiing

devicB6

e?e EUpportsd at

this

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 Devices flagged bg asteiirtE h a n dl e r s . If


The follouing

c: D2:8DAT D: HOLD 11:

(*,

it

exa|npleE shou, valid

*

€re Eupported bU nonresid€nt i6 sgsuoed to bs 1 device/filenade

specifications:

CasEette File "BDAT" on disk drivE *2 Fi1e "HULD" on disk drive *1 Keqboard

OPERATINC SYSTEM c o 1 6 5 5 5 - 46

l,!.iting:

Seetion I

I/B

Exaop 1e

The exatrlple provided in thi! E€ction illuEtratei an I/O operation using th€ CIO "outine.

'

a EimpLe ex€mple of

, This cod€ Eegnent illuEtr€tes the gimple erample of reading , t e x t l i n e 6 ( r e r o r d s ) f r o m a d i E t e t t e f i l € n a n e d T E S T E Ro n d i s k , dFive *1. Al1 sgmbols uEed are equated {rithin the pr.ogrein , €ltholgh nanq of thE gqnbols are in the OS equate file. ; The progra,0 per*or

-.

-

stepr:

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

s the follor!ing

I/O ECUATES

EOLIOcA3=

$98 93O

i END OF LINE CHARACTER. ; 1OCB *3 AFFSET ( FRBf'l IOCB *O).

ICHID= ICDNo= ICCOT{ICSTA= ICBAL= ICgAH= ICPTL= ICPTH= ICELL= ICBLHICAXl= ICAX2=

3O34O ICHID+1 ICDNO+1 ICCOtt+1 tCSTA+1 ICBAL+1 ICBAH+1 ICPTL+ 1 ICPTH+t ICBLL+ 1 ICgLH+1 ICAXl+1

; ; I r / ;

( H A N D L E RI D - - S E T B Y C I O ) . (DEVIC€ * -- sET 8Y CIO). COI{I{ANDBYTESTATUS DYTE -- SET BY CIO. EUFFER ADDRESS (LO!.,t. BUFFER ADDRESS ( HIOII ).

; ; ; ,

BUFFER LENeTH (LO!r). BUFFER LENoTH ( HICH ). AUX 1. AUX 2.

APEN= *O3 GETREC= 3Og CLOSE- SOC

, OPEN COt'il'lAND. , GET RECORD COI'{MAND. , CLOSE COMMAND.

OREAD= 9O4 Ol.lRI T= tOE

, OPEN DIRECTIUN = READ. r D F E N D I R E C T I O N= N R I T E .

EOF=

*AB

r END OF FILE STAIUS VALUE.

CIOV=

5E456

r CIO ENTRY VECT0R ADDRESS.

, 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 " .

LDX

{tIOC83

, SETUP TO ACCE9S IACB #3.

O P E R A T I N GS Y S T E | !c O 1 6 5 9 5 - -

Sertion

I 47

,

LDA STA

IiOPEN ICCOH,X

; SETUP oPEN COMiIAND.

LDA STA LDA STA

*NAr'lE ICBAL,X *NAI.IE./256 ICBAH, X

, SETUP SUFFER POINTER TU ... ;..P O T N TT A F I L E N A M E .

LDA STA

*OREAD I C A X1 , X

; SETUP FOR OPEN READ.

LDA STA

{aO ICAXz,X

; CLEAR AUX ?.

"OPEN" THE FI LE. .JSR BPL

CIOV TPlo

, PERFORI'I"OPEN" OPERATION. , STAIUS llAS P0SITIVE -- oK.

Jl'lP

ERROR

, NO --

|'OPEN" PRABLET''|.

r SETUP TO READ A RECORD. TPlo

LDA STA

*GETREC ICCOH,X

, SETUP "CET RECORD"Cot'lt'{AND.

LDA STA LDA STA

*BUFF IC8AL, X *EVFF /25b ICBAH, X

; SETUP DATA EUFFER POINTER.

LDA StA LDA gTA

{*EUFFSZ ICBLL,X *SUFFSZ/456 ICBLH, X

i SETUP l'lAX RECARDSIZE . . . ;... P R I 0 R T O E V E R YR E A D .

'rSR Bf'lI

CIOV TPzO

, READ A RECORD. , MAY gE END OF FILE.

; READ REC0RDS.

LOOP

; A RECURDIS NOS, IN THE DATA SUFFER "BUFF". O P E R A T I N OS y S I E M C 4 1 6 5 5 5 - 4S

IT IS TERMINATEDSY geition

5

; 4!-qBL CHARACTER, AND THE RECORD LENCTHrS rN "ICALL. 3nd ,,ICBLH.,. , THI$

EXAHPLE urLL Da NoTHrNewrTHTHEneionp _lUii-ileu. JMP

; NEOATM

TP?O

LC]OP

STATUS ON READ --

, READ NEXT RECORD.

CHECK FOR END OF FILE.

CPV BNE

*EOF ERROR

, END 6F FILE STATUS? , NA -- ERROR.

LDA sTA

{+CLOSE ICCOH,X

; YES --

JSR

C IOV

, CLOSE THE FILE.

'Jt'tP

,!

, ***

CLOSE FILE.

END OF PROCRAH***

; DATA REEION OF €XAI.IPLE PROCRAII

NAI'|E \-7

. BYTE

,'Dt: TESTER,,, gOL

DUFFsz= ao

; go cHARAcTERREcoRD nAx ( INCLUDESEOL'.

BUFF=

, READSUFFER.

Figlre

* *+EUFFSZ . gND g-3

An I/O Eradple

OPERATINe SYSTEi4COl6SSg --

geEtion

5 49

Device-SDecif ic

Inf ormation

This section provide6 deviEe-EpeEific inforrnation regerdinq the device hendler6 thet inter+ace to CIO. K e q b o e r d H a n dl e r

(K: )

The leqboar.d device i9 a reed ontg d€vice uith: supportE the +ollouinq CIO function6:

hendle" that

OPEN CLOSE EET CHARACTERS OET RECARD GET STATUS(oul l function)

The Kegbo€rd Handlei can Droduce the follouino $aO -f88 --

error. statuEes:

IBREAKI |(eg abort. (produred bg pressing fCTRLI 3). end-of-tile

The Kelbo€Fd HandleI' iE one of the re5ident handler.s. It Eet of devi€e vectors 5ter.ting at location E42O.

has a

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: t/l\I

- The ATARI keq toggles € +1a9 th€t en:btes/disables the inve,'sion of bit 7 o+ each dats ch:recter r.ead. The Sci€en Editor editing ke!s are exempted f.on glJch i nveiE ion, hou,evel.

C A P S - T h e t C A P S , / L O W RkI e g p r o v i d e s t S H I F T I t C A P S , / L O U R I- t C N T R L I I C A P S , / L O W R- I-tCAPS,/LOIIRI

50

three

flnctions:

Alphe caps 1ocft. Alpha ICTRLI locl. Alpha !n1ork.

O P E R A T I N GS Y S T E I ' C I O15555 --

Section

5

The 69Etem potrers up and {ril.1 €gEten r€6et c a p s l o E k o pt i o n

to the alpha

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 IBREAKI teg gener€teE en EOL Eha?aEter €nd retur.ns BREAKststuE.

CIO Function DeEcriptions T h e d e v i E e - r p e c i +i c r h a r a c t e r i 6 t i € E (descr'ibed earliea in this seation)

of the Etandard CIO functions ere deta i Ied belou:

OPEN 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

No rpeciel

in AUX1or,AUXA.

handl.er aationE.

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 The handler doee nothing but set the stetus

to $Ol_

T h e o r g o f O pe r a t i o n Pre55in9 a legboaad leg generates an IRO interrupt and vectorE to th€ Kegboard Handler.s i.nterrupt ser.vice Foutin€ (Eee Section 6). The leq Eode for the keU pressed is then read and Etor.ed in ctata bdte vErieble CH lOAFCl. Thi.s oc€ur€ uhether or not there r,E en active read requeit to th€ K€gbo€rd Handler, end effects a one-bqts FIFO for teqboard entrq. See App€ndir L (EE) for s discu!6ion of the auto iep€at festurE. OPERATTNCSYSTEM C416555 --

Section

s

The Kegboerd Handler monito.6 the CH vaiiable for not aontaining t h e v a l u e $ F F ( e m p t r Js t € t e ) u h e n e v e r t h e r e i F a n a c t i v e r e a d request for the handler. WhenCH Bhous nonemPtg, the handle. tales the keg code fron CH snd Eets CH to $FF again. The lerl code bute obtained from CH is not an ATASCII code and has the fo I Io|lJing +orm:

+-+-+-+-+-+-+-+-+ l Ci S i k e g c o d e +-+-+-+-+-t-+-+-+

o I

[ , 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. The rarnaining Eix bit6

are the hardqrare ketj code.

The leV code obteined is th€n converted to ATASCII using the SirEt o+ the follo{ring rules that applies: 1. 2. 3. 4.

Ignoie the code if the C €nd S bits are both set. IS the C bit is setl proces5 the fte{ €6 a ICTRL] code. If the S bit is Eet, proce5s ihe keg aE e tSHtFTl code. If CCTRLIIorft iE in e+fect, proceEs alphs rharacters es CTRL codeE, all other6 aE lE(,ercase. 5. IF tSHtFTl lor& i6 i'| effect, proceiE alpha chareEterE as SHIFT aodes, all other.E €E louetcage. 6, Else, proEe6s as 1o{refcase rharacter,

Then: I+ the resultant code i6 not a ScrEEn Editor Eontrot code, and iS the video inveree tlag is set, then Eet bit 7 of the ATASCII code (uill €eu6e inver.se video {rhen diBpla{ed)

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 Keg Code

KeV Cap

o o 0 1 O ?

L 6 C J 6 A ; 3 8

L'/r. ISHIFTI C€se 4C 4A

ICTRLI OC OA

:1 '_:

o4

Keg Ke! C o d e c€P

Lt r. SHIFT Ca€e

CTRL

?o

2e

58

00

5D

60

22

5 6 7 B

K + + O

6 e e 6

8 B A F

4E 5C 4F

OF

aa

O

A

P

T

O

50 55 98 49

10 15 9B 09

2A

7C

1D

::

!:_

43

03

B

OC O O O 10 Lt 1 14 15 1 t 1 1g 1A 18 1C 1 l lF *

D E F ?

6 7 9

u

T

s

REI 9F I 6 9 ? D = 3 D v 76 C B x z 4

6

3

62 7 8 7 A 3 4

,:

t't

:: 45 59

;

TAB T t4

3B 39 3A 3E 3C 3D 3E

?6 1B ?L

54 67 51

71 39

30 33 34 35 36

98*

ICTRLI 3 returns

4D

::

/i\

;30 7 8ACKS 7E

E

H

3_

CAPs

s

;; 19

17

29

38 3C 3E 6& 6e 44

)

3 33 6 36 C E S C T1 S D 5 3 5 E 2 3 2 1 31

9C 40 7D 9D 46 4S 44

FE 7D FF 06 OB 04

47 53 41

07 13 01

- 67 73 61

EOF 6tetuE.

A c o t h p l e t n e n to f t h i g A pp e n d i r F . Figur'e 5-4

OB 1E

1B

eo

N

0 0 0 O

o

20

table

(AIASCII to kegstroke)

is qiven in

Kegcode to ATASCII Conversion TabIe

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 The displag devi..e !5 a reed/{f ite device uith t h E t E u p p o tt s t h e f o l l o r r i n g C I 0 S u n c t i o n e :

a h€nd1er.

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 The DiEplag Handlcr Ean produce the fo11ouin9 erfor S84 -sBD -1 8 9 1- $93 --

EtatuseE:

lnv€1id Epeci€l comftand. CurEor out-o f-reng e. Screen mod6 > 11 N o t e n o u g h m e m o ? gf o r s c r e e n f i o d e E e l e c t e d .

The DisplE,J Handler iE one of the iesident handIerg, and ther'efore has a 5et of devire vector'9 gtertino at locetion

E41O.

S c r e e n l ' l o de 6 You can operate the di6pl€g screen in ang of ?O configuaEtions (ftodes 1 through 8, r/ith or 0rithout split screen; plus mode O, and modes 9 th?ouqh 11 '!ithout split scr.een). tlode O is the text displaging mode. Hodes 1 thiough 1 1 a r e a l 1 g r e p h i c s n o d e s ( € l t h o l g h m o d s sa a n d 3 d o d i s p t a g a subset of the ATASCII charecter set). Mod€s 9 through 11 req!iie e CTIA chit to be inEtts11ed in plEce o+ the standard CTIA chip.

TEXT I'IODE O In taxt node O the Erteeh is comprised of 24 Line6 oS 40 chare€ters per 1ine. Ptogian alterable left €nd l.ight ftargins lirnit the dieplau afea. Th€g defat]1t to 2 and 3? {of a poEeible O O P E R A T I N OS Y S T E T C ,IO16555 -54

Section

5

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. The text gcreen deta is internallg organi!ed :s v€riable length l o g i E a l l i n e s . T h e i n t e r n a t r e p r . e E e n t : t i o n i s e 4 I i n e s o r h e nt h e s c i e e n i 6 c l e a r e d . E e e h E O L m a r . k Et h e e n d o f a l o g i c a l l i n e € s text iE sent to the screen. If oo.e than g phlrsical lineE of text are Eent, a logical line uill be forfled evert, A phqsicel lines. The,number of phgsical lines used to cooprisi a iogicat line (1 to 3) iE aluags the minimuo required to hold the data for thet logirat ! ine. 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. AII_dsta going to or eonir|g +rom thE tert screen iE represente., in €}-bit ATASCII code eE 6houn in Agoendir E.

TEXT HOD€S 1 AND 2 In text ftode6 1 €nd Z the 6creEn characters (|node 11, or. 12 lines left and iight nEpging are o* no there is no visible csr5or. lheie rrith the dEta and in all tegerds 9 r ' s p h i c a | n o d e 6b g t h € h € n d l e r .

co{rpri3€s either 24 lines of 20 o f 2 0 c h a r a c t e F F ( r o o d e2 ) . T h e con9€q{Jenre in th€6e nodes and e r e n o I o g i E e I I i n e s e 6 s o ci a t e d thege flodes ere tfeBted aE

Dat€ going to or coning +rom the screen is bElou'

+-+-.i-+-+-+_+_+_+

in the form shoun

o

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

Value

0 1

(defaultl

( PF1 ) (PFO) (PFO) (FF1) (PF3) (PF?} (PF2 }

9feen gold gold gi.een red blue blue real

3 J

6 7

CoIor Registel. (see A pFe n d i x H)

Character CHBAS=SEO

t

-

e

-

!

-

t

-

e

'] ?

t

-

t ! -

Char.acter Set CHEAS=3E?

IHEART] TARROI.J] THEART] TARROI.I] TD I AI1OND ] TTRIANOLE ] TD I AI1OND ] TTR IANGLE ] IHEART] IARROT^' 1 tHEARTI tARRO(ll tD IAHOND] I TRIANCLE1 I DI AMOND ] I TRIANGLE]

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 . Figure

5-5

Tert

ilodes 1 End 2 Deta Forn

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 ) The 6creeh ha5 v€rging phgsical €h€rtscteriEtica foi each of the g t € p h i c a | n D d e Ea s s h o u n i n A p p e n d i x H . D E p e n d i n q u p o n t h e n o d e , 1to 16 color' 6€lection iE aveil€b1e for each pirel and the Ecteen 9ize varies from 20 bq le (lone6t reiolrJtion) to 3AO bq 192 (highest resolut ion) pirels. There is no visible

curso? for

the graphics mod€ output.

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 In spli.t-scr€en configrrr.ations, the bottom o+ the Brr.een iE resetveit +or four lines o{ mode O text. The tert aeoion is controlled bq the Scresn Editor, and the graphiEs "igronr't c o n t r o l l s d b r J t h e D i E p I a q h s n d l e r . T u r oc u r E o r s a r . e n a i n t a i n e d i n this configuration so thst the Ecreen segments cen be managed independentlrJ. 56

O P E R A T I N eS Y S T E MC O 1 6 5 5 5 - -

$ection

5

To operate if| split'scfeen mode, the Screen Editor n!9t +irst 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) .

be

CIO Function DeEcription6 The device-6pecific Eher.€cteristicE of the stendsrd CIO functions (deB€ribedea"Ii€r in this section) are deteiled belou: 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. The handler supports the follouring optioni: 7 +-+-+-+-+-+-+-+-+

AUX1

r

icrgt{,,lrRt r

+-+-+-+-+-+-+-+-+

Where: C r 1 indicate6 S = 1 indicEtes oodeslth R a n d { ^ ,a r e t h e

AUXa

to inhibit sii€€n .lear on OPEN. to set up a split-6creen configuration rolghIonlq). di?ection bits (read €nd urite).

7 +-+-+-+-+-+-+-+-+ i I mode +-+-+-+-+-+-+-+-+

(for

o !

Where: node i5 the scr€en mode (O ihrough 11,. -

Note: If the Ecreen ode se!€cted iE O, then the AUX1C and S o p t i o n 6 a T e € E 6 u m € dt o b e O . uith the Displaq Handler You 6hare menorq utiliretion inforfletion. Shering is neceEs€?gbecause the DiEpleg Handler d g n a m i c € 1 1 9€ 1 1 o c a t € 6 h i g h s d d r e s s m e n o r ! f o r u E e i n g e n e r a t i n g t h e E 6 r . e e nd i s p l a g , e f l d b e c a u 5 e d i t + e i e n t t s o o u n t s o f m e n o r g a ? e an n e e d e d f o r t h e d i f + e r e n t s c r e e n { r l o d € s .P r i o l . t o i n i t i s t i n g O P E N c o . n n € h d t h e v a r i a b l e A P P t ' l H It O O O E I s h o u l d t o n t a i n t h e h i q h e 6 t a d d r e 6 E o f R A MU o u n e e d . T h e S c r e e n h 8 n d l € i uill opefl the E.reen onlu if no RAMis needed at or beldu that acdie6E. Upon ret{rrn fl'o'n: EEreen UPEN, the veriable contein the address o+ the ltsst free bgte €t menorg priof menorg. to the screen-rsquiaed

S F E R A T I N OS Y S T E MC O 1 6 5 9 5 - -

I " I E M I O Pt O A E S I ' l , i l l the end of RAH

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 ere elter.ed:

Ecreen vari€b1es

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). Tab6 or.e set at poiition! 2,15,A3,jr.,3q, 4 7 , 5 5 3 56,3 , 7 L 7 9 , e 7 , 9 3 , 1 0 3 , 1 1 r , 1 r 9 .

N o s p e ci a 1 h a n d l e r a . t i o n s . CET CHARACTERSand GET RECORD Returns data in the +o11o{ringEcreen node dependent +orms, uher€ eech b{te cohteins the dat€ for ofle cursor poiition (pixel); th€re is no f€cilitq fot heving the hsndler r€turn pacted graphicr d€ta. 7 +-+-+-+-+-+-+-+-+ I ATASCII .t-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ I C ! D +-+-+-+-+-+-+-+-+

i

l.lode O

I

f , l o d e s1 , e - -

C = .olor/data set.

D = trun.ated

Figuie

5-6

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 +-+-+-+-+-+-+-+-+

Modeg9,10,11 --

craphi.is

i

D = dtsta.

Mode 3-11 6ET D€tts Foim

The cut5or ftoves to the next po6ition a5 erch data bqte ig retuinad. Fo. mode O, the cur.sor urill stag uithin the 6pecified ma.gins; for aIl other oodes, the curror ignore6 the margins.

5A

O F E R A I I N OS Y S T E I ' C I O16555 --

Section

5

PUf CHARACIERS End PUT RECt]RD Tha handle!' accepts diEpleg data in the follo0ring sEre€n ode dependent fotns; theie i9 no facilitq for thE handler to receive graphics data in packed form.

.

+-+-+-+-+-+-+-+-+ i ATASCII +-+-+-+-+-+-+-+-+

o

+-+-+-+-+-+-+-+-+ I C i D +-+-+-+-+-+-+-+-+

i

Mdde O

I

M o d e s1 , 2 - -

C.

D = truncated

Figlre

\--

5-7

coloi/date se t, A T A S CI L

+-.ti_+_+_+_+_+-+_+ i ? iDl +-+-+-+-+-+-+-+-+

l,lode3 6,1,7 --D

+-+-+-+-+-+-+-+-+ | 2 iDl +-+-+-+-+-+-+-+-+

l ' l o d e E4 , 6 , 8

+-.i-+-+_+*+-+-+-+ | ? i D +-+-+-+-+-+-+-+-+

t{odes 9, 10, 11 --

craphics

i

--

= color.

D = color.

D = d€ts.

Mode 3-11 pUT Data For'rn

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. tlhilr o!tputting, the Displeg Handler monitore the kegboErd to deteEt the pre66ing of the ICTRLI 1 tetj combination. l{hen this occuie, the h.ndler loops inte.naltg until thdt fte{ combinEtion is presEed again: ThiE eff€cts a stot/3tsi,t +unction that freezas the Ec.e€n displaV. Note that there is no ATASCII Eode asEo.ieted uith €ithei the tCTRLI 1 l€! rombination or the steit/stop function. The stop/star.t funrtion can be control led onlg +|.oo the teVboerd (or bg altering dat€baEe variable CH €s diEtug6ed in Appendix L, E4r.

UPERATINCSYSTEM C016555 --

Section

5 59

CET STATUS No handle? €ction

ex.ept

to set the statuE to t01.

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. Ihe v€lue

for

the cofioand bute for

D R A Wi E $ 1 1 .

FI LL T h i s s p e c i a l c o f t m € n d+ i l ! 9 a n lines 'rith e speEi+ied coloi. in DRAtr,but E6 eech point of scans to the right performing P A S C A Ln o t E t i o n ) :

ere8 of the s€reen defined bg turo T h e c o m o a n d i s E e t u p t h e s e . n ea 6 the line i5 dreurn, the r.outirie the pioced!re Eholrnbelou (in

WHILE PIXEL fRolr,COLI = o DO EEOIN PIXEL tRolt, COLI := FILDAT, COL := COL + 1i I F C O L ) S c r e e n r i g h t e d g e T H E NC O L : = 0 END; An exemple of a FILL op€r€tion

is ghoon belon:

+ 1 +-------------------------------+ 4 +-----------------------------+ + + 2 Where: '-' '+' 1-2 -3 -4 _-

iepiesent6 the fill operation. are the line point6, uith '+/ for. the endpointg. set set 6et :et

cui5or and plot point. cursor and DRAII 1i.ne. cureor end plot point. +i11 datE velus, set cur.so!., and FILL.

O P E R A T I N GS Y S T E HC O l 6 5 5 5 - 60

Section

5

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 . The value

for

the cofloand brJte +or FILL is

S12.

User-AI tersb 1e Dat€ Bsse V€riables Ceitain funrtions of the DiEpIsg Handler reqoire gou to etemine and/or alter veritsbles in the OS dstabase. The follouinq (Eee describer softe of the more corl.nonlg u6ed hsndl€r' vatiables. Appendir L, B1-55. for eddition€t desEriptione). Cursoa Po6ition Tto ver.iableE neintain the cursor positi.on for the grEphics E c r e e n o r | n o d e 0 t e r t E c r e e n . R O I I C R Sf O O 5 4 1 | | | a i n t a i n 6 t h e d i s p l a q r o { , n l n b e r i e n d C O L C R St o o s 5 l l n a i h t a i n s t h e . t i E p l a g c o l u m n number. Both nunbers rEnge from O to the rnexinum nunrber o+ t o r r r s / c o I u | n n s ,- 1 . T h e c u . s o r c a n b e s e t o u t s i d e o f t h e d e f i n e d text margine {rith no i11 e+f€ct. Yorrcen read and urri.te thi r e g i o n . T h e h o | n e p o s i t i o n ( O ,O ) + o r b o t h t e x t € n d g r a p h i c a i E t h e uppea le+t corner of the 6creen. R O W C R iS6 € 6 i n g 1 € b g t e . C O L C R Si 6 aintEined €t e-b!tes, the leaEt Eignificant bqte being at th€ lo|lrer add.e€8.

!rith

llhen gou alter. the6e varieble5, the Ecresn repreEentetion of the cursor uill not novs untit the next I/O oDeretion involving the di5pla'J is perfoimed. 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'. You can enable the diEptag of the text cur5or bq s€tting C R S I N Ht o z e r o . S u b 6 e q u e n t L / O u i l l then g€ner€te a visible c ul.90f ,

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. The rnargin veluei inclusivelg define the useeble pol.tion of the iicreen *or all operations in that gou do not erplicitl! elter the cursor. location vaiiableE e6 described pr.ior to thig paregreph. C ol o r

Contio1

The OS !pdates ha.duare color ?egiste|'s uEing data from the OS d a t a b e 6 E a E p a r t o f n o r m a l S t a g € 2 V E L A N Kp r o c e s s i n g ( 6 e e S E t t i o n 6). Sho{rn bel.ou are the data bage var'iab1e na es, fhe ha!.drlj€re regigt€? naoes, and the funEtion of each regiEter. See Appendix H for' the mode dep6ndent uses +or the reqiEter.s. Date Base

Hardurere

F u n ct i o n ------

COLORO COLOR1 COLOR? COLOR3 COLOR4

CoLPFO COLPF1 CALPF2 COLPF3 COLAK

PFO PF1 PFA PF3 AAK

PCOLRO PCOLR1 PCOLR2 PCALR3

COLPI{O COLPMI cOLPt'l2 CALPM3

P l , l O- PH1 -PH2 -P l ' 1 3- -

Plaufield Plagfield Pl.agfield Platfiald Pleqfield

O. 1. e. 3. bactg.ound.

PlarJer/mi56ile Pl€qer/mi6si1e Plsrte./mis6i1e Plauer/miEsile

O. 1 2. 3

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 thet 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 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 - 62

Section

5

'

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. DATA EASE VARIAgLE +----------+ I t'{El,,tTOP +

HARDWARE RFGISTER (Updated ever.q VBLANK} I

+---+------+ +---------------+ +---+-+-------+ I Di6plaq : List

+----------_-_+ Screen

+----------+ +-----_---+ il SDLSTL i I DLISTL ! +----->+ i + = ! SDLSTH | | DLISTH !

t

l i +-----_____+

i +----------+ i DatE l<-- SAVIISC

Graphics end/or Tert

i

!

+_____-___+ I

+----------+

+-------------+ 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 ! Letters

| E1OO I

i-------------+

! Special ! G r a ph i E s +-------------+ I Lot eicase i Letterg

I EzOO I I ESOO I

OPERATTNOSYSTE|.ICO16555 --

Section

5 63

+---------+ I cuLPFo I icoLaRo i = =--) I COLPFT !

i c o L o R1 i tcoLoR2 i icoLoR3 ICOLOR4

Figu.e 5-8

r cuLPF2 | i coLPF3 r

i

i coLBK

i

+---------+

I

Scr.eenDispl8g Block Diagram

The follo0ring retetionships

are pregent in the preceding di€graft:

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 .

2.

The displaq li6t itEelf defines the characteristiEF of the 9cr'een to be displaged and points to the neinorg containing the deta to be displa{ed.

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 . The default value foi thiE v€riable is tEO. This vari€ble declaies that the character rep?esentations start at nemorq a d d r € € E € O O O ( t h e i h a r € E t e r E e t p r o v i d e d b { t h e O S i n R O I ')I. Each character iE defined as 6n 8Xg bit (natrix, requiring B butes per tharEcter. 10?4 bgt€s are rEquired to define the large5t Eet, since a charecter code contain6 up to 7 eignificEnt b i t E ( s e t o f 1 e g c h a r a c t e r E ' . T h e O S R O I ' Ic o n t a i n 6 the defsult s e t i n t h e r . e q i o n f r o m E O O Ot o E 3 F F . A11 chal'Erter codes tsie converted bg the handler from ATASCII to en inter.nal code (and viEe ver6a), 6E Eholrnbelou: ATASCI I

coDE

oo-lF 20-3F 40-5F 60-7F AO-9F AO-BF CO-DF

INTERNAL

cooE

40-5F O0- 1F 2C-3F 60-7F CO-DF BO.9F 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. In text mode6 l and e it usE desired thet one cheracter qubset include capit€l letters, nirnbets, €nd punctuation and the other' c h € r € ct e . s u b s e t i n c l L r d e l o u e r c a E e 1 € t t e r E a n d G p 6 c i a I g ? a p h i E E chErEcters, T h e c o d e E f o r . t h € E € p i t a l and IourerEeie letters i d e n t i € a l i n t e r t | n o d € s 1 and e.

uefe

to be

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). Databage v€r iab I € SAVHSC p o i n t E t o t h e I o u e s t m e m o r g a d d f e s 6 0 f t h e i c r e e n d a t a r e g i o n . I t c o r r e E po n d g t o t h e d a t e d i s p l a q e d a t the uooer Ieft coaner o+ the displag. 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 bq date ba5€ me oiU frofi the end of RAf'ldountard (as specified g c r e e n d€te and then for the v € r ' i B b l e R A M T O P ) ,f i r E t $ o r t h e displaq 1i6t. lhe scl'een date region iE cleBred and the diEplag memor{ is available. The displag list is €r€ated if sufficient list addre5r is stoi'ed to the databaEe.

OPERATINOSYSIE}'{ C916555 --

gertion

5

S c i e e n E di t o r ' ( E : ) hendler thet uses the Kegboetd The 9creen Edit01. iE a read/uiite piovide "line_at-a-time" input H a n d l e r t o Handler and the Di6pIag o u t p ut e E a s f o r m a t t e d u e l l editinq functions, {rith inte?srtive The Scteen Editor

6upports the follouing

CIO +unctionE

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 stat{J9e5. d i 6 c u g s i o n o f S cr e e n Ed i tor eiror

for

The Screen Editot' i5 one of the resident htsndlerE, and therefore hes a 6et o+ device vectors staiting €t location E400. 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 l.{ost o+ the behavior6 elreadq de+ined for thE Kegbo€rd Handler and the Di6ptag Handler applg eE u,ell to the Screen Editar: The discuEEions in this Section ui11 be lilnited to dsviation6 fion those behaviors, or to additional +e;ltures that aI.e part of the Screen Editoi ontg. The SEreen Editoi dea15 onlg uith tert data ( g c r e e n m o d eO ' . T h i s S e € t i o n a 1 5 o e x p l a i n s t h e 6 P l i t - E € r e e n E o n +i g u r a t i o n f e a t u r e . 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 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 iditor 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 - 66

SeEtion

I

Il nl :el t

!t hl tE"

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

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 rE positioned to the b€qinning of the Iogic€I line foliouing the one JUSt r.ead.

CIO F0nction Descriptions The device-gp€cific characteristics functions are detai led belou:

of ths st€ndaid CID

OPEN The devire nade is E, and t h e S c r ' e e n E d i t o r ignores €ng devi.re nutnber and {ilename s p e c i + i c e t i o n , i + included The Screen Editor

AUXl

s u p F o r t s t h e + oI l o u i n g o p t i o n :

7 o +-+-+-+_+_+-+_+_+ i it,iRl iFi +-+-+-+-+-+-+-+-+

l,lhere: R and W are the d i r e c t i o n b i t s ( r € € d and {,rite). F = 1 ind icBtes that a iforc€d read,, i6 desired (see OET CHARACTERa n d c E T R E C O R D+ o r o o r e i n f o r m s t i o h ' -

cLosE No speciel

handler actions.

eET CHARACTEREnd GET RECORD 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. "+;;;*; ;;"d,, opEN oprion allous gou to read teri data uithout rnt;;""n;;;;. t r i i . , , J o u c o d x o a n ua READ-op.retion, the Screen Ediror u,ili .;;;;;";;;. i r i, "n. start of the Iogical tine in orhich the tert cursor 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. A 6pecial case occurg rlhen cheraEter'6 eie output uithout e t€rni na t i.ng EeL, and t h e n a d d i t i o n a l cheracter.s €re appended to

T]PERATINCSYSTEM CO16555 - -

Section 5

t h € t l o g i c e l l i n e f r o o t h e k e g b o a ' . d . t r h e n t h e I R E T U R N ]t e q i s preEEed, onl{ the teqboard entered cha.ecters are sent to the .aller, uniesE the curEor hes been ooved out o+ and then baEk into the logi€€l line, in that care all o+ the logiEEl line uill be 6ent. PUT CHARACTERand PUT RECORD The HdndlEr e€Ee9ts ATASCII chatatters a5 one chat{cter Per bqte. gixteen o+ the 256 ATASCII characters €te control codesi the EBL code haE universsl nesning, but moEt of the other contr('l E!des have Bperial fteening ontq to a diEPIag or' print device. The Screen Editoi proceEriing of th€ ATASCII Eontrol rodeE is € r p l a i n e d b e1 o u : CLEAR (*7D) -- The S€|.een Editor clearE the current displaU of alI date and the cuagor iE placed et the hooe gosition (upP€r left cornel' o+ the Ecreenl. The 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 € . t o t h e b o t t o l n t h e o f t h e d i s P l a g curEor urill u,r€p ft'om top line 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. -- lhe corsor tnoves le+t bg one tolufin. The C U R S O RL E F T ( t l E l ruf5or u,ill ufap from the le+t $Eigin of e line to the t'ight mar'9in of the 6aoe line. bq one coluon. C U R S O RR I G H T ( $ l F l - - T h € c u r s o r d o v e e r i g h t q r r a p cur.sor u,ill froft the riqht margin of a line to the left margin of th€ sane line.

The

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 -6A

S€etion

5

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:

O 2 19 I 29 --L------+---------+---------+----*----R

39

-T--------------T----*--xi------T--------------T--------------Tx t-------Note the e++ect o* the left loq ical line. The Handler def€ult

SEreen column l+. L/R = nargins. A logical line. r = inac.esible co lu0ln5,

|nargin in defining

the li.mits oS the

tab Bettings are shoun belo0r:

O 2 9 19 aP --L------+---------+__-------+---------R rrT----T-------T-------T-------T-------I rX---__T_____--T-------T-_-----T--_____T r r -----T-------T-------T-------T------_T

39

Scieen colufin *. L/R = mergins. A Iogi€€1 line. r = inacEesible c o 1 unn s.

CLEARTAB ($98) -- Tfie Screen Editor rlearE the current cursor po6ition oithin the logicel line fl"om being a tab point. There is pt'ovided bg the Hendlerno rrclear all tab point5" +€cilitg 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 p o i n t tab 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 Iine- A logical 1in€ can be 5plit into b e g i n n i n g o S t s t l e l ] ,l o g i r s l p r 'ocess, the last helf of the original trro logical li.neE bg thiE 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. ($FE' -- the cheractei on uhi€h the cursor D E L E T EC H A R A C T E R resicteE iE rernoved/ €nd the remainder of the logical line to the right of the deleted rharecter ic ooved to the left bq one position. The nuftber o+ phqsical linei composing a logical Iine ran decrease a3 a result 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 . BELL ($FD' -rnodified.

An audible

tone iE genereted; the diEplaq is not

ENDOF LINE ($9S) -- In addition to its record terminati.on function, the EOL causeE the cu.6or to advance to the beginning o f t h e n e r t l o g i c e l l i n e . l . J h e nt h e c u r E o r r e a c h e s t h e b o t t o n l i n e of the screen, the reEeipt of an gOL ui11 cause the gcreen date to 5cro11 upuard bg one logical line.

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 Also see the Displaq Hendler data base ver.iable discussion.

O P E R A T I N eS Y S T E i , C | O16555 -70

Section

I

Cursor PoEition R O t t c R Sa n d C O L C R Sa . e e E s o c i a t e d Hhen in a split-screen configuration, trith the graphi.s portion of the diEplag and tuo othei variableE, T X T R O Wt O 2 9 O l a n d T X T C O L t O 2 9 1 l , a r e s s g . t c i a t e d u i t h t h € t e x t u , i n d o u . the leait T X T R O I iI r a i i n g l e b g t s , a n d T X T C O Li s e - b g t e s t i t h Eigni+i€ant bgte being at the lourer address. Note that the most s i g n i , f i c a n t b { t e o f T X T C O Ls h o u l d E 1 u e g 5 b e z e . o .

'

The hone poqition o f t h € u i n do u .

Enable/Ihhibit

'

(O,O) +or th€ tert

of Contiol

uindou i6 the uppsr Left

corner

Codes in Text

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 the detts 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 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: '

The Casgette device i6 e read or urite device {rith a Handler that e!ppofts th€ fol lo|lrin9 CIO +lnctionE: OPEN EET EET PUT PUT GET

CHARACTERS RECORD CHARACTERS RECT]RD STATUS (nu1l +unction r

Th€ Cas6ette HEndler can p?oduce the follo{ri.ng erroi

status€s:

$AO -- IBREAKI ks{ tsbort. $84 -- Invalid AUX1 bgte on OPEN. 588 -- end-of-f i le. S A A - 9 O- - S I O e r r o r E e t ( s e e A p p e n d i x C ) . The CasE€tte Handler is one of the resident handler,s, and ther.efore h€s e Eet of deviEe veators 6taating tst location E44O.

CIU FunEtion Deicription6 Th€ device-Ep€cific d e t € i 1 e d be l o l r :

.haracte?iBtics

o+ the 6t€nde.d CIO fun€tions

are

OPEN The deviEe nslne is C. and the H6ndler. ignores fi Ienaoe speciticatioh, i+ ihcluded. The HEndler iopport5

BnrJ devi€a nomber end

the follotrring option:

O P E R A T I N eS Y S T E MC O 1 6 5 5 5 - -

Section

5

AUX2

+-+-+-+-+-+-+-+-+ i ict +-+-+-+-+-+-+-+-+

l^lhere:c = 1 indicates that the cesEette is to be read/u?itten s t o p / E t a r t b e t { r r e e nr e c o r d i ( E o n t i n u o u s m o d € } .

urithout

Opening th€ Ea5gette foi input generates : 5ingle eudible tone, as E profi9t for gou to verifg that the ca5sette Pleqe'a iE 5et up f o i r e a d l n g ( p o | , , e ro n ; S e r i € 1 B u s c a b l e c o n n e c t € d ; t 6 p e c u e d t o E t a r t of fite, and PLAY button depreEsed'. t{hen the EeEsetta i5 re€dq, tape gou cen pt€es an{ kegboard keq (ercePt tBREAKIt to initiate ie€din9. 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' b!tton dapreEsed). Wh€n iE set up +or tl,riting (as Ebove, Plus RECORD the cassette i3 resdg, Vsu t€n Pre95 anV ke{boerd ketJ (erEept There i3 no uag for the coilpute. to tBEEAKI) to begin tepe uriting. 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 . There is a potentiel piobl€tn {tith the €arsette in that uhen the the ftotor. keeps running until the casEette iE opened for {rtitin9, ( 1 2 E } If 128 det: bqtes are dat€ bqtes) is {tritten. firet recoid Ebout 30 seconds of the OPEN, uritten or' th€ tEEcette i5 cloied uithin p e r ' f o r ' f i e d , then there iE no Problefi. and no other seriaI bus I/O is b€ {rr'itten a r e n o t o e t , s o n e n o i s € { ti l I Houever, if those tonditions o E tur dh€n e r . r o l . l r r i l l reco?d and an to th6 tdpe F.io. to the first e r e a n t i t i p a ted that tare +i1e iE re€d Iater'. If tengthg del6rrs t i t n e t h at the e n d t h e is opened betueen the time the cassette file ( 1 2 8 d u m n q' . e c o r d t h e n a { r r i t t e n , data bUtes) i€ +i?st cassette recgrd 6o|ne b q t e s o f 1 2 8 t{picaIlg EhouId be urittsn a€ part of the file, g u c h $ F F 6 , or all E | I I r e r o s , as all i n n o c u o u s d a t E d o u l d b e u , ri t t e n , ( b l a n l e + 2 O) . 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 € .

The CLOSEo+ a tape iead Etops the cassette T h e C L O S Eo f 6 t e p e u r i t e

|rlotor..

does the f o l l o u i n g :

Lt!'ite6 ang remaining user' data iecoid l , l ri t e s € n e n d _ o f - f i l e Stop6 the cassette tnotor.

in the buffel. to taPe.

OPERATINGSYSTEH CO16595 - -

Section 5

OET CHARACTERSand OET RECORD T h e l . l e n dI € r . r e t u i n E

det€

in the follouing

+-+-+-+-+-+-+-+-+ I data b{t€ +-+-+-+-+-+-+-+-+

+ormEt:

I

PUT CHARACTERSend PUT RECORD The H€ndler accepts data in the follouing .t-+-+-+-+-+-+-+-+ i data b{te +*.1-+-+-+-+-+-+-+

format:

I

The Handl€r'attaches no significen.e to the dets b{tes uritten, a valus of 994 (EOL) cEUs€s no 6oecial Ertion. CET STATUS Th€ Handler. does no more thEn set

the

statos

to tO1.

Theorq of 0peration The Cesiette l{6nd}€r urriteE and reads el1 of the foamet Bhoun belour:

+-+-+-+-+-+-+-+-+ i o I o 1 0 1 0 1 i t-+-+-+-+-+-+-+-+ t o1 0 1 0 1 0 1 i +-+-+-+-+-+-+-+-+ i control bgte I

+-+-+i+-+-+-+-+-+ i 128

i bqtee +-.t-+-'-+-+E+'+-+ i E h e ck s u m +-+-+-+-+-+-+-+-+ FiOUre 5-9

data in fired*length

S p e e d n e a s u r e f i e n t b gt e s .

i I i

(Menaged bq 5I0, H E n d1 € r . )

C € s s e t t e H a n dl e r R e c o r d Fol'm€ t

O P E R A T I N GS Y S T E MC O 1 6 5 5 5 - -

Section

3

not the

recor.dE

The cootaol bqte containE one of three velue€: o

iFC indicates

o

$FA indicates the iecord ir a pertiallg fu}l dstE reEordi qorr EUppl!.d teuer than 129 bgteg to the record. ThiE ra:e cdn oEaui onlq in the .eEord piior to the end-of-fi1e. The nuftbe. o{ uEar-gupplied datE bqteg in the .ecord i9 rontained in the bgte prior to the chectsuo.

o

]lFE indiEete6 th€ re.or.d is an End-of file r€coFd, poFtioil is alI reroes +or. an end-o+-fi!e Fecord.

the recoid

le a full.

dat€ re.ord

(1ag brJt€s).

the data

The 9IO roltine geneiatei and Ehects the chEctsu. It is pait of the tape recor.d, but it iE not contained in th6 Handler's t€.ord buf+er

cAsEuF to3FDl.

T h e . p r o c e E g i n E o + t h e s p e e r l - m a a s u r € t t r e n tb r J t e s d u r i n g is discussed io Appendir L, D1-DZ.

caBgette

reading

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

A 2o-geaond leader

o

Anq nsobaf of data-rEcord

o

An end-of-f

i le

The c:rsette-deta

of martr tone. +rafie6.

fr.ame. reaord

frathes aie

foi.matteal aE ghoun b€lou:

faaahe= pre-iecoid rraite tone (pRWT', + alet3 rEaord, + poEt reEor.d 9ap (pRG) Tha nondste gortion€ of a frane have Eher5cteristiEg thEt d a p e n d e n t u p o n t h e u r i t e O F E Nm o d e , i . € . E o n t i n u o u 6 o r Etrrt/Etoo.

€re

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 . Stop/steit PRC * up to 1 €econd of ljnlnoon tone9. Contin|Joug PRO * froo O to n seaondg o+ rrnknoun tones? uhere n is dependent upon gour prograrn tining. The inter-r.eeord g€p (IRC) betueen ang tuo record6 consi6tE of the PRO o+ the first r s . o r d f o l l o { r e d b { , t h e P R W To f t h e s e c o n d reco.|.t, OPERATINOAYSTEI'ICU16995 --

g€ction

s

Printer"

H a n d! e r

(P: )

The Fl'inter device iE a t|rrite-onlg device ulith € Handler' that supports th€ follouing CIO +unctions: OPEN PUT CHARACTERS PUT RECORD GET STATUS The P?inter

Handler can pr'odu€ethe follotrinq

9SA-9O--

SIO €rior

set

error

gtatuEes:

(iee A9pendir C).

The P!'intes Handler is one of the resident hand1erg, and there+ore heE a Eet of device vectors starting at locetion

E43O.

CIO Fun.t i on Descriptions The device-sperific charaEteristiE5 €re deta i I ed belou:

o+ the Etandard cIO functiong

OPEN The device ns{ne is P. The Handler ignores if included. filenane sper ification,

ang device

The Hendler. urites ang data remei.ning in its print€r device, !rith trailing bIentE to fill

nuftber and

buffer to the out the line.

PUT CHARACTERSand PUT RECORD The H€ndler ec.epts

print

data i.n the +o1lourin9 format:

7 +-+-+-+-+*+-+-+-+ I ATASCI I +-+-+-+-+-+-+-+-+

o

The onlg ATASCII control code of enq Eigni+ic€ore to the Handler is the EOL charecter. The printer. device ignore6 bit 7 of everg d€t€ bgte and prints a sub Eet o+ the ie aining 1eg aodes. (Eee App€ndix C for the print€r character set). The Handlei supports the +ollouring print

option:

O p E R A T I N eS Y S T E MC O 1 6 $ 9 5 - -

SeEtion

5

+-+-+-+-+-+-+-+-+ grint node i +-+-+-+-+*+-+-+-+

AUX? l.rhe.e:

I

94E (N) s e l e c t s n o r d r € l p r i n t i n g ( 4 0 c h € r E c t e r . E p e r l i n € ) . 5 5 3 ( S ) s e l e c t s s i d e 0 r a g Ep r i n t i n g ( 2 9 c h a r a c t e r s p e r l i n e ' . $57 (W) 6elects !ride piinting (not 6upported bq pi,inter devi€e). Ang other value (inEloding OO) iE treated EE a norm6l (N) print seleat, urithout producing an erroi stEtus.

CET STATUS The Handler oht€ins a 4-b!te Etatl6 fro ths printer. cont.olle. e n d p u t 6 i t i n s g s t e m l o c a t i o n D V S T A TE O Z E A I . T h e foroat o+ the Etatu6 bgtss iE shoun betou: +-+-+-+-+-+-+*+-+ I co|no€nd stat. +-+-+-+-+-+-+-+-+ i AUX2 of prsv. +-+-+-+-+-+-+-+-+ i tioeout +-+-+-+-+-+-+-+-+ (un!sed) i +-+-+-+-+-+-+-+-+

i

DVSTAT + O

i

+ l

I i

The coooand stetljs contains the +o1louin9 Etatug bits condition indiretions: b i t O: b i t 1: b i t 7: The nert

end

an invelid connend fi.sms lra6 r.eceived, a n i n v e l i d d E t € f f a m s u r e Er e c € i v e d , en intelligsnt cofltroller (nor$a11q = O).

brrt€ containE

the AUX2 velLre froo

The ti.m€out bgte contains a controller v a l u e ( i n s e c o n d s) .

the previoog

op€rstion.

provided meriouln tifi€out

T he o r g o f 0 p e r a t i o n The ATARI AzOtTf,ll 4O-Colufln Printe!. is € line-at*a-tioe printe? ?ether than a character-€t-€-time printei, g o u t so deta mrrst be buffered bg the HandleF snd sent to the device in record6 rorresponding to one pFint line (40 chal.acter6 for nornal, e? rharEcter: for sideueus). 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.

DiEt File

l{aniger. (D: )

The OS BUFpor'ts foui unique FiIe l'lanegementSubEgste{Ils et thp time o+ thtE niiting. Ver6ion 1A is the original version. Versi.on IB i5 a 5liqhtlg {rodlfied version of lA and is the one d € s < r i b e d i n t h i s d o c u m e n t . l . , l o s to f t h i s d i 6 c u E s i o n a p p l i e s a s (7eO {reIl to Ve|'sion tL that hendles a double-densitg dis*ette e56-b{te ie{tors) in addition to the sin91e-densitU disl(ette (7?o 128-bqte gectorE'. Vergion III has aIl neu +i1e/direEto.U/map structureB ahd can posEiblrJ contain changes to qour interf:ce e s { r eI l . The File lvlanagenenS t ub6gsteo includes € disk-bootable ( R A t l - r e s i d e n t ' D i s k F i l e M s n a g e r ( D F l ' 1 )t h a t m a i n t e i n E a collection o + n a | n e df i l e E o n d i . e & e t t € s . U p t o 4 d i s k d r i v e E (Dl: thr.ough D4: ) ran be accegsed, €nd up to 64 files per diEkette cEn be arcessed. The sgstem diEtette6 5upplied b'J ATARI but € 1 1 o u , a E i n g ! e d i . 6 l d r i v e ( D 1 ) € n d u p t o 3 O P E Nf i l e s , gou can alter these nunbefs es deEcribad later in t h i E s e ct i o n . 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

9O3 -$88 -tAA-9O +AO -tAl -$A2 -3A3 -3A4 -$AS -tA6 -$A7 -$AB -3A9 -tAA -3AB --

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:

(EOF on next l'ead). Last dat€ from file end-of-fi le. -- SI0 error 6et (eee Appendix C,. Drive nufiber Epecification err.oi. No iector buffer availeble (too manq open file€). Disk full Fatel I/O error in director.t or bitmap. Internal file * mi5$atch (Tt?uctural p"oblem). File nane speci+ication error. Point inforn€tion in error. FiIe locted to thiE operetion. S o e c i a l c o m t n a n di n v a l i d Di.ector! fu11 (64 fi1€s). File not +ound. P o l n t i n v a l i d ( f i l e n o t B P E N e d+ o r . u p d € t e ) .

C I O F u n ct i o n D e E c r i p t i o n g The device-6pecific cha?€cteristica are detai Ied belo|ll:

of the Et€nderd CI0 *unctions

IIPEN FILE The d€viae name is D. Up to four. dis& drives can be €ccessed (D1 through 04,. The di6* filenefie can be fr.on 1 to C' ch€rarEers rn length uith €n optionel l- to 3-character ettension. 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 AUX1

+-+-+-+-+-+-+-+-.t" | tt.|tRt iAl +-+-+-+-+-+-+-+*+

llhere: l,l and R Ere the dire.tion bitE. tlR = OO iE invalid O 1 i n d i c a t e E O P E Nf o r r e e d o n I g . 1 0 i n d i c e t e s B P E N4 o r u r i t e o n l q . 1 1 i n d i c a t s e O P E N* o r r e a d , / u r i t e ( u p d a t e ) . A = 1 indicetes

appendedoutput uhen W = 1.

You mag use theee fotlou,ing valid

AUXl opti6ns:

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 ) i 6 o pe n e d f o r i n p u t . A n g u i I d_c6rd ch€r'acters The ind ic€ted file ete used to 5ea?rh for the f irEt oatch. If the +i1e is not found, a n d n o f i 1 e u i I I b e o pe n e a l . i5 r e t u r n e d , an e!.f01. 5tatus

O P E NO u t p u t

(AUX1 = 9OA)

is opensd +or outp!t sterting uith the +irEt The indicated file 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 atch. I+ the fil6 chatacterE are u6ed to Search fol the firBt e1r'€adgeri5t6, the existing file uril 1 be delet€d before oPening If the +ile doeE not alaeadq eri9t, the naned file as e neu file. it !rilI be creeted. A file oD€n€d foi' ootput rrill not aFPeal in the diiectorg until i5 not pl'operll closed, it hes been Elosed. If en output file of the sectori thet urete €aquired for it ian be lost $ofle o!'eIl until the diEk is reformetted. that is opened +ol. output can not be oPened cotlcutrentlg A file for enq other accesg. oP€N Append (AUX1 = $O9) 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. If a file opened fof append is not proper'Ig aloEed, the €ppended ieoain un$odi+ied and deta rrill be lost. The eristing +i1e uitl some oi e11 o+ the Eector6 th€t uere acquired *or the appended oortion .an be lost until the diskette is reformett€d. O P E NU p d a t e ( A U X I = 9 0 C ) The indicated +ile update provided it used to Eeafch for

(thet muEt elreadq exi6t) uill be opened for' 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 the fii.9t metth.

The GET, PUT, NOTEand POINT opeiations i n t e t ' t n ix e d e s d e 6 i r e d .

aie

all

valid,

and can be

If a +ile opened fo!' update iE not properl{ €Losed, { Bectot'€ uorth of infor.m€tion can be lost to th€ +ile. A file opened for uDdate can not be extended-

ao

OPERATINe SYSTEII CO16555 --

Eection

I

D e v i c e / F i l e n a m e S p e ci f i c e t i o n The Handler expe€ts to find the fol louinq forln:

a device/fil€n€me

specificetion

of

D I 1 : n u m b E l . > l{: + i I e n a m e > { E O L >

{number} ::= 1l?13i4 < f i l e n e n e > : : = t < p r ' i m a r q > l C .C { e r t e n r i o n } I l < t e r d r i n a t o r } <primerg) ::= an uppercase elpha EhEr.e.t€r fotloued b! O to 7 alphanuoeric chararters. I+ the prid|ar'g nane i9 IesE then g cheracters, it rri.ll be raddcd {rith blankE, if it is greeter then E| characters, the ertrE Ehaiacte?s urill be igngrad. <€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 .

: : = <EUL)[ Figure 5-1O

D e v i c e , / F i 1 e n € m eS g n t a r

The fotlouing

Bre all

v€1id device/filenaflei

for. the diEtette:

D1: oA|{E.SRC D: |'1ANUAL5 D:.t{HY D4: BRI DGE.OO2

Fi lenane tli ldc€rd in9 The filenane specification can be furthsr generalized to inctude the u9e of the "{ri1d-cerd" charecters * and ?. TheEe uildEar.d characfets al1ou, portions of the prim:rq and/or ertension to be a bb r e v i a t e d a s f o I l o u s : The ? iharacter in the Epeci+icetion allous ang filenaiDe ch€racter at thst p6sition to produce a "natch. " For. exaftp1e, !,lH? uill o a t E h f i l e s n e f l e d N H O , l . r H y ,S J H 4 ,e t c . , b u t n o t a f i l e n a m e d WHAT, 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 . Soft€ valid

useE o+ urild-cErd sDecifiEation5

*. SRC B A S I C .* *.r+ H*. ?

ai'e Ehoun belou:

Files having an extension o* SRC. Files n6ned SASIC 'rith Bnq extenliion. All +i1e6. FileE beginning orith H and having € O or 1 c h a r e ct e r e x t e n s i o n .

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 : COtltlAND BYTE c $O3 = poj.nter to device/fi.lenane specificati.on. E U F F E RA D D R E S S AUX1 = $06 A+ter the directorg iE opened, a record urill bs returned to the c a l l e r f o r e e c h + i l e t h € t f t : t c h e e t h e O P E Ns p e € i f i c a t i o n . The r'ecord, thet coniainE on1'JATASCII chtsrscters, iE *ormatted at shoun belou:

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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

a2

O P E R A T I N OS Y S T E MC 0 1 6 5 5 3 - -

Section

5

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 ). Aftei the last filenane match reroid iE leturned, an eddition€1 record is rettJfnsd. Thii record indicate6 the number o+ unu$ed seEtors av€ilable on the dislett€. The +ornat foi this record is shoun belour:

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 +-+-+-+-+-+-+-+-+-+_+-+-+_+_+_+_+-+ !|heie:

count = the nuftb€r' of unuEed seetorg e = EOL ( 398 '.

on t h e d i s k e t t e .

(tO3 end $88' sre returned as ih a nornEl The EOF st.tuses 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 .

data

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 Upon c103ing a file rsed, the Handler ielea€aE sll !.esourees being u9€d to support thEt fiIe. Upon closing a file

{riite,

the Handler:

o

rrr.iteE anq rEsidu€1 datE +.oft its to the dislette.

o

updates th€ dir.ectorg and allocation distette.

o

r€l.ea5es all that fi Ie

internal

intern€1

file

buf+er for

that

+iIe

$ap +ot the eEEocidtsd

resourc€s being utilired

to support

eET CHARACTERSand cET RECORD Chararteig ere read fro t h e d i 6 k e t t e a n d P : 5 5 e d t O CIO as a rau, data str€am. None of the ATASCII Eontr.ol character.g have anu special 3ignificance. A 6tatuE of $gg is retrrned i f an atteop t is nade to rEad past the lest blte of E f i l e . OPERATINOSYSTEMCO15553 - -

Sec tion

PUT CHARACTERSand PUT RECORD 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 The indirated +ile is .herted end one of the follouinr b!te values is retu?ned in ICSTA end r.eqigter. Y: $O1 -EA7 -$AA --

Fil€ File FiI€

status

found €nd unlocfted. }octed. not +ound.

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 the nert bgte to be r€ad or uriitt€n, in th€ var'iab169 sooun belou: ICAX3 = LSg of the diE&ette sector nuftber. ICAX4 = Sg of the diEkette sectoi nuftber_ ICAXS= l.elative sector displacement to b{te

o+

(O-r.24t.

POINT (CAHHANDBYTE = $p6) 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. ICAX3 = LSA of the diskette eector numbe.. ICAX4 = HSB o+ the dirtett€ sector number. ICAXS= relative 5e.tor displacement to bgte (O-1241.

a4

OPERATINe SYSTEII CO1655S --

g€ction

g

LOCK 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. You set up theEe follou,ing c 6 1 1 i n g CI O :

I O C B p a r a m € t e r . 5p r i o r

to

COI'{HANDBYTE = 923 A U F F E RA D D R E S S* p o i n t e r A f t " r e L O C Ko p e . a t i o n , been Eltered:

to device/filenane

the follouing

speEification.

IOCB pe?emeter u,ill

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 of possible statu6 codes.

for

have a list

UNLOCK

.-

ThiE coomand allorrs gou to reoove the loc|( statuE of anq n u f i b e r o f n a r n e df i I e s . Unlocliing a file thet iE not lttcled is a T h e valid oo€r'Etion. HEndler €xDects a device/filenarhe specificEtion; t h e n e l l o c c L r r . r e n E e so f t h e f i l e n a m e s p e c i f i e d uill be unlocled, urino the t ild-card role5. You set up thes€ *ollouing c a l l i n g CI 0 :

IOcB p€refteter5 prior

to

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.

A f t e r a n U N L O C Ko p c r ' a t i o n , t h e f o l l o u i n g EI te?€d : S T A T U S- . e s l l t l ist

!OCg paraneter uill

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 o+ possi.ble status codes-

have been a

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 involv€d. The deellorete the diskette space {rEedbg the files then €1I Handler erpects a devics/filenatne spe.ific€tion, occurences of the filen€ne 6pecified uii11 be deleted, using th€ rrild*aard ruler. OFERATINe SYSTEfl CO16555 --

Section

5 85

You set up theie c a l l i n g CI O :

IOCB paremeters prior

follo{ring

to

COHMANDEYTE 3 921 B U F F E RA D O R E S S= p o i n t e r A f t e r a D E L E T Eo p e r . B t i o n , been altered:

to device/filanane

th6 follouing

S T A T U S= r e s u l t o f D E L E T Eo p e r a t i o n ; possible stEtus Eode6.

spe€i+icetion.

lOCg perameiei

uill

E€e Appendix g for

have e list

RENAI.lE Thi5 .on|tland allolre {ou to change the +ilenamer of arlg number of unlocled fites on a singIe di6kette. Th€ Handler erpeatE to find a device/filenane sperifi.ation th€t +o11ou,s: { 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 > A 1 1 o c c r . r r r e n c e so f t h e f i r s t fileneme uill be reolac€d {rith the second fileneoe, using the urild-€€rd rules. No proteGtion i.E paovided again6t forning duplicate nane5. Once forned, duplicate name6 c€nnot be 6€paratelq ren8rned or deleted; hoo€ver', an OPEN F I L E c o m m € n du i l l alu€qs 6elect the fir.5t file found that oatches the filene$e 6pecification, 6o thet file uilt al{raq6 be acceBEibl.e. The RENAI,IE c o m n r a n dd o e s n o t a t t e r t h e € o n t e n t o f t h e fileE involved, lrterelq the name in the diiectorg. Examples o* soloevelid belou:

RENAME neoe sgecificationg

are shoun

D 1 : + . S R C ,* . T X T D:TEI,IP,FDATA D2: F*, F+, OLD You set up these +ollo{ring IDCB perianeters prioF to c e I I i n q CI O : COilt'lAND EYTE = $2O E U F F E RA O D R E S S= p o i n t e r A f t e r e R E N A H Eo p e r e t i o n , been eltered:

to device./filentslne specifi€ation.

the follouing

S T A T U S= r e E ! 1 t o f R E N A I ' I Fo p e r a t i o n , list of pos6ible status cod€s.

IOCBparaneter ui11 have see Appendix B for

O P E R A T I N OS Y S T E MC O 1 6 9 5 5 - -

a6

Section

5

ts

ot

FORi'IAT Soft-sector diEtette6 oust be form€ttsd before theg cEn Etore +ornat a d a t a . T h e F O R M A Tc o o o € n d a l l o u s g o u t o p h g c i c 6 l l q diglett€. lhe ph{sic€1 formetting proc€ss {rr'ites a neu copg of avarq EeEtor on the Eoft-seEtored diskette, uith the data poition o f e a c h B e c t o r ( o n t E i n i n g a l 1 r e r o 5 . T h e F O R i i A Tp r o c e E s c r e a t e 5 a n ' r e t n F t t r r 'n o n E g s t e | n d i s k e t t e . l^lh€nthe tor.metting proce6E is Eooplete, the FMg createg Bn initial Vo1l|naT€b1e of Contentg (VTOCIand an initial File Di"ectofg. Th€ boot iector (l+1) is plr|tlenentlg reserved ar pert of thig procoss. IOCB pErEmeterg prior

You set up theEe folloqring c a l l i n 9 Ct O :

to

COtlt'{ANDBYTE = aFE B U F F E RA D D R E S Ss p o i n t e r A f t e t e F O R M A To p € r ' e t i o n , been altered:

to device EpeEi+iEEtion.

the +olIouinq

IBCB pei€meter

S T A T U S= r e s u l t o + F O R M A To p e r s t i o n ; list of Dos€ibIe Et€tu6 codeE.

\_.

6€e Appendix I

ui11

have

+or a

To creEte a sg5ten digkette, a copg o* the boot fil.e muEt then be uritt.n to sectorE lf2-n. Thi6 iE 6EcompliEhedb9 nriting the file n a f i e d D O S .S Y S . T h i s i E a n a { e t h a t i 6 r e c o g n i t e d b g t h e F M S e v e n though it i3 not in the directorg initi{119.

T h e o r q o f O pe r E t i o n Th€ rerident OS initiates the dist-boot oioEeEs (see geEtion 10). T h s O S . e a d E d i s * e t t e s e c t o r L 1 t o f t e m o r gE n d t h E n t r a n i * e r 6 c o n t r o l t o t h a " b o o t a o n t i n u E t i o n a d d ! . e E s t t( b o o t E d d r e s s + 6 ) . The boot-Eontinuation pr.ogfa sontained in EeEtor {t1 then continues to load the r.efiainder of the File l,lanatement gubBqEtem to me. noiguEing additional in+ormation rontEined in seEtor l+1. T h t F i l s l l a n a g e m e n tg u b 9 9 s t e l n l o e d e d , u i l l contain a Dist File (DOS) package. Manag€i , end optionatlq, a Disk UtilitieE 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: E V t e 9 = m a r i | n u on u f i b e r o + o p e n f i I e s , m a x i m u nv a l u e i E 8 ) . Sgte 10 = drive

Eelect bits,

one buffer

OPERATINOSYSTEII CO16955 --

one buf+er per (the oer (1-4 onlu) Section

5

a7

The Dis* File fldnager uill then inaert the n€t|le D and the Handle. vector iable addresg in the device tabte. MITE: There is a di6cr.epenEg betueen the Di6k File l{anager,s numbering o+ distette sertorE (O-7191 end the dis|( conttoller.s nutnbering o+ diskette sertor.s ( 1-72Oli EE a resslt, onlu sectors 1- 71? are used bg the DiEk File I'lanager. 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€:

AE

OPERATINeSySTEtt CO1659S--

Section

5

FMSDistctte

Uti I i zetion

T h e o a p b e l o u s h o u r et h e d i s t e t t e E t a n d a r d 7 2 O € e ct o r d i 6 k e t t e . +-------_-----_-_+ ' E O O Ta e c o r d +---------------_+ FllS EOOT = +ile ' DOS.SYS +----------------+ i Use|. = FiIe I Ar.ee +----------------+ vToc(note 2) l +---------------_+ : File = Directorq

-

\:

+----------------+ . U6e? = FiIe I Area

6ectoi utilizetion

i

Sector

1

i

gectoi

2

i

SeEtor

n

i

Setto.

i

Settor' 359 ($167)

|

gertor

!

Sector 361 ($169)

i

Secto.

Figure 5-11 HaP

unused

FiIe

a

-+

+* Note i n+l -+

1

360 ($168)

3 6 4 ( $ 1 7 O)

I I

SeEtor 719 ($ACF)

i

ge€tor 72O (izDol

+---i------------+

I

for

M e n e g e n e n tg u b s { 5 t e f i D i E l e t t e

Ssctor Utilization

N O T E1 If the diskette i5 not a srretemdiskette, then gour' and no space iE reEerved for the FMS Fite Aiea stsrts at secto.2 " D O S " ( D O S .S Y S a n d D U P .S Y S ) m s t J s t i l l be B O O Tf i f e . Houevs!', " a N . r ' {,ri.tten to e di6kette that heE al.eadg !9ed eectots NOTE2 --

VTDC stendE for

Volume Table of Contents.

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 ( 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 softuare ihoo,n belo{| +______-______--_+ i boot f lag = O i +----------------+ ! *sector5=1 I +----------------+ I boot addr€is i = 07OO [ +----------------+ I init €ddr.€ss +

I 2

I i

+----------------+ I JMP = rt4B

i

i + I

I + |

boot reed Eo n t i n u E t i o n addres5

Egte O

i marfileg=3 | +----------------+ I dfive bits = 1 i +----------------+ I al1o. dir,c * O i i boot iflage end i + + i i address + 1 ! +----------------+ I boot f1a9 {} O I

6

| | I | | i I

9

N o t €1

lO

Note 2

1r.

Note 3

F M S +------------configuretion i date 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

go

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

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 +_+_+_+_ii-+_+_+-+ N O T E3 -

_

gqt. 11 rpecifieE the buffer b g t € e h o uI d € q u a l O .

allocation

a sel€cted d?ive. dire.tion,

this

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 D O SS . YS file. It iE actualt{ en unused b{te.

OPERATINOSYSTEH C4165$5 --

S€ction

the

F gL

Boot ProcesE Me org l'lep 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 . +----------------+ i data fron boot i = E€ctor read E{ s I res i d6nt OS I +----------------+ data +rofi r.est of DOS.SYg i'ead bg the = progr.em in the * I boot sertoi. I t !

t'lenorgaddr'€5sO7OO 077C

a77D

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 T h e f o r m a t f o a the Fl"lS volutn€ table o f c o n t e n t E 360) is rhourn in the diEgr.am beloor:

+----------------+ I dit'eEtorg tgpe I

++---------------+ (10) i nar ilttun + sector *

! = ozCS

(hi)

BUte o

Note

1

Note

3

Note 3

I +

i

i nunber of (lo) | + E e rt o r s + i avEileble (hi ) i

+----------------+ r i = volune bit nap = i l +----------------+ t +----------------+ Figuie

5-14

File

The volune bit

(VTOC, s6rtor

10

t

flenegefient Subsqste.n Volulne Teble o+ Contents

mEp orgenization 7 o +-+-+-+-+-+-+-+-+ I 112 3 4 3 6 7l +-+-+-+-+-+-+-+-+

ts f

location

fotlous:

Bgte 10 of VTOC

. i

1t

+-+-+-+-+-+-+-+-+ Figure 5-15

File

Hanegensnt Srb69stem Vol!fle Bit

Hap

At eEch tnap bi.t po6ition, a O indicatei the dorresponding sector iE in u6e and a 1 indicEteE that the sectol' is availableNOTE 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'{. OPERATINE SYSTEI'{c o 1 6 5 5 5 - -

Section 5 93

N O T E3 -

File

set to 7O9 The number of ge€tots svailable iE initiallg a+ter a diskette is freEhl! fornatted, thiE nuobet is adJUsted EE files Et€ created snd deleted t6 Ehot! the nunbeF o.f Eectors Evailable. The EectoaE that are re5erv€d ere l and 360-368. initiallq

Directorg

Forftat

Th€ FMs reserve6 eight Eectors (361-364) fot' a file diiectoig. Earh iector containing directorg infor'$ation +or' op to eight for anq volutne. fil€6, t h u s p r o v i d i r i g f o r a l l l s x i m u t no f 6 4 f i l e s The fordat o+ a 3ingle 16-bgte +i1e enttg is shotn belou: I flag bgte +----------------+ (Io) I Ee.tor + count (hi) | +----------------+ ( 10) I star"ting + s e Et o t (hi) i nlnber

I

B'Jte O

| I I + |

(1) | + (3'

+ !

+ file

(4) i

nane

(5)

nan€

(a)

!

ertension (3)

i

! + pr.im€rq (6) i + (7' i + (al I +----------------+ (l) | file

+

!

i}-------------i--+

Figure 5-16

File

Dir€ctorV

For|nat

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

O P E R A T I N OS Y S T E Mc f 1 1 6 5 5 3 - -

94

aesigned: Section

bit bit bit bit

7 ! 1 if the fi le 6 = 1 if the +ile 5 = 1 if the file O=l i t O P E No u t

The fl€9

has been delet€d. is in use. i6 locked. put.

bgte cen ta*€ on tha +ol1o{ring valueg:

IOO $4O 341 $60 98O

= = = = =

entrq entrq entrg €ntig antrg

not Vet used (no file). in u5e (no.flri1 CLASEd*i1e). i n l s e T D P E No u t p u t f i l e ) . in u6e t loc&ed f il.e). available (prior fi1€ d€Ieted).

Sector coont i3 the nuftb€r of ie.to?s

FttS Fi Ie Sectoi The fo.o€t

compri3inq the +ile.

Foroat

of a gector in gour data file

is ihoun belou:

o +-+-+-,}_+-+-+-+-+ I dgta +-+-+-+-+-+-+-+-+ I file * lhi +-+-+-+-+-+-+ !to.usrd pointer +-+-+-+-+-+-+-+-+ iSl bgt€ count +-+-+-+-+-+-+-+-+ Fiquie --

5-17

Fil!

!

+O

! + I

+123

i

+127

+126

l , l 6 n e g s , r n a nSt u b s l s t e m F i l e

Sector

Fo!.mat

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_ The S bit indlcate5 {rhether oi not the Eector i9 a ,,9hort sector,' (a s€ctor containing Seuei then 125 dEta bgtee). S is equal to l uhen the sectoi is Ehort.

OPERATINe SYSTEiI CO165S5 --

Se€tion

5 95

Ihe bqte-crunt sectof.

field

€ o n t e i n E t h e n u | t l b e ro f d a t e 6 q t e e i n t h s

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 (CIO', thiE c€ction disruEse3 those the Central I/O Utilitg alaa!i.

R e si d e n t

Device Hendler Vectot's

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 _+ +---------------, +_ GET STATUS -'

+6 +8

+-___________-__ia

+SPECIAL .r---------------+ +JMP +IN IT

-+

+1O

-+

+12

+-

SPARE aYlE +---------------+ Figure 5-18

-+

Resident D€viee HandIe? Vectol.s

See S€Etion 9 $oi a detailed description +or e€ah of theFe Handlet entig points.

of the d€ta interfaEe

Each of th€ veEtorg conteing the addresE (Io,hi) of the HEndler entrq point minus 1. A technique Eimilar to th€ one sholrn belou is l.e{uired to access th€ desired routineE: O P E R A T I N eS Y S T E MC O l 5 5 5 5 - 96

Section

5

VTBASE=$E4OO

; BASE OF VECTOR TABLE.

LOX LDA JSR

*x I data EOVEC

, OFFSET TO DESIRED ROUTINE

LDX .JSR SIA

{+g'J GOVEC data

, OFFSET TO DIFFERENT ROUTINE. r OET DATA FROH ROUTINE.

VTBASE+I, X

, SAVE REOISTER A. i ADDRESS I'ISB TO STACK.

VTBASE, X

; ADDRESS LSB TO STACT(.

GOVECTAY LDA PHA LDA PHA TYA RTS

, SEND DATA TO RUUTINE.

, RESTOREFECTSTERA. , JUttP TO ROUTINE.

The Jl4P INIT slot in ea€h set of vectors initialization entrg (not lnin!E 1). The bese dddreEs of the vector Eet for h e n dl e r s i E s h o u n b e l o u : SEre€n Editor (E: ) Displag Handler (g: ) Kegboard Handler {K: } Printer Handlet' (P: ) C€rsette Handle!. (C: )

Jumps to the Hindler

eech of the r.esid.snt

E4OO. 8410. E420. E43O. E44O.

The reii.dent disftette Handler is not CIO-conoatible, interfa€e do€s not use e vecto!. set.

R e si d e n t D i r t e t t e

9o its

Hendler

The reEident Distette Hendler (not to be eonfus€d {rith the DiEt FiIe t'laneger) is responEible *or alI phUiical aac€sses to the diEkett€. The unit of dat€ tranE+er for thig HandI€r. is a 9ino1e diEkette EeEtot containing le8 data brJtes. 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 (SIO). use bg the Diskette Handler and/or. the Serial L/O UtilitU 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

nou be desc.ibed, end the Each of the DCB bgtes oill sqsten_equate fi1€ name for e€ch ui11 be 9iven. SERIAL BUS ID -.

DDEVIC TO3OO]

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. DEVICE NUI'IBER--

DUNIT [O3OI]

You set up this bqte to contain a c c e E s e d( 1 - 4 ) . cotlt4AND BYTE --

DCOi'1NOr0302l

You Eet up thiE b€ t er forned.

bgte to contain

STATUS BYTE --

the disft dtive

the disk

nu{rber to be

device .ooosnd to

DSTATS tO3O3]

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 li6t of the poesibte status codes cal1ei. See AppendixC +or: EUFFER ADDRESS--

DBUFLU CO3o4I and DBUFHI to3osl

This e-hgte pointel' containE the €ddreEs of the golrce oi deEtination of the diskette sector deta. You need not suPplq e n a d d t e s s f o r t h e d i s l s t e t ! 5 c o m m t s n d T. h e D i 5 l H e n d l e r u i I I obtein the rtatuE and inEert thE addiess of the status buffer into th i6 +ieId. DISK TII'{EOUT VALUE -. The Handler supplies

BYTE COUNT --

DTIhLO 10306] this

tlneo!t

DBYTLO IO308l

value

(in uhole 5econdE) *or'

and DBYTHI IO3O9I

This 2-b'Jte counter indicateE the nulnbei of bgtes t!'anE{eI't'edto o r f r o m t h e d i 5 t € 5 a r e E U l t o f t h e i n o s t ? e E e n t e o m f l a n d ,a n d i s set up bg the Handler. SECTORNUI'IBER--

DAUX1 TO3OA] ANd DAUXz TO3OB]

(1 ThiE 2-bgte n!.nber Bpecifies th€ diskette sector. nunber bgte' to read or' 'rrite. DAUXl conteins the leest siqnificant O P E R A T I N GS Y S T E MC O 1 6 5 5 5 - 9B

Section

5

72O) and

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

Diskette

H a n dl e r

Ther.e€re five

bgte.

Command.-

c o n t n a n d ss r J p p o r t e d b g t h e D i s k e t t e

G E T S E C T O R( P U T S E C T O R- - * * * PUT SECTOR$IITH VERIFY €TATUS REAUEST FORMATDISK

not

supported

Handler:

bU cur-rent handler

***)

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 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:

the

COill.lAND EYTE = 952. D E V I C E N U H B E R= d i s & d r i v e B U F F E RA D D R E S S= F o i n t e r SECTORNUI'IBER= eeEtor

nsrnber (1-4).

to qour 1e8-bqte bu+fer. number to read.

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, houeverPUT SECTOR (Coninand bgte ***

= $5O)

Not supported b{ CUirent Handler **lr (But cao be scc€5sed thFough SIU dir.€ctlg. )

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. D E V I C E N U I 4 B E R= d i s k

drive

B U F F E RA D D R E S S= p o i n t € r . S E C T O RN U M E E R= 6 e c t o r

number (1-4'.

to gour. t28 bqte buffe.r.

nunbei to uiite.

gever.a1 of the othe!. DCE paf€fleteis Upon return fro{tl th€ oper€tion, 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 H€ndler uritas th€ EpeEifi6d sector +r.oo qour buffer end r€tu!.ns the operation Et€tus. ThiE confiand differE froft PUT S E C T O Ri n t h a t t h e d i 5 k e t t e r o n t r o l l e i i'eads the sector d.t6 after uriting to verifg t h e 0 , l i.t e o p F r a t i o n . A s i d € f r o f t t h € C O I V I M A N D EYTE vaIue, the calling se{uence is identi{al to PUT SECTOR. STATUS REOUEST (Comltl5nd bgte

e 693)

The Hendlcr obtEinE a 4-bgt€ 6tetus +roin the diskette controller 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 harduare 9tat. +-+-+-+--r-+-+-+-+ i tioeout +-+-+-+-+-+-+-+-+ ( unleed ! i +-+-+-+-+-+-+-+-+ Figure

5-19.

D V S T A T4 o - g g t €

T h e c o o m a n ds t e t u s Bit Bit Eit 8it 8it

O = 1= 2 = 3 = 4 =

1 1 1 1 1

ronteing

indiEatEE indiEeteB indiEateE indicateE indicates

I

DVSTAT + O

i

+ 1

and

i i

Operetion

StatuE ForftEt

the follouino

stetuE bitg:

an invalid coomand fr.afte oras rec!ived. en invalid date +?ane u.E received. that e FUT op€r.6tion aas unE{Jccess+ul. that the diEtette ie urite protected. active/standb9.

Th€ harduare Btatus b{te containE the status regi5ter o+ the INS1771'1 FIoppg DiEkette Controller chip ueed in the diEftette €ontroller. See the docunentatiott for thEt chip to obtain information relating to the fieaning of eech bit in the bgte. The tioaoot bgte Eont€ins e controller'-provided value (in secondg) to be uEed bg the Handler. You Eet the follooing DCBpaian€t€t.E prio. the Dis l et te Handler:

marifiun titoeout

to calling

COI'IMANDBYTE = $53. = diik DEVICE NU|,|SER

d.ive

nunber' (1-4).

g€ve.€l of the other DCE paremeters Ugon r'sturn froo the operation, 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 DPERATINe SYSTEM C016995 --

100

Sef,tion

5

lnte.a6t '

t o go ! ,

houever.

FORI'IATDISK (Coltloand 8!te

= 321)

T h e H E n d l e . € o o d r a n d st h e d i s k e t t e c o n t r o t l e r to foroat the entir'e d i s k c t t e a n d t h e n t o v e r i f q i t . A 1 1 b a d s e c t o r n u f t b e r 6 ( r . , pt o a m€tinu$ o+ 63! are tetorned and put in the supplied buf+a.r., follo{red bg tto bqtes of a1I 1,s ($FFFFt. You 6et up the follo{rin9 DCg paraoeterE prioi. to caltinq the Di6tette Handter: COtlf{ANDSYTE = $21. D E V I C E N U H B E R= d i s t

drive

B U F F E RA D D R E S S= p o i n t e r Upon return,

gou oight

number, (1-4,.

to gour 128-br1te buffer. DCg pareneters:

b€ inte!'ested in the foIIouing

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.

UEl. T.| 1

EUE

I/U

Inpot/Output to deviceE othe|' than the k€gboe.d, the e.reen, and the ATARI Cotllputei controlLer port devires, must utilize the Sel.ial I/O b!€. This bus containE data, control, and clork Iines t o b e u s e d t o a l l o u t h e c o d p u t e r t o c o m m u n i c a t eu i t h e x t e r n a l devices on thig "daiigchained" bu9. Everq device on the bus h€g e uniqu€ idefltifier and 'ri11 respond onIg then directlq addre6sed. '

(g1O), that T h e r e s i d e n t E g E t e r np r o v i d e s a S e r . i a l L / O U t i l i t g provide3 a standar.dired high-1eveI pr-ogra&inter{ace to the bus. gIO iE 'rtilized bg the resident DiEtette, Printer, and CaEEette handler's, dnd iE intended to b€ u6ed bg nonreEident handleis {see Section 91, or' bq €pplication6? as {rel.1. For e detailed de5ct.iption o+ the prograd/SIO inteiface and for. E detBiled bu5 Epeci$iEation refer to Section 9.

OPERATINOSYSTE|'i CU16555 --

Section

5 101

Related Documents