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

10 PROCRAHENVIRONMENTANO INI TTALI ZATION

This EeEtion d isctrsEeg possible elteanative sof tuar'e envi?on0rent9


using OS Configurstions. Environnent$ othei thEn those diFcusEed
here ere a16o poEsible. A tho.ouqh !nde?itanding ot the pouer-up
€ n d s g s t e n r e E e t p r . o c e E s e s( E e e s i e c t i o n 7 l u i ! l be neresEerg to
evaluate €11 €lternative environoentg.

CARTRI DGE

Hogt 9ame9 (end some lenguag6 processorg) a.e EUpported via the
cartridge environflent. The E€r'tridge r.eEident Foftuare i5 in
c o n t r ' o l o f t h s s g E t e o , s o m e t i n e s ! s i n g t h e O S a n d E o m e t i r n e sn o t .
A cartridge can Epecifg uhether the distette i6 to be booted at
Pouet'-up tioe, urhethei the ca"t"idg€ i5 to provide the
controlling softuare, or uhether the cartridge 1s s sp€cial
diagnoEtic .artiidge. These optionE are Epecified bU bits in the
certt idge headei, as sho|,n belou:

+----------------+
! car.ti id ge i BFFA (9FFA for cert?idg€ B)
+- -+
i 5t€rt address I

r o 0 !
.i'-----__---.-i---+

i option bute i
+----------------+
I c a r t r i d9 e I
+- -+
i init addiesE I BFFF (9FFF fdr cgr.tiidqe g)
+----------------+

Figure 1O-1 Certridqe He€d€i Fornat

The b'Jte used to tsllou, the OS to determine lrn€n a


cartridge i6 inser.ted; loEation6 BFFCand 9FFC {ri11 not read re!.o
u h e n t h e r € i s n e i t h e r R A l ' td t t h o s e l o c a t i o n 6 n o r a c a r t ? i d g e
inEeited. RAMis differentiated from a cartridge b9 its abilitU
to be a I tered.

U P E R A T I N GS Y S T E I IC O 1 6 9 5 9 - - Section 1O
Th€ option bgte has the +ollouing option bite:

bit O = O, then do not boot the diskette.


1, than boot the di6*ette.

Ait 2 = O, then init but do not Etart the cartridge.


1, then init end 6tar"t the cartridqe.

bit 7 = O, then c€rtridge is not a diegnostiE EEitridge.


1, then cartridge i5 e diagnostic cartridqe €nd cont?ol
uill be qiven to th€ taitridge before anq of the 6s
is initialized (JI'IP(BFFE)).

The cattridge init sddtess Epecifies the location to uthich the DS oill
JSR during eI1 pouer-up and sqstem reset opaiEtions. AE a t$inim!m,
thig vectol. should point to an RTS in6tiuetion.

The €artridge Et€r.t addregg specifies the location to trhich tha OS


|lriIt Jl'tPdrring aIl pouer-up and sgstem reset opetatidnE, if
bit 1o+ the option bgte iE = 1 The epplication Eho!ld exe ine
t h e v a r i . a b l e I ^ T A R M SI OT OOSI if srtsten .eset action is to be
different t h a n p o u r e r - u p ( t l A R t ' l s Tu r i l l b e z e r o o n p o u , e t ' - u p e n d
n o nz e r o t h e r e a f t e r ) .

Caitridge Slithout Boot€d Support P:ckage

A cai'tr'idge thet does not specifg the di5&ette-boot option end doeE
not guppoat the cEBsette_boot pos5ibilitq c a n u 6 e 1 o { r r e rm e r n o r g
( t r o m O 4 8 O t o t h e e d d r e 6 s i n M E M T O Pt o z E s l ) i n e n g u a u i t s e e g
fit.

Cartridge tlith Booted Support Package

A cat'tridge th€t does specif! the distette-boot option or does


Euppoit the EEs6ette-boot possibilitU | n u s t u s e 5 o f l r e€ € r e i n i t E
uEe of louer lnenorq, The follouing regions are de+ined:

O4AO-O6FF is Eluaqs svEllable to the certridge.


MEMLO/l'lEt'{TO
r ePg i o n i s a l u r a U s a v a i l a b l e to the carttidge.

DISKETTE-BOATED SOFTI^JARE

Softueie can be booted {rorn the di5* drive at pouei_!rp tifie in


regponiie to one of the follot!ing conditions:

O P E R A T I N GS Y S T E HC O 1 6 9 9 5 - - Section 1O
154
Neither C6rtr idge A nor B is inser'ted.

C a i t t ' i dg e A i 6 in6erted 3nd haE bit O of its option bqte


IBFFDI = 1.

Certr id ge B is inEerted and hes bit O of its option bqte


t9FFDl = 1.

If an{ o{ these €onditions are met, the Og uil l ettenpt to r ead


t h e b o o t r . e c o r d + r o m s e c t o r . * 1 o + d i 6 t d r i v € 1 and then trans+er
Eontrol to the Eoftlraie that u65 ie€d in. Tha exaEt sequenc€ of
operations uill b e e r p l € i n e d l a t 6 t i n t h i s s e at 1 0 n .

Di stette-Boot File Form€t

The leg region of a diEkette-boot file is the first 5ir bgte5, uhich
are formatted aE shourn beloor:

+-*--------------+
i flags i +irst bgte
+----------------+
i L of Eectors i

i nemorg addfeBs I

i to 6tait 1o€d i

! init !
+-
I address i sixth brrte

! boot I
! cont inu€ti on I
I .ode I

Fi..ur.e 1O-2 Dislette-8oot Fil€ Forftat

T h e f i r B t b q t e i s s t o i € d i n D F L A G St O e 4 O l , b { t i5 otheiurise
unu€€d. It should eqlel rero.

The Eecond bltc contains the nufibe? of 128-bqte diskette 9ecto'l'5


to be read aE pa.t of the boot process (including the reco?d
containing thit inform6tiont. ThiE nunber Een r'5ngt ftom 1to
259, {rith O meaning 256.

O P E R A T I N GS Y S T E I IC O 1 6 5 5 5 - - SeEtion 1O
1s9
The third and forr.th b!te6 contain the eddresF (1o,hi) at uhiEh to
stert Ioading th€ first b{t€ of the +ile.

T h e f i + t h a n d s i r t h b q t e E € o n t a i n t h e a d d r e s s ( l o , h i ) t o u r h i E ht h e
booter uill trans*et contr.ol after. the boot procesE i6 complete
a n d u h e n e v e r t h e t S Y S T E MR
. ESETI teg is pressed_

t r J s t e m( F M S ' h a 6 e x t i E b g t e i a g F i g n e d t o
T h e D i E l e t t e F i l e I ' l a n a g e m e nS
its boot record, but this i9 a sperial €aEe of the gener'Elized
disftette-boot €nd is dis{os9ed in Section 5.

D i Ek e t t e - B o o t Pr oce5s

If no cartridge iB inst€11ed, then the di5kette uritl follou theEe


ste96 to boot !n:

1. Read the fir.st diek€tt€ record to the caEEette buf+er tO4OO:.

2. EttrEct inforfiation +rom the +irst Eir b{teE:

S a v e t h e f l a g s b g t e t o D F L A G S( 0 2 4 0 , 1 1 . S 6 v e t h e * o $ s e c t o r s
t o b o o t t o D B S E C Tt O 2 4 1 , 1 1 . S e v e t h e l o a d e d d r e s E t o E O O T A D
foe42,2l. Save the iniiielization address in DOSINI IOOOC,Al.

3- Move the record Just read to the load Eddreg6 sp€cifled.

4. ReBd the remaining records dire.tlg to the 1o€d erea.

5 . J S R t o t h e l o a d a d d r . e s s + 6u r h e r e a o u l t i E t € 9 € b o o t p r o c e s B € e i l
continue. Tfte csi.r{ bit indicsteB the success of thrE
opereti.on {car.rg s€t = el.for, rarrg resEt = EUcceEri).

NOTE: During 6tep 5, dfter the initiel boot proE€Es rg


conplete, the booter uill trans+er contr.ol to the seventh bUte
of the firgt record. The soft{,r6re should continue the boot
ptoEers at thi6 point, if it is e oulti6tage boot. The vElue
o f l ' { E l , l L Ot O A E T l s h o u l d p o i n t t o t h € f i r . s t f r e e R A M I o c a t i o n
begond the Eo+tuere JUEt booted. It Ehou!d be estebliEhed bU
the bootsd softuare aB shou,n belour:

LDA *END+I , SET UP LgB.


STA MEI'ILO
STA AFPiIHI
LDA *END+1,/256 i SET UP tlSB.
sTA t'lEi,|LO+1
STA APPI,IHI+ 1

If the booted softuare i5 to tele control of the


sqsten at the end of the boot operation, the
vetto. D O S V E CI O O O A I m u 5 t b e E e t u p b g t h e
e p p l i c e t i o n a t t h i s t i o e , D O S V E gp o i n t i t o t h e

O p E R A T I N eS Y S T E MC O 1 5 5 5 5 - - Section LO
160
rertart €ntr{ for the booted application. If the
booted goftuare iE not to take control, then
D O S V E C5 h o u l d r . e n a i . n u n . h € n o e d .

LDA *RESTRT ; RESTART LSB.


STA DOSVEC
LDA *RESTRT,/256
STA DOSVEC+1

6. JSR indirectlq through DOSINI for initialj.letion of the


appliration, the appli€Btion uill initislite and return.
NOTE:The OS enters the initielizetion point on €verg
595tefi re6et end 9o{rer-up. lnteinal initiatiz€tion can tat€
p l a E e d u r ' i n 9 s V B t e | nr e 6 € t a n d p o u e r - u p a E d e l l . Initiatization
can alEo be def€rf€d until Step 7 for. €ontrol1in9
applications.

7. JtlP indirectlg through D O S V E Ct o transfei rontrol to the


epFlication.

MITE: PieEsing the C S Y S T E MR.E S E T ! f t e q a f t e r t h e a p p t i c a t i o n


is +ull.g booted uill cauge rtep6 d and 7 Eo be i.epeated.

SaftpIe Dis kettF-Bootab t e Progr"emLiEting

Thi6 s&eletal p.ogram can be booted fr.om the di6ftette. It r.eteins


contt'ol rrh€n it is entered.

, THIS IS THE START T]F THE PROGRAI'{


FILE.

PST= +O7OO , (OR SO}IE OTHER LOCATION).


,r= PST I (. oRG).

; THIS IS THE distette-boot C B N T R O LI N F O R T ' i A T I O N .

.BYTE O i
.BYTE PND-PST+I27 / 12e i NUI'IBEROF RECARDS.
. IIORD PST , MEMORYADDRESSTO START LOAD.
. [ ^ , O R DP I N I T ; P R O o R A hI N I T .

I O16555 --
O p E R A T I N eS Y S T E I ' C Section 1O
L61
; THIS IS THE START OF THE BOOT CONTINUATION.

LDA #PND ; ESTABLISH LOW MEHORYLIMITS.


STA T,IET,ILO
STA APPI,IHI
LDA *PND/256
STA l"lEMLO+1
STA AFPiH I+ 1

LDA #RESTRT ; ESTABLISH RESTART VECTOR.


STA OOSVEC
LDA *RESTRT/256
STA DOSVEC+1

cLc ; SET FLAG FOR SUCCESSFUL BOOT.


RTS

; A P P L I C A T I O N I N I T I A L I Z A T I O N E N T R YP O I N T .

PINIT RTS ; NOTHINC TO DO HERE FOR . . .


, ... CONTROLLING APPLICATION.

; THE i'1AIN BODY OF THE PROeRAHFOLLOWS.

RESTRT=*

i THE I'IAIN BODY OF THS PROORAMENDS HERE.

PND= IT J 'PND' = NEXT FREE LOCATION.


. END

Fiqure 1O-3 Diskette-Boot€ble Prog.afi LiEting Example

Progrem to Creete DiEkette-Boot FiIeE

This gection provideE € pl.ogr€fl that can be used to tnakeboot€ble


files on diEftetteE. Ihe piografi given is not the onlq one possi.bler
end no €1Eifts ere made a6 to its eleqance.

OPERATINOSYSTEI'ICO16553 -- gection 10
r62
Shoun belou i6 € listing of the progralll to rreat€ diskctte-boot fiIeE.
; I TES A SINCLE "FILE" TO THE DISKETTE AND IS
THIS PROCftAI{T.IR
. i USED IN CON.JUNCTIONI.IITH A PROCEDURETO I.IAKE DISKETTE-
i SOOTABLE FILES. THE FOLLO{'ING TI.'O SYMBOLS I.IUST BE EOUATED
, USINC THE I.IEI{ORYLti,IlTS OF THE PROERAfiTO BE COPIED:

, /PST. = PROoRAHSTART ADDRESS (SEE


'PND. = PROeRAT'| AAfipLE PROCRAH).
r END ADDRESS (SEE SAMPLE PROGRAH).

s E C S1 Z = 1 2 8 i DIs(ETTE SECTORSI ZE.


PST= $O7OO
PND= 913e4
FLEN= PND-PST+SECSIZ- 1,/SECSIZ , * OF SECTORStN FILE.
+= gDOOO ' T H I S P R O O R A f I ' SO RI G I N .

BOOTA BRK i **+ LOAD APPLICATION +**


; SET UF DEVICE CONTROLBLOCK FOR DISKETTE HANDLERCALL

LDA *FLEN , {* 0F SECTORSTO t'RtTE.


STA COUNT

LDA {+1 ; DISK DRIVE *1.


$TA DUNIT

LDA *'I"' , SET UP FAR {RITE I.IITH CHECK.


STA DCOf''ND

LDA *PsT ; POINT TO START OF APPLIC. PROE.


STA DBUFLO
LDA {+PST,/256
STA DBUFHI

LDA *O1 ; SET UP STARTINGSECIOR* = Ooo1.


STA DAUX1
LDA *OO
STA OAUXz

OPERATINGSYSTEI.ICO16559 -- Section 10
163
, NT]WI.'RITE THE FILE ONE SECTBR AT A TIME.

aDTolo JSR DSKINV , TJRITE ONE SECTOR.


BHI DERR ; ERROR.

LDA DBUFL0 ; INCREHENT I'IEMORYADDRESS.

AOC *SECSI Z
STA DBUFLO
LIA DBUFHI
ADC #O
STA DSUFHI

INC DAUX1 , INCREHENTSECTOR*.


8NE BOTOAO
INC DAUXz

8OTO2O DEC COUNT ; HURE SECTORSTo IIRITE?


BNE BO'O10 ; YEs.

ARK ; STOP {.|HEN DONE.

DERR BRK ; STOP ON ERROR,

COUNI *=*+1 ; SECTORCOUNT.

, THIS IS THE CARTRIDCE HEADER

*= *BFF9 ; "Atr CARTRIDGE.

INIT RTS
. r"roRD 900T0
. BYTE O,4
. I . J O R DI N I T

. END

CASSETTE-BOOTED SOFT}IARE

You can boot so+tuere fr.om the cassette as {rell aE fr'om the
di€lEtte, at por{€r-(Jp. The +ollorrring requiredents must be et in o.der
to boot froo the caisette:

o You mrst be pressing the ISTARTI keg as pouer iE


epplied to the srJEten.

o A cassette tale uith e propei boot fordat *iIe muEt be


in6tal1ed in the caEsette d.ive, €nd the PLAY button muEt be
oae9secl-

O P E R A T I N GS Y S T E MC 0 1 6 5 5 5 - - gection 10
164
tlhen gou aae given th€ audio prompt bg the caEsette
h a n d l € r . r J o r ,f l r u s t p r e s s t h e t R E T U R N I l e V .

I+ alt of these conditionE Ere ftet, the OS uill reed th€ boot fil€
frotn the ca6eette snd then transfe. control to the Eo+ttrr6ie that
uar reed i n . l h e e x a c t r i e q u e n c eo f o p e r a t i o n 6 | , i 1 l b e e x p l e i n e d
Iater in th is rection.

Caesette-Boot File For|rlet

The *eg region of a ce5gette-boot file is the +irst cix bqtes, that
are fornBtted:E s h o u , nb e l o t r :

+----------------+
i * o{ RecordE i
+-*--------------+
i l,lemorq Addr.ess ,
+-- --+
i To st€it Load
+----------------+
I Init

! addres€

The firEt bgte iE not uEed bg the cass€tta-boot ptoceEs.

The sEcond bqte conteins the nuftber of 128-bqte cE!tsette teco.ds to


be regd as par't of the boot process (inclrding the recoiel
containing thig inforflation). Thi6 number Een renge f?om 1to 295,
uith O meening 256.

The third end fouith bgtes cont€in the addret! (Io,hi) to thich the
bootef uill trans+er contl.ol a+ter the boot pioces5 iE cot$Plete end
u h e n e v e r t h € I S Y S T E i | .R E S E T I k e v i E p r . e s 6 e d .

Cessette-Boot PFocess

The ca5sette-boot process iE deEcribed step_bg-5teP for a


configur:tion in th€t no tar.tridge 15 inBtellEd and no disLett€E ar'e
att€ched. For the general c€se Eee Section 7.

1. Read the firEt caEsette !.ecord to the a355ette bu+fet'.

2. Ertract infdroetion from the firEt Eir bgteE:

0 F E R A T I N e g Y S T E HC O 1 6 5 5 9 - - gection 1o
L65
Sdve the * of r-e.or.ds to boot. Save the load address. Save
the initialiration €ddreeE in CASINI COOOZI

Mov€ the record JoEt .€6d to the load EddreE6 6pecified.

4. R6ad the remaining recordr directlq to th€ load €rea.


JSR to tt6 load addrese+6 uhere a fiultiEtege boot pnocess
Ean continuei the c€rr.g bit rrrill indic€te the succe6s o+
this opeiation (carrg set=error, carrq resst=6uccess).

JSR indi.reEtlg through CASINI for' initieliration of tne


application; the epplicetion uill initialite and r€tut"n.
7. Jl{P indir€ctlV through D B S V E Ct o t r E n s f e i control to the
application.

PtaE6ing the ISYSiTEH R.E S E T I l e g e f t e r t h e € p p 1 i € E t i o n i6 fullg booted


qrill c€use Eteps 6 and 7 to be repeEted.

NOTE: After the initi€l boot proceea is codrpleta, the boot€r uitt
tiensfea control to the seventh bgte of the Sirit re:ot'd; at thie
point the 6oftuar6 ihould continue the boot protesE (if it iE a
nulti.stage boot, €nd then gtop the csgEette drive, trhich due to e
s{etem bug {rill 6till be running, uEing the fotlouing inst!.uction
S A q U 6 n Ee :

LDA f$3c
STA PACTL TDSOA]
The :pplication s h o u l d t h e n E e t a v : 1 u e i n M E l , t L Ot } 2 g 7 ) t h e t
p o i n t E t o t h e + i r . E t f r e e R A l , ll o a a t i o n b e g o n d t h e s o f t u e r e
Just
booted, as shoun belou:

LDA {+Et,lD+1
t'tEHLO
STA APPT'IHI
LDA {iEND+1/256
5TA I'iEHLO.i 1
STA APPT'IHI +1

If the booted softureie is to tafte contiol o+ the 6Vsten at the end


o f t h e b o o t o p e r a t i o n , t h e v e c t o i D O S V E CI O O O A I m u ; t b e 5 e t u p b g
t h e 6 p p l i c a t i . o n a t t h i 6 t i f n e , D O S V E Cp o i n t s t o t h e r e E t € r t e n t r . q
for the boot6d appli.ation. If the booted Eoftl,aie iE not to tale
controL t h e n D O S V E CE h o u l d r . e l t l a i n ! n c h € n g e d .

LOA *RESTRT , RESTART LSB


9TA DOSVEC
LDA I+RESTRI,/256
STA DOSVEC+1

NOTE: The init ialization point i5 enter€d on ever.q EqEtemreEet


and Pouer'-upi internel initiali?ation cen take plate he!.e.

{ 016555 --
O P E R A T I N GS Y S T E I ' C Se.tion 1O
166
For aontrolling applications initiali!ation can alEo be deferred
unti I step 7.

Sa|np
1E Ca6sctte-EootabI€ Program Lirting

S h o tn b e l . o U i s a s l e l e t a l program thet csn be boot€d fr.on the


ca99ette and that retains Eontrol uhen it is entered.

; THIS IS THE START OF THE PROeRAMFILE.

PST= $O7OO ; (OR SOME DTHER LOCATION).


*= PST ; (. ORG).

, TH:S IS THE c€EEette-boot C O N T R O LI N F O R M A T I A N .

.BYTE 0 ; ( D O E S N . TH A T T E R
).
.8YTE PND-PST+!27/128 t NUMSEROF RECORDS.
. trORO PST ; IIEMORY ADDRESS TO START LOAD.
. [|ORD PTNIT i P R O o R A MI N I T .

; THIS IS THE START OF THE B[]OT CONTINUATION.

LDA {f$3C i STOP THE CASSETTE.


STA PACTL

LDA {+PND , ESTABLISH LOt, t'lEt'luRY LII'IIIS.


STA I'IEMLO
STA APPIIHI
LDA *PND,/2'6
STA MEMLO+I
5IA APPI.IHI+1

LDA {+RESTRT ; ESTABLISH RESTART VECTOR.


5TA DOSVEC
LDA *RESTRT,/E96
STA DUSVEC.|I

CLC , SET FLAO FOR SUCCEESFUL EOOT.


RTS

; APPLICATIONINITIALIZATION ENIRY POINT,

PINIT RTS , NOTHINO TO OA HERE FOR . . .


, ... CBNTROLLING APPLICATTON.

; THE MAIN BODY OF THE PROERAMFOLLO!.'S.

RESTRT=L

, THE I'IA'N BODY OF THE PROCRAI'IENDS HERE-

OPERATINCgYSTEi'l CO16355 -- Section 10


lb7
PND= * i ,PND' = NEXI FREE LOCAIION,
. END

Figuie 1O-4 saftpIe C:sEette-8oot€ble Piogram

Progia|n to Create Ca6Eette-Boot Files

This s6ction provides a progrsm Iieting that €an be !sed to fiate


bootable files on caBsette tepe6. Ths prograft given is not the onl!
one posEible, €nd no cleilns are made €s to its e16gance.
gihoun belou is e Iisting of the prograrn to .r.egte ts {tsEsette-boot
fi.le:

I THIS PROCRAIII4RITES A SINGLE FILE TO THE CASSETTEAND 1S


, USED IN CONJUNCTION[.'ITH A PROCEDURETO I'IAKE CASSETTE.
' BOOTABLE FILEs. THE FOLLOI.'INO TWO SYMAOLS MUST BE EOUATED
; USING THE I'{EI.{ORY
LTHIT9 OF THE PROGRAI.ITO BE COPIED:

, 'PS|T' = PROCRAI,I
START ADDRESS (SEE SAMPLE PRACRAT'I
).
, 'FND' = PROGRAI,I
END ADDRESS (9EE SAI'IPLEPROGRAM).

PST- *O7Oo
PND= i1324
FLEN= PND-PST+1?7/ l?A*12A , ROUNDUP TO IIULTIPLE OF leA.

*= iEOOO /S 6RIGIN.
I THIS PR0GRAM

IOOTB LDX *91O , USE IOCB *1.

; FIRST APEN THE CASSETTEFILE FOR 9IRITING.

LDA *OPEN ; SET UP FUR DEVICE "APEN. "


sTA ICCOf,t,X

LDA *OPNOT , DIRECTION IS 'OUTPUT. "


STA ICAXl, X
LDA **BO ; SELECT SHORT IRG.
sTA I CAXa, X

LDA *CFILE , SET UP POINTER TU DEvIcE NAt'tE.


5TA ICBAL, X
LDA *CF ILE/296
STA ICSAH, X

JSR CIOV ; ATTET{PTTO OPEN FILE.


Bll I CERR ; ERROR.

r NOW WRITE THE ENTIRE FILE AS ONE OPERATION.

I O16595 --
O P E R A T I N eS Y S T E F C Section 10
164
LDA I+PUTCHR , sET UP FOR "PUT CIIARACTERS."
sTA rccor.r,
x
LDA {*PsT , P81NT TO START OF APPLIC. PRAC.
STA IC8AL, X
LDA *PST,/436
STA IC8AH, X

LDA *FLEN , gET UP * AF BYTES TO $'RTTE.


STA ICBLL, X
LDA *FLEN/256
5TA ICBLH, X

JSR C IOV ; t.IRITE ENTIRE FILE.


BI'II CERR i ERROR.
, NOW CLOSE THE FILE AFTER SUCCESSFUL I4,RITE.

LDA {+CLOSE r SET UP FOR "CLOSE."


STA ICCT]M,X

',SR C IOV J CLOSE THE FILE,


BH' CERR , ERROR.

J STOP WHEN DONE.

CERR 8RK , STOP ON ERROR.


'\-, CFILE "C: ", CR ; FILE NAt'18.
. BYTE

i THIS Ig THE CARTRIDEE HEADER

*= 3BFF9

INIT RT9
.I.IORD BOATD
, BYTE O,4

,I.'ORD IN IT
. END

O P E R A T I N CS Y S T E I IC O 1 6 5 5 5 - - Section 10
t6s
11 ADVANCEDTECHNICUE$AND APPLICATTON NOTES

This s€ction piegents infoift€tion to use the capabilitirs of the OS


end sooe of the hErdl,€re catabiliteB that aren't diiectlq avaitable
through the OS,€nd in fact, can be in direct conflirt orith !artE o+
the O5.

SOUND CENERATION

T h e B S u E e E t h e P U K E Yc o u n d g e n e r a t i o n c a F a b i l i t i e E o n l g i n t h € L / u
5ub996t€o, +or cEss€tt€ FSK tone generation? €nd +or the ,,noisg
bu6" option in SIU.

Capabilitier

T h e h a r d l r e r e p r o v i d e s f o u r i n d € p e n d e n t l V p r o g r e m m a b l es u d i o
channel6 that are fiixed and ient to the te1€vi6ion set as part of
t h e . o m p o E i t e v i d e o E i g n a l . T h E p O K E yr e g i s t e i s s h o u n b E l o u a . e a l l
concerned {rith sound rontaol (a6 desEribed in the ATARI Hoo€
C o f l p u t e r H a r d u a r e I ' l E n u a l) _

AUDCTLIDzOA] A u t ti o c o n t r o 1 .
AUDC1 lD2oll and AUDF1 CD2OO! Channel l r ontro l.
AUDC2 tD2O3l end AUDFAtDpo2l C h a n n e l ? c o nt F o l .
AUDC3 tD2O9i and AUDF3 tD2O4l C h a n n eI 3 r o n t r . o l .
AUDC4 tD2O7l End AUDF4 tD2O6l C h a n n eI 4 Eo n t r o 1 .

Con+lictE lJith OS

There are t{ro potential con+lictE 0 r i t h the OS invo 1vj.ng sound


gene16tion:

The OS can generatE it! oun gound5 and th e n t u r n o f f a l l gounds


e5 pE?t of I/O operetion6 to the .as€ette end the Eerial bus
PertpheaalB.
T h e O S d o e g n o t t u r . n o f f s o u n d s u h e n g o u press !SYSTEfYI. RESETI or
tBREAKI. If the eoundE€re to be turned off undet'tho9€
c o n d i t i o n s , t h e c o n t r o l I i n 9 p r o g r e n r u E t p r o v i de t h E t c a p e b i I i t g .

O P E R A T I N OS Y g T E t ' lC O 1 6 5 5 3 - - Section 11
r70
SCREENCRAPHICS

H a r d u r a r eC a p a b i l i t i e g

Th€ harduare cEpebilitieE for screen preEentations are quite


versatile, the OS uses a v€rq EnaIl emount of the [apabilitg
provided. The neanE of ettengion, houever, ar.e non-trivial, and
neling chahg€s to e screen forftEt irhil€ still utiliring tho
resident DiEple{ Handler {rill bs dif+icult. See the ATARI Hone
Conputea Hard{rare Manoal for infornation regar.dinq screen
PrEsentationE.

O S C e p € bi l i t i e E

Tha re6ident DispleU Handler arbit.arilg supportF I of the 11


p o i s i b l e f u l l s c r e e n m o d e s ( 1 1 o f l 4 l r l o d e si f t h e e T I A c h i p i E u i e d
in pl€se of the CTIA,. The reiident DiEplaq H€nd1€r ellou6 for en
optional "€plit-srre€ni t e t t u i n d o u o f f i r e d 9 i ! e . T h € h a r . d ta r e
allorls for oanv nore optiong thgn the Displag Hsndler EUpportE, €s
r r r i l l b e E e e n b g r e E d i n g t h e A T A R I H o l n eC o l | l p ! t e r H e r d { r € r e
M a n u e1 .

Cu?Eot'Control

You can contiol the Displaq HandIer.tert and graphicE cursorg


diidctl.{ (see Se€tion 5 €nd Appendir L, B1-4}.

C o1 o r C o n t r o l

You cen e1t€r. th€ coloa l'egi6ter asEignftents that the Displag
H € n d l e r ' n e l e 6 u p o n € I l O P E Nc o m m a n d 5 ( 6 e e A p p e n d i x L B 7 - e a n d
elselrheret. Note that sve.9 Eqstern ies€t or Dirplaq Handl€r. OPEN
uilI r e s e t t h e v a l u e 9 b € c l t o t h e 9 { r s t e r nd e + a u l t .

OPERATINOSYSTEM CO16555 -- Section 11


L71
AIterh€te C h € r a c t € r S et B

Tto ahBracter. sets at.e avsil€b1e in screen tert modes t end


A. The
v a l u e s t o r e d i n t h e d e t B b 6 E e v a r i a b l e C H B A SI O Z F 4 ] i e l e c t s t h e
chaiacter set of inte.eEt to !ou. The default vslue ;f $EO
provideE capital (!ppe.ca6e, letters, nunbers and the punctuation
ch€recters.corr.esponding to displag codes gAO thFough gSF in
Appendix Et. The alternate value o+ SEA provides lo;e?caEe Iett€rs
and the special charerter giaphiEs set (;orresponding to diEp169
code€ S60 th.ough $7F end gOOthrough $1F in A;pendi; E).

UBer-de+ined €haracter setE cen aleo be obtained +or tert node,6


0,
1,
-and a btt providing th€ chat,a.t€r ,natrix definitiorlE in RAtland
s a t t i n g C H B A St o p o l n t t o t h o s e d e f i n i t i o n s . C H B A Sa I l r a g B c o n t a i n s
t h e . f n o s tE i g n i f i c a n t bits of th€ nemorg €ddfess of the gtart of the
ch€ract€r definitionE, a6 shoun belo{rl:

7 0
+-.t-+-+-t-+-+-+-+
CHBAS I MSB !r r! T€rt node O
+-+-+-+-+-+-+-+-+

+-+-+-+-+-+-.i-+-+
i MSB lxl Tert dodes l and 2
+-+-+-+-+-+-+_+_+

Figure 11-1 U s e r ' - D e + i n e dC h a r a c t e r S E t B i t M € r n o r qA d d r E s s e s


(X indicates an ignored addr.€ss bit
egsuoed to be O. '

I 016595 --
O P E R A T I N GS Y S T E I ' C Section 11
172
EEch charaster iE defined b9 an E x E bit rnatiiI, the
c h E r a c t e r ' e ' i s d e f i n e d a s t h o u n bel ou:

7 0
Bgte +-+-+-+-+-+-+-+-+
l0totototolotoiol o
+-+-+-+-+-+-+-+-+
rototM!r.!liorot
+-+-.i-+-+-+-+-+-+
! o ! 1 t1 ! o t1 r 1 i o ! o l
+-+-+-+-+-+-+-+-+
i o i 1 i 1 i o i 1 rl l o ! o l 3
+-+*+-+-+-+-+-+-+
i o t 1 t l l o i 1 r1 ! o t o i 4
+-+-+-+-+-+-+-+-+
t o t1 i l t o i o r 0 r o t o l
+-+-+-+-+-+-+-+-+
toto!1t1!t.ioiol 6
+-+-+-+-.'-+-+-+-+
rorotorotoioiotot
+-+-+-+-+-+_+-+-+

Figure 11-? UEer Defined I r I Ch€r'€cter |latrix Bit Table

The stor.age for the character E € t i n v o l v € 5 e i g h t ! onslE t t ive


bgtes for eech chaiactei uith chaiacters otdeted .ongerut ive l g bg
t h e i r i n t e r n e l E o d e v a l u e ( 5 e e t h e d i E c L r s g i o n i n A p p e n di x L
re lat in9 to 9591.

+---------------+
Ch e r e c t e r base ! ChEracter for i
I cod€ tOO I I bgtet
+-------_-------r
lCha.act€r +or i
i .ode *O1 | increeEing addreEseE
+__-------------+

+-----___------*+
lchar"ecter +or. i
I code S7E i
+--re-----------+
i Chara€ter for :
i code $7F i
.t---------------+

F i 9u r e 1 1 - 3 Chd.ac ter Base Diaqrai|l

PLAYER/HISSILE ORAPHICS

The OS nakes no u5e of the plaqer/missile generation capabilitq


o f t h e h a r d t , a r e . I t c € n b e L r s e di n d e p e n d e n t l g o f t h e O S u r i t h n o
€ontl ict.

O P E R A I I N CS Y S T E HC O 1 6 5 9 5 - - Section 11
H a r d u r a r e C a p a bi I i t i e s

T h e h a a d u a r - ee l l o u s a n u m b s r o f i n d e p e n d e n t l g m o v e a bl e s r r e e n
o b J e c t E o f l i ! r i t e d { r i d t h t o b e p o s i t i o n e d a n d | n 0 v e de b o u t t h e
sEreen {rrithorrtaf+ecting the ',plagf ietd,, (bit-dl€pped qraphics or
Eh€racter) data. Prioritg contiol BllouE the verious obJects to
heve a displag p.eced€nce in c€se of con+1ict (overlapr.

Conf I ir ts l'rith OS

You |nust assore that the Fla{erlnisEile data is


a d d i e E s - € 1 i 9 n e d a E r e q u i r e d b 9 P I V I B A S tED 4 O 7 l . y o u E l s o m u 5 t
find a 5!itable free srea th€t the OS guErentees to be free under
alI environ ents-

READINE CAME CONTROLLERS

The OS reeds the gane controlleis (shoun belou) €E D€rt of the


s t a q e e V B L A N Kp r o c e s € ( s e e A p p e n d i x L J 1 - 9 ) :

J o ! s t i c * s . / t r . i 9g F r 6 1 - 4 .
P a d dl e c o n t r o L l € t s / t r . i g g e r . s 1 - 9 .
Driving contiollerE./trigger6 1-4.
Light pen/tr iggei

In addition to theEe iontrollers, other in+ormstidh can be sensed


or Eent using the P!A €hip to thet th€ con6ole connecEorE€re
i.nterfeced.

K e r r bo d r d C o n t r o l I e r S e n s i n g

Data can be read +ro|n en ATARI legboerd cont?ol1€r connected to the


first po.t. ThiE program alters l.egisterg on e chip celled a pIA.
To 5et these bact to the defautt velues to do futther I/O, hit
t S Y S T E MR
. ESETI ol' PUKE PACTL,60. If this pr.og"an is to be loaded from
dislette, u s e L O A D , n o t R U Na n d o r a i t f o r t h e b o s v t i g h t o n t h e d i s k
dtive to go out. Do not €recute the Frograo be+ore thiE light goes
out, other.{riEe the dislette continues to soin.

1 O R A P H I C SO
5 PRIf{T :PRINT " KEYSOARDCONTROLLERDE|'IO "
1 0 D I I t R O ! r (3 l , I $ ( 1 3 l . E U T T O N $1( )
30 GOSUB 6000
40 FUR CNT=I Ta 4
6 0 P O S I T I A N 2 , C N T * 2 + 5 :P R I N T " C O N T R O L L E R
* " ; C N T ," , " ,

I O16555 --
O F E R A T l N OS Y S T E I ' C Section 11
t74
70 NEXT CNT
EO FOR CNT=1 TO 4:EOSUB TOOO:POSITION 19, CNT+CNT+s:PRINT BUTTON$,
: NEXT CNI
120 eoTo ao
6000 REH ** SET UP FoR C0NTR0LLERS+*
601O PORTA=54O16:PORTE=54017:FACTL=S4O1E:pgCTL=94O19
6oe0 POKE PACTL,4A: POKE PORTA,2S5:pOKE pACTL, SA: POKE PORTA,??1
6025 POKE PBCTL,48: POKEPORTB,2SS: pOKE pBCTL, Sg: FOKE PORTB,Aal
( O' =239 : ROW( 1 ) =2a1 : ROH( e ) =1A7: ROt,( 3 l = 1 1?
6030 ROt^l
6040 I$=" 1234567S9*Ott,'
6090 RETURN
TOOOREH *r+ RETURNBUTTONg t,tTH CHARACTERFOR FUTION ITHICH HAS
BEEN PRESSEDON CDNTROLLERCNT (1-4!. **
7OO1 REt'l ta NOTE: A I WILL 8E RETURNEDIF NO CoNTROLLERIS
CONNECTED.**
7OO2 RET.{*I1 A SPACE I,IILL BE RETURNED IF THE CONTROLLER IS
CONNECTEDBUT NO KEY HAS BEEN PRESSED. **
7OO3 PORT*PBRTA:IF CNT>z THSN PART=PORTB
7OO5 P=l
TOOS PAO=CNT+CNT-2
7O1O FOR J:O TU 3
7O2O POKE PORT,ROW(J)
7O3O FOR I=1 TO lo:NEXT I
7O9O IF PADDLE(PAO+I)}1O THEN P=J+J+J+2: COTO 7O?O
7060 IF PADDLE(PAO)>1OTHEN P=J+J+J+3: GOTO 7O9O
7O7O IF STRIG(CNT-I)=O THEN P=J+,J+J+A:COTO 7O9O
TOAO NSXI J
7O9O BUTTAN$=I$( P, P )
7O?5 RETURN

Figure 11-4 Reeding D€t€ From en ATARI Kegboar.d Cont.oller

OPERATINo SYSTEM CO16$9t -- Soctioo 11


175
ThE t€ble beloo, shous the vafiable/regiEter v€lu€! used for reading
k e u bo a i d c o n t r o l I e r . + r o m € a c h o f t h e + o u i c o n t r o l l e l ' D o r t E .

Port 1 Port 2 Po"t 3 Port 4


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
PORT A
direction FO - t - l
bitg
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
I PORTB
idiiection FO
lbits
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
i Po"t A
i fgrr, 6€1
i e ct
+_+-+-+-+-+-+-+-+_+-+-+-+-+-+_+_+-+-+-+-+-+
I PortB I EF, DF, I
i rou, ge- i -
i lect I
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
i Coluon IlPADDL1 IPADDLS iPADDLS iPADDLT I
! S€n6e | | i I I
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-.t
I Coluon 2IPADDLO IPADDL2 IPADDL4 IPADDL6 i
I Sense i i i i I
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
i Colurnn SiSTRIGo !STRIOl ISTRIeA iSTRIeg I
I Sense i I I i I
+-+-+-+-+-+-+-+'+-+-+-+-+-+-+-+-+-+_+_+-+-+

Figure 11-s A T A RI K € g b o a r d C o n t r o l l e r varisb I e/RegiEter Val ue


T€bIe

Front PaneI Connectors €E I/O Port9

T h e t h i ' e e p e g e 5 t h e t f o l l o u s h o u h o t E o l n eo f t h e P i n q i n t h e f a o n t
panel (geme rontrollerl connectors csn be used as generel I/O pin5.

Harduat e In+oidlat ion

PIA ( 6520 / 6A201


Out: TTL level6, I Ioad
In : TTL leveI6, I load For more infor{rr€t ion refer
t o 6 9 2 0 . h i p m 6 n u al .

OPERATINCSYSTEMC t 1 1 6 9 5 5- - gection 11
176
Port A Circuit (t!pical):

1d\.-r-lraEk
6 9
v
l " l €I e c o n n e E t d r , F R o N T v i e u ,
Pin B = Gt'ound
Pin 7 = Vcc 8+5v +)
Port B CiFcuit (tgpical):
+5 N o t e : S c m A m ax i f t u m
(B) totel external drain
4. 7K
o n p o u J a r 9 u pp 1 g a l l o u e d
6520
Port

"Trigger" Poit C i r e u i t ( t g p i c a l ) :

220

Softuafe In+ormEtion

69g0 PIA: (Thie slEo pertainr to elI of the folloning: **)


Po.t A contr.ol (address D3Oe)

7 6 5 4 3 2 o
t,hite thiE into this regist€r

Poit A Dete/D€ta direction addl.es


ing rontrol
O = Data oirection iE at D3OO
1 = d€ta iE at D3OO

P o r t A d a t a d i r 6 E t i o n ( a d d r e s 6 D s O O)

7 6 9 4 3 2 1 0

Wt'ite thiE intD thiE regiEtet.

Data directiEn control

1 = O u t
O = In

UPERAT I D16555 --
I N O. S Y S T E I ' C Se{tron 11
177
P o r t A d a t e ( a d d r e s s D 3 o o'
3 2 1 0
Reed or Write this regiEter
4 3 2 L 4 3 2 7

Jac k 2 Jeck I
Pi.n Nunbers

Port B Contiol (add.eEs D303)

I 1 1 X o

6520 PrA:
Poi t B C o n t r o l ( a dd r e i s D 3 O 3 '
7 6 3 4 3 2 1 0

o o I 1 x o o ul'i.te thiE into thiE register

t-port B Date/Data dir€,cEron


addre6Eing€ontrol
D301 conts i.ns data
direction
$DsO1 €onte ins

dat€ direction ( addres 6 D3O1


6 5 4 3 2 1

x x x x lrfit e thi.s into th i5 r 'e g r 6 t e r

date dire€tion contr.o1 for Port B


1 = o u t
O = ln

Port d€ta (addreE6 D3o1)

6 5 4 3 2 1 0

4 3 2 1 4 3 2 r

Jack 4 J ack 3
Pin Nu|nbers

Folr "Trigger" ports: D O1 0 , D O 1 1 , D O 1 2 , D O 1 3

7 6 9 4 3 2 1 0

Read th ir port

Trigger Value
Dolo = Port 1 Pin 6
D013 = Port 4 pin 6

L7E O P E R A T t N eS Y S T E | i C O 1 6 5 5 5 - - Sertion 11
Other l,liscel lsneous Softuste Infor$Etion

11. The OS 6et6 up all pIA por.ts as inputE during


initi€Iiration.
21. lhe O$ usuallg reeds the €bove once per televiston fr€ne
(during
vertical-blank) iDto RAHas tollous:
Dtsta Base Name AddpesE Date
STICKO O27A 7 6 5 4 3 2 | O Jac I 1, p ins 4, 3, 2,
if 10053,7
o o o x x x x
S TI C K1 072q Jac ft 2, Pins 4 , 2 , 2 ,L
sTrcrl2 o27A Jac k 3, Pin6 4 , 3 , a , 1
ST ICK3 o27E .Jact 4, Pine 4 t 3 , 2 , 1
STRIGO ozE4 Jecl 1, Pin 6

6 5 4 o
S T RI C 1 o2a5 o o o o t o o o .Jec I

sTRlc2 .J€cl 6

SIR IC3 o?47 ,Jac I 4, 6

PADDLl o27A 4 o
x x x t x X x x x Jact 1, Pin 5
PADDL3 o27e Jac & 2, r l n ;
PADDLS o274 Jact 3,
PADDLT Jact 4, Pi n 5
PADDLO t\)'t 7 Ject 1,
PADDL2 o273 J€r k 2,
PADDL4 o275 Jec I 3,

PADDL 6 o277 J€r I 4, Pi n 9

Figur.e 11-6 Using Front Panel Connertor€ I/O Poits: Pin


F l n c t i o n T € bl e E

P i n E 5 e n d 9 a r e r e a d t h r o u g h t h e p a d d l a c o nt r o l l e r c i r c u i t r q
a nominal v€1ue o+ 7 indicates that the oifl ic high (or +Ioating)
and E nooinal value of 228 indicates that th e pin i3 puIled lou.

0PERATTNe SYSTEH CO16559 -- Se c t i o n 1 1


L79
Appendir A -- CIA COHI4ANDBYTE VALUES

The +ollouing h e t v a l u e E a r e k n o u r nt o b e l e g i t i { r l a t e CIO comrnends.


M o E t h e n d1 e r 6 :

o3 -- OPEN
o 5 --OET RECORD
-- CET CHARACTERS
og _- PUT RECORD
OB -- PUT CHARACTERS
oc
OD -- CET STATUS

D i E pl a g H a n dI e r o n l q :

12 -- DRAI'
D i s ke t t e F i l r tl€nagef ohtg:
20 -- RENAI'IE
2I -- DELETE
22 -. FARHAT
23 -- LOCK
24 -- UNLOCK
25 -- POINT
26 -- NOTE

APERATINC SYSTEI4co16t35 -- A p p e n di x A
lEO
Appendix E -- C I O S T A T U SB Y T E V A L U E S

- S h o u n b s l o { r , € r e t h e t n o u n C I O S T A T U SB Y T E v E t u e s .

01 (OO1' -- OPERATIONCOMPLETE(NO ERRORS)

AO (1EA) -- EBREAK] KEY ABORI


81 (129) -- I O C E A L R E A D YI N U S E ( O P E N }
A2 (13OI -- NON-EXISTENT DEVICE
A3 (131) -- OPENEDFOR WRITE ANLY
A4 (132) -- INVALID COMI'IAND
A5 (133) -- DEVIC€ OR FILE NOT OPEN
A6 (134) -- I N V A L I D I O C B N U M B E R( Y r . e g o n l { }
87 (135' -- APENED FAR READ I]NLY
AA (136} -- END OF FILE
89 (137) -_ TRUNCATEDREC']RD
AA (138} -- DEVIC€ TIMEOUT (DT]ESN'T RESPSND}
AB (189} .- DEVICE NAK
-
AC (14O} -- SERIAL 8US INPUT FRAI'IINOERROR
AD (141! -- C U R S O Ro u t - o * - r a n g e
gE (142) .. SERIAL BUS DATA FRAME OVERRUNERRAR
AF (143) -. SERIAL BUS DATA FRAME CHECKSUI"I ERROR
90 (144} -- DEVICE DONE ERROR
91 (145) -- SAD SCREENr'rODE
146) -- FUNCTION NOT SUPPORT€D8Y HANDLER
147) -- FOR SCREENI'IODE
INSUFFICIENT I,IEI1ORY

._. A0 ( 1&O) -- DISK DRM * ERROR


A1 (161 ) -. TOO MANY OPEN DIS( FILES
A2 (162) -. DISK FULL
A3 ('.63} -- FATAL DISK I/O ERROR
A4 (164) __ INTERNAL FILE f I.IISMATCH
A5 (165) -- FILE NAI'IEERROR
A6 (166} __ POINT DATA LENOIH ERRT]R
A7 (L67' -- FILE LOCXED
AE ( 16S} -_ COI'II{ANDINVALID FT]R DISK
A9 (1A9' -- D I R E C T f I R YF U L L ( 6 4 F I L E S }
.
AA (17O} -- FILE NOT FOUND
AB (171} -- PAINT INVALID

O P E R A T I N oS Y S T E } {c 0 l 6 5 5 9 - - Appendix B
Appendir C -- StO STATUS BYTE VALUES

Shoun belou af.e the & h o u n S I O S T A T U SB Y T E h e x e d e c i m e l v a l u e s .

01 (OO1' .- OPERATION COHPLETE (NO ERRORS}

AA (138' -- DEVICE TII'IEOUT (DOEsN'T RESPOND)


BB (139} -- DEVTCE NAK
AC (14O' -- SERIAL 8Ug INPUT FRAMING ERROR
AE (144} -- SERIAL BUS DAIA FRAI'IE OVERRUNERRSR
EF (143) -- SERIAL SUS DAIA FRAME CHECKSUI,IERRAR
90 (144' -- DEVICE SONE ERROR

I U16555 --
O P E R A T I N CS Y S T E I , C Aprendix C
ra2
Appendix D -- AIA$CII CODES
gx 4X BX AX cx EX

sp o
g1 D A a
g2 a B b
p3 0 # c c
g4 0 $ D d
g5 il z E e
v6 0 & F f
g'7 s G g
gB E] ( H h
ve E ) T t-
gA tr J j

9B I + K k
gc g L I
gD FI M m
gE l| N
0iF
0 o
Lg E g
11
E 1 o
r2 EI 2 R

0 3
14 tr 4 T t
E U
II
L7 E 7 W
'tR
et x
19 II v
IA g
E
1D
o
g l CT,EAR
I
Plfra
lYfis BELL
g Ftg BHln
1F
o TAB TAB lHin

O P E R A T I N CS Y S I E H C 0 1 6 $ 5 5 - - Appendix D
143
Appendir E -- DISPLAY CEDES (ATASCII)
qX 2X 4X 6X BX AX CX EX

gs o G
gt- D A a
g2 tr B b
g3 EI c c
g4 CI $ D d
gs il g
g6 a &
E
F
e
f
g7 s G g
g8 a ( H h
q9 E
gA a ) I
J
l-

j
gB E + K k
gc g L t
gD FI M n
gE EI N n
gF
il o o
c( DES 8p-FF SHOWAS
E IN\IERSE VIDE
Lg
E g P p ol caDEs 99-1F
11
D L 0 q
T2
tr 2 R r
t3 EI 3 s
tr 4 T t
15
EI 5 U u
16 II 6
'7
t'7
EI W
18 et 8 X x
19 CI 9 Y v
g z z
E t trI
fC o
1D tl l EI
o tr
o D
I 816555 --
O P E R A T I N GS Y S T E I ' C Aprendix E
A p p e n di x F -- KEYBOARDCODES (AIASC I I }

CTRL SHIFT & SHIFT LO!IER


LOI"IER
o o , ? o 20 <ip€c e> 40 e 3 5 60 ^.
0 1 A 3 F 1F 6 L a
02 B 15 1E B 13 6 2 b
0 3 c 1 2 23 t+ 1A 43 6 3 c
O 4 D 3 A 2 4 t 1A 44 D 3 4 6 4 d
O S E A A 1D 45 6 5 e
0 6 F 3 A 2 6 & 1B 4h
O 7 G 3 D G 3 D 6 7 9
O B H 3 9 2 A ( 30 4e H 3 9 6 A h 39
0 9 t o D 2 S ' 49 I O D 6 9 i OD
OA J 01 2 A * 07 4A J O l 6 A J o1
O B K O S o6 48 t{ o5 6 8 k o5
o c L o o 20 4C L O O 6 C l oo
o D 2 9 4D M 2 5 A D m 2e
O E N A 3 N 2 3 6 E n
o F o o a 4F o o B 6 F o
10 P OA 3 0 0 P O A 7 o p OA
11 0 2F 31 1 1F G 2 F 71 q 2F
t 2 R 2 A 1E 3a 7 e t
c ,16
3 3 3 1A s 3 E 7 3 t
1 4 T 2D 3 4 4 1E T 2 D 74 t
1 5 U 08 3 5 5 U O B OB
1 6 V 10 3 6 6 in v 10 10
17 t,l 2E 33 57
18 X 16 3 A B x 16 7 g x 16
I q Y E B 3 9 9 30 59 Y 2 S 7 9 q
1A Z L7 3 A : o2 5A 7 1 7 7 A z t7
19 <eec) 1C OD [ 2 0 7 9 i
1C ^{!p} CE 3 C < \ 0 6 7 C l
1D ^4dot n> OF 3 D = OF 5D 7D 4c lear>
^{Ie+t} 06 ^ 0 7 7E 4back> 34
lE 3 E )
1F ^<r igh t>O7 5F - o E 7F <Eeh>

go-9A /l\ oo-14 9F 5{teb} 2C


9E <.etut'n> and ^3 O C ,1 A AO-FC /l\
^E
20-7C
9C s{:del> 34 FD 1E
FE ^{de1} 34
9D s<:insel.t>37 ^< i nser t)37
9E ^.{tab} 2C FF

E{ oi ^4
<cleei)::= "<ietul"n>
< r ' e t u r n > : : = < r e t u a n > o r E 4 i € t u^.4ne> s c o} r
<esc> ::= <esc) or E{esc> or "46pef,e}
{spEce} ::= <sPsce> or 9<sPace>or

Whe"e: s tss a prefix indicate5 tSHIFTI'


^ as a P!'efix indic€teE tCTRLI'
/ i\ aE a ptefi x ind icates ATARI ft€q invet'9e active'

0PERATtNG SYSTET'IC016559 -- Appendir F


145
A p pe n di x e - - PRINTER CODES (ATASCI I )

Cha|.€Etar set +or " n o ' . n a 1 " $ o d e p i i n t i n g :

20 < E P a c € > 4 0 e 60
2L 41 A 61
4 2 8 b
*
4 4 D 64 o
?e 4 9 8 63
* 6h f
4 7 C
( 4 A H
) 69
2A * 4 4 J 6A
+ 4 8 K 6E
4 C L I
- 4 D M dr
4 E N
4 F O (t
30 P
1 91 0 7L
e 5 2 R l.
33 5 3 S
4 5 4 7 t
J
6 5 6 V 76
37 7 57 t' 77
3A 5 A X 7A
9 5 ? Y
'. 5 A Z 7A
7B
4 5 C \ 7C
3D 5lJ _l 7D )
5 E ^
{space}

Note: The +ollouing codes pr int diffeisntlv than defined bg


t h e A T A S C II d e f i n i t i o n .

00 t h f . o u gh t F p r i n tb1ank.
g?intg \ inEtead o+ "di€hond".
printc { instead o+ "spEde".
7D p i i n t s ) i n s t e € d o f " a l e a r " .
prints - instead of "haclspace".
piints blank inEteed of "tab".

OPERATINOSYSTEH AppendixC
186
Character set + o r . , , E i d e d a g E . ,m o d e p r i n t i n g :

4 0 e 6 0 @
4 1A b L A
4 e B 6 2 9
4 3 C 6 3 C
4 4 D 6 4 D
4 9 E 6 5 E

4 7 e 6 7 e
4 E H 6 A H
49 I 6S r
4 A J 6 A J
4 9 K 6 8 K
4 C L 6 C L
4 D H 6 D H
4 E N 6 E N
4 F A 6 F O
o 5 0 P 7 0 P
31 sl 0 71 0
5 2 R 7 2 R
5 3 S 7 3 S
34 4 5 4 T 7 4 1
35
36 6 5 6 V 7 6 V
7 5 7 W 7 7 W
a 5 A X 7 A X
3? I 5 9 Y 7 9 Y
3A 5 A Z 7 A Z
i 5 8 E 7 B t
5 C \ 7 C \
3D s D l 7 D t
5E {up> 7E <up>
5F <1eft> 7F <Ie+t>
Note: thc follouin! codes pr.int dif+erentlg than defined bU
t h e A I A S C II d e f i n i t i o n .

oo through aF pr int blan&.


p"ints "up aaaou," instead of
5F p r i n t E " l e f t a r r o t " i n s t e a d o f _ .
60 t h r o u g h 7 F r e p e e t 6 4 0 t h r o u g h 5 F i n E t e a d o f p r o p e r s e t .

C Y S T E HC 0 1 6 9 5 5 - -
O P E R A T I NS Appendir e
187
Appendir H -- S C R E E NM O D ECHARACTER
ISTICA

Mode Hori z. Veit. Veit. C o1 o r 5 Data Co lor l'leno.r,


* Po6it. tllo Sp t'l Sp Velue Reg. Reqd.
(split) (ful1t
o 4 0 e 4 2 b E E t g d . BAK 992 q92
OO-FF
PF 1"

baclgd, BAK &74 67e


oo-3F P F O
40-7F P F 1
AO-BF
CO-FF PF3

20 ba.tgd. EAK 424 420


oo-3F PFO
4Q-7F P F 1

CO-FF

40 20 4 8AK 434 432


1 P F O
e P F I

BO 40 o sAK 694 696


I PFO

ao 4B 40 o BAK L174 117h


I PFO
2
3 PF2

6 160 96 BO o BAX 2174 2LA4


I

7 160 96 o BAK 4190 4200


1 PFO
P F 1
3

s 320 192 160 2 o PF 2 S112 E13E


1 PF l+

9 BO 152 I Not€ 2 a 138

10 ao 1s2 9 o Pi'l 0 g138


1 Pf,{ 1
2 PH2
PH3
4 PFO

OPERATINCSYSTEH CO16555 .- A pp e n d i x H
1S6
P F 1

SAK
BAK
BAK
B BAK
PFO
P F 1

11 ao 192 L6 Note 3 813A

Notas:

Uses color of PF 2, l!ft o+ PF 1.


UseB color o+ gAK, llm of date value (*O-Fl.
UEeF .olor of data value (tO-F), Iun of BAK.

: * Plagfield color reqist€r r.


P Hr : : = Plag6i/l'lisEile oraphica coLor regi5ter r.
BAK :: = Eaalgfound rolor iegist€r (also knol,n aE PF 4t.

The default valueg for the color reoistaas are shoun belour:

8AK = EOO
PFO = 529
PFI = gCA
PFz = $e4
PF3 * $46

OPERATING SYSTEI'ICO16559 -- Appendix H


149
The +oi& of a color regi6ter' bgte is shoun belou:

7 6 3 4 3 ? I O
+-+-+-+-+-+-+-+-+
i color l1!m !O!
+-+-+-+-+-+-+_+_+

Where: Eolor (her values ) Iuo

O=gr€g O = hinimuo lrroinance


1= light orange 1= |
2 = or€ngE 2=
3 = red orenge 3= (inrFeasing
4=pin* 4= lunln€nce,
5 = purple 5 =
6 a purple-blue 6s I
7=blue 7 = nerimuo luninance
I = blue
9 = light blue
A = tuiquois€
B = green-b lse
c - gr een
D = gs1lou-green
E = grang 6-9 reen
F = light orange

OPERATINGSYSTEH C016559 -- Appendir H


190
APFENdiT I -- SERIAL 8US ID AND COMI.IAND
SUMHARY

Se. ia 1 b!s device ID6

Floppg distettes D1-D4 E31-94


Pr inter P1 $4O
RS-232-C R1-R4 $50-93

Eierial bus control codeE

ACK - $41
NAK - S4E ,N,
cot'TPLETE - +43
ERR - $45

Ser i€ I bus coofiand cod€€

READ - $5e ,R') OiEt


I.'RI TE - t57 , V l ,, printef/Dist
STATUS - s$3 'S' ' Pr.inte./Disl
PUT(no chect, - $5O ,P'' DisT
FOR'4AT - *21 't'> Dis|(
READ ADDRESS - $S4 , T ,,
READSPIN - 6'1 'O') Diil
MOTORON - $s5 ,u,, Disr
VERIFY SECTAR - 156 ,v', Dist

OPSRATINCSYSTEI.ICO1695$ -- App€ndir I
191
Appendix J -- AAM VECTURS

T h e f i r e d a d d r e E s OS ROM JMP v e c t o r s a r e s h o u n b e l o u r , a t each


E d d r e s s i s e J l , l P i n E t r u c t i o n t o t h e i n d i € € t e d Fo u t i n e .

Name Addr Refer.ence F u n c t i . o n

DISKIV E450 D i s ke t t € H e n d l e r i n i t i a l i z a t i o n
DSKINV 8453 3.4.2 D i s k e t t e H e n d1 e r e n t r g .
c lov CIO utilitg entr.g.
stov E459 9.3 5IO utilit! e nt r g .
SETVEV E45C S€t S{ste Timers rout ine.
sYsvav 6.3 S t a g e 1 V B L A N Ke n t r g .
XITVBV E x i t V B L A N Ke n t r g .
SIOINV SIO utilit'J initial i zEtion-
SENDEV E46A S e n d e n a bI e r o u t l n e .
INT I NV I n t e r r u p t H € n d1 e r . i n i t i e l i 2 € t i o n .
c la INv CIO utilitrJ initializ€tion.
BLKBDV 3. 1.1 8 1 € c k bo a r d m o d e e n t r g .
SIARMSV E474 7. W 6 r n s t a r t ( I S Y B T E MR . E S E T I) e n t r u .
coLDsv 7. C o 1 ds t € r t ( p o l r e r - u p ) e n t r g .
RBLOKV E47A Cassette-read block etltrU.
csoPIv E47D CasEette-8PEN input entrg.
* Th€se v€ctors a.e for OS internal u6e onlg.

T h e f i x e d a d d r e s E F l o t s t i n g P o i n t p a c t e g e R O Mr o u t i n e e n t r g p o i n t
E d d r e s s e 6 a . e s h o u r nb e l o o i q o m p l e t e d € s c r i p t i o n s o f t h e
€ o r r e E p o n di n 9 r o u t i n e s a r e p r o v i d e d i n S e c t i o n L

AFP DAOO ASCII to FP conve?t


FASC DeE6 FP to ASCII .on\r.r"i.
D?AA Integer to FP convert.
D9D2 FP to integer convert.
FADD DA66 FP ad d.
DA6O FP iubtract.
FI,IUL DADB FP ftultip1q
FDtV DB28 FP divide.
LOC DECD FP b€se e logErithn.
Locto DEDl FP ba6e 1O logarithro.
EXP DDCO FP base e erponentiation.
E X P1 O DDCC FP bese 10 exponentiation.
PLYEVL DD4O F P po l q n o o i a I e v e l u e t i o n .
ZFRO DA44 Clear FRO.
ZFL DA46 Clsai FP number..
FLDOR DDA9 Load FP n!|tlb er.
FLDOP DOAD Load FP nuftb e?.
FLDl R DDg€ Load FP nsnb er.
FLDlP DD9C Load FP nunb€r..
FSTOR DDAT S t o r e F P n u m be r .
FSTOP DDAB S t o r e F P n u n be r .
Fi'IOVE DDB6 lvlovE FF number.

0 P E R A T I N GS Y S T E | {C O 1 6 5 5 5 - - Appendix J
192
The bes€ addresses of the Handler, veatois for the .esi.d€nt
h a n dl e i s a r e s h o u n b e l o u r :

S c r € e n E di t o r ( E ) 8400
DisplEg Handler (S, E410
K e g b o € r ' d H a n dt e r . ( K ' E4aO
P r i n t e r H a n dl e r ( P ) E430
C a e 6 e t t e H E n d! e r ( C ) E440
S€e Saction 5 for the foafiat of the entr.g +or each Handl€r'.

The 690A Cotrlputer i n t e r r u p t veEtor vatlug3 are ghoun belou:


F u n ct i o n Addiess Valu€
NII I FFFA E7B4
FFAC E477
IRO

OPERAIINC SYSTEMCO16955 -- Appendir ,J


193
Appsndix K -- DEVICE CHARACTERISTICS

Thi€ appendix desEribeE the phgEiral cheiErteristirs of the


deviceE thgt inteifece to the ATARI 4OO end ATARI 8OO Hofte
ComFUters. lJh€re epplicEble, data t€pecitg, date trenrSer
ratr, stoaEge +oimat, gIO inteit:ce, end cebling uiIl be
d6tailed.

KEYBf]ARD

The tegboa.d input rate iE linited bg th. OS terrboard reading


proredure to be 60 chE'racterg p€T' serond. Th€ cod€. foi. each teg
i€ sho&,n in Teble 5-4. The &egboard h€rd{rar6 hag no buffering and is
r.te-liftited bg the debounce €lgorithn used.

DIEPLAY

The television screen diiplaq generator has manl Eepabilities


that are not us€d bg the Displag Handler (as described in Section
5 efld shoun in AFpendix H). There are additional displatJ |nodeE,
obJect gEneratol.s, hardnare displaq scrolling, €nd mang other
featureE that Er'a degcribed in the ATARI Home Conguter
H€rduare l'tanual.

SinEe all displag data is stor€d in RAtl, the di6plag data upd.te
tate is liftited piinarilg bg the softuare routi.neB that genertste
and f0.ltl6t tha data and acEess the RAt'|. The g€neiation of the
d i s p l a q f r o m t h e R A f ' li e a c . o { n p l i s h e d b g t h e A N T I C a n d C T I A o i O T I A
c h i p 6 u r i n t D i r e E t M e i n o r gA c c e e s ( D f 1 A l to accesE the RAMdata.

The internal storage *ormats for diEplBg dsta for the varioug
oodeE Er.e d6tailed in the ATARI Hofle ConDuter Hard{,are
l'lanuaL

ATARI 41O PRBCRAMRECORDER

The ATARI 41O Program Recorder has the +o11o{ringth5tacte.i5ti.c6:

DATA CAPACITY:

1 O Oc h € f a . t e F s pei C-60 tape (unloilnEtted).

DATA TRANSFERRATES:

+ 600 Eeud (60 characters oer 5€cond,

*Note: Th€ OS has the abilitq to adJust to diffeient tape 5peeits


(447 - 995 Eaud).

O P E R A T I N CS Y S T E I ' C O 1 6 5 9 5 - - Appendir K
194
STORAGEFORMAT:

T€peE Ere recor.ded i.n 1,/4 track 6te.€o +orftat et L 7lB incheE per
' EeEond. Ihe t€pe can be reEorded in both directions, uhere tr€Eks
l and a afe side A left €nd right, and tra€ks 3 and 4 a!.e side B
r i g h t e n d l e + t ( i n d u E t r g E t a n d a r . d) . O n e a c h s i d e , t h e l a f t
.hannel (1 or 4) is used for €udio and the right channel (A snd
3) is u6ed for digit3l in+ormation.

The audio channel is reror'ded the norrnal ueg. The digitel rhannel
i E r e c o r d e d u s i n g t h e P O K E Yt r r o - t o n e m o d e p r o d u c i n q F S K d a t a a t
u p t o 6 0 0 b a u d . T h e I ' I A R Kf r e q u e n c g i s 9 3 2 7 H r a n d t h e S P A C E
frequencrJ is 3995 Hz. The tr€nsnission of d:ta i6 agunchronous
b V t e B e r i a I € s s e e n + r o n t h e c o n p u t e r r P O K E Ya e a d s o r u r i t e s a
bit serial FSK sequence for eech bgte, in the follouing order:

l6tart bit (SPACE)


datE 6it O -+
data bit 1 |
. + - o = S P A C E ,1 = MARX.
data bit 6 |
data bit 7 -+
l. stop bit (tlARK)

The onlg control the coroput€r has ov€r. tape fiotlon iE notor
etert/stop, €nd this onlg if th€ PLAY button is presEed bg th€
\!,. user. In order for recording to tske pI€E€, the urer muit press
both the RECend PLAY buttons on the cassette. The coDo!ter has
no uragto Eense th! position of the6e buttonE, nor even if an
ATARI 410 Progr.ao Recorder is cabled to th€ romguter, so the u6er must
be cEre+uI uhen using thiE device.

gII] I NTERFACE

The cessette device utili:e6 portions of the Eer'ial bus harduare,


but does not fol1ou 6nV o+ the protocol as defined in Section 9.

ATARI A2OTTI.I] O.COLUI'{N II'IPACT PRINTER

The ATARI 82O Frinter. has the follouing shEr6Eteristic6:

DATA CAPAC! TY:

40 Ehara.te?s per line (nortrlal printingl


aq rher€rters per line (5id€uags printing'

DATA TRANSFER RATES:

O P E R A T I N GS Y S T E i IC 0 1 6 5 5 5 - - Aependix K
195
BuE ?ate: xx chafacteis per gaEond.
Print time (bur6t): xx ciararters per eeEond.
Pr^int tine (€ve?age): xr characteis p€r second.

STORAGE FARfiAT:

3 7/8 inch qrid€ paper..


5X7 dot m5tFix, i&pact pr.inting.

Noroal foroat --
40 tharac terE per 1ine.
6 l ineE per inch (verticet'.
12 f,har€rterE per inch (horizontal).

9idat,aUg +o.nat --
29 charac terr per- li.ne.
6 I ines per inch (veitical).
9 ch€iact€r.s per. inch (horizontal ).

SIO IN'ERFACE

The cont!.otler 6eriaI bus tD is $4O.

Th€ controll6r quppor't6 the +gllouring SIO (omflands (9ee $eation 5


fot ilo?s infor.oation rega?dirg thc Handler End Seation 9 +or a
g€nefaI diseosgion of bus connands):

CET STATUS

The conpute. E e n d s e q o m m a n df r e m e o f th€ for&at Bhoun belou:

Device ID = t4O.
Cotnn€nd bgt€ = $S3.
EUxiIiarg 1= doesn?t matter.
autilia.g 2 = doesn't matter.
Checlsum = cheEkslm of bgtes above.

The printer controller re5ponds lrith a data fra{re of the format


E h o u r ne a r l i e r . i n t h i s a p p e n d i r a s p a r t o f t h e C E T S T A T U S
d i E c u g si o n .

PRINT LINE

The cooputer sends € command+rame of the forfiat Ehoun belou:

D€vice ID = 34O.
Coomand bgte = $57.

O P E R A T I N CS Y S T E I {C O 1 6 5 5 5 - - Appendix K
19b
euxilierq 1= doesn't natter.
e|rxiliarg 2 = 9 4 E f o r n o t ' t t t e 1p r i n t o . $ S 3 t o r Bideuagg.
Check6urn = c h e c k g u mo f b u t e s a b o v E .

The conrouter sends e data frafle of th€ foroat ihoun belo{r:

Leftmost rh€iacter. of line (coluon 1).


Next Ehara.ter o+ line (colurnn 2).

ilgfrtmost character. of line (cotumn 40 or a9).


C he c * r u n b q t e .

Not€ thEt the da*a freme Bire iE variable. either 41 or 30 bgte6


in 1en9th, depending upon the pt'int mode specified in the roomand
+iafie.

A T A R I A 1 O D I S K O RI V E

The ATARI glotTMl DiEk Drive has the follot!ing characteristicE:

DATA CAPACI TY:

72O Ee€tore of 128 bgte6 each (Disk H€ndler fo.mat).


7O9 6ector6 o+ 125 data brrtes each (Diet File lvlanaqer formet)

DATA TRANEF€R RATES:


gus rate: 1920 ch€rarters pei' 5€aond.
Seek tim€: 5-25 oeec. pei tracl + 10 to a1O ns€E
Rotetionel latencq: 104 oEec tnarimu|n(2eg rpln).

STORAGEFORMAT:

51/4 inch disftetts, soft sectored bU the control l€r.


40 trec kr per dis*ette.
1 B s e Et o r ' E p e r t r a c t .
1 2 € } b { ,t e s p e r 6 e c t o ? .
Controllsd bg Netional INS1771-1 foroatter'/control ler chip.
€ectot Eequencepe. treEk is: 18, 1, 3' A' 7' 9. I 1, 13, 15,
t7, 2, 4, 6, A, 10, 72, 14, L6

SIO INTERFACE
geritsl buE IDs i'ange fiom *31 (for 'D1', to 934
The controller
(for 'D4' ).

I u16555 --
O P E R A T I N GS Y S T E I 'C Appendix K
Lq7
Th€ controlter s u p p o I . t s t h e + o l l o u r i f i g S t O c o m m a n d s( 6 e e e a r l i e r
in this Appendir foi information ebout the DiEket*e Handter end
S e c t i o n 9 f o . a g e n e r a l d i E c u s s i o n o f b u E c o m m € n d)5:

GET STATUS

The conFUtsr s e n d s a E o r n r o a n d+ r a $ e o f the +oimet shoun belou:

DeviEe ID = i31-34.
C o m t o a n db g t e = $ 9 3 .
a u x i l i a r U 1 = d o e s n/ t m € t t e r .
auxiliarg 2 = doeEn.t metter.
Checksuft = checftsuoof bqte6 ebove.

The diskette €ontroller r.esponds(l,ith a data freoe of the +drilat


shoun earlier i n t h i s A p p a n d i x a s p a r t o f t h e 9 T A T U SR E O U E S T
di9crJEEion.

PUT SECTOR ( I,'ITH VERIFY}

The computer 6endE a commandfrarne of the forftat sho{rn belou:

Device ID = $31-34
Cofimend br/te = E57.
aurili.arg I = loo bgte of ssctor number.
auxiliarg ? = h i S h b g t e o f s e c t o r n u m b e r .( 1 - 7 2 0 ' .
CheclBrrfll = €h€cksumof bqte6 above.

T h e E o m p u t e r i e n d E a d € t e f i a m e o f t h e + o r m E t s h o u r nb e l o u :

128 data bgtes.


C he c l s u m b g t € .

The dis&ette controller uritss the fa€fte ddt6 to the Epe€ified


EeEtor, then read6 the sector end compares the content {rith the
frame data. T h e C O | I F L E I Eb q t e v a l u e i n d t c a t e s t h e s t e t u E o f t h e
ooetetion.

P U T S E C T O R( N O V E R I F Y }

The .omputer 6ends a comoend frame of t h e + o r . n a t 5 h o l | J nb e 1 o u , :

Device ID = t31*34
C o r D n a n db g t e = $ 5 O .
EUxiIiarg 1= lou bqts of sector number.
aurili.arq 2 = hiSh bVte o+ sectoi number (1.-72O1.
Chec*sum = c h e c f t E U mo f b g t e s a b o v e .

The comp!ter Eend6 e date fraft€ o+ the fo.mat shoun belon:

I O16555 --
O P E R A T I N eS Y S T E I ' C Appendix K
194
128 date b!tee.
C h e c&s u n b q t e .

The di9*atte contioller urites the +r.aoed€ta to the speEi+ied


9 e c t o r , t h e n s e n d E t s C O M P L E T Eb r l t e v a l ! e t h e t i . n di c t s t e s t h e
statos o+ the operetion.

EET SECTOR

The conputer. sends € connand +rErns of the fornat Ehoun belou:


Device ID = *31-34
Comnand bqte = $92.
a u x i l i a a g 1 = ! o { , b g t e o . Fs e c t o r n s n b e } .
auxilia?g 2 = high bqte of sector number (1-7aO).
Chectsum = che€ksun of bgtes above.

The dis&ette controller sends € d€te frane oS the tor at 9ho{rnbelou:


1 2 8 d a t € bg t e s .
Che.tsl|n bgte.

FORMATDISKETTE

The coop!t€r s € n d s a c o m m a n df . a m e o f t h e f o r o a t 6hournbelou:

Device !D = 931-34
Conoand bUte = $21.
autiliarg 1 = doesn't mattei.
euriliarg 2 = doesn't netter.
Chec lsufi = c h e c k E U r | ro f b{tes ebove,

The di6&ette Eontroller conpletelV foi €ts the digkette (g€nei€t€E 40


trackr of 18 soft seEtors per tiack oith the data oortion of earh
Eector €qu€1 to a1l zeros) and then reads each secior to verifg
its int€gr.itg. A det€ frEme of 128 bgtes ptut checL6!n i5
i e t u r . n e d i n t h a t t h e s e c t o r a u r n b e r so + a l l b a d s e c t o f s ( u p t o a
|nExin{r& o{ 63 Eectors} are rontained, +ollo{red bq t{ro consecutive
btJt€5 o+ *FF. t$ there Ere no bad sectoig on the dist€tte the fii6t
? bltes o+ the data

O P E R A T I N eS Y S T E MC U 1 6 9 5 5 - - Appendir R
199
Appendi x L -- O S DATA BASE VARTABLE FUNCTIONAL DESCRIPTIONS

CENTRAL DATA BASE DESCRIPT I AN

This €pp€ndir pl.ovides detail€d infor.mation for those variables


in the OS data ba5e that c€n be altered bu the user. Rernainino
variableE are provided ntsrrEtive descriotions. Information on the
variables iE praiented in € multipls acceEs Echeoe: Loor(up
t e b l e s e r e r e * e r € n c e d t o a € o m m o n6 € t o f n € r r € t i v e 6 , t h a t i s
itEeIf or.dered b! function.

VEriebIe de€criptions :re referenced bg € l€bel catted a variable


id€nti+iei (VID) .lsftbe.. The labeI conprise6 € single letter
foLlolred bq a nulnber. A differ.ent tetter is aisigned foi. etsrh
m a J o r f u n c t i o n a l a r e a b e i n g d e s a r i b € d , a n d t h e n u d r b e r , sa r e
a6signed sequentiat lg uithin daah tuDEtional area. Th06e
va!.iables that tsre not Eongidered to be of interest to ang user
are flagged uith an a€terist (*) a+ter their naoes. The data bese
lootup tab l€e tiovided ar.e:

1. Functional grouping -- index to the function narr,ative and


deBcriptions of vsriebles, giving VID and vari€b1€ nE|ne.

2. Alphab€tic liet of names -- 9ivin9 VID of description.

3. Address o.dered list -- giving VID of de5cr.iption.

I t e n 1 , t h e f u n c t i o n a l g r . D U p i n gi n d € x , s t a r . t E o n t h e n e x t p e g e ;
the other tuo lookup tabIeE are at the end of Appendir L.

O P E R A T I N eS Y S T E I IC O 1 6 5 5 5 - - Aeeendix K
2o0
FUNCTIANAL INDEX TO DATA EASE VARIAELE DESCRIPTIONS

llemorg aonf igur'etion


A1 r'rEr'tLo
A2 I'IEMTOP
A3 APPI'IHI
44 RAI'ITOP
A5 RAHSIZ

Tert/graphics scteen

Cur.gor cont?ol
8 1 C R SI N H
s2 ROWCRS. COLCRS
93 OLDROI.I,OLDCOL
84 TXTROI.',TXTCOL

S c r e e n m a r gi n g
D5 LI'IARCN
86 RI'IAREN

C o l o r ao n t i o l
E7 PCALRO _ PCOLR3
9e cctLoRo- ca|-oR4
Tert Ecroll ing
99 SCRFLG*

Attract node
B10 ATRACT
811 COLRSH*
812 DRKMSK*

T a bb i n g
813 TAEMAP

Logical tert line5


814 LOOHAP*
815 LSGCUL*

Split screen

OPERATINE SYSTEII C B 1 6 S 5 5 - - A p p e d di r L
eo1
816 gBTgCR*

F I L L , / D R A $ ,f u n . t i o n
817 FILDAT
B1g FILFLOI'
819 NEt, SROtr*,NEWCOLT1
B2O HOLD4I'

821 RO{INC*, COLINC*


BE2 D€LTAR*, DELTAC*
BE3 COUNTR*
824 ROHAC*,COLAC}
845 ENDPT*
D i s p 1 a 9i n g c o n t r o l . h € r € c t e r . s

E E E a p e( d i G p l a g + o l l o u i n g c o n t r o l c h a t ' )
826 ESCFLE*

D i E Fl E g c o n t r o t chsracter.s fiooe
F27 DSPFLC
Bit ndppedgr.aphirs
S2A DHASK*
829 SHFAT{T*

O P E R A T I N CS Y S T E MC O 1 6 5 5 5 - - AppEndix L
?o2
IDtafnE I lror k ing variableE
B3O HOLDI*
s31 HOLD2*
932 HALD3*
833 TTIPCHR*
834 DSTAT*
935 DINDEX
836 SAVMSC
937 OLDCHR*
B3A OLDADR*
839 ADRESS+
840 MLTTI'IP/OPNTI.IPlTOADR*
841 SAVADR/FRMADR+
842 BUFCNT*
843 BUFSTR*
844 SHPFLG*
945 INSDAT*
946 Tr.tPROt,tn.T|4PCOLi
947 TI.,IPLBT*
844 SUBIF|P*
84? TINDEX+
85O E ITMSK+
s91 LT BUF+
852 TXTIISC
853 TXTOLD*

c0l6555 --
oPgRATINc SYSTET{ Appendir L
203
Interna I character cooe Eonver!ilon
854 ATACHR
955 CHARr

C. DiBl Handl€r
CT BUFADR*
CZ DSKTIHi

D. C a e g e t t e ( p a r t i e S I O p a r t i n H a n d l e r ' )

8e0d rate deter0ina t i on


Dl CBAUDL*,CBAUDH*
DP TII'IFL6*
D3 TIfiER 1*, TII'IER2*
D4 ADDCAR*
D5 TEIIPI*
D6 TET{P3*
D7 SAVIO*

Caee.tte ood€
DA CASFLC*

Ca3sette bu$fer
D9 CASBUF*
DlO BLII',I*
011 BPTR*

lnternal uorking variab 1eE


D12 FEOF*
D13 FTYPE*
D14 WHADE.I
D15 FREO*

K e gb o e i d

Keg read ing end debounEing


El CHl*
E2 KEYDEL*
E3 CH

OPERATING SVSTET{ C O 1 6 5 5 5 - - A p p e n di r L
204
S p e Ei a I f u n c t i o n s
gtart/stop
E4 SSFLAO

IBREAK]
E5 ERKKEY

t S H I F T I / [ C O N T R O L ] 1 o ck
E6 SHFLIIK
E7 HOLDCH*

Autorep eat
E8 SRTI!IR*

tnveiEe vid eo
E9 INVFLO

Console stitches (tsELEcTl, ISTART].and tOPTIONI]

P. inter

printer-buffer'

Fl PRNEUF*
F2 PSUFSZ*
F3 PBPNT+

Int€rnal uor king vsr'iables


F4 PTEI'IP*
F5 PTI I'IOT*

Central l/B routine (CIO)

U€er Eal I paralreters

e1 IOCE
G2 ICHID
C3 ICDNO
e4 I CCOM
E5 ICSTA
G6 ICEAL, ICBAH
G7 ICPTL, ICPIH
EA I CBLL, ICBLH
0 9 I C A X1 , I C A X 2
c10 IcsPR
Devic€ I ta t{.,6
G11 DVSTAT

devi ce teble
612 HATAES

0 P E R A T I N OS Y S T E MC O 1 6 5 5 5 - - ApPendix L
205
C I O , / H a n d1 e r i n t e r f a c e ParameEers

e13 ZIOCS ( IOCSAS)


o14 tcHIDZ
cl5 ICDNOZ
c16 ICCOT'IZ
cl7 ICSTAZ
G 1 B I C B A L Z ,I C A A L H
Cl9 ICPTLZ,ICPTHZ
CAO ICBLLZ, ICBLHZ
Gel ICAXlZ, ICAX2Z
GA2 ICSPRZ ( IC IDNO,C IOCHR)

Inte|.nal {rorkinq verieble6


623 ICCOHT+
G?4 IC IDNO*
o25 C IOCHR*

H. Seiial L/B routine (SIO)

Uiea call pat'em€te.9

H1 DCB Eontrol bloEl


HA DDEVIC
H3 DUNI T
H4 DCOI.IND
H9 DSTATS
H6 DEUFLO,DEUFHI
H7 DT I I'ILO
HA DBYTLO,DEYTHI
H9 DAUX1, DAUX2

Bus Eound contr'ol


H1O SOUNDR

Serial buE control

Retrq logic
Hl1 CRETRY*
H12 DRETRY*

C he c &s u m
H13 CHKSUT'!+
Hl4 CHKSNT*
Hl5 NOCKST'I*

OPERATINO SYSTEMC O 1 6 5 5 5- - ADeendix L


Data bu+fering

Oenerel buf+er cont.ot

H16 SUFRLOI+,
BUFRHI+
H17 BFENLO*,8FENHI+

C o s l m a n df r a r n e o u t p ! t b u + f e r .
H1e CDEVTC*
H19 CCOMND*
HeO CAUXt*, CAUXaT+

Receive,/transfl it data buf f eiing


H21 BUFRFL*
HEz RECVDN*
HE3 TEMP*
H24 XI'ITDON+

5IO t irneout
H?g T I I'IFLG*
He6 CDTt'tVl*
H27 CDTt'tA1*

Intern€ I uor t ing variablei


HzA STACKP*
H29 TSTAT$
H3O ERRFLG*
H31 STATUS*
H32 SSKCTL*

ATARI ront.ol leiE

Jogsticks
Jl STICKO - STICK3
J2 STRIOO - STF IG3

P a d dI e s
J3 FADDLO - PADDLT
J4 PTRIGO - PTRIG7

Paddle cont|.ol lerE


JE STICKO * STICK3
J9 STRICO - STRIGs

K. Di.El file ftensgei


K1 FTISZPG*
KE ZBUFP*
K3 ZDRVA*
K4 ZSBAT,
K5 ERRNOI'

OPERATING SYSTEI'I Ct116555 -- Append i r L


?o7
L- Disk rrtititiee (DOSI
Ll DSKUTL*

l.t. Floating point peclag€


Hl FRO
I'I2 FRE*
M3 FR1
l,l4 FR2*
M5 FRXi
M6 EEXP*
t't7 NsIeN*
HA SSIONS
M9 FCHRFLC*
MlO DIGRT*
Ml1 CIX
M12 INEUFF
I'113 ZTEt'tP1*
ti14 ZTEI{F4*
f.115 ZTEMPS*
I.|16 FLFTR
H17 FPTRz*
l'l1B LSPR1*
l'119 L8PRA*
tI'O LBUFF
H21 PLYARC+
H2E FPECR./FSCR*
H23 FPACR 1/FSCR1+
HE4 DEGFLC./RADFLC*

N. Pourer-Up €nd Sg9tefl ReseE


RAll sizing
N1 RAmLO*, TRAT.|SZ*
N2 TSTDAT*

Disl€tte/.aEEette-boot
N3 DOSINI
N4 CKEYT
N5 CASSBT*
N6 CASINI
N7 BOOT?,.
NA DFLAeS*
N9 DSSECT*
NlO BOOTADI.

Environn€ntdl Eontfol
Nll COLDST
N12 DOSVEC

OPERATINO SYSTSI'|CO1655t -- Arrendir L


204
IS RESETI
N13 t'ARt{St

P. InterruptE
P 1 C RI T I C
P2 POKMSK

Sgsteln T i mer€

Real-ti|ne cloc|l
P3 RTCLOK

Sgst€fi Tiln€r 1
P4 CDTfM
P5 CDTIIA1

Svsten Timer ?
P6 CDTTVa
P7 CDTI'IA2

$irJ6t€dr Tifters 3-5


P8 CDTllV3, CDTMV4,CDTt'tVs
F9 CDTMF3,CDTHF , CDTI.IF'

RAI'I-inteFrirpt v€Etoir

NMI-interrupt vec tor s


P1O VDSLST
P 1 1 WSLKI
F 12 WgLKt)

IFQ-interrup t vec to.6


P13 VII,IIRG
P14 VPRCED
P15 VINTER
P16 VBREAK
P17 VKEYED
PlA VSERIN
P19 VSEROR
P20 VSEROC
P 2 1 V T I M R1 , V T I t . 1 R 2V, T I M R 4

HErduere reg ister updateE


P22 SDMCTL
P23 SDLSTL,gDLSTH
P24 EPRIOR
P25 CHACT
P26 CHBAS
P27 PCOLRx,COLARx

OPERAftNc SYgtEl{ CO165S5 -- AeDendir L


209
I n t e r n e I l , o r ' &i n g v e r i e b l e
PzA INIEIIP+

R. UEer 6r.eaE
R1 ( unlabcled )
R2 USAREA

This €ppandix contains deBcriptions oS dlango+ the deta base


variebleg, degcriptions are included for a1!. of the user-
e c c e 5 s i b l e v a r i E b l e 6 € n d f o r E o n r eo f t h e ' , i n t e r n a 1 , , v a r i a b l e s a s
uell. ThoE€ veriables that er'e not con6idered to be noroallq of
interest to ang u9€r E.e +1a9geduith en asteriE& (*) after their
nafie6i the other veri€bles can be of int€rest to on€ or more o+
the +ollorring rlaE5es of u6eis:

o End user.
o eetle d€veIoper.
A pp I i c a t i o n 6 p r o g i a m t n e i .
o 5{stem stilitg uriter.
o Language proEe6Eor developer.
D e v i c a H E n dl e r { ^ l ri t e ? .

E a c h v € r i a b l . € i i s p e c i f i e d b q i t s 6 gs t e m e q u e t e f i l e n a m e
fol l oued bg itE addresg (in hex ' end the number of bgtes regerved
i n t h e d at a b a s e ( i n d e c i n e l ' , i n t h e f o l l o o r i n g f o r n :

< n a d e > t 4 a d d . e 5 s ) , < Ei r e > l

For eraop1e:

MEt'lLO f OaE7, 2J

N o t e t h a t n o E t u o r d ( 2 b g t s ) v a r i € b l e s ate ttrdsred {rith the leaEt


siqnificant bgte at the loorer €ddress.

OPERATINE SYSTEf,Ic o 1 6 5 5 5 - - A p pe n d i x L
210
A. I.I€HARYCONFICURATIAN

$ee Sectioo 4 for d genei€! digcuEsion of me or{ dqnaoicF dnd


6€ction 7 for detallE of Egstem initialiration.

A1 M E l " l L OI O A E T , a l - - U6er-f!.ee meno|.{ lou eddress


f'lEl'{LO
contEing th€ Eddre6s of the +irst lo€ation in the frae
oe.rol.g regi.on. The value is e6tablished bg the Og dut,ing pou,€r-up
and sgstefn reEet initializEtion and is never €ltered bq the OS
th ere€ f ter.

A? i'lEl,ltoP !OAE5,2l -- User-free rne|nol.g high add?eEs


M E I I T O Pc o n t a i n s t h € e d d r . e i E o f t h e f i r 5 t non-us€.ble ftenrorg
loaetidn ebove the free menorg .egion. Th€ velue i6 !stabti€t€d
bg the BS during pouer-up aod sgBteo reset initializdtioni and
f,hen is Fe-estebliEhed uhen€ve" th€ displag is opefled, baF6d uFon
the requir.eoents of the selacted g"€phics node.

43 A P P I ' { H II O O O E , 2 l - - U 6 € r - + r e 6 m E r n o r gs E r e e n l o u e r tioit
APP HI is e oser-controlled v€iiEbI€ that contains the address
qrithin the +reE menoiq region belot|, rrhiEh the DiEpleg Handler cannot
g o i n s e t t i n g o p s d i E p 1 t s 9s c i e e n . T h i E v 6 r i a b l e i s
initialized to zero bg the OS et pourer.-up.

A4 R A H T O P *! 0 0 6 A , 1 t - - DiEplaq H€nd1ei tog of RAH addre6e (l,tSB)

R A I ' I T O PC e ! . m 3 n e n t l g r e t a i n s t h e R A H t o t d d d i e E E t h a t q , a e c o n t e i n e d
i n T R A H S Z( a s d e s c r i b e d i n N 1 ) f o r t h e D i s p l s g H a n d l e t . , 6 u 5 e . T h e
velue iE set up aE pert of Handler initializEtion.

Ag RA|ISIZ [OAE4, 1] -- Too o + R A M d d d t e s s (HSB onlgl

RAt'lSIZ perfll€nsnt 1g retainB the RAtl top addreEs that uas.ont€ined


i n T R A M S Z( a 6 d e s c i l b € d i n N t ) .

OPERATINO SYSTEM C O 1 6 5 5 5 - - A p p e n di r L
211
S. TEXT./ORAPHICSSCREEN

See Section 5 for e di6cu6Eion of the tert and graph i€ E 6creens


and their Handlerr.

C u r s o r C o nt r o I

For the text screen aod split-sci,€en tex t {rindou there is a


visible cur.Eor on the Erreen uhich sho{r5 the position of the nert
input or output gperation. The cur.sor is iePresented bg inve.sinq
the video of th€ chEra.ter upon uhich it re:iid€E, but the cuagor
can be made invisibls, at the use.,s oot ion, The gr.aphirs screen
dlu,a99 h€6 an inviFiblE €ur.sor.

The cu.rot' p03ition is sensed bg eremining d€t€ base v€riabI€9


and cEn be moved bg alter.ing those s€oe vtriebtes; in €ddition,
uhen using tha 6creen Editor., there are curEor rnoveoent contiol
code6 that aan be Eent as d€ts (es expleined in SsEtion S'.

Bl C R S I N HI O A F O ,1 l - - Cursor di6ptag inhibit flet


l ' r he n C R S I N H i s l . r o , atI outputE to the tert screen uill be
folloured bg € visible curEoi (inverssd charecteir; end uhen
CRSINH i9 non!eror no visibl€ EU!.sor lrrill be gener.€ted.

CRSINH_is Eet to r.ro b! pou,ei-up, the tSySfEH. RESETI or tgREAKl kegs


or an OPENcondand to the Displag Handler o? Screen Editof.

Not€ that iltering C R S I N Hd o e E n o t E e u s e t h e v i s i b l e c u r E o r E o


thanqe €tates until the next output to the €creen; i+ €n
iilmediata changa to the curFor state is desired, uithout €ltering
the scr€fen data, follo!, the CRSINH Ehenge uith the output o+
CURSORUP, CURSORDOl.lN, or sone other innocuous Eequ€nce.

t O O 5 4 , 1 l a n d C O L C R St O O 9 5 , 2 l - -
BA ROITCRS Current tursor
position

ROIJCRS a n d C O L C R Sd e f i n € t h e c u r € o i t o c a t i o n (.ou and coI! n,


respaEtivelg) +or the nart data elenent to be r€€d *ron or
kritten to th€ oain gcreen Eegment. tlhen in split-scaeen oodet
the vaiiables T X T R O We n d T X T C O Ld e + i n e t h e c u r s o r f o r t h e t e r t
uindou at the bottod of the sc.€en ae erDl€ined in B4 belou.

The ro|, and colualn nulnbering 6tart uith the valu€ rero, and
i n c r e a s 6 i n i n c r e m e n t E o f o n e t o t h e n u l t l b e r .o f r o u s o r € o l u m n s m i n u E
1i uith the upp€r Ie+t cornef of the screen being the or.igin (O,Ol.

R O W C R iSE a E i n g l e - b q t E v a r i a b l e l r i t h a m a r i m u . [ € ! t o u , a b t e v a l l e
o f 1 9 1 ( s c i e e n o o d e s 8 - 1 1 1 , C O L C R Si s a a - b g t € v 6 r i e b l e u i t h a
naxifium allouable value o+ 319 (Ecreen mode 8).

O P E R A T I N oS Y S T E HC O l 6 S s F - - Appendix L
B3 O L D R O I I[ O A 5 A , 1 I a n d O L D C O L! O O 5 B , 2 1 - - PFioF .ur5or tosltion

OLDROIIand OLDCOL ar"e updated frolrl ROITCRS; and COLCRS}befot€ ever.g


operation. The variablei are u s e d onlg f o r the DRATE
J nd FILL
oPe!'etions.

8 4 T X T R O W[ O a g O , 1 ] € n d T X T C 0 L t O 2 9 1 , e l -- S p1 i t - s E r e e n tet t cut'so!'
position

T X T R O I Ia n d T X T C O Ld e f i n e t h e c u t s o r l o c E t i o n ( r o u , a n d c o l u m n ,
r e s p e c t i v e l g ) f o r t h e n e r t d e t a e l e m e n t t o b e t.ead fron or
tritten to th€ 6D1it-screen tert uindou.

The iou and column nLrdb€rin9 €tart {rith the value zero, end
incraese in inETement6of one to 3 and 3?, r'espectivelq, uith the
uppet Ie{t corner of the sp!it-Ecreen t€xt uindo!, being the origir!
(o,o).

S c i e e n M a ? gi n g

The text screen and 6D1it-Ecreen text 0rindoo have uEer_€1t€rabl€


Ie+t €nd right nar'9inE that define the normal doo:in of the tert
cufsof_

BS L I ' I A R G Nt O O 5 2 , 1 l - - Tert coluon left maFgin

L M A R G Nc o n t a i n s t h e c o l u m n n s m b e r ( O - 3 9 ) o f t h e t e r t s c ? e e n l e f t
marlin, the text csrgor. uill rehain oD or to the right of the
le+t oargin aE a r'esult of sll opet'ationsr un1655 the cutsoa
€o1unn variable ic direEtltj updeted b'J the user (5ee 92 and 84
ebove). The de+Eult v€lue for LI'IARON is 2 and i: eEtebli6hed uPon
p o u , e r - u p o f 5 q 5 t e m r e 5 et .

B6 R i ' 1 A R GtNO O 5 3 , 1 l - - Tert colunn iight {laigi.n

Ri'{ARGN c o n t a i n E t h e E o l L , | n nn u r n b e r ( O _ 3 9 ) o t t h e t € r t 5 E r e e f l r i g h t
mtsrgin, the text crrrsor l,i11 remein on or to the left of thE
right margin eE E ierult o+ ell oper€tione, unlEEs the t!t3or
coluon variable i.6 directlg updated bV the ueer' (see 82 €nd 84
abov€). Th€ de+ault value +or RHARGN is 39 and is e5tabliEhed
upon p o u e r - u p of 5 v 5 t e n r e 5 e t .

O P E R A T I N CS Y S T E Mc o f 6 5 5 5 - - Appendix L
Color Control

A s p a r t o f t h e s t a g . 2 V B L A N Kp r o c e E E ( s e e S e c t i o n 6 ' , t h € v a l u € E o +
n i n e d a t a b a s e v a r . i a b l e 6 6 r e s t o r e d i n c o r r e s p o n di n g h a r d u a r e
colo. contr'o1 t egiEter6. The color r€giEters are divided into ttro
groUp9: the plager/missile colors end the plEqfield co1or6. The
pl€qfield €olor rag iEterE are utilized b q t h e d i f + e r e n t s E r e e n m o de s
as shoun in Appendix H. The pItsqei,hissi 1e coloF r.egigters are not
used bg the etandard OS.

87 P C O L R O- P C O L R St O e C O , 4 l - - plagsr/missite graphiEs colors


Each color vaiiabl€ is gtored in the €orresponding harduare
t . e gi s t e a a 3 ! h o u n b e l o u :

PCOLROIOzCO] coLPr,ro
IDot2]
P C O L R 1t o 2 c 1 l coLPi.l1 [ DO13]
PCOLRzto2czl coLPMzCDO14I
PCOLR3tO2C3: coLPtt3 tDo15l
E a c h c o l o r v a r i a b l e ha6 the forftat Fhournbelou:

7 6 5 4 3 ? 1 0
+-+_+_+*+_+_+_+-+
i color ! lu'r| lr!
+-+-+-+-+-+-+-+-+

See Appendir H for infor.mation fegar.ding the color and Iudrinance


field vel u€8.

sE coLoRo - coLaR4 [oec5,9] -- Pl€gfield colorE

Each color vari.ble i6 stored in the correspondinghdiduare


r€g i Eter a9 shoun b€lorr:

coLoRor o a c 4 l COLPFO t D o l 6 l
coLoRt r 02c91 COLPFI, tDo171
coLoR2tozc67 COLPF2 f D o l e l
coLoR3rcacTJ COLPF3 c D o 1 9 l
coL0R4t o 2 c B l COLSK T D O l A J

Each color vdiiebl€ h€6 the format Ehoun belolr:

7 6 5 4 3 2 1 A
+_+*+_+_+_+_+_+_+
I color I lun iri
+-+-+_+-+_+_+_.t_+

S e e A p p e n d i r H + o r i n + o i r n a t l s n l . e g a r di n g t h e c o l o r ' a n d l l l n i n a n c e
field vel ueE.

O P E R A T I N GS Y S T E I ' IC O l 6 5 3 5 * - Aependir L
214
T€rt gcrol t ing

The taxt sEr€ln or split-screen tert uindou,,,sct'olls,r ugorerd


uienever o n e o f t h e t r r o c o n d i t i o n s s h o u , nb e l o u o E C U r s :

o A text line at the bottoo rou ot the Erreen ettends past the
r . i g h t m € r 9i n .

6 A text lihe at the bottoo rou of the screen is teroinat€d bq


EN E.UL.

Sc.,olling haE the offect of Ferloving the €ntire logicat tine that
starts at the top of the scr€en and then moving ali EUbsrquent
lines upuerd to fill in the void. The EUrroi ,ill al"o|r|o\r.
uplrard i4 the Iogic6I line deleted ixreedl one phg3iEet tin€.

89 SCRFLC*tO2gB,1I -- Scrolt +lag


S C R F L ei 5 a u o r l i n g v a r i a b l e t i a t E o u n t s t h e n u | r l b e r o f p h t r s i c a l
l i n e s m i o u s 1 t h d t u e r e d e t € t e d f r o | n t h e t o p o f t h e Ec r € e n ,
s i n c e e I o g i E a l l i n e r E n g e s i n s i ! € + r o m I to 3, SCRFLC ranger
fron O t6 2

Attr.€c t f'tod6

Attiaat noda is a oerhani6a[ th€t proteatE th€ television scra6n


fro|n h€ving patterns ,'buined into,r the phoEFhorsdue to. fired
displaq being 1e+t on the screen foa ertended geiiods of ti|ne.
lfhen the .omput€r is left unettended for lnor6 Lhan g otnutes, the
c o l o r i n t e n s i t i e E € r € l i t n i t e d t o g O p e r c e n t o f t n e r i m u ne n d t h a
hu€E ar€ continuatlq v€ried everg 9.3 Fecondg. pies5ing .ng
ftegboard date keq uill be suffiEient to reftove the ettraat fiode
+or I nore fti nutes.

AE p€r.t of the Etag€ 2 V8LANKprdcesE, the coloi registers fr.o.l


the d.ta bEEe are 9€nt to the coFresponding hardruari color
ie9isterEi befor€ thatJ €ie Eent, theg und.rgo the folloiring
tiEns$oroation:

h€tduaFa regiEter ; database veiiabte X O R C O L R S HA N D D R K l l S l {


Normall{ COLRSH= tOO End DRKHSK= *FE, thu5 oeting thr above
calcul€tion e nul l opeiation; hoorever, once attraci ftoda bacolneg
ertive, C B L R S H= t h e c o n t € n t o f R T C L O K + I a n d D R K M S K= f F 6 , t h a t
ha€ the rtfect of fiodif{ing E}1 of the GolorE and |(eeping th€ir
lutninance aluagE belo{l, the 50 perc€nt lev€1.

SinEe RTCLOK+I lE incr.€ ented everg 256/60 of a qeEond end


6 i n E e t h e l e r r t E i g n i + i c a n t b i t o f C O L R S Hi 6 o f n o c o n r e q u e n c e , a

OPERAIING SYFTEI! Col6igg -- Appendir L


2L5
.olof/1un €hange uill be efferted everq 8.3 6e.ondE (5lA/60:,

81O ATRACTrOO4D,tl -- Attr€.t mode ti{ner, €nd fleg


ATRACTis th€ tim.r. (end +Idg) that Eontr.oli the initiation and
tarmination of attr.aEt fiode. hlhenever s teqboard kerJ iE pressed,
the legboer'd IRO s.rvice routin. sets ATRAaT to ..ro, tnu,
teidineting €ttract nodei the IBREAK! keq logic behaves
accordinglq. A s p e r . t o + t h e s t a g e l V D L A N K9 i o . . . s , ATRACTiE
inErefiented everq 4 s€cond9; i+ the velue erceeds 127 (a+te, 9
oinut6s uithost tegboard aEtivit{}, t h e v € 1 u e o + A T R A C Tu r i l l
be set to *FE and uill rstain that vatue until attr€Et fiod€ is
teroinated.

Since the att.6ct |node is pr.evented End terfiinated bq the OS


based orlll upofl kegboard activitq, 6ooe ssers cen {tant to r,eEet
A T R A C Tb a E a d u p g n A t € r i - c o n t a o l l e r €vent detection,
sser-controlled 6e!.ial I/O bus activitg or ang other Eigns of
Iife.

811 C O L R S H * ( O O 4 F ,1 l - - Color ihift n€sk


C O L R S Hh a i t h e v a l u e i O O { r h s n s t t r a c t node is ioactive, thu6
off!cting no Ehange to th€ scae€n colois, uhen attrEct mode ig
a c t i v e , C O L R S H€ o n t e i n E t h e c u r r e n t v a l u e o f t h e t i n e i veriable
m i d dl € d i q i t (RTCLOK+I'.

812 D R N I ' I S K *C O O 4 E1, l - - Dark (luoinance) nas*


D R K I { S Kh e s t h . v r l u e O F E o r h e n E t t F a r t | n o d e i s i o d c t i v e , uhich does not
rlter tha lufiinenE€i and hEE the value $F6 uhen 6tt.act mode
is active, uhi.h lorces the most Eigni+irant bit of the lufiinan.e
field to rero, thuE guaranteaing thet the lunin€nce !riIl neve'|.
erceed 50 per cent.

T e bb i n 9
ge€ Section 5 for a di5cu5sidn of the use of t€bs in conJunction
ui th the Screen Editor.

813 T A B I I A Pl O t A 3 , 1 5 1 - - Tab Etop setting nap

The tab settings ar.e retained in a 15-b9te (1?O bit) f|lap, urhere
bit value o+ 1 indicatee a tab ietting; the diagrad belou sho{rs
the mapping of the individuel bitr to tab Dositione.

OPERATINGSYSTEI{ C416555 -- Appendix L


2L6
7 6 5 4 e e 1 0
+-*-+---+---+---+---+---+---+---+
t o i l. i 3 t 4 t 5 t 6 t 7 t TABHAP+O
+---+---+---+---+---+---+---+---+
I I i 9 | 10r 1M2i 13! 141 151 +1
+---+---+---+---+---+---+---+---+
I

t
+---+---+---+---+---+*--+---+---+
| 1 1 2 t1 1 3 !1 1 4 i 1 1 5 ! 1 1 6 | 1 1 7 ! 1 11A1t9 i +14
+---+---+---+---+---+---+---+---+

f,lhenevet the Displag Handlef or screen Editor is opened, thiF nap


is initialiled to contain the value of $O1 in ev€.{ b{te, thu6
providing the default tab 6tops at 7, t3' 23' ett.

L o gi t a I T e r t L i n e s

the tert sc?Fen iB invisibtg divlded into logiE€1 line€ of tert,


eaEh coftpr.iEing fiom one to three phrrsiEEl. 11nes of tert. The
Ecr€en iE initietiz€d to 24 loEical lines of on€ phgsi.al lin€
e€ch; but d€ta €ntr.g and/or data insartion can inctease tha size
of e logical lins to tuo ot. thiee phqFicel 1!.ne6.

814 LOe AP* to28e,4l -- Lotical line starting rou nep

The beginning phgsi.sl line n{mber for each logical lina on the
scieen is ietained in B four bqte (32 bit! map, uhere e bit velue
of one indic€ter th€ Etart o+ a logicel line; the diagraft belou
shoos the napping o+ th€ individual bitE to phgEical line (rourl
n u t n b€ r 3 .

7 b 3 4 3 2 1 0
+--+--+--+--+--+_-+--+--+
I cr 1l 2i 31 41 9l 61 7! LOoHAP+O
+--+--+--+--+--+--+--+--+
I al 911oi11112113i141191 +1
+--+--+--+--+--+--+--+--+
i 16i 17| lql t9 t20't2L i22i23i +2
+--+--+--+--+--+_-+--+--+

+--+--+--+--+--+'-+--+--+

The map bitE aie tsl1 Eet to 1 {rhenever the tert screen i5
opened or €1€ared. F?om that Coint, the oap i5 upttEted as
logical 1i.ne5ere entered, edited and deleted ft.om the 9c?een.

i O16555 --
O P E R A T I N eS Y S T E I ' C Aependir ,
,r,
815 L O C C O L +t O O 6 3 , 1 I - - CurEor/1ogical line column nu|noe.
L B e C O Lc o n t a i n s t h e l o E i E E l - l i n s aolumn numb€r +or the coar€nt
aurEor poEition, note that a logicel IinE can cooprise up ro
three phgsicel lin€s. ThiE v€riabl€ is for. the internal use of
the Di sp1aq Hendter.

goIi,t Screen

The Displaq Handler and SEr€en Editor. together support the


operation of a split-s.r€en oode (ges Sartion F) in uhich the nain
portion of the screen is in one o+ the gr.EPhic5hodes and ig
cont.olled b9 the Di6pla! Handler, €nd ther€ are 4 phgiical lines in
the tert uindou, et the bottom of the sci€en uhirh is .ontrolled bu th€
S c F e e n E di t o r .

816 B O T S C R *t O a A F , 1 I - - T€xt 5ci€€n IineE count


B O T S C Rc o n t a i n s t h € n u m b e r of lines of tert +or the Eurreni
screen: 24 for node o oi 4 +or a Eplit-screen ||lode. Th6 Handter
€lso uE€s this var.ia61e a6 an indication of the sqlit-Tcr.sen
Etatus, tests eF6 nad€ for the 6pecific valueE 4 and 24.

DRAUI,/FILL F{rnction

The DRAI,funEtion line dr5tring algorithn is shoun b€Io(l,


tranelatld to the PASCALlang!age +|.on aseemblg tangrage.

Ngt{Rot.l = ROI{CRS; NEIICBL : = CBLCRS,

DELTAR ABS ( NEWROW-OLDROW


},
ROWINC SIGN (NEWRO{J-OLDRBIJ
); { +1 or -1 }

DELTAC ABS ( NEI.'COL-OLDCOL};


CI]LINC SIGN (NEIICOL-OLDCOL T, t +1 or -1

R O W A C: = O i C O L A C : = O ;
ROI.JCRS := OLDRO{, CULCRS := OLDCOLT

COUNTR := MAX (DELTAC,DELTAR);


ENDPT := COUNTRi
IF CI]UNTR = DELTAC
THEN ROIIAC : = ENDPT DIV 2
ELSE COLAC : * ENDPT DM,

I.IHILECOUNTR>ODO
BECIN

OPERATINE SYSTEI'IC O 1 6 5 5 5 - - A p p e n di r L
?14
ROttAC i= ROl.lAC+ DELTAR,
IF ROt^lAC)= ENDPT
THEN
EE6IN
ROt^lAC:= ROWAC- ENDPTT
ROHCRS:= RO|ICRS+ ROWINC
ENB;

COLAC :* COLAC + OELTAC,


IF CALAC )= ENDPT
THEN
BEEIN
COLAC := COLAC - ENDPTT
COLCRS := COLCRS+ CALINC
END,

P L O T _ P O I N T ,t F o i n t de+in€d bg ROWCRa
Sn d C O L C R S)

IF FILFLG <> O THEN FILL_LINE'

CoUNTR := CAUNTn - 1

ENO;

The FILL funrtion €lgorithm (FILL_LINE above' iF described briaflq in


SeEt i,on 5.

817 F I L D A T I O A F D ,1 1 - - Fill data

FILLDAT containE th€ fill reqion data v€lue aE peit of th. calling
sequEnce foi a FILL rofl{nand as d€sciibed in Section 9.

BlB FILFLo* tO287, 1l -- Fill flag


.- FILFLC indi€ate€ to the shEred code uithin thc Diiplig Handl€r'
!,hether the rurrent op€ration is FILL (FILFLG <> O' or DRAII
(FlLFLc = O).

819 NEIIROII* [0060, 1l and NEWCOLi+tOO61,2J -- D€stin€tlon point

N E l . l R O t€Jn d N E I I C O La r e i n i t i e l i r . d t o t h e v a l u e E i n R O I { C R Sr n d
C O L C R S ,' r h i c h i s p r e s e n t t h e d e s t i n a t i o n €ndpoint of the DRAW/FILL
c o m m a n d . T h l e i 5 d o n e $ o t h a t R O I I C R Sa n d C O L C R Sc a n b e e l t e r e d
during the p€rforoanEe of the coomand.

B2O HOLD4* fO28C,1l -- Temporarq sto.aqe

o P E R A T I N GS Y S T E MC O l 6 5 5 5 - - Appendir L
2L9
HOLD4 is used to save and restofe t h e v e l u F i n A T A C H Rd u r i n g t h e
F I L L p l " o r e E E i A T A C H Ri s t e m t o r a r i l r J s e t t o t h e v € l v e i n F I L D A T t o
a..otopli6h th€ fillittg portion of th€ comnand.

8 2 1 R O W I N C * [ O O 7 9 , 1 ] a n d C O L I N C T .I O O Z A , t I - - Ro{r,/cotumn
incIeanent/dec"e ent

R O W I N Cd n d C O L T N Cd r e t h € r o u s n d c o l u n n i n c r € n e n t v a l u e 6 ; t h e g
ere eech Eet to +1 or -1 to control the bdEic direction of line
dralring. ROI',INC End CULINC repr.eEent the sign6 of NEI.IROH-
ROI'rCRSand NEI|COL - COLCRS, r.eEpertivelg.

BAe DELTAR* tOO76, 1f and DELTAC* EOO77,A7 -- Delta rou and delta
col umn

DELTAR and DELTAC contEin the absolute values of NEITROH- ROtrCRs


and NEI'rCOL- C O L C R S ,f e E p e c t i v e t g , t o g e t h e r u , i t h R O W I N Ca n d
CtILINC, thet, define the Etope of the lin€ to be draun.

823 C O U N T R *[ O O 7 E , 2 l - - Drau iteration count


C O U N T Ri n i t i € l l q c o n t a i n s t h e l a r . g e r o f D E L T A Ra n d D E L T A C , t h a t
i9 the number of iterations Fequir.ed to gen6r€te the desi?€d
l i n e . C O U N T Ri s t h € n d e c r e m e n t e d a f t e r e t e i { p o i n t o n t h e t i n e i s
plotted, until it reache6 € value of zero.

824 ROI.,AC* [OO7O,2l end COLAC* tOO7a, ?1 -- Accunutators


RO9TAe Cn d C O L A C € r e u o r k i n g a c c o m u l a t o r . E t h e t . o n t r o l the !.our-and
cotuftn-point plotti|rg and increfient (oi decpelllrntl +unction.

B?3 ENDPT* tOO74,2t -- Line l e n g t h


E N D P Tc o n t a i n s t h e l a r g e r o + DELTAR and DELTAC. and is used in
c o n J u n ct i o n u i t h R O I , A C / C O L AeC
n d D E L T A R / D E L T A Ct o c o n t r o l t h €
pl o t t i n g o f l i n e p o i n t s .

Displag inq Control Cha.acterE

O f t e n i t i s u s e f u l t o h a v e A T A S C II c o n t r o l E o d e s ( 3 s . h a s C L E A R ,
C U R S O RU P , e t c l . di5pla'Jed in th€ir graDhi. foi$s initead o+
iaving thenl perforo their. contr.ol tunction. Thi€ di.3plag
cepabilitg is provided in tqro +oros {rhen outputting to the Scieen
Editor: 1, a data Eontent +or(n in ohich a ipe.ial character (ESC'
precedeF eaah cont,iol charaEter to be di6plaqed and Z) a oode
contio 1 form.

O P E R A T I N OS Y S T E HC O 1 6 5 5 5 - - Appandix L
220
Escape (Diiplarj Follguin! Controt Cha.acter'

l,rhenever an ESC .heraetei ir detected bg the Srre€n Editor, the


n.rt cha.a.ter follolring thiE Eode iE diEpl!ged as d€t€, even if
it lrould noFrnallg b€ treatrd aF t Eonti'ol code, the EOL rode iE
the 9ola ercaption. It is aIuaVs treated €B e contr.ol code. The
geEuenae ESC ESC uill caugo the setond ESC EhareEter to be
dieplaUdd.

926 ESCFLO* tO2A2, lt -- Escepe +Iag

ESCFLCiE uEed bg the gcreen Edito" to control the eEc€pe


tequenEe funEtion; the +laq is set (to tao) bg the deteEtion o+
3n ESC ch€ract!r. (llE) in the dat3 etreafi end is r.set (td O)
follo{ring th€ output of the nert charrctei.

-
DiEp!a{ Control Chtsracter.Elvlode

trhen it i5 deiired to displag ATASCII contfot €odes oth€r' thar


EOL in thair gFaphiEe forfi, but not have an ESC thar€ct€r
agEociat€d irith eeEh control code, r dlsplaq tlode can be
estEbliihed bg Eetting a flag in the deta bE3e. This capabilitg
i s u s e d b g l € n g u a g e p r . o c e s E 0 1 6q r h e n d i s p l E g i n g h i g h - l e v e I
language Ftatalaents, that cEn tontein cotttrol Eodes at data
e I enent 5.

827 DSFFLe [O2FE,1] -- DiEplag contiol characterr flag

t r h e n D S P F L Ci E n o n z € f o , A T A S C I I c o n * r o l c o d e 3 o t h e r t h e n E B L 5 r e
treated as data and diEplaged on the scr€€n uhen ostput to the
S i c r e e n E d i t o r . . t l h € n D S P F L Oi E z e r o , A T A S C I I . o n t . o I codes are
ProEe:sed n o r : l t g .

DSPFLCis set to zero b{ Po{rer-up and [SVSTgt'{.


RESET].

Bi t-Hepped eraph i.s

A nuanber of t€lrlporerg variableE ere us€d bg the DiEpleg Handler


uhen h€ndling data elenentc (pirrlE' g o i n g t o o r + r ' o mt h e E c r e e n i
of inter.e5t her€ ate those veriahleE that €i€ used to control the
pEc|(ing and unpacking of grephics deta, tth€ie a mElnorgbgte
tgpicallrJ Eontains mor€ than gne date eleoent (tor exanple,
6creen node I contsins I pixel5 per |tl€fior{bgte).

828 O H A S X * [ O 2 A O ,1 : - - Pixel location m€st

OPERATINOSYSTEH cO16355 -- AteEndix L


221
D I ' I A S Ki s a m E s l t h a t € o n t 8 i n s z e r o 6 f o r a l 1 b i t 6 t h e t d o n o t
cotaeEpond to th€ speEi.fic pixel to be opereted l,pon? eno
1 ' 6 f o t a l 1 b i t E t h a t d o c o r r . e s p o n d . D I I A S Kc a n c o n t a i n
th€ vslu€5 6houn belo0, in bin3rq notetion:

11111111 -- Fcra.n mode6 l snd A, one pixel paF bqte.

1 1 1 1 O O O O- - 6cieen ftodes 9-11, turo pir€lE p6r bqEe.


00001111

l 1 O O O O O O- - Ecreen oodes 3, 5 and 7, +our pirels per bgte.


oo1 10000
ooooltoo
oooooo11
1 O O O O O O O- - scr-sen ood.s 4, 6 and & eight pixelB pe? bgte.
o1000000

ooooool0
oooooool

829 S H F A I I T * [ O O 6 F ,1 l - - Pirel JUsti+iEation


S H F A M Ti n d i c a t i s the anount to shift the right-Justified pirel
data on output, or ths amount to shi+t the ingut dat€ to riqht
Ju6tif! it on input. The value is alrrregs the saoe aE for DMASK
prior to the JUstific6tion p.ocess.

I n t e . n a I l ' r o r . ki n E V e r . i a b I e E

83O HOLDI* tOO51,1l -- Tedpoi€rq Etorege

831 HOLDa* tO29F,17 -- Tempo.€rq storage

832 HOLD3* lO29D, 1l -- Teftpoierg Etorage

833 Ti'IPCHR* !OO9O, tl -- Teoportsrg stor.eg€

834 D S T A T * [ O O 4 C ,1 l - - Disptag statuE

835 DINDEX tOOi7, 1l -- Disptag tnode

DINDEX aontaini the curI.ent screen ftode obtained +r'oo the 1ou
order +our bits o f t h e o o E t i e c e f l t O P E NA U X 1 b u t e .

836 SAVI,|SC[OOS9, al -- Sareen I'leoor g A t l d r e 6 s

SAVI'1SCc onta inE th€ I o u e s t a d d r . e s s o f t h e s c r e e n d a t a . a g i o n ; t h e


data at that addreEE i5 displaged at the upper Ieft corner of the
sct'een.

I I P E R A T I N GS Y S T E HC O 1 6 5 5 5 - - Appendir L
837 O L D C H R *I O O S D ,1 1 - - Cursor' <haiacter Eav€/r€stors
O L D C H Rr . e t € i n s t h e v a l u e o f t h e c h a r e c t e r u n d e , t h e v i s i b l € t e r t
- cnrt6ori thi6 variable iE uged to re6tore the oaiginEl character
velue uhen the cuasor is moved-

83€ OLDADR* IOOSE,2l -- Cursor |tlemorg addresg

S L D A D Rr e t r i n s the memorg address o+ the Gurrent vi6ibte tcrt


cursor location, thiE v€r.i€bl. i6 used in conJunction !rith OLDCHR
(837) to Fe6tore the origlnat chafaater valua uhen the curror rs

839 ADRESS* tOO64,?f -- Tefiporerg Etorag.

B4O HLTTTiP/OPNTHP/TOADR*
10066,2l -- Teopor.rig Etorage

841 SAVADR
/FRI'{ADR* [OO6E,2l -- t€hporair, storage

842 g U F C N T * t O O 6 8 ,1 l - - gcreen Editor cu.r.€nt logical !ine size

843 SUFSTR*[OO6C,2t -- Tanporarq Etor€g€

844 S I I P F L C * C O O 7 B1, l - - SgIit-i.reeo cursor rontrol

In split-screen node, the graphirs lurror. data and ths t6rt


{rindou cu?ioa dat6 aae +requentlq suapped a9 shoun b€lou in oidea
to get th. variables as:ociated trith the region being ac.essed
i n t o t h e F O I I C R S - O L D A DvRa . i a b l e E .

ROI{CRS 82 ------- TXTROI| 84


caLcRs 82 ------- TXTCOL E4
DINDEX 835 ------ TINDEX 949
sAvHsc 836 ------ TXTMSC85e
oLDROlt S3 ------- TXTOLD853
oLDCOL 83 -------
oLDCHRS37 ------
OLDADRB3A ------

SWPFLG is uced to Leep ti.e.t of q,hat data 5et i5 currentlg in the


R O I T C R S - O L D Ar .DeR g i o n ; S W P F L Ci s e q u a l t o $ F F 0 r h E nE p l i t - t c . e e n
t e r t u r i n d o u c u r . s o r !d € t E i s i n t h e m a i n r e g i o n , o t h c r r r i s a S W P F L O
iE eq(]dl to O.

849 INSDAT* IOO7D, 1l -- Tenpoierg 3to.ate

SYSlgll C016559 --
OPSRATINO Appendir L
223
846 Tt'tPRO[{r.tO2B6, 1] and THpcoL* CO289,2J -- Tempor€rs srorase

447 TMPLBT* [OAA1,1l -- Tenporaig Etorage

B4g SUBTiIP* fO29E, 1l -- Tenpor.erq storege

849 TINDEX* tO293, 1l -- Split scr€e'| tett uindo{r, screen |node

TINDEX ir the Eplit-screen tert trindou equivalent of DINDEX and is


e l u e g r . q u e l t o r e r . o u h e n S W F F L Gi s e q u a t t o r e r . o ( s e e 8 4 4 ' .

B9O g I TI.ISK* [OO6E, 1] -- Teftporaig stor.ate

851 LINEUF* toe47,4Ol -- phrJsical line bu+fe.

LINBUF iE us€d to teftpore!'i1{ buf+er one phgEical line of tert


uh€n the Scrlan Editor iE moving gEreen data.

452 T X T I ' I S C8 0 2 9 4 , 2 7 - - SpIit Ecieen memorq addr.ess

T X T I { S Ci e the split-sqreen tert uindo{, veriion o f S A V M S C( 8 3 6 } .

See 844 foi |tlorc informatibn.

853 TXTOLD* toe96,6l -- Solit sEreen cursor det€

SEs 844 foa oore infoifietion.

Ioternal Chararter C o d e C o n v e a si E n

Tuo variableB tie q6ed to iet€in the rurrent chEra.ter being


P r o E e t E a d ( f s r b o t h F e e d i n g a n d L r r . i t i n g ) , A T A C H R. o n t E i n s t h €
valqe 9a3ted to or +rom CIO, end CHARcontEins the inteinal code
tot.ieiPonding to the value in ATACHR.SecEuEe the h5rduare doeg
not inteip.ct ATASCII character.s directlg, the transformations
ihoun balou EFc rppliad to a1l tert date reed End uritten:

ATASCI I INTERNAL
CODE CODE

oo-lF 40*5F
20-3F OO-IF
40-5F 20-3F
60-7F 60-7F
80-9F CO-DF

OPERATINe SYSTET'ICOl6593 -- Appendix L


224
AO-AF EO-9F
CO-DF AO_EF
EO-FF
gea P26 for arore i n f o r f i . t i on.

S 5 4 A T A C H RI O A F S , 1 l - - Lest ATASCI char,€Eter o.i ptot point


A T A C H Rc o n t e i n s t h e A T A S C I v a l u € f o r t h e n o s t r . c € h t E h e r a c t e i
r€ad or !r.itten, o. the valse of th€ gr.aphitE point. ThiE
variabte can 61i. be conEidored to be e parameier of th€
F I L L I D R A I { c o f i n a n d s , a r t h . v a t u . i n A T A C H Ro i l } deteroine the
line cotoF rrhen a DRAI,or F'LL i6 per+or.ned.

859 C H A R * I O A F A ,1 l - - tntern€l cheracter code


C H A Rc o n t e i n ; t h e i n t e r n E l eod6 v6lue for the doEt recant
c h a r a ct € r r e a d o r t r i t t € n .

C. DISKETTE HANDLER
S e e S e c t i o n 5 f o l ' a d i . E c u s E i o no + t h e r e s i d € n t D i i t e t t e HendIea.

Cl S U F A D R *t O O l 9 , 2 l -- Data bu++er pointer

E U F A D Ra c t s e E t € n p o r a r . g p a g a z e r o p o i n t € r ' to the .urrent


d i s L e t t e bu f { e r .

C2 D S K TI I ' l * 4 0 2 4 6 , 1 l - - Dist forost operation timeout tilne


DSKTIR.ont.inE the tioeout valu€ for" SIO calling s€quence
v a r i € b l e D T I M L O ( s e e S e E t i o n 9 ) . D S K T T Mi s s e t t o 1 6 0 ( u h i c h
repr€sent3 e 171-s€cond tifieort) €t initialilation tio€, 6nd i5
updeted after each diEtettE statuE reqlrest operation. It contains th6
v a l u e r e t u r n a d i n t h e t h i i d b g t e o f t h e s t a t u E + r . e m e( e e e S € c t i o n
51, Note that al1 diElette oDer€tionE other thEn +ormat have a
tired (7t se.ond timeout, eEtablished bU the Di6kette llandler.

D. CASSETTE

Se€ Section 5 for a general description of the CaEEette Handler. The


a a s 9 e t t e u s e s t h e S e a i e l I / O b u s h E r d u a i e , b u t d o € s n o t c o n f o r m !ri th
t h € S € r i a 1 l / O b u s p r o t o c o l e E d e l i n e d i . n S s c t i o n 9 . H e n c e , t h e Ser ia I

OPERATINGSYSTEI,ICO16559 -- Apgendir L
I/O utilitg (SIO, haE caEEette €peci+ic code uithin it. sone veriables
in thiE subsection Ere utilizsd bg SIO End 6ooe bg the CaE€€tte
H e n dl € r .

Baud Rate D6terolnatidn

The input baud rata i! assum€d to be e no|nlnal 600 baud, but uill
be €dJUrted, if neEesEa!'!, bg the 5IO routine to account fot.
drive-dotor variationE, .tretched tape, etc. Th. beginning of
evetg saFratt€ record containg a Pettetn of alternating 1'3 and
reror that ic urad iolslg for Fpecd corr€ctiont bg aneasuiing th€
tina to "a:d a firad nsltlbei o+ bitg, the taue-ret!ive baud rete
is d6t.r.fiined and th. haiduere adJutted a..ordinqIg. InPut baud
i'ater..ngin9 frofi 319 to 14O7 baud t€n th€oieticallg be handl€d
uBing this t.chniEU..

The input basd ..1. is adJusted bri s€ttinq the POKEY.ountcf that
contigl€ the bit rarrpling pe.iod.

Dl CBAUDL* [O?EE, 1l and CBAUDH* [O2EF, 1l -- Cassette baud tate

InitiaIi..d to OsCC h€r, uhich rlpFeEent3 . nodrinrl 600 baud.


Aft.r b.ud rat6 calE{rlation, thsEe vaiieble5 !riIl Eontain POKEY
count€r vdluag for the coaaerted baud rEte.

DP TII'IFLO* tO317, 1l -- Baod ratG dete.nination tioeout flag

TIHFLO ir urrd b{ SIg to timeout a. uneucceEEfol bNud rate


dete.nin.tion. The fleg iE initiallg set to 1, end i+ it attainE E
v81ue of zaro (a+ter 2 s€Eonds) before the f ir'st bqt€ o$ the cassette
reeoad he3 becn read, the ooei6tion uill be abor'ted. See Elgo He4.

D3 TII'IERI* [O3OC,2l and TIMSR2+ tO31O,2l -- Baud rate tim€rs

The3e timerE .ontein referenEe tifiee fot the beginning end end o+
the fircd bit eett.rn r.e.€ive pF.iod. The first bgte of each
tinrr a o n t a i n s t h a t h e n E u r r € n t v e t t i c a l l i n e { o o ntar valus reed
fron A N T I C , E n d t h . e e E o n d b q t e o f e a c h t i n e r c o n t€inE the then
ru.r€nt value of t h e 1 e € 5 t s i E n i f i c a n t b g t e o * t h e OS "e€1 time
clocl ( RTCLOK+2).

The diffeienEe batueen the tifiers is colverted to tagter Peir


coqnts end is than u5ed to perfol'lt a t6bl€ lootup uith
int€Fgolation t o d e t s t i n e t h e n e u v a 1 ! s 5 f o ! ' C B A U D La n d C B A U D H

D4 A D D C O R *[ O 3 O E ,1 l - - tntet'polation adJUEtfie[t vetiable

O P E R A T I N eS Y S T E HC O l 6 5 5 5 - - Appendir L
226
A D D C O Ri s e t e l l l p o r a ! - g v a r i a b l e u s e d f o r the it|terpolatton
calcslation o+ the above computation.

DE TEHPI* tO312,21 -- Tehpo.ia.r, storage

D6 TEMPS* fO319, 1l -- Temporar{ stotage

D7 SAVIO* 80316, 1l -- SeriEl in dEta det€.t

SAVIO i5 uErd to ret€in the stat. o+ SKSTATIOAOFI bit 4 (seri.l


data in', it is uEed to detect ({nd ir updated aftdr} eve.{ bit
a.r i.vE L

Cassetta l , l o de

Dg CAgFLe* COaOF,tl -- C.srette I/O ftat

CASFLCis uF6d intern:tllg bq SIO to control thr progr.ft {loll,


thr.ough sher€d coda. A valsa of zero indiEata! that the rurient
operetion it a standaad Serial I/O bug oteration? aDd e norrerg
v€lue indicates a ca6s€tte ooeration.

Cassette 8u++er.

D9 C A S B U F * I O S F D ,1 3 1 1 - - CaEsette record buff€r.

C A S B U Fi E t h e bu++er uBed b9 the Cersettr H.ndlci for th. packing


end unFacting of casEette-t'ecofd d.ta, and b{ the initializatiorl
raEiette-boot Iogic. The foilnat for the stand8id tessett€ .ieEord
in the buf+e. iE Ehoun belou:

7 6 5 4 3 2 t O
+-+-+-+-+-+-+-+-+
io I o 1 0 1 01i CASDUF+O
+-+-+-+-+-+-+-+-+
l o 1 0 I o 1 0 1! +1
.i-+-.t-+-+-+-+-+-+
! control b{t. I +2
+-+-+-.f-+-+-+-+-+
! 1aa !
= detd
i bqtes I +130
+-+-+-+-+-+-+-+-+

See Section 5 foi €n €tplanation of the itandard casrette-record


formet.

OPERATINGSYSTEM COt6959 -- Appendix L


?e7
Dlo gLIt{* to2gA, 1l -- Cassette r.ecord dtsta 6ir€

BLIl.t conts inE the count o f t h e n u n b e i o f d a t a b q t e 6 i n t h e


c u r r e n t c a s g e t t € ! e co r d b e i n g r e d d . B L I M u i l l have a value
ranging froft 1 to 128, d e p e n d i n g u p o n t h e . e c o r d c o n t r o l b ! t e as
erple ined in gection 5.

Dl1 E P T R * [ O O 3 D .1 l - - C€66ette-r€cor.d d a t E i,ndi x


B P T Rc o n t a i n s a n i n d e x i n t o t h e d a t a p o r t i o n o f t h € c a sr e t t €
.eEo|.d being read or uritten. The value uill range frodr O to the
then cur..nt value of BLIH. When BpTR equets B L I M t h e n t h e b u f f e r
(CASAUFt ii ft,l1 i+ !,r iting o . r . e m p t g i + r . e a dr n g .

Int€ina 1 lJo"t ing Veriablei

D12 F E O F * [ O O 3 F ,1 ] - - C€ss€tte end-of*fite +1ag


FEOF is used bg the CaEsett€ Handl€r to +lEg the d€tection of an
end of file condition (contr.ol bgte = 5FEl. FEOFe{u€1 to zero
indicates th€t an EOF h€E not vet been detect€d, and a nonzero
valoe indicetei thEt en EOF hsE be€n deteEted. The fl€g iE reset
at evet g OPEN.

D13 F I Y P E * [ O O 3 E ,1 l - - Int€r.reEord gep t!pe

FIYPE ie a cop{ of ICAXzZ from the OPENcofi and end indic€tes the
tgpe of interaecord gep selected; a positive vElue indicateE
noroal r.ecord gaps, and a negative velue indiEateE continuous
n o d e 9 a ps .

D14 I'MODE* to zBq,11 -- CEEsettG read./urite node +lao

HI'IODEie ueed bg the C a s s e t t e H a n d l e t t o i n d i E a t e u h e t h e r t h €


E u r r e n t o p e r € t i o n i E a re€d ot uriit€ opefation, E value of za!.o
ind i.ateg r€ad, End a valu€ of $8O indicate5 urite.

D19 FREo* too4o, 1l - - Beep count

F R E Q i s u 3 e d t o i e t e i . n a n d c o u l l t t h e rlu. nber of beeps r e q u e E t e d o f


th€ BEEP routine b g t h e C a 5 s e t t e H E n dl e r d u r . i n 9 t h e OPEN c ommand
proEess.

OPERAT'NG SYSTEMC O 1 6 9 5 5 * - A pp e n d i r L
E. I{EYBOARD

Sre Section I fot. a gener.l dascription of the Keqbolrd Hendter.

Keg Re:d ing end DebooncinE

Th: Eonsol6 |(eg Eode r€giator. iE rrad in rerponE6 to an IRO


interrupt that iE gener.ted trhenevEr a trg Etr.ol6 i3 deteatad bg
the harduare. The keg code is comparcd rrrittr tha prioi |(€r, .ode
accept.d (CH1)i i+ the cod€E 6ie not identical, then the neu God€
i5 accepted and stored in the &e! code FIFO (CH) and in the prior
ke{ code vari€b16 (CH1}. If the codeE ai.e id€ntieEl, th.n the neo
co.le ii accepted onlq if a EUitable teg d€bou.cr delaq ha5
tranipir€d gince the prior value uar accegted.

I * t h e f t e t Jc o d e r e e d a n d a r c a p t e d i E t h . c o d e f o . I C T R L I 1 , t h a n
the displEg 6ta.t/stop fteg (sSFLAC, is comptefiented ard the
value iE not itored in the t€q code FIFO (CHl.

In addition t o t h € t e a d l n g o + t h e * e g d e t E , S R T I I . I Ri E s e t t o t g o
f o i a l l l n t e r r u p t 6 r € E e i v e d ( r e e E 8 ) r a n d A T R A C Ti s r € t t o O
u,neneveie neu code 1s aE.!tt€d (see BIO).

The Kegboard Hsndler obtains all keq dsta frofi CH, lrhenevar s
code is ertrEcted fron that 1-btJte FIFg, th. H€ndtet store6 a
v€lo. of *FF to the FIFO to indtcatc thet tha code has been Fe.d.
see Sertion 5 for further. diEcuesion of the Keqbo€rd Handler,B
proc€6sing of the lerJ codes

E1 C H l + t O 2 F 2 ,1 l - - Prior legbo.r.d Eh6r'€cter .ode.

CH1 contains the kelt code v€1ue of the leg moit r6a€ntlq r€ad and
Ecc€Dted.

E2 KEYOSL* TO2F1.1 l - - Debounce delag tifter.

KEYDELi.e set to a v a l u e o f 3 u h e n e v e r a k € { c o d e i s a c c e p t e d ,
and i6 d€cr.einented everq 6oth of a iocond bq the stage 2 VBLANX
p.ocesE (unti I it i€ache6 !ato ).

C H [ O 2 F C ,1 I - - KerJboard character Gode FIFO.

CH i5 e l-bgte FIFO that contains either. the vallje of the most


recentlg r.ead and dccepted keV code oi the value 3FF (rrhteh
indicateE that the FIFO is enptg). The FIFO is norilell{ reed b{
the Kegboar"d Handler, but ctsn be r.€ad bg e uEei program.

Keq data can also be gtor.ed into CH bg the Autorepeat logic €s


etplEined in the discuEsion relating to Eg.

OPERATINOSYSTEI'{CO14S59 -- Appendix L
S p e c i a l F u n ct i o n s

Star t/5top

Displa{ Handlei and sicr€en Editor. output to th€ text or. gr6phics
noda 9c.een cen be Etopped end sta.ted (ryithout lo3ing ang o+ the
output date) through the use of the tCTRLI 1t€t, coftbination.
Each leg depreE€ion toggIeE a flag thet iE monitored b{ the €bove
|'€ntioned Handlers. trhen the flag is nonzer.o, the handlerE uait
+oi it to 9o to zero be+oi'e eontinuinq anrJ output-

E4 SSFLAC [O2FF, 1l -- Stert/Etop f1a9

The +lag is noamallg zero, indiceting that Ecreen output is not


to be stoppEd. The +la9 iE Eomplefierted bg everq occurrence of
the ICTRLI 1&eg conbination bg th6 leqboafd IRG servi.e routine.

The +lag ir.et to .ero upon pouer-up, I S Y S T E MR


. ESETI o. IBREAKI
k a g p r o c e s Ei n g .

IBREAXJ Keg

E5 B R K K E Yt O O l 1 , 1 ! -- TBREAKI keg +1€g

E R N K E Yi E s s e d t o i n d i c a t e t h e t t h e t B R E A K I t € ' , h € E b e e n p i e e s e d .
Tha v€lue is nornallq nonzero i|nd is set to zero uheflever the
IBREAKI keq is presEed. The cod€ that deteEt6 and pror€EE€E the
tBREAKI condition (+1ag = O) Ehould set the ftag nonuero 69ain.

S R K K E Vi s o o n i t o ! ' e d b g t h e f o l l o u i n g OS ?outine6: Kegbo.rd


Handler, Displeg Handlei, Scr€€n Editor, CasEette Handler, xx?
T h e d e t e . t i o n o + a f B n E A K l c o n di t i o n d u r . i n g a n I / O o p e r E t i o n
tlill caus€ the ope?ation to be aborted and € Etetus of $8O to b€
returned to the user.

The +1ag ii Eet to nonzero upon Pouer-lp, C S Y S T E IR


4 .E S E T I o r ' ! p o n
aborting E pending L/O operation.

ISHIFTI/ICANTRALI Lock

ThE l€9bo€.d contr.ol haE thl.ee different lnodesfor code


genaration that applrJ to the €lph€betic *ege A throuqh Z:
1' norm€1, 2) caps lock, and 3) control 1oc|(-

O P E R A T I N CS Y S T E h C U 1 6 9 5 5 - - Aerendir L
In normal node, e1l lnmodified alphabetic character leqs generate
the lourerEare letter ATASCTI code (t61-7A).

In c€pE loct ftode, €11 unmodified alphabetia charaEter kEgE


generate the upperca3€ letter ATA$CII .ode (+41-9A,.

In tontrol loct node, Ell unnodifi€d .tphabetic character keg5


generate the (ontiol Ietter ATASCII cod€ (lO1-1A).

In all thrre mod€E, an{ alphabetic char€rtEr |(eg that ic oodified


(bg being pressed in conJUnEtion '!ith the tgHlFTl or ICTRLI t€rJ)
ttill geherate the desired ftodified Eode.

E6 S H F L O KI O 2 B E , 1 l - - ghift/contiol loc|l control +1ag

S H F L O Ko o l d l a l l ! haE one of three values:

$Oo = nornal ftode (no loc16 in eftect).


t4O o capg lock.
38O s cont.o I lock.

SHFL0R is Eet to !t4o upon Pouei-up and csYgTEl'i.RESETI and is


m o d i f i e d t h e r " e a f t e r b v t i e o s o n l g u h e n t h e t C A P g .L O U E R I f t e g i s
presEed (eithei brJ itEelf or in conJUnction uith th6 [SHIFT] or
I C T R L I k e 9, .

.- E7 H O L D C H *[ O O 7 C ,1 l - - Character holding varieble

H U L D C Hi s u g e d t o i e t e i n t h e c u r r e n t ch€reEter value ptioa to the


t S H I F T I . / t C O N Y R O L Il o g i c p r d c e e 6 .

A ut o r e p e a t

The Aotor.epeat feEture respondE to the continuous depr€55ion of €


*egboard |(eg bg "eplicating the tetJ codE 10 tifieE per seEond,
a+ter an initiel 1 / ? s e c o n d d e I a v . T h e t i t [ l e . v e i i a b l e S R T I H Ri s
used to control both the i.niti€1 delstJ end the rep€at rate.

W h e n e v e r S R T I I . I Ri s e q u e l t o ! e . o a n d a k e 9 i € b e i n g h e l d d o u n ,
the value of the *eq code iB stored in the l€q code FIFO (CH)
T h i e l o g i c i s p a r t o f t h e s t E g e 2 V B L A N Kp i o c e s € .

EE SRTIHR+ tO2eB, 1l -- Autoreeeat tioer

S R T I M Ri 5 c o n t r o l l e d b g t t o i n d e p e n d € n t p r o t e s s e 6 : 1 ) t h e
keqboard IRO Eervice routine, uhich est€b1i9he5 the initi€1 d€l€g
v a l u e a n d 2 ) t h e 6 t e g e 2 V D L A N Kr o q t i n e t h a t € E t 5 b I i g h e s t h e
repe€t rrte, decieflents the timer and iflPlement5 the auto repeat
logic.

O P E R A T I N OS Y S T E Hc 0 1 6 5 5 5 - - Appendix L
I n v e r s e V i d € o Co n t r o I

The K€gboErd NandlEr allous the direEt qenEr€tion of nore than


hdlf of the 296 ATASCII codee; but codes *gO-9A €nd codeE $AO- FC
can De tenerated onlt/ uith th€ ,,inverse video ood€', active. ThE
ATARI keg acts as 6n on/o+f toggt€ for this mode, €nd all
chaiacteai (except Sor scaeEn editing control chararters, uiIl be
9ubJe€t to inver.gion uhen the oode i9 active.

E? INVFLG tO286, 1l -- Inverse video +tag

INVFLG i6 noroallg zefo, indicating that nor.mat video ATASCII


codrs (bit 7 a O' rre to be qeneiated frofl keqstrokes; uhenever INVFLO
i5 nontero, inverre video ATASCII €odes (bit 7 = 1t uill be generated.
The sperial rontrol code€ are erempt fron thiE bit rnanipulation.

INVFLO iF set to zero b{ pot ea-!p End sgste{r rsset.

The Kegboard Handler inv€rts bit 7 of INVFLG uhenever. the ATARI terJ
i5 paetsed, the louer order bits a r e n o t E l t e r . e d € n d a r e E s s u d r e dt o b e
telo.

The Kegboard H.ndIei/s "erclu6iv. or'E'r (XOR,s) the ATASCII keg deta
uith th€ valse in INVFLC at all tines; the noifnEl velues of gOO and
*BO thui lead to control of the inv€rse video bit (bit 7).

Console Kegs: tSELECTI,fSTARTI, and tOPTIONl

The Eonrole tEgs e.e 3ensed directlU +ron the hat.duare


' i e g i 6 t e r C A N S O Lt D O l F l , s e e t h e A T A R I H o f t e C o o p u t e l .
HerduEre M:nuaI for detai l._

F. PRINTER
gee S€ction 5 for a general description o+ the Pr'inter HandIer.

Painter-Eutfer

F1 PRNBUF*tO3CO,40l -- Pr.inter-record buffer

P R N E U Fi 6 t h e b u + + e r u s e d b U t h e P r i n t e r Handler. for pac|(ing printer.


data to be Eent to the device controller. The b!ffer i5 40 bgteE long

O P E R A T I N eS Y S T E Mc O 1 5 5 5 5 - - AppEndix L
and cont€ins nothing but printe? data_

- FZ P A U F S Z + E O O 1 E1, l - - pfinter-record 6i!e

P B U F S ZE o n t a i n g t h e s i z e o f t h e P r i n t e r - r e c o r d for the current node


seleated, the oodes and reEpective sizes (in decinal buteg) are sho0in
belou:

Normal, 40
DoubIe l,idth 20 (not currentlg 6!pported bg the deviEe)
Si de{rags 29

Status req!eet 4

F3 PBPNT* IOOID, 1l -- P.inter-brrffer indel


-
PEPNT Eontains the current inder to the Printer-bu+fer. PBPNTianges
in valu€ +roltl zaro to th€ value of PBUFSZ.

l n t e r n a l t r o rI i n g V a r i a b l € s

F4 P T E l . l P *I O O I F , f l -- Pr.inter Handler temporarg deta Eeve


PTEHP is used bq the Printer. Hendle? to temporarilg seve the velue of
€ cheiacter to be output to the printer.

F5 P T I N O T * t O O 1 C ,1 l - - Printef tioeoat value

P T I t ' i O Tc o n t e i n s t h € t i o € o u t v a l ! e f o r g I 8 c a l l i n g E e q u e n r e v a i i a b l e
DTIMLO (see gection 91, PTItlOT ii 5et to 30 (uhich r"epre€entE a 32
second timeout) at intializetion time, and is uodated afte? each
printer. Etatus requeEt oper.ation to contain the vallJe r.etu?ned in th€
third bgte of the status frame (Eee Section 51.

O . C E N T R A LI / O R A U T I N E ( C I O }

See Section 5 fo. € desciiFtion of the central I/O UtilitiJ.

Usei cell Paraneter"s

O P E R A T I N eS Y S T E MC O 1 6 5 9 5 - - Appendi.x L
C I O € a I 1 g a r a m e t e r s a r e paE€ed pri.|larilg through
En I/O Control
BIoc|( (IoCBli although additional device Etat!s
infofmation can be
retuined in DVSTAT, and Handler inforoation i6 obtained fro|n the
devi ce teb le (HATABS).

I / O C o n t F oI S l o c t

I O C B i s t h e n a m ea p p l i e d c o l l e c t i v e l g t o t h e
16 bgte5 associated
urtn each of the B provided control Etructu.esi
EEr' gaction 5.

c1 I O C B C O 3 4 O1, 5 I - - L/O Cont.rot gloct


The l€bel IOCB iE the location of the fi.st bgte of the fir.Et IOCB in
the dst€ b35e. Foi VIDe cA thiough 01O, the "id".rr." grven ere foi.
I U C B l + Oo n I g , t h e a d d r e e E e s f o i a t t o f t h e I O C E , s
ire shoun tetou:
0340-o34F IACB {io
o350-o35F IOCB t'1
0360-o36F IOCB t+2
o370-o37F IOCB tf3
osao-o3€F rocE *4
o390-o39F rocB t+5
oSAO-O3AF tocB *6
o380-03BF tocg *7

02 I C H I D t O 3 4 0 ,1 l - - HEndler ID
$ee SeEtion 5. Initiali2ed t o t F F a t Pou,ei-up and rgsteo i e9at.

e3 ICDNO€0341, 1 l - - DEVice number

S e e S e ct i o n 5 .

04 ICCOT'ito342, 1 l - - C o . n m s n db g t e
s e e S € ct i o n g .

05 ICSTA to343, Status


Se€ Section 5.

E6 ICBAL, ICBAH to344,27 -- Buffar. addres6


Ser Section 5.

OPERATINC SYSTEI'I co1659s -- A p p e n d ix L


234
C7 ICPIL, ICPTH fO346.21 -- PUT ByTg vector
ge€ SeEtion t. Initialized to point t o C I O ' E , , I O C Bn o t O P E N , r, . o u t i n s
at po{reF-uF and sq5tem re6et.

eA ICSLL, ICBLH tO346,21 -- Bu+fer length / bgte count

S e e S e et i o n 5 .

e9 ICAXl, ICAX2 EO34A,2l -- Auxiliar{ inforoation

See Seetion 3.

OtO ICSPR tO34C,4l -- Spare bgtes for Handl6i ue€

.- There iE no fired assignoant of these four bgtes; the Hrndlea


asEociated {rith an IOCB can oa oaq not use thega bgt€3.

DeviEe Statug

e11 D V S T A TE O 2 E A , 4 l - - D.viEe Etatus

See Section 5 +or e discl,s.ion of t h € O E T S T A T U Sc o l t | f i . n d .

D e v i c e T a b1 e

e12 H A T A B SC 0 3 1 A , 3 B l - - Devi.6 table

See Section 9 {or a desc.iption of the devire table.

CIO/Harldle. Inter+ac€ Parameters

Communicationbetue€n CIO and a Handlet' iE acconplieh€d uEing th.


650A oachinc FegiEters, and € data Etruetuie celled tha Zero-tat6
IOCB (ZIOCBt. The ZIOcs l3 63Eenti.ll! a copg of the p€rticul.l
IOCB being useal for the clrrent operation.

OPERATINCSYSTEM CO16S95 -- Arrcndir L


a3s
Zero-Page IOC8

G13 Z I O C A ( I O C B A S I t O O e 0 ,1 6 1 - - Zero-pase IOCB


Th€ Ze.o-page IOCB iE en €tact copq (except as not€d in the
discusEionr thet follon) o+ the IOCB ep..ifiad brt the 650A X
rdqi3ter upon entrg to CIO, CIO.opie6 the o!ter tevel IOCB to
th€ Zer,o-pe9a IOCB, perforns the indicat€d +unction, noves the
(possiblq alter.edl Zero-page IOCB bac& to the
out€r tevel IOCB,
and then t.et!rns to the caller.

Althougi both the outer level IOCBEnd the Zero-Fage IOCBa.e


defined to be 16 bgteE in Ei!e, onlV the first 12 69tes are moved
b q CI O .

C14 I C H I D Z t O O e O ,1 l - - Handler inder numbe.


Se€ Section 5. Set to iFF on CLOSE.

G15 I C D N O Z t o o 2 1 ,1 l - - DeviEe drive nunber.

S e e S e c t i o n 5.

cl6 I C C O H Z too?2,1 I * - Comoeni bqte

Se€ Section

C17 ICSTAT tOO23,1l -- Stetus bgtF

Se. Section 5.

O1A tCgALZ, IC8ALH tOO24,2l -- guffer tsddress

S.e SeEtion 5. This pointE" v€riable iE nodified bV CIO in the


coui.ge of processinE iom€ com{rand6i houever, the oriEinal vetue
iE ieEtored be+ore returning to the celler.

C19 I CPTLZ, I CPTHZ

See Section 5. Set to point t o C I O ' E , , I O C Bn o t O P E N . r o u t i n e on


cLosE.

G2O ICBLLZ, I C B L H Z t O O 2 A , 2 l - - guf+er. length / bqte Eount

s e e s e ct i o n 5 . T h i s d o u b l e - b r r t e v a r i e b l e ? u h i c h E t a r t E o u t
representing th€ bu++er length, i6 modi*ied b{ CIO in the course

O P E R A T I N GS Y S T E HC O 1 6 5 9 5 - - App€ndix L
of pt'oce6€ing Eofte comm€nds; then, before returning to the
caller, thr transaction bqte count iE Etored the.ein.

G21 ICAXlZ, ICAXAZ tOO2A,2l -- Auxiliar{, infornation


S e e S e Et i o n 9 .

e22 ICSPRZ (tCIDNO,CIOCHR) [OO2C,4t -- CI0 uorlinq ver.iabteE


I C S P R Za n d I C S P R Z + 1€ r e u s e d b g C I O i n o b t a i n i n g t h 6 e p p i o p r i . t e
Handler entrq point froo the h€ndlei.s veEtor tabla (Eee Section 9).

ICSPRZ+a is alEo lEbeled ICIDNO and retEin5 thr v.lue o+ the 65Oe X
re9isteD fr.orn CIO entig. The X r.egister is loaded frodr ICIDNO ei CIO
ret!rns to the ca!lei.

I C S P R Z + 3 i s a l r o l a b € 1 e d C I O C H Ra n d r e t e i n g t h e v a l u e o f t h e 6 5 0 A A
iegister f r o f l C I O e n t ! . q , e r c e p t f o r d a t a r e a d i n g t g p e E o t n n l a n d E ,i n
d h i c h c a 6 e t h e m o e t r e c e n t d a t € bgte read is etor.ed tn CIOCHR. Th€
65Oe A register i E l o € d e d f i o l | l C T O C H Ra E C I O r e t u r n i to the catler..

I n t e . n a I t r o r . ki n 9 V € r i € b I e E

e23 tccor,rT*too 17,1I -- Coimend table ind€r

ICC0HT ir usFd as an i n d € t t o C I O ' E i n t e r ' l a l ao|nftand tab 1€, u h i c h m a pt


comoand bqte values t g H E n d l e r ' e n t r g o f f s e t E ( s € 6 S e c t i o n I +or mot.e
i n f o r m E t i o n ) . I C C O M Tc o n t a i n s t h e v a l u e f r o o I C C O M Ze x c e p t u h e n I C C O M Z
i 6 g r e a t e r t h a n $ O E , i n u h i c h c d 6 e 1 C C O M Ti s iet to $OE.

ee4 rcIDNo* to02E, 11 - - C I O c a l l X ieg i g ter Eave/restore

See 022.

O25 CIOCHR* (0o?F, 1l - - CIO call A reg ister Eave/reE t or e

See G22.

H. SERIAL I/6 RAUTINE (SIO}

See 5e€tion 9 for diFru6gion$ relating to SIO.

OPERATINe SYSTEI.{CO16559 -- Appendi{ L


U6el" Ca 11 Pafanreter.s

StO aaIl perEmeters aie pa65ed painatilg through a Device Control


BloEt; Elthough an additiona! "noisg bu6" option exists that i5
EelectEble thr.ough a sep€r.ate vaii€b1e.

Device Contr.ol Blo.t

H1 D C B [ O 3 O O ,1 ? l - - Devi.e Control Bloct

DCB is the nane applied €olleEtivelg to tht 12 bgteE at loGationg


O S O O - O 3 O B f. h e r e b q t e E p t o v i d e t h . p € r a m e t e r p a s s i n g o € c h e n i 6 m f o r gIO
and €re d.rcribed individuellg b€lon.

HA D D E V I C [ O 3 O O ,1 l - - DeviEe bui ID

see S.ction 9.

H3 DUNIT lO3O1,lf -- Devicc unit nlmbet

see gection 9.

H4 DCol'lNDtO3Oe, 1l -- Device cooft€nd

See Se.tion 9.

H9 DSTATSfO3O3,1l -- Device statuE

See Sect ion L

H6 , BUFHI tO3O4,2l --
D B U F L OD Hsndlei bufflr €ddreEe

See Sect ion 9.

H7 O T I M L O t O 3 O 6 ,1 l - - Oevice tineout

See Section 9.

HA , BYTHI [O3OA,2] --
D B Y T L OD Buffer' length / bgte count

see gi€ction 9.

OPERATINGSYSTEI'i CU16555 -- Appendit L


234
H9 DAUX1.,DAUX2 t O 3 O A '2 l -- A u xi I i e r r J i n + o r f t e t i o n
See Sect ion 9.

BUESound Control

H 1 O S O U N D Rt O O 4 1 , l l -- Ouiet/noiEg t/O flEg


S O U N D Ri s a * l a g u s e d t o i n d i c a t e t o S I O l r h e t h € r . n o i s e i , t o b €
9ener€t€d on the televiEion audio ciF€sit uhea Ser.ial I/O b{J9
€Etivitq i E i n p r o g i e s E . S O U N D Re q l a l t o ! e r o i n d i c a t e B t h e t
9ound i3 to be inhibited, and non!ero indiesteB that sound is to
b e € n e b l e d . S I O E e t s S O U N D Rt o g a t p o d e r - s p d n d s q E t e n r g s 6 r .

5 6 r .i e I B u F C o n t r o l

Retr.g Logic

S I O u i 1 1 a t t e & p t o n e c o m p l e t e c o d m a n d" e t r g i f t h e f i r E t a t t e m p t
rE not error fiee, arhera a conplete coinsnd tig roniists o+ up to
14 €tteftpti to send (End ecknouledge) a rgdtoan; f.ane, follollled
b q a E i n g I e e t t e m p t t o r e c E i v e C O H p L E T Er n d p o E E i b l q a d a t r
frame-

Hl1 C R E T R Y * t O O 3 6 ,1 l - * Conoend fraoe r€tr9 rount.r


C R E T R Yc o n t r o l s the inner too! o f t h e r ' e t r . g l o g i c , t h a t a . i o c i e t e d
r r i t h E e n di n g a n d r e c € i v i n q a n a c l n o u l e d g e m e n t o + t h e c o n f t a n d f F a o e .
C R E T R Yi 5 s e t t o 1 3 b u S I O e t t h e b a g i n n i n g o f e v e r . g c o m o a n d
in it i€t ion, thuE E11o;ing +or €n initi.l att.npt and up to 13
add it ional retr.i es.

H12 DRETRY* tOO37, 1l -- Device retrg counter


D R E T R YE o n t r o l E t h e o u t a r loop of the fetrq I09ic, that
a s 6 o ci a t e d u i t h i n i t i a t i n g a connand.et.q after e failuie
sub6eqt,ent to the romnand frane aclnouledg€oent. D R E T R Yi r E € t t o
1 brj SIO at entrg, thu6 .1 looing foi an initir! atteo!t €tld
l e d di t i o n a l r e t F u .

OPERATINO SYSTEI.{C U 1 6 5 5 5 - - A p p e n di r L
C he c & B u t o

Th. Serial I/O buE protoEot ipecifies t h a t alI rooftend and data
r l . a n a s o u s t c o n t e i n a c h e c f t s u mv E l i d e t i o n b t J t e , t h i s
bqte is the
arith..etiE sum (uith end-ar.o!nd carr{} of a l l o + t h e o t h e r - b q t e s
in th€ +feoe.

H13 CHKSUI'I+tOO31, 1J -- Checlrsut, velue


C H K S U I ic o n t a i n s the ftErD€ aheckgurn as cot$puted bg SIO +or all fFame
ta6ns+er9.

H14 C H K S N T * I O O A B ,1 l - - CheckEum sent f1a9


CMSNT irdic.teE to th€ E6iiat boc t!.anEftit i n t e r r u p t s e r v i c e
routin. uhethei the frane chec|tjuo bgte hag b6.n sent
Ve t . C H K S N T
e q u a l t o z e r o i n d i r a t E s t h a t t h e c h e i t s u r n b gt e h a s n o t g e t b e e n
sent, after t h e c h e c t s u f n i E E e n t , C H K S N Ti s t h e n 5 € t n o n : s r o .

H15 N O C K S* [ O O 3 C ,1 l - - No chec&sud $oltous dat€ +Ieg


N O C K S I Ii E r f l e g u 5 e d t o c o n m u n i c . t e b e t o e e n t h e g I O t o D I e v e I
code and the SeiiaI bu9 r'eraive ioterrupt gervic€ routine that
th€ next input utll not be folloured b! € chec*euft bgte. A v6lue
of aero rpecifieE thet e chealistl| brlte rrritl folloo, nonrero specifie6
that E chectsum bgt. uill not follou.

Data 8uffe. i nE

Orneral Bu+fei Conti oI

H16 B U F R L O * t O O 3 2 ,1 l a n d B U F R H T * t O O g 3 , 1 l - - Nert bqte address


B U F R L Oe n d B U F R H Tr o f i p r i g e E p o i n t e r t o t h e n e x t b u f f e r l o c e t i o n
to be read +|'om gr oFitten to. Foi e data frarae trensfar, the
pointei i5 initiellg Eet to the value contein€d ir the SIO call
p a r a n e t e r . D B U F L Oa n d D B U F H I , r n d i E t h e n i n E i e n e n t e d b g t h e
intaarupt gervire aoutinec ts a part of oo,t 5l bus
deta tr.€n!+er'.
For a conoand frama trEnsfer, tha pointer iE i€t to point to th€
SIO-maintained commandfiams output buffer,.

H17 B F E N L O * t O O 3 4 , 1 l a n d B F E N H T * t O O 3 5 ,t t -- Buffer end addr€s5


S F E N L O . / B F E N Hf Io . f i . pointer to the bgt€ totlouing the tast freme
data bgto (not including the ch€slruot to be sent dr. r€Eaived.

SYSTE CO16S59--
OPERATTNG Aeeendix L
BFENLO/BFENHI i6 t h e a i t t h { r r t 1 c E U m o f B U F R L D / E U F R H9I l u s the
frao€ sire plus

Command
Frame Output Bu++et
See SeEtion 9 fot' the tommand fr.eme for'ftat and dascriPtign

H1A CDEVIC* tO23A, 1 I - - C o m f i e n d+ r a o e d e v i c E t D

CDEVIC is set to th€ v a l u e o b t : i n e d bq €dding SIO calI paFaneter


D D E V I C t o D U N T Ta n d E u bt r a c t i n g 1 -

H19 CCOIIND* tO23B, 1 I -- Command +r6me cofttnand.

CCOI'INDis Eet to the v a l u e obtained fro{n SIO call pEaametea


DCOI-IND.

H20 CAUXI* tO29C,1l end cAuxa* to23D, 1I -- AutillErg infotfiation

C A U X I e n d C A U X 2a r e B e t t o t h e v a l u e s o b t e i n € d + r o SIO call
p a r ' 6 n E t e r ' 3 D A U X l a n d D A U X 2 ,r e s P e c t i v e ! 9 .

Rea€ive/TrEnEdi.t Deta Buf+€r ing

H21 BUFRFL* tO03B, 1l -- Bu$fer fu1l flag

S U F R F Li s € f l a g u s e d b { t h e E e i i 5 1 b u 5 r e c e i v € i n t e r r u P t t e r v i c e
ioutinE to indiiate uhen the m€in portion of a buc frane has bren
r e c e i v e d - - e 1 1 b u t t h e c h e c * E L t t t lb ' J t e . E U F R F L e q u E l t o t e f o
indicates thet the ittEinpoition heE not been co|nplEtelli received'
€ nonzero value indicates thet the oein portion hes been
i'€ceived.

H22 RECVDN* tOO39, 1r - - Receive +ra,ne done flag

R E C V D Ni s a f l a g u E e d bq SIO to comnonicate bet{raen the Serial


bus receive interruPt s;rvic€ routin€ and the main SIO cods. The
f 1ag iE initiallq Eet to 2ero bq 5I0, and later 6et nonzero bq
the interrup t seivice ioutine aftel. the lsst bgte of € bus +r'ane
heE been r'eceived,

H?3 TEt'lPit CO23E,1l -- SIO 1-b{te I/O data

O P E R A T I N oS Y S T E HC A 1 6 S 5 5 - - ApPendix L
24L
T E I ' I Pi s u s e d t o r a c e i v e 1 - b q t e r e s p o n s e E f r o l t l 5 e r i a I bug
controlle.Er EUch as ACK, NAK. COI'IPLETE or ERROR.

H24 XI{TDAN* [OO3A, 1l -- Transdtit frane done f}ag

X M T D O Ni s e f l E g u s e d b q g l u t o c o m r t l u n i c a t e b e t o € i n the SeriBl
buE tr'enBmit interrupt Eervice routine and th€ main 5IO code. The
+1a9 is initiellg Eet to zeFo bU SIO, and later 5et nonze.o bq
the inte!.t'spt Ee.vlc€ r'outins a+tea the leEt bgte of a bus +iane
ha5 been tranEmitted.

S I O T i m e o ut

SIO u6e5 Sgsten Tioer 1 to provide the tioeout Eepabilitg for'


var.ious operationg initiated inteinallrJ. Sae SeEtion 6 for a
diEcuision of the capabiliti€s o + t h € S q E t € ( nT i m e r E . T I h F L o i 3
the fleg used to cofifiuniEata betu€en SIO and the tin€r initieted
code poirted to brJ CDTI'|A1.

H25 Tl l.lFl.c+ [0317, 1] -- sIO op.ration tilneout flag

TIIIFLO ie us€d to indicete a ti eout situation foi a buE


oper€tion The flag i5 initiallg 5et to 1, 5nd if it atteinE a
value of rero (eft€r the timaout period) befoie the tutrent
operetion is Eomplete, the operetion {ti1l be aborted. See .Iso
D2.

H26 C D T t ' t V 1 *t o 2 1 g , 2 l -- Sg5tem Tioer 1 value

ThiE e-bgte rount tater on vEiious values depending uPon the


operation b€ing tioed. Se€ al6o P4.

H27 CDTI''AI+ EOe26' 27 -- SUiten Timer 1 addreEs

T h i r v e r t o ? E l u r e q Ep o i n t E t o t h e . J T I M E R r o u t i n e ? u h o s e o n l g
f u n c t i o n i s t o s e t T I i ' l F L Gt o z e r o . T h i s v e c t o r i 5 i n i t i a l i r e d bq
SIO betore everg use, so that S'rste Ti&er 1can be uged bg an!
process that does not use SIO &rithin d tining +unction See aIso
P5.

O P E R A T I N CS Y S T E HC O 1 6 9 9 9 - - Appendix L
I n t e r n a I W o r ki n g V € r . i a b t e i

H28 STACKP* tO31A,1l -- Stect p6inter sav./r,eito.e


S T A C X Pc o n t a i n E t h e v a t u € o f t h e 6 5 0 g S p r a g ' i s t e r a t e n t . q t o
SIOi this ii retained to faeilitate a direri erro. erit +ioft an
gIO Eubroutin€.

H29 TSTAT| f0319, 1l -- T€mpoiarg statug


TSTAT iE ured to rett,rn the operetion stat{rg fr.ottl th€ l,lAIT
routine and uitl contEin one o+ th! gIO Etatu3 bgto vetue5 as
i h o u n t n A p p e n di r 8 .

H3O ERRFLe* tO23F, 1l -- t/O error, fl.g


! E R R F L Ci s u ; e d f o r . E o f l r u n i c a t l o n b € t t e e n t h € I I A I T . o u t i n e a n d t h e
out.r lave! StO code. ERRFLo is norfi.llg zr.o, but ir Bet to IFF
then € device rssponds uith an invalid iteponse bgte.

H31 STATUS* [OO3O, 1I -- SIO operation 3tEtus


STATUSir a !e!.o-pitge veiiable thEt is uged lr,ithin SIO to contain
the operetion st€trrs that uill be Etored to th€ catling ,equen..
\ _. p a . a o e t e r v € r . i a b l r D S T A T Su h e n S I D r . t u r n s to th€ call.r.

H3a SSKCTL* [0232, 1] -- SXCTL Gop{

SSKCTL ic otili.ed bg StO to teep tracl of the content of th.


SKCTL [D2OFl reglEterr uhich lE a uFita-onlg r€gist€r.

!,. ATARI CONTROLLERS

The ATARI Eontioll€rs are read es part of the Stage e VBLANK


p.ocese. The .neoded deta ie pirtiallV decoded a.rd proce3red as
shourn in the subsectiong that +oIlorr.

JorJEticts

Up to four Joggtict controllerr rrn bc att.chad to the EofiFutea


Eonsole, each uith a ?-po3ition Jogstlc* plus a trigger bstton.

OPERATINCSYSIEH CO16595 -- ApPendir L


243
J1 STICKO * STICK3 EO27e,4j -- Joq6ticl po 6i t i o n s e n g e
The 4 JoUsti.cftposttion senEe va.iableE contain a b it-encoded
p o s i t i o n s a n s e a 9 s h o | l , nb e i o u :

7 6 5 4 3 e 1 0
+-+-+-+-+-+-+-+-+
io o o otRtLtDlui
+-+-+-+-+-+_+-+_+

uher.e: R = O indicates Jogstict RIOHTsensor trle.


L - O if|dicate5 Jolrstick LEFT sensoi trqe.
D c O indicatEs J o g s t i c * D O W Ns e n s o r t i u e .
U e O indicateF Jogstick Up sensoa true_
Nine unique conbinationg are posiible, indiceting the poBsible
J o g s t i a & p o Ei t i o n s s h o u n b e t o u r :

CENTER toF
UP toE
UPlRIOHT 306
RICHT 907
DOUIN/RIOHT tO5
DA!'N 9OD
DOI"IN/LEFT IO9
LEFT *OB
UPlLEFT 304

J2 STRICO - STRte3 tOtA4,4t -- JoqBtiEl t.iggEr. sen6e


Th6 foui Jogstic& trigger sense variebtes each contein a siDole bit
i n d i c a t i n g t h 6 p o F i t i o n o f t h e J o q s t i E | ( t i i q g e l ' € s s h o 0 r nb e l i u :

7 6 9 4 3 ? 1 0
.i-+_+_+_+_+_+_+_+
to o o o o o otTi
+-+-+_+_+_+_+_+_+

Uhe!'e: T c O indirateg triggei pr€sEed.

PaddleE

Up to eight peddle controller5 Ean be connect€d to the cooo!tei,


eech lrith a potentiodeter €nd a trigger sens€.

J3 P A D D L O- P A D D L T t O e 7 O ,A l - - paddt€ DoEition eense


There ir a single-bgte variable esEo.iated {rith eech ,addl.
position a€nger the valu€€ r.anga f"orn eAB for full

OPERATINe SYSTET'iCO16SSS -- Appendir L


244
counteiclockuise aotation to l for +ull cloct{rise r'otation.

The paddle values er€ oftan €onverted bg the usri, ai thoorn


belou, to tive a tesult of O for +ql1 coqnte!'Eloclrria€ totation
and 227 for f!11 cloElUiee rotatlon:

VALUE := eAB - PADDLX;

J4 PTRIOO- PTRIGT tO27C,AI -* Paddle tr.igglr' e€nee

Th. g-psdd1! tt'i9ger senr. variables eech tont.in e singl€ bit


indirating the poEition of the taddle t?igger aE Ehoon b.lou:

7 6 t r 4 3 2 1 A
+-+-+-+-+-+-+-+-+
lo o o o o o oiTl
+-+-+-+-+*+-+-+-+

uhera: T = O indicates trigger pressed.

Liqht Pen

Th€ OS teadr the posltion of a single light pen.nd 3tore€ the


hofizont€l and vertic€1 rosition coda$ in tuo variabl€5i th"3a todsB
ar'e not tha gaoe es tha eEtual s€ra€n.oor'dinEta9. The pen poEition
codeE foa dif+erent oortions of the sEieen are shoun belou,:

\._, Left edge -- 67.


codee inci'ease in incaeoent5 o+ ont to E valua of e27, than Eo to o
and tontiaua to incree€e monotonicallg (one count Pel. colo!' clock).
Right edge -- 7.

Uppot odga -- 16.


Codeg inEreEEe in inEiementS of one (one count pef tlro rSEtor
I inee l. Louer' edge -- 111.

.- T h e l i q h t p e n h a r d u , a r eu i l l iead and latEh th. p.n Pocition 60 tifies


p". se;ond; independent of the pen button position, lrhlch is
5eParat6l{ senEed.

In grder +or the light Pcn to opeaate it tnust be PoEitioned over a


portion of the screen |,hich haE suffi.ient luninancE to activtte the
photoEensot in the peni a blant ( d a r k ) scfeen uill g e n . " a l 1 g n o t
provide enolgh luoinance to utilize thG light Fen

J 5 L P E N Ht o e 3 4 , 1 l - - Light pEn horizontal Pocition qode

L P E N HE o n t E i o 6 t h e h o r i r o n t a l p o 5 i t i o n . o d e f o t t h e l i g h t p e n , t h e
a l g o t i t h t n 6 e 1 o { , ( u r i t t e n i n P a E c a l) s h o u E t h e c o n v e i B i o n f r o m P o E i t i o n
code to 6cieen coordinste (screen mode 7):

I F L P E N H{ 3 3 { chect +o. rollover point }


THEN { adJust velueg to fight of rotlover }

OPERATTNGSYSTEI{ C415555 -- ApPendir L


e45
XPSS := LPENH+ zaz
ELSE { no adJlretoent to left o+ rol}over loint }
XPOS : a LPENHT
X P O S : s X P O S- 6 7 , t adJust for latt edge offret )
IF XFAS d O THSN XPOS := O;
IF XPOS ) 159 fHEN XPOS := 1s9;

J6 LPENV tO235, 1! -- Light pen vertical position cod€


L P E N Vc o n t E i n E t h e v e r t i c e l po6ition Eode +oi the light pen; the
algorithn beloq, (uritten i n p a s c a l ) s h o r r s t h e c o n v e r ; i o n + i . o mD o E i t i o n
code to Bcf'een coordinEte (gc?een ftode 7':
yPOS :s LPENV - 16, { adJUEt for uppei €dge offset }
IF YPOS 4 O THEN YPES :* O,
IF YPOS ], 95 THEN ypOS : = 95,

J7 STICKO - STICKS tO27B, 47 -- Light pen button Eense


The light p e n b u t t o n E e n s € i g e n E o d e d i n o n e o f S T T C K O- S t I C K a
(dapending upon the actu€1 Eontioller port uEedl as shourn
belou:

+-+-+-+-+_+_+_+-+
i totoiotTi
+-+-+-+-+_+_+_+_+

uhere: T - O indirate5 the light Fen button is pr.ssEed.

Driving Contiot le.s

The d"iving controller hes no poEition EtopE End th{J6 6llorrs unlimited
rotation in eithri direEtion, the outprrt of the Eontrolter is € 2-bit
Caag eode {rhich can be used to detertnine the dir€ction of aotation.
The contaoller i5 Eensod using the satne intern€1 harduar€ a9 the
J o g E t i r k , t h u i t h e E a t n €d e t a b a c e v E r i E b t e s 3 r e u r e d f o r b o t h .

I O16555 --
O P E R A I I N GS Y S T E I ' C Areendix L
246
Je S ' T I C K O- s T I C K 3 [ O 2 Z E , 4 l - - D"ivinq controtle. Eense
The 4 driving controller sen€e var.i€bles conteln an encodGd
rotation ( p o E i t i o n ) E e n s e v a l . u e , € E F h o o r nb e l o u :

7 6 e 4 3 2 L O
+_+_+_+_+_+_+_+_+
lO O O O 1 lival!
+_+_+_.t_+_+_+_+_+

urhei€ a clockuise rotation of tha contr.otl€r produceE the fo1looing


EontinuouE aequence of four values (Ehoun in hexadeciflElt:

o F , o D ,O C , O EO, F ,O D , . . . . . . .

end a €oqntarcloctrrise rotation of the controller. produces the


follo'rring Eot|tinuous sequencc of four velueS:

oF, oE,oc, oD,oF, oE, . . . . .

J9 - STRIG3 tOAA4t 47 --
SSSSsTRIGO Driving trigg.r 3en5e

fh:.four driving trigger seose variabl.E eech contein a iingle bit


indicating th. porition of the driving trigge. as shoun beto0r:

7 6 9 4 3 2 L O
+-t-+_+_+_+_+_+_+
io o o o o o olT!
+_+-+_+_+_+-l_+_+

orh€ie: T = C indic€te6 t.igqer piegEed.

K. DISK FILE I'IANACER

See Section 5 +or in+oroation relating to the DiEt Fi!,e M.nager.

K1 FMSZPC* tOO43,7l -- Ft'tS reserved space


F H S Z P Gi r t h c r e g e f v e d E p a r e i n t h e d a t a b a s r f o t ' t h e v a r i a b t c B r h o u n
baloui the naoeE aBEoriated uith K2 thiough Kg.ie not in the etrstefi
equate f ile.

Kt ZSUFP* fOO43,2l -- Buffer pointer

K3 ZDRVA* lOO49,2l -- Drive pointei

K4 ZSBA* tOO47,el -- Sector buffer oointer

OPERATINCSYSTEM CO16595 -- Appendir L


e47
KS ERRNO* [OO49, 1] -- Error numoer

L. DISK UTILITY POINYER

L1 DSKUTL* [OO1A,2l -- Feg€-zero pointer veriable

.FLOATINC
tI. POINT PACRAEE
See S€ction g +or a dcscription of th€ Floati$g point package.

Ml FRO IOOD4,6I -- Fp .egirt€r O

He FRE* IOODA,6l -- FP r.caiEter (internal)

tt3 F R I [ O O € O , 6 1- - FP r.egistsi 1

tt4 FR2* [OOE6,6t -- FP iegirtar 2 (internetl

, ] --
l . l 5 F R x * [ O O € C1 Spare (!,nu€ed)

i 1 6 E E X P * I O O E D1, l - - Erponent valse (internEll

I ' 1 7 N S I C N * I O O E E1, l - - Sign of oenti6sa (intginEt)

I ' l g E S I 0 N * I O O E F 1, l - - Sign of exponent (intarnsll

t ' 1 9 F C H R F L C *f O O F O1, l - - F i r . E t c h a i a c t e r fleg (inte!,n€t)

t'llo D I G R T * ! O O F 1 ,l : -- Diqits to .ight of de.iftel point

t ' 1 1 1 C I X I O O F a ,1 ] - - Character inder

t ' 1 1 2 I N B U F FI O O F S , e l - - Input t€rt bu+fe. pointei

OPERATINGSYSTEI{ C416999 -- Appendix L


248
l'113 ZTEMPl*IOOFS,e] -- Te por€rtJ storage

.- H14 ZTEt'tP4*[OOF7,e] -- T€|nporarg 6torag€

Hl5 ZTEt'tP3* COOF9,?l -- Tenporar{ stoiage

|116 FLPTR COOFC,2I-- Pointer to FP nuober

Hl7 FPTRa+ IOOFE,2] -- FP pac*ege u5e

H1a L8PRI* tO57E, 1l -- LBUFF preemble

t'119 LBPRa* tO$7F, 1l -- LAUFF p!.€anbIe

M2O LBUFF tO5AO,96l -- Text buffei

Hal PLYARC* IO5EO,6l -- FP r€gister (int€rnel)

Mea F F S C R / F S C R *C O S E 6 , 6 l - - FP rsglst.r (lnternalt

t ' 1 2 3 F P S C R l , / S C R 1 *( O S E C , 6 l - - Fp r.€EiBter (intlrnal)

t{24 IOOFB,tl --
DEeFLe./RADFLG D€g,reos/radianr flag

D E G F L G= O i n d i c a t e s r ' r d i a n s , 6 i n d i c d t e i {eorees.

N. Pouer-UD and SYSTEH RESET

Se€ Section 7 for details o+ the pouei-up €nd Eggtem r69et


oPerrtions.

R A f , lS i z i n g

Dur'ing gotrer-up rnd Eq5teo aeget the tirEt no[-RAM addre3s dbove 1OOO
hex is located and its sddresg reteined u3ing a norldestr!etive
test. The first b g t e o + e v e i t J 4 K m e m o t . g" b l o c l " i E t € s t e d t o g e r i f
it is altera!1e, if so, the or'iginal value i9 testored end the next
bloEk is t65ted, :nd if not, that addresE ii con€idered to be th€
end of RAM.

OPERATINe SYSTEM CO16555 -- App.ndix L


249
Nl R A M L O * / T R A I ' 1 S Z[ o
* oo4,3] -- RAll d€ta./te3t Fointer (tempoferg]

RAIILO+I Eontains the LgB of the Eddress to be teEted (aludqs = Ot


and TRAIISZ (san6 ar RAl.lLO+z) contains thr f'lSB of th€ addie3E to b€
t a 6 t e d . R A H L S + Oc o n t a i n E t h e c o m p l e m e n t e d v a l u e o f t h e d a t a
origlnallg .ont.in.d in the oefiorg location being tetted.

L6ter in the initlatlzation piocesE these veri€bIeE ere osod for


totellg uniel.trd functione, but fir3t t h e v r l u € i n T R A l v l s zi 5 f i o v e d
to the variables RAHSIZ and MEI'ITOP+1.

N2 TSTDAT* EOOO7,L7 -- T€st data blte $av€

T S T D A Tc o n t a i n s the original value of the meoor{ locetion being


teeted.

Diststtr/Cissette-Boot

A9 a prrt of thc Poqrer-up Eequenca, softuaae can be booted frofi €n


€ttached disl driv€ or. ce6!iatte plagei €5 expl€ined in Section 1O

N3 DOSINI IOOOC,e]-- Di6l€tte-boot initialization v€ctor.

D O S T N Ic o r t a i n s t h r d i E k b o o t . d 3 0 + t t a t e i n i t i s l i z e t i o n address
froo th. beginning of the boot file (see Saction 1O) uhenev€r s
dist ett.-boot is succa6sfull{ co.npleted.

N4 CKEY* too4A, 1l -- casEetta-boot requeEt frag

CI(EY iE an internal fIEg u6€d to indicate thet the tonsole ISTARTI


leq uar pressed during Pooe.-up, thuE indicating thst a
cassstt€-boot i s d e s i r e d . C K E Y e q u a l s z € r o r r , h e nn o c a 6 s e t t e - b o o t i5
requested, and iE non:ero llrh€n a Eassette-bgot is requested. T h e
+lag i9 cleared to zero 6fter a cessette_boot.

N5 C A S S B T * [ O O 4 B ,1 ] - - CaEEette-booting fIag

C A S S B Ti s u E e d d u i i n g t h e c a E s e t t e - b o o t P r o . € 5 5 t o i n d i c a t a t o
ihared code thet th€ caEt€tte i6 being boot€d and nEt the di6kette.
C A S S B T€ q u a t t o . e " o i n d i c t t e s a d i s l e t t e - b o o t , and nonzeio indica+es
a ra95e tte-b oot.

N6 CASTNI rOOO2,2J -- CEes€tte-boot initialiretion vector

CASINI contains the .aEsette-booted Eoftuare initializ€tion address


+ion the be9!nning of the boot file ( s e e S e c t i o n 1 o ) { r r h e t r e v ear

0 P E R A T I N o S Y S T E Mc o 1 6 5 5 9 - - Appendir L
250
aass€tt€-boot i s s u a c E E g f u Il V r o n p l e t e d .

N7 B O O T ? * [ O O O ? ,1 ] - - SuEceiEfut dieketts/Eaesett._boot fI6g.


B O O T ?i n d i . a t e e t o t h e i n i t i . t i z a t i o n p r . o c e E E o iu h i c h , i f a n t j , o f
the boot ope!.etions uaot to 6ucccss+ul Eooptetion.
Th€ flag valueE
are set bq the OS Bnd the +ormat for th€ vat iabte
i9 Ehoun balou:

7 6 5 4 3 2 1 0
+_+_+_l_+_+_+_+_+
i tctDi
+-+-+-+-+-+_+_+_+
{ritere: C c 1 indiE6tes that t h e c a s s e t t e - b o o t u e s G o m p l a t e d .
D - l i n d i E a t e s t h a t the dist!tt€-boot u.E coopteted.

NB DFLAOS* [O24O, 1] -- Diskette flage


DFLAeS contdins the value of th€ f i r e t bqt! of the boot fil., .fter .
d i s kett.-boot, See S€ction 10.

N P D A S E C T *f o a 4 1 , 1 l - - Diskette-boot Eactor count


D B S E C Ti E i n i t i a l l r J set to tho velue of the s.cohd bgts of the
f i l e , d u r ' i n g a d i s l e t t € - b o o t , a D d i s t h e n u s e d t o c o r i t r o t t h e boot
of additional diEtette soctors r.ead, 1f rng. nunber

NlO BSOTAD* tO242,2i -- Di6lr€tte-boot .lnor9 add..sg


B O O T A Di E i n i t i r l l ' J set to the value of the third and fourth
bgteE o+ thr boot flle, during a dlst(Ftte-bootr and is nqt
tnodified th ereafter.

Environfient Contaol

tf, et the end o+ a poorar-upor 9 9 s t € m r e 5 e t , c o n t r o l i r n o t


91v€n to one of the cartridqes (es Etplelned in S€cttonr 7 .nd 10',
than progr.a control passeE to the addr€3r cont€ioad in tha data
base veriab le DOSVEC.

N1l COLDAT*t0e44, 1' -- Coldst.it .oftpt.t€ f159


C O L D S Ti r u s e d b { t h e i n i t i e l i ! e t i o n r o u t i n e t o d e t e c t t h e c a s 6 o f
E 9 9 3 t e mr l B e t o c < u r r i n g b € f o r e t h e c o p l e t i o n o f t h e po!ref-up
p r o c e r i . C O L D S Ti r s € t t d 3 F F a t t h a b . g l n n i n g o f t h r pouer-!g

OPERATINGSYSIEM CO16555 -- Appendir L


?51
se{uence and is set to O €t the conpletion, if 5 EgEted rB6et
occur'9 uhile the value iE nonzero, the pouer-up Eequen.e uill be
reinitiated (rether than initiating € 9{ste|n teEet s€quence}.

N12 D O S V E Ct O O o A , 2 l - - Non.artridg€ cootrol vector

A t t h € b e g i n n i n g o + p q u e r ' - u p t h o O S E e t s D O S V E Ct o p o i n t t o t h e
"blarkboer.d" routine, D O S V E Cc e n t h e n b e a l t e r e d a s a c o n s e { u e n c e
o+ a distette-boot or. caEsette-boot (as erplained in Section 1Ol to
rFtabligh a neu control progl€t!r. Control urill be paEied tht"ough
D O S V E Co n d l 1 p o u 6 r - u p e n d s g s t e o r e s e t c o n d i t i o n s in uhich e
c tridge do€E not t€te cont.ol +irst.

S g E t e t nR e s i t

N13 $tARllST IOOOA,1l -- Werl|letart f lag

WARIIST.quals tFF dsrlng a sgstam reset (ureiitl6tart)


i n i t i a l i z . t i o n a n d €quslE O dur.if|9 a pouer'-up initialization
(coldst.rtt.

P. INTERRUP'S
ge€ Se€tion 5 for e discuEEionof intet'ruPt Froc€sEing.

P1 C R I T I C [ O O 4 2 ,1 ] - - Critica] code Eection flag

CRITIC is uecd to signal to th€ VBLANKinterrupt pro..5eoi that a


critical code e..tign is executing trithout IRO interrupts being
inhibited, the VBLANKinterrupt groceEEol' uitl stop inte.rupt
pt'oceislng 3+tei Et.g€ l end be+ot€ 6tage 2, Just es if the 69Oa
proEegsot I bit t'eie set, uhen CRITIC is set.

C R I T T Cs q u a l t o z e i o i n d i . a t e 5 t h a t t h e c q i r e n t l q e r e c u t i n g t o d e
Eection i5 noncritical, uhile ang non!efo value indiEetas that the
currentLrJ e r e c u t i n g E o d € section i5 ct'itical.

PA F O K | € K [ O O 1 O 1, l - - P O K E Yi n t e r r u p t mes*

POK SK is a softuare neintained interiupt mEsl that is used in


ronJUnction t r i t h t h e e n e b l i n g a n d d i s E b l i n g of th€ vailous POKEY
interrupt€. T h i ! f i a E * i e r e q ! i ? e d b e c a u i . t h e POKEYint{rrupt
.nable i e g i E t e r I R O S N E D 2 O E I i 6 . u r i t e - o n l g r o gister, .nd at ang
point in til|le the 5g5te!!t Ean hdve several uEe"5 independantl!
€n.blinE €nd dissbling P O N E Yi n t e i r u p t s . P O K } i S Ki E u p d a t e d b q t h €

OPERATINe SYSTEII CO16555 -- App6ndix L


25e
s6ers to alud{s cdatain the curtent cont€nt of IRCEN.

5{stsn liner€

The Sgeted Tifiers a!.o discugced in deteil in ge.tion 6.

Realtin! Clocl

The re€ltirne cloct (or fiaoe counter, a6 it iE Eometimescal1ed'


i i i n e i e d e n t € d e s p a r t o f t h e s t a g e I V S L A N Kp r o t € 3 g , 9 e x p l E i n e d
i n S e ct i o n 6 .

P3 R T C L O Kt O O 1 2 , 3 l - - Realtine +.afie .ounteF

R T C L t l t ( + Oi s the nost Eignifitant b g t e , R T C L O K + 1t h e n o r t i n o s t


sig'|ificant b g t 6 , a n d R T C L O K + at h e l e a 6 t s i g n i f l E a n t b q t a . S e e t h e
dis.ussionE at D3 and pre.eding B10 for OS ute of RTCLOX.

Sg6t€o limer 1
ggstem Timer' 1 is maintained a5 par.t of the st.te 1 V A L A N KP . o c e E s ,
and thus h€s the h i g h e s t p r i o . i t g o f a n g o f t h e u 9 6r tinets.

P4 CDTHVI toel8,2l -- sgstEm Tioer 1 velue

cDTHvl containE zeio uhen th€ tioer is insctive, otheilrie. it


c o n t a i n g t h e n u n b e r g f V B L A N K 9r ' e o a i n i n g u n t i l tioeout. Also 5ee
H26.

P5 CDTI'{AI tO?,26' 27 -- gtJste$ Tiner I Jlop address

C D T I ' 1 A lc o n t s i n 6 t h e a d d r e s e t o t t h i c h t o J S R 5 h o u l d t h e t i m e r
tioeout. Se€ 3l.so H27 and Eectiofl 6.

gPERATINO SYSTEII CO16555 -- Appendir L


253
SrrEt€o Tifte. 2

Sgsten Tih€r. 2 iE naintain.d a E p a r t o f t h € B t a g e Z V A L A N Kp r o c € E s ,


end hdE the E€cood highest piio!'it9 of the uEer timer6. The OS doei
not have anrJ direct use for Sgstem Timer 2,

P6 C D T M V 2t O 2 1 A , 2 7 - - Sgst.m Timei 2 vatue

C D T H V ac o n t a i n s r e r o u h e n t h e t i o e r i s i n a c t i v e , o t h e r u i s e it
c o n t a i n s t h e n u t n b e r o f V B L A N K Sr . m e i n i n g u n t i l tifteout.

P7 C D T I { A et O 2 2 A , 2 l -- Sgsteft Tide. 2 JUmp addr€e3

C D T I ' ! A 2c o n t a i n i the €ddre6s to trhich to JSR should the time.


timeout. See Section 6.

Sgstem Tineri 3, 4 and 5

Sgstem Timers 3, 4 end 5 a?e oaintain€d as pa.t of the €tage 2


V B L A N Kp . o a e g s , e n d h a v e t h e l o u e s t p r i o F i t g o+ the uiei timer6.
Th€ OS does not have anq dir.€ct uae +or thare tifters.

PE CDTlfV3 toztC,?J, CDTl.tV4 tO21E,2t and CDTt'tVg tO22O,2l

lhai€ variableE contain zero uhen the corregponding timers are


inactive, otheruis. t h 6 g c o n t a i n t h e n u m b a i o f V B L A N K Er e m a i n i n 0
u n t i . I t i m eo u t .

F9 CDTl.lF3 tO22A, lL CDTtlF4 tOa2C, 11 €nd CDTMFS COAAE,2i

Each of thcse l-bgte variables uill be set to lero should its


cort €spondinE tiftea timeo{rt. The OS n€ver modifieg the6e bgtes
e x c e p t t o g e t t h e n t o z e r o { . r 9 o nt i r n e o u t ( a n d i n i t i a I i ! a t i o n ) .

RAI'I Interisp t V€. tor6

T h e i e a i e R A l v lv r c t o r s for menq of the interrupt conditionE uithin


the sUsteh. Se€ Section 6 foi. a di5cuseion of the placing o+ values
t o t h e s e v e Et o r . € .

S Y S T E MC O 1 6 5 5 5 - -
OPERATTNG Aerendix L
234
NHI Interrupt V e ct o r 6

P 1 O V D S L S TI O A O O , A I- - DiEp1aq-tist interrupt vector


Thi6 vector. is not |,5ed bq the OS. See Se.tion 6.

P11 WBLKI 8c.222,e7 -- Imoediate VBLANK veEtor


This veEtor is ihitialired to point to th6 BS stege l VBLANK

P1? WBLKD tO224,27 -- Deferred VBLANK vector


This vector ie initialized to point t o t h e O S V E L A N Ke r i t routine.
S e e S e ct i o n 6 -

IRO Interiupt V e ct o r s

P13 Vtt'llRO tO216,2J -- G€n€iaI tRO vectoF


This veEtor iE initi€lized to point to the OS tno interrqor
proce9Eor.. S€€ Section 6.

P14 V P R C E Dt O z O ? ' 2 7 - - Seriat I./O bus proeeed ,tgnal


The EariEl buE line thet produaas thir inter.r.upt ls not uEed in tha
EUfrent Egsteir. See SeEtion 6.

P15 V T N T E Rt O 2 O 4 , A t - - Serial I/O bu6 inteiiupt siqnat


- The serial bus lin€ thet p|.oducei this inteirupt is not ured in the
cur.r€nt sqste$. See Sectio|r 6.

P16 V I S R E A K : E O 2 O 62, 1 - - BRK instruEtion veEto,


This veEtor. is initialized to poin* to e pLA, RTI E.{uenrc .s th€
US proper does {rot utitize the BRK instrurtion. See S-.ctton 6.

P17 V K E Y S DI O a O A , 2 ] - - Keqboard inteiiupt veEto,


This vector is initi6lired to point to the Krgboa.d Handler,.E
interrupt gervice routine. See Section 6 and ahe diEcussron
pieced in9 E1.

OPERATINOSYSTEI'ICO16399 -- Appendir L
255
Plg VSERIN [O2OA,2t -- Serial I/O buE reEeive dats ie€drJ

ThiF vector is initiEli!ed to point to the SIO |Jtilitq's interrupt


6ervica routine. See Section 6.

P19 V S E R O R[ O 2 O C , ? l - - Ser.ial l/O bus tfinsmit readg

Thit v€ctor 1s initiilizad to point to the SIO utilitg,s int€rrupt


€ervice routine. See Section 6.

PzO V S E R O C[ O 2 O E , 2 l - - SeiiaI I/O bi!€ t.snrmit ro$plete

Thir v.ctor ir initialired to point to the StO utilitU.e intorrupt


3arviae routine. See Section 6.

Pe1 VTIMR1 EO?IO,27, VTttJtR2 tO212,al and VTIttR4 to2t4,21 -- pOKEy


t ioer. vec tors

T h e P O K E Yt i n e r . interr.upts are not used bq the OS See Se.tion 6.

Hardueie R.g ist.. Update6

A ! p a r t o + t h . s t e g e 2 V B L A N Kp r o c e s E , c e r t e i n h a . d u a r . a . . 9 i s t € . e
ara updated fFom 08 dgt€ baso variable6 as rxplaincd in Section 6.

P22 SDHCTL* tozeF, 1l -- DttA controt

S D M C T Li E s e t t o a v a l p e o f t o z a t t h e b e g i n n i n g o f a D i s p t € !
Handler OPENcomnandr and then later Eet to a val{r. of t22. The
v a l u e o f S D M C T L i i s t o . e d t o D I ' I A C T L[ D 4 O O ] a i p a r t o f t h e s t a g e e
V B L A N Kp r o c e 5 r .

P?3 S D L S T L * t O 2 3 O , 1 l a n d S D L 8 T H T .t O ? 3 1 , 1 1 - - DiipIaU list dddrers

The Displr{ Handler format6 a neu di6plag liEt uith €verg OPEN
coooand and pute th6 diiplag List addreE€ in SDLSTL ard SDLSTH. The
v.luc of thesF bgtae are 6tored to DLISTL ED4O2I and DLI$TH [D4O3]
a E p a r i o f t h e s t a g e 2 V B L A N Kp r o c e s s .

o360-o36F IOCE lf2


o370-o37F rOCg {+3
0380-o3EF IOCA *4
o390-o39F IOCB tts
oSAO-O3AF IOCB ti6
o3BO-O3BF rOCB lf7

OPERATINOSYSTEI'ICO16555 -- Aprendir L
236
NUTE: The.e is a potential ti{ring probleo assotiet.d tith the
updating of tha hardorarc te9i6ter9 +rom the dEta ba6a vaiisbleE.
s i n c e t h e i t a g e a V B L A N Kp r o E e t s i s p e r f o r o € d u i t h i n t e i r u p t g
'- enabl€d, it i. pog6ibl€ foi €n IRO intetropt to ocEur befoir thr
updating of DLISTH and DLISfL. I+ the p!.ocairing of that
interrupt (plus other neEted interruptg, arcaed€ the
vertical-b1.n* d.l€g ( 1 fisecr, then th€ digpl.g lirt point.r
regiiter uill not have been updated uhen displag I i E t Ptocesting
coomencls for the ne{, fremc, end e rctesn g}itch lrilI r'aF|J!t.

P24 G P R I O R * I O A A F ,1 l - - Prioiitg control

The Displa{ Handler .lteis b i t 3 6 a n d 7 o f G P R I O Ra t P a t t of


eBtablirhing the OTIA mode. Th. v.lue of GPRIORis ttoird to
P R I O R [ D O l B l a E p a t t o + t h e s t e g e a V B L A N KP t o c . ! s .

P23 C H A C T * E O 2 F 3 ,1 7 - - Character control

T h e D i s p l a g H a n d l e r . E e t 6 C H A C Tt o t o a o n e v e i g O P E N c o | n n . n d . T h €
v a l u . o f C H A C T i . E t o r a d t o C H A C T Lt D 4 o l l a E p t r t o f t h . € t a g e 2
VBLANK rr.oc ess.

P26 C H A A Sl O a F 4 , 1 1 - - Charactei addre.s ba3.

T h . D i s p l a g H . f | d l a i 6 e t s C H B A St o I E O o n e v e r g O P E N c o d n . n d . T h €
v a t u e o f C H E A S i e E t o r € d t o C H B A S EC D 4 O 9 ] a s p a t t o + t h ! 5 t a g e 2
\:. V S L A N Kp F o c e r e . T h i s v e r i a b t e c o n t t o l t the eh:r'.ctet .ubt.t for
sEreen oodeE l and e, a value of tEO Pl'ovidas the €apital letteis
and nufibe? set {rhereas a vslue of lEe provides the loorarcase
letter's €nd speeiat graphics 3et. See 85$ fo. |not'e infoiftatio'|.

P27 P C O L R XE O A C O , 4 I a n d C O L O R Tt O 2 C 4 , 9 l - - Color regi6tlri

See 87 and 88,

Internal. !{ork ing Variab les

P2g INTEIIP* toeeD, tl -- Tempora?g Etotage

INTEI'IP is ui€d bg th6 SETVBL (SETVBV' routine.

UPERATINOSYSTEI'ICO163S5 -- APpendix L
257
R. USER AREAS

The area6 shol,n belou are availrb16 to th€ lser in a non-nested


envi,.onfient. gee S.ction 4 foi +ur.th€r infoioation.

R1 IOOEO,12E]

R2 tO4aO,640I

OP€RATINOSYSTEf'|CO16559 -- Appendir L
zea
ALPHABET'CAL LIST OF DATA BIrSE VARIABLES

NAt'IE vtD ADDRESS


SI ZE

ADDCOR D4 o30E, I
ADRESS 839 0064, 2
APPMHI A3 oooE,2
ATACHR s94 O2FB, 1
ATRACT 810 oo4D,I
BFENHI Ht7 oo39, I
BFENLO Hl7 oo34, 1
BI TI'ISK 450 oo5E, 1
BLIII D10 o2aA, 1
BOOT? N7 ooo?, 1
BOOTAD N10 0242,2
BOTSCR O2BF, 1
EPTR D11 oo3D,1
BRKKEY Fq ool 1, 1
BUFADR o o 1 5 ,a
BUFCNT 842 oo5g, 1
BUFRFL H21 oo3g, 1
EUFRHI H16 oo33, 1
BUFRLO H16 oo3e, 1
EUFSTR 843 oo6c,2
CASBUF o9 o3FD,131
CASFLG DA o30F, 1
CAS:NI N6 ooo2,2
CASSBT N5 oo48, 1
CAUXl H20 o23C,I
CAUX2 l{20 o23D,1
CSAUDH D1 O2EF,1
CBAUDL D1 OzEE,1
ccoHND H19 oe38, 1
CDEVIC H1E oe3A, 1
CDTHAl P5,l,!.27 422&, 2
CDTMA2 aezB,2
cDTHFs P9 oe2A, 1
CDTMF4 P9 oazc, 1
cDlr.{F$ P9 o22E, 1
cDTHV1 P4, H26 0226,2
cDTt'rv2 P6 o21A,2
cDTt|v3 PE o21C,2
OPERATINOSYSIEII CO16559 -- A9p.nd i r
e59
cDTt'tv4 P8 oaLE,2
cDTf.tv9 PB 0220,2
CH ozFC,1
CHKSNT Hl4 oo3s, 1
cH1 FI oeF?, 1
CHACT Pe5 oaF3, 1
CHAR 855 OzFA,1
CHSAS P2A o2F4,I
CHKSNT H14 oo3B,1
cHKSUIl tlt,t o o 3 1 ,1
CIOCHR oozF, 1
crx t't11 ooF2,1
CKEY N4 oo4A,1
COLAC 424 oo72, 2
coLcRs 92 oo95,2
COLDST Nl1 oe44, 1
COLINC 821 oo7A, 1
coLoRo BA, F27 oac4, 1
coLoRl BA, P27 ozcs,1
co|-oR2 88, P27 cec6,I
co|-oR3 84, P27 o2c7, 1
coLoR4 BA, P?7 ozcE,1
COLRSH 811 oo4F, 1
COUNTR 823 ao7E, 2.
CRETRV Hl1 0036, 1
CRITIC P1 oo4a, 1
CRSINH B1 o?Fo, 1
CSTAT oeg8, 1
DAUX1 H9 o30A, I
DAUX2 H9 0308,2
DBSECT N9 o24L, 1
DAUFHI H6 0304, 1
DBUFLO H5 0305, 1
DEYTHI HA 0304, 1
DEYTLO HE 0309, 1
DCB H1 0300, 1?
DCOt'tND H4 0302, 1
DDEVIC H2 0300, 1
DEEFLC n24 OOFB,1
D€LTAC Bet oo77 ' 2
DELTAR B2e 0076, 1
DFLAOS NE oe40, 1
DICRT Hto o o F 1 ,I
DI NDEX 835 aoeT' 1
DMASK B2g o2AO, I
DOSINI N3 oooc,2
DOSVEC N12 000A, a
DRETRV H1? oo37, 1
DRKI'ISK 812 oo4E,1
DSI(TI f'r c2
DSKUTL L1 oo1A,2
DSPFLE s27 O2FE, 1
DSTAT 434 oo4c, 1
OPSRATING SYSTEM CO16555 - - A p p e n d ir L
260
DSTATg H5 0303, 1
DT I ITLO H7 0306, 1
OUNIT H3 0301,1
DUNUSE 0307 t 1
DVSTAT c11 o2EA, 4

H6 OOED,1
ENDPT 025 oo74t e
H30
(ERRNO K5) oo49, I
ESCFLC o2A2, L
ESICN f.{a OOEF,1
FCHRFL l',t9 ooFo, 1
D12 oo3F, 1
F ILDAT OEFD,1
F l LFLC B1 A o2B7, 1
FLPTR i416 ooFc, 2
FtlSZP6 K1 oo43, 7
FPSCR Hee o5E6,6
FPSCR1 H23 ogEC,6
FPTR2 t1l7 OOFE,2
M1 00D4,6
FRl tt3 oo€o,6
M4 ooE6,6
H2 OODA,6
o15 oo40, 1
FRI.IADR 0069, 2
FRX ooEc, 1
FSCR 1,122 o5E6,6
FSCRl M23 o5EC,6
FTYPE D13 oo3E, 1
EPRIOR P24 o26F , L

HATABS o12 o31A,3A


HOLDI 830 oo51,1
HOLD2 831 o29F. 1
HOLD3 o29D, 1
HOLD4 820 ozDC,1
HOLDCH oo7c,t
I C A X1 G9 o34A, 1
ICAXlZ Gel oo2A, 1
ICAX2 e9 0348, 1
1CAX27 oo28, 1
ICBAH o6 o?45, L
I CBAHZ ots oo25, 1
I CBAL o6 0344, t
I CEALZ G1B ooe4, 1
ICSLH oa 0349, t
ICELHZ G20 oo29, 1
I CELL ca 0344, I
ICELLZ oo2g, 1

OPERATINe SYSTET'!CBl65S5 -- Appendix L


261
rccor'l G4 0342, L
ICCOHT e23 o017, 1
ICCOttZ G16 oo22,1
I CDNO G3 0341. 1
I CDNOZ Gl5 ooel,1
ICHID 0340, 1
ICHIDZ c14 oo?o, I
IC IDNO c24, C2 2002E, 1
ICPTH 0347, t
ICPTHZ c19 oaeT,1
I CPTL 0346, 1
ICPTLZ e1? 0026, 1
c10 434C, 4
I CSPRZ oo2c,4
ICSTA GS 0343, 1
ICSTAZ c17 oo23, I
INAUFF it 12 ooF3, 2
INSDAT 445 ao7D,1
: NTE}IP PzE oaeD, 1
INVFLE 0286, 1
IOCB c1 4340t t6
I OCBAS G13 oo20, 16
KEYDEL

LSFEND M20 osEO,96


LBPR1 M1E o37E, t
LBPR2 I't19 o37F,L
LBUFF 20 oigo, 96
LINBUF 851 oe47, 40
L['ARCN oo5?, 1
LOeCOL 815 0063, 1
LOGfIAP 814 a?82,4
I'lE!tLO A1 a2€7, 2
ItEt'rToP A2 o2E5,e
MLTTI'IP 840 4066, ?

NEI.'COL 819 oo6L,2


NEI'ROW s19 0060, 1
NOCKSII Hl5 oo3c, I
NgIGN ?17 OOEE,1
OLDADR B3S oo5E,?
OLDCHR 837 oogD, I
OLDCOL B3 oo5D,t
OLDROI,I oo5A, 1
OPNTI'IP 840 0066,2
PADDLO oe70, 1
PADDLI o e 7 1 ,L
PADDL2 J3
PADDL3 J3 oe73, 1
PADDL4 0274, 1

APERATINGsYsTEf'tco16s55 - - A pp e n d i x L
262
PADDLS
PADDL6 0276, L
PADDLT 0277 , I
PBPNT. o o 1 D ,1
PBUFSZ o o1 E ,1
PCOLRO 97, P27 o2co, 1
PCI]LR 1 a7, P27 o2c1, 1
PCOLR2 87, P27 ozce,1
PCOLR3 s7, P27 oec3,1
PLYARO t'121 osEO,6
POKMSK o o 1 0 ,1
PRNBUF o3co,40
PTEMP F4 ootF, 1
PT IMOI t-t o o 1 c ,1
PTRICO J4 oeTc, 1
P T RI O 1 J4 o27D,1
PTRIG2 .r4 o27Et t
PTRIE3 oeTF, 1
PTRIG4 J4 o2ao, 1
PTRIGS J4 0 2 8 1 ,I
PTRIC6 o2E?, 1
PTNIE7 .J4 0293, 1
RADFLC H24 OOFB,1
RAMLO N1 ooo4,3
RAt'lSI Z A5 opE4, 1
RAIITOP A4 006A, 1
RECVDN oo3?, 1
RI.IARON oo53, 1
ROWAC 824 oo70,a
ROWCRS oo54,I
RAS'I NC 821 0079, 1
RTCLOK oo12,3
SAVADR 841 oo6E,2
SAVIO 0316, 1
sAv!tsc 836 oosg,e
SCRFLC B9 O2BB,1
SDLSTH P23 o:31, 1
SDLSTL 0230, 1
SDHCTL P?2 o22F, t
SHFAI{T 829 oo6F,I
SHFLOI( O2BE,1
SOUNDR H10 o o 4 1 ,1
SRT I I.IR oazB,1
SSFLAG OzFF,1
ssl(cTL oe32, 1
STACXP H2B 0 3 1 A ,1
STATUS H31 0030, 1
STICKO J1, J7, J8 o27e, I
ST ICKl J', J7, JA 0279, 1
sTtcK2 J', J7, JB o27A, 1
sTlcK3 ,J1, J7, .rE o27B, 1
STRIEO .J2, .J7, ,tg 0e94, I

OPERATINCsYaTEit co16955 - - A pp . n d i r L
263
J2, J7, Jq 0285, 1
STRIG2 J2, J7, ,Jg oeB6, 1
STRI G3 J2, J7, J9 o2s4, 4
SU8TfIP s48
sl.lPFLo 844 oo7B, 1
TABI.IAP s13 o2A3, 15
TEIIP H23 o23E, 1
TEMPl o312,2
TEIIP3 I)6 0319,1
T I }{ER1 o30c, 2
T tf'tER2 0310,2
T l.tFLC D2, HES o317,1
TINDEX 849 oe93,r
TI,IPCHR 833 oo90,I
THPCOL 946 oeBq,a
TI'IPL8T 847 o 2 A 1 ,1
T}IPROW 846 O:BB, 1
TOADR 940 ao66, e
TRAHSZ N1 ooo4,3
TSTAT H29 0319, 1
TSTDAT N2 ooo7,1
TXTCOL 94 o29L,2
TXTt'tSC s52 a294, 2
TXTOLD 853 0296,6
TXTROW B4 0290, 1
UgAREA R1 ooao,1ea
VSREA'( PL6 0?0 6, ?
VDSLST P10 0200, 2
vIHtRO P13 o2L6, 2
VINTER P15 0204, 2
vt(sY8D PL7 oeo8,a
VPRCED P14 0202, e
VSERI N Plg o20A,a
vsERoc P?O o20E,2
P19 o20c, 2
VTIIIRI P2L o410,2
vTrHR2 P2L o2L2, 2
vT 'tR4 P2l oeL4, 2
VVELKD P12 o2e4, 2
WBLKI P11 o2??, ?
ltARfiST N13 oooa, 1
||t.loDE D14 0289, 1

xHTDON H24 oo3A,1


IZBUFF K2) oo43,a
( ZDRVA K3' oo45,2
ZI O C B G13 oo?o, 16
( z58A K4) oo47,2
ZTEXPl ooFs,2
O P E R A T I N eS Y S T E MC O 1 6 5 5 5 - - ADeendir L
264
zTEr.,rP3 M19 00F9, 2
zTEr'rP4 M14 00F7, ?

O P E R A T I N GS Y S T E MC O 1 6 5 5 5 - - Aroendix L
IIEI.,IORYADDRESS ARDERED LIST OF DATADASE VARIABLES

ADDRESS VI D NAI'IE

oooo-ooo1 s7 LNZSS
ooo2-ooo3 N6 CASINI
ooo4-oo06 N1 RAI'ILO,TRAIISZ
oooT N2 TSTDAT
oooa N13 9tARf'tST
ooo9 N7 800T?
oooA-oooB N12 DOSVEC
oooc-oooD N3 DOSINI
oooE-oooF A3 APPI.IHI
oo10 P? POKI,ISK
oo11 E5 BRKKEY
oo12-oo14 P3 RTCLOK
oo15-oo16 C1 BUFADR
oo17 c23 ICCOI1T
oolA-oo1B Ll DSKUTL
oo1c F5 PTIMOT
oo1D F3 PSPNT
ootE FE PBUFSZ
ool F F4 PTEHP
oo20 813, G14 ICHIDZ
oo21 c15 tcDNOZ
oo22 G16 ICCOMZ
e17 ICOBAS
ooa4-ooe5 G1g ICBALZ, ICBAHZ
ooe6-oo27 G19 ICPTLZ,I CPTHZ
oo2a-oo29 O2O ICBLLZ, ICBLHZ
oo2A-oo29 O21 ICAXIZ, ICAX2Z
oo2c-oo2F G22, e24, G29 ICSPRZ
oo30 H31 STATUS
oo31 t{13 CHKgUt'l
oo32-oo33 H16 SUFRLO,BUFFRHI
oo34-oo35 H'7 BFENLO, BFENHI
oo36 Hll CRETRY
oo37 H12 DRETRY
oo3a H21 BUFRFL
oo39 H22 RECVDN
oo3A H24 XI,4TDON
oo3B H14 CHKSNT
oo3c H15 NOCKSI.I
oo3D D11 BPTR
oo3E D13 FTYPE
oo3F D12 FSOF
o040 D15 FRSO
oo41 H1O SOUNDR
oo42 Pl CRITIC
oo43-oo49 Kl, KA, K3, K4, K5 ZEUFF' ZgUFP, ZDRVA,
oo4A N4 CKEY
oo4B N' CASSBT
oo4c 834 DSTAT

OPERATINC SYSlEl'l CO16555 -- APPendix L


26h
oo4D 910 ATRACT
oo4E 812 DRKMSI{
oo4F Btl COLRSH
oo50 833 TI,IPCHR
oo51 930 HOLDl
oo9e s5 LMARGN
oo53 g6 RI'IARON
oo54-oos6 ROt"tcR6,COLCRS
ao67 835 DINDEX
ooSB-oo59 836 sAvt'tsc
ooSA-oo5c B3 OLDROOI, OLDCOL
ooSD OLDCHR
ooSE-oo9F OLDADR
0060-0062 819 NE!|RO0,NEHCOL
oo63 815 LOeCOL
oo64-oo55 ADRESS
0066-0067 840 H-TT}IP, OPNTI'IP,TOADR
oo68-0069 84t SAVADR./FRf{ADR
OO6al A4 RAI.ITOP
oo68 B4a EUFCNT
oo6c-006D 843 BUFSTR
oo6E 850 BITMSK
oo6F SHFAMT
oo70-oo73 924 ROltAC,COLAC
oo74-oo79 825 ENDPT
oo76-0078 DELTAR, DELTAC
oo79-oo7A 841 ROWINC,COLI NC
ooTB 844 SWPFLC
ooTc HOLDCH
ooTD B4S INSDAT
ooTE-oo7F 423 COUNTR

ooao-ooFF gEE FLOATINC POINT VARIABLE LIST AT END.

o100-olFF 690? SIACK

o200-oao 1 P10 VDSLST


oeoz-o203 P14 VPRCED
o204-o205 P19 VINTER
aza6-0207 Pt6 VBREAK
020a-0209 Pt7 VKEYED
oeoA-0208 P1S VSERI N
o20c-oaoo P19 VSEROR
o20E-o20F P20 vsERoc
0210-o215 Pat vIT R1, VI tr'rR2,VITllR4
o2t6-o2L7 P13 VIMIRO
o?19-o219 P4, H26 cDTt'lv1
oelA-o218 P6 cDTt'tvz
oalc-o221 PA cDTt'tv3, CDTttVS
cDTMV4,
o22?-O2e3 WBLKI
0224-0223 W9LKD
o2e6-oae7 PA, He7 c DTt'lAI
oeza-0229 77 CDTI{AA
o?24 P9 cDTi'tF3

SYSTEIICO16595 --
OPERATING Appendir L
267
o*B EA SRTIT{R
ozec P9 CDTI'IF4
ozeD PIE INTEI'IP
o?2E P9 CDTT,{F5
o22F P?? SDIICTL
oe30-o231 PE3 SDLgTL, SDLSTH
oe32 H32 SSttcTL
o23A H1A CDEVIC
o23S H1S cct]t'tND
o23C-O23D HzO C A U X l ,C A U X ?
H23 TEHP
H3O ERRFLG
o240 NA DFLAGS
o24L N9 DBSECT
024e-oa43 N1O BOOTAD
o244 Nl1 COLDST
o246 C2 DSKTIH
0247-A?6E 851 L INBUF
o26F P24 OPRI{IR
o270-o277 J3 PADDLO -- PADDLT
o27e-o279 .,1, J7, JA STICKO -. STICK3
o27C-O2A3 .J4 PTRIOO -- PTRIG7
o2a4-o2a7 J2, J7,,.tg STRIOO -- STRIGS
oea9 D14 WMODE
02aA DlO BL lt.t
o2gg-o2aF EilO un|Jsed
oe90-o292 84 TXTROI.I, TXTCOL
oe?3 A4S TINDEX
oa94-o295 852 TXTi'iSC
o2g6-0298 853 TXTOLD
oa9D 832 HOLD3
o29E E4S suSTtlP
o29F 831 HOLD2
o2AO BzE DhASK
o2A1 847 TMPLST
o2A2 826 ESCFLO
o2A3-0281 413 TA8r.lAP
02B2-O?85 814 LAGHAP
02B6 E9 INVFLE
BlA FILFLE
02BE-02AA 944 T}!PROW,TI'PCOL
02BB 89 SCRFLO
02BC BEO HOLD4
oagE E6 SHFLOT{
OABF 876 BOTSCR
02co-ozc3 87,P27 PCOLRO-- PCULR3
o?c4-o2cB BA,P27 PCOLRO-- PCOLR4
o2E4 A5 RAiISI Z
o2E5-02E6 A2 }4Ef'ITUP
o2E7-O2E8 AI l4Et'rLO
OAEA-02ED 811 DVSTAT
Dl CHBAUDL,CHBAUDH
oeFo 81 C R SI N H
ozF1 E2 KEYDEL

OPSRATINOSYSTET'ICO16555 -- Appendir L
cHl
oeFS Pe5 CHACT
oaF4 P26 CHBAS
O2FA 855 CHAR
02FB B$4 ATACHR
ozFC E3 CH
O2FD EL7 FILDAT
827 DSPFLG
OzFF E4 SSFLAC

o300 Hl, HE DCB/DDEVIC


o301 H3 DUNIT
o302 H4 DCOMND
o303 H' DSTATS
o304-o305 H6 OEUFLO,DBUFHI
o306 H7 DTIHLO
030a-o30? H8 DBYTLO,DBYTHI
o30a-o308 H9 DAUXl, DAUX2
o30c-o30D T I I'IER1
o30E D4 ADDCAR
030F DA CASFLG
os10-o3t 1 Tt I'iER2
031a-o313 D5 TEI.IP1
031S D6 TEI'1P3
0316 SAVIO
03t7 D2, H25 TII{FLE
031E H?A STACKP
0319 He9 TSTAT
03lA-o33F HATABS
0340 G 1 ,C 2 I O C E ,] C H I D
o341 G3 ICDNO
o342 G4 I CCOl.l
0343 o5 ICSTA
o344-0345 ICBAL, ICBAH

0346-0347 ICPTL, ICPTH


o348-0349 ca ICBLL, ICBLH
034A-0348 o9 ICAXI,ICAX2
034C-034F e10 ICSPR
0390-o35F Gz-O10 ( tocB *1 )
0360-o36F e2-c10 ( IOCB *2)
0370-037F o2-G10 ( IOCS *3)
03BO-O3AF e2-c10 ( IOCE *41
0390-o39F e2-ero ( tDcB *s'
o3AO-O3AF Gz-O10 ( IOCB *61
03go-03BF e2-o10 ( IOCB *7)
03co-o3E7 F1 PRNAUF

o3FD-047F D9 CASBUF

0480-o6FF UBer Area

OPERATINESYSTEI,Ic o t 6 5 $ 5 - - A p P e n di x L
FLOATINO POINT PACKAC€VARIABLES

ooD4-ooD9 l.t1 FRO


OODA-OODF I't2
ooEo-ooE9 M3 FR1
ooE6-ooEB M4 FR2
ooEc FRX
OOED H6 EEXP
OOEE ?17 NSICN
OOEF E ESICN
ooFo t't9 FCHRFLO
ooF1 t'r10 DIORT
ooF2 1,t11
ooF3-ooF4 l,|l2 INBUFF
ooFS-ooF6 r13 ZTEIIPl
ooFT-ooFE t'i14 ZTE}IP4
ooF?-ooFA zTEHP3
OOFB H24 RADFLO/DECFLE
ooFc-ooFD H16 FLPTR
OOFE-OOFF M17 FPTR2

o57E 1A LSPR1
o57F t119 LEPR2
oSao-o5FF ll?o LEFEND, LBUFF
osEO-O5E5 t421 PLYARG
o5E6-O5EB .422 FPSCR,/FSCR
oSEC-O5Fl n23 FPSCRl/SCR1

OPERATINGSYSTEMc o 1 6 9 5 5 - - A p pe n d i r L
INDEX
The EUbJect inder contains thr€e forins of rrterences:

Section nurnber? such €E ,3. ,


Appendixr EUchae ,ApF B.
Variable ID fr.orn Appendix L, soch as '97,.

ATARI standa.ds L2
ATASCTT 894-55, 3, ApP D_c
attract oode BIO-12, 6,
bit oapprd qraphics BaE-8A9, 5, App H
blerkboard mode g, NlA, 7, 12
ENF T
boot a, 4, N3_1o, j, 7, 1o
BREAK ES, 6, L2
.
rar.tridge 3, 4, 7, LO
casBette brud fate determine D1-D7
cassette-boot 3, NS-1Or 7, lO
cas6ette devlEe D1-DlS, A, g
C a s e e t t e H a n dl e r ( C ) 5
CIO (Cent.al L/O Utilitqt Ot-AS, g, ?
CIO/urei intrr+eEe 01-11, S, App A, App B
CIO/Hand ler. interface Gle-?]Z, C
CLOSE L/O comfiEnd S, 9
coldstar.t (6ee .poqre.-uo.)
color control A7-8, 5, 6
control charaEt€.6 a26-27, S, App D
c i i t i E a l s e c ti o n pl,6
Eulsor g1_4, 9

database 4
DCB (Device Cont.ol Block' Hl-9, 5, 9
DELETS I/O Eomoend s
-
developnent sqstem 19
alevire/f i lenao{ speri+ir6tion 5
DeviE€ Handler 3, q
deviE. tabte 2, At2, e, 7, 9
di6ft-boot 3, N3-1O, e, 7, tO
dist davire F
DiEft File t{sneger (Dt Kl-F, g
DiEl Handl€r' (resid€nt) C1-2, I
displatJ device (scr€en) BS4-S9, S, App E, App H
Di€pl€g Hahdler (S) Bt-bg, s
displag list 4r p1O
DOS (Di6t Utilities) Ll, ta
DRAl.l I/O coomand 817-eg, s
dr iving Eontrol lei JB-9
Edur6tional Sqsteo Foroat Caigettes g
error hendling OS, HO! H1l-12, 9, A9, B-C

OPERATINOSYSTEH CO165S5 -- TNDEX


271
EOF (end-of-fi 1e)

Fil. ltlan.gcment SUstem


FILL I/O command Dt7-25,3
f Iost in9 point packaoe 2, 4, H1-e4, a, APp J
FORMAT I/O c ohmand
fFee maftoag 4, A1-3, R1-2,
game.alntroll€r5 3, J1-9, 6, 11
OET CHARACTERI/O conftand 5 , 9
OET RECORDI/O connand
OET STATUS I/O com and

Handler (9ae .devire handler, and individual device handlerg,


initial ir€tion, certr.idoe
init ial i rdt i on, Hendl!r 7, I
init ial i z6ti on, interrupt 6
initialization, 5!Eten 4, 7, 10
i n t e r n a l d i G pl a g c o d e 5, 854
interruptg 2, P |-eB, 6
i n t € a r u p t n a EI
inverEe vl deo (disolau)
rlo
IOCB (I/O Controt BloEk) et-10,5,9
I/O .ett'g lo9ic H11-12

JogEtick

|(egboii,d Autorep aet


k e g bo a r . d d.vice
Kegboard Handler. (l(, E1-9, 3, App F
lerrboard l e g d e b o u n Ei n g E1-3
light pen 11. App J
LNBUC
LOCK I/O c onftand
IogicEl tert lines {EEieen) B14- 15, I
me{norg ( see .RAt'i., 'ROt'l' alld , f ree .[€|l|or{ . ,
fienorq dqnanics A1-5, N1-2, 4,
memorg oap 4
NOTE I/O c oftftEnd 5
OPEN I/O c oomand 5 , 9
p a d d1 e !,3-4
Page o 4, nL-17, RL, S
page I 4 , 9
par i pherel deviGeE
POINI I/O Godr|tland
P o!,e i-u p ?, N1-13, 4, 7, t2
pr.int€r device

OPERATINE SYSTEM CO16555 -- INDEX


272
Printer Handle!'(p) F1-S, s
p r . o g r . a i nd e v e l o p m € n t 13
PUT CHARACTERI/O coo|nand 5, 9
! PUT RSCBRD I/O coomand 9, 9

RAt't 3, 4, q
recor.d ( I/81 s
BENAI'IE L/O .ommend E
RESEI 2, N1_13, 6, 7, 12
ROt't( os t L, 4
R9-a32-C HEndler (R) g, 9

Scr.een Editor' (E' El-gg, 5


Eci.een narging B5-6, $, 7
sEr€en modeE 4, S, App H
scrolling (tertl 89,5
ceridl I/O bug 3, 9, 9, App I
f S H I F I l , / C O N T R O Ll o c k E6-7, g
SIO (6eri.al bu6 I/O Utitit'J) Hl-3a, p13-2r, S, 9, App C
sound control (gto) H1O, 11
SPECIAL l,/O con|lt€ndE J, 9
split Ecieen 816, 5
gt€r ft 4
5te"t/stop (diEpIaUt 84, 6, t2
6 t a 9 e 1 V B L A N Kp . o c e s E p3-$, 6
s t B g e 2 V B L A N Kp r o c e E E p6-9, pze-e7, 6

tabs (Screen Editor) Bl3, I


timeout (d6vice) HAA-ZZ, 9
ti €rs (crJstem) F3-9, 6

UNLOCK L/O contnEnd F


asei uorrspace 4, f,llE-A3, Re

v6ctors, RAt'l pi, p7, p1o-e1, 6, 9


vectore, ROH g, 9, ADr J
vert ica I blank int€rrupt F11-12, 6
.- uar.mitart ( see .RESET,)
ui 1d-car.d (diit fil€n€fte, s

ZIOCB (Zero-p.ge IOCB' e13-e2, 9, O O A O1, 6

BPSRATINC SYSTEI.ICOl6955 -- INDEX

Вам также может понравиться