You are on page 1of 34

AllARl%oo/8oo

ATARI HOME COMPUTERSYSTEM

TECHN ICAL
REFERENCNE
OTES
includes:
OperatingSystemUser'sManual
OperatingSystemSourceListing
and
HardwareManual

TO ALL PTRSONS
RECTIVINCfHIS DOCUMTNT
Reproductionis forbidden without lhe specificwritten permissionof
ATARI,lN(. Sunnr\ale,(A q408b.No risht to reprodu(elhi\ do(umenr,
nor the.ubie(l m.tllerlhereof,i. Brantedunles\br $ri en rgreement$ith,
or rvritlenpermissionfrom the CorDoration.

/t\" "
ATAR| ^-","",
".-**--.c.*-!o
ATARI%oo/8oo

ATARI"HOME COMPUTERSYSTEM

OPERATINGSYSTEM
MANUAL
USER'S

/t\
ATARI'.
-"^.--^--,-.-*-,
s
C O P Y R T G H T1 9 8 2 , A T A R I , I N C .
ALL RIGHTS RESERVED

IO ATT PERSONS
RECEIVINC
THIS DOCUMENf
Reproduclion is forbidden without the specific written permission of
ATARI,lNC. Sunnyva'e, CA 94086.No rightto reproduc€this documenl,
nor the subiectmatter thereof, is grantedunlessby written agreem€nrwilh,
or wrillen oermissionfrom the CorDoration.

Every efforl: has been made to ensure that this manual accurately
alocuments this product of the ATARI Hoine Computer Division.
Ho$rever, due to the ongoing improvement anal update of the computer
software and hardware, ATARI, IllC. cannot guarantee the accuracy
of printed rnaterial after the date of publication and disclains
liability 'o-r changes, errors, or omissions-
ATARI Ho e Cofip uter
Opereting Sgsten USER'S MANUAL

PREFACE 17

INTRODUCTION 1A
CENERAL DESCRIPTION
OF THE ATARI COI'IPUTERSYSTEM 1A
CooventionE U6ed in ThiE Manoel

HEXADECII4AL NUMBERS 20
MEI.IORYADDRESSES
KILOBYTES OF IIEIIORY 20
FASCAL AS AN ALGORITHM-SPECIFICATIAN LANGUAC€
MSI,IORYLAVOUTS 20
BACKUS-NAURFORM (BNF)
OS-EOUATE F ILSNAI.IES
OFERATINC SYSTEM FUNCTIONALORGANIZATION

I n p u t l o { . r t p u t S u bs q s t e o
Interr"upt Froc es6 ing
Initirl i.ation

Pouer-Up 22
Srts tett| R€9€ t 23

FI oat ing Point A"ithmetic Pa.kage 24

CONFIGURAIIONS 2e
Progran Envi r onfientE 23

Blac kboard flode 29


Caitr idge
Diskette-Boot
C a 6s e t t e - 8 o o t

R A M E xp a n 6 i o n
P e r 'i p h e r a 1 D e v i c e E

eane Controt 1erg 27


Progra{r R€coider
Ser ia I B|,E DevicaE 2A

SYSTEI.I I'IEHORYUI ILI ZAT ION 29

RAHRegion e9

Pege O 30
Page 1 30
OS D€ta 8es€ 30
UEer l.lortspate
Boot.8€9ion 31
S.reen Displag Li6t and Data 31
F r e € l { e m o r g R e gi o n

4
C a rt r i d g e s A a n d g
l'lapped I/O
Re6ident OS and Floating Point Packag€
Centia 1 Data BeEe DeEc.iption
l,le{florq Dgnafii c a

Sgrtem Initializetion P r o Ee 6 E
C h a n gi n g S c r e e n I ' l o d € s

I,/O SUBSYSTET'I

Central I/O Utilitg


C I 0 D e 5i 9 n P h i t o s o p h q

DEVICE INDEPENDENCE
DATA ACCESS I'IETHODS
I'IULTIPLE DEVICE/FILE CONCURRENCY
UNIFIED ERRAR HANDLINE
DEVICE EXPANSION

CIO CALLINE MECHANISM

HANDLER ID -- ICHID [O34O] 39


DEVICE NUMBER_- ICDNO tO341]
COMI.IANDBYTE __ ICCMD TO342] 40
STATUS -- ICSTA to343l 40
SUFFER ADDRESS
ICBALT0344] AND ICBAH IO3451
PUT ADDRESS --
ICPTL T0346] AND ICPTH tO347] 40
EUFFER LENGTH/BYTE COUNI --
ICBLL to34gl and ICBLH CO349l 40
AUXILIARY INFARi.IATION--
ICAXl tO34Al and ICAX2 lO34gl 40
REI4AININC BYTES ( ICAX3- ICAX6 } 4L
C I O F u n ct i o n 5 4L

OpEN -- AEEign DeviEe/Filename to IOCB


€nd Readq fot'Acces6 41
CLoSF -- Terminat€ AccesF to Device/Fi1e
and Rel eas6 IOCB 42
OFT CHARACTER9-- Read n Cha.ertarg
(B{ te-AI i gned Aec€ss}
PUT CHARAC1ERS-- wr.ite n Cha.Ect6rs
( B gt e - A I i g n e d A t c € s E ) 43
e E T R E C O R D- - R e a d U D T o n C h a r € c t € r 6
( R e e o r d - A l i g n e d A c E e E s) 44
P U T R E C O R D- - t 0 r . i t e U p T o n c h E r a e t e r e
( R e c o . d - A I i g n e d A c c e s s) 44
G E T S T A T U S- - R e t u r n D e v i t e - D e p e n d e n t
S t a t u E B gt € € 45
SPECIAL -- 9Decial Function 45

Device/Fi lenene gpecif ication 46


I/O Eraftple 47

D e v i c e S p e ci f i . I n + o r r n a t i o n 50
K e q b o a r d H a n dI e r . 90

CIO Function Descriotiong 51

T h 6 o . g o f O pe r a t i o n 51

D i E p1 a g H € n d l e r ( S : ) 54

Scaoan llodes
TEXT HADE O 54
TEXT }'1ODES1 AND 2
eRAPHICS ODES (Modei 3 Thiough 111
SPLIT*SCREEN CONFIOURATIONS

C I O F u n ct i o n D e s e r . i t t i o n 6
User-AIterab 1e DEte Base Variables 61
Theor! of Operation

licreen Editor (E: ) 66

CIO Fun.t ion DeEcrirtiong


User-Al terab 1e Data Base Var'i€bIes 70

C a e E e t t e H a n d1 e " ( C : )
C I O F u n ct i o n D e s E r i p t i o n 6

T h e o r g o f O pe r a t i o n
Fi 1e Str uctuf e
Pr inter Handler (F: )
CIO Flnction DeEctiptiong
T he o r g o f O p e r € t i o n

DiE|( File Hanager (D: ) 7e


CI0 Flnction oescriptionE 79
D € v i c e / F i 1 e n € f i e S p e ci + i E E t i o n al
Fi lenane tli ldcard ing

S p e ci a l C I O f u n c t i o n 5
l h e o r g o f O pe r a t i o n
F l ' l SD i s k e t t e U t i l i r € t i o n a9
FMS BOOT RECORD FORI'IAT 90
BOOT PROCESS I'IEI.IORYIIAP s2
VALU''IE TABLE OF CONTENTS
FILE DIRECTORYFORT4AT 94
FIIS FILE SECTOR FORI'IAT 99

Non-CIO I/0
R e si d e n t D e v i € e H a n dl e r Vectorg

R e s i d e n t D i s f t € t t e H a n dI e i 97
D i e k e t t € H.nd ler Co|llmand 9 99

Ser ia 1 BUE l/o 101

INTERRUPT PRACESSING 102

C h i p - R e Fe t
N o n o e E * e bl e Intarrupts 103

S t a g e 1 V S L A N KP r o c e E s 1C4
S t a g e 2 V B L A N I 4P i o c e E i

H a sk e b l e I n t e r r u p t E
Interrupt Initislirstion 10e
givstem T ioers 109
Usage Not€9 109

PoKEY Interiup t i'{ei k 110


S€tting Interrupt and Timer Vector.E 110
gteck Content 3t Interrupt Vector. PointE 111
llisce I laneous ConBiderations LLz
FlorrchaitE 113
SYSTEI'I INI TIALI ZATIAN r16
Pouer-Uplnitialiration(Coldstart)pr.oceduie 116
SgEteo Reset tniti€liz€tion (lrar.nstart) procedore 119

FLOATING POINT ARITHI,IETTCPACKAGE

Funrtions/Cal lin9 Sequence6

ASCII to Flodting Point Conversion (AFpt


Floating Point to AgCII Conve.sion (FASC)
InteEer to Floating Point Conv€teion (IFp) 123
Floating Point to Integei Conversion (FpIt r23
Float ing Point Addltion (FADD' 124
Flo.t ing Point Subtr.action (FSUBI
F106ting Point Multiplic6tion (Fl.lULt 124
Fl oat ing Point Division ( F D M
Floating Point Loga.ithms (LOe end LOOTO' t23
Floeting Point Etponentiation (EXp end EXpIO'
Floating Point Polrrnonial Eveluation (pLyEVL'
Cleer FRO ZFRO) (
C1e€i Pege-Z6ro Floetinq Folnt Number (ZF1) 127
L o a d F l o a t i n g P o i f l t N u r D b e rt o F R O
( FLDOR and FLDOP)
Losd Flo6tlng Point Nuftber to FR1
( F L D l R a n d F L D 1 P)
Stora Floatinq Point Number Fnor FRO
( FATOR and FSTOP)
ove Floating Point Numbsr From FRO to FRl
( Ft'tovEt 1eE
Resour'6. Uti I i z.tion
Iop l€fientati on Det€i 1s t??

ADDING NEI.' DEVICE HANDLERS./PER


TPHERALS 131
Oevice T€ble 134
CI t l / H € n d l e i l n t 6 . * a c e 134
Calling lvlechaniEtn 135
Hendlei. Initialitstion
Fsnction6 Suppoited 736
E r F o r H a n dI i n g 140
Rdsourca Al location 140

ZERO-PACE RA}I t4r.


NONZERO_PAOERAH 141
STACK SPACE

H a n dt .e . , / S I O I n t e a f a c e 142
Calling MechEnisdr 142
F u n E t i o n 6 S u pp o f t e d L44
Er.r.or Handl ing L44

SEr'ial I/o 8us Chsr€ctefistics End Protocol 145

H a r d u a r e / E l e ct r ' i c a I C h e r € c t e r i s t i c s 145
Seria I Poit Electrical Specificetions 147
Bus Comanandg 147

COI'II,IANDFRAI'IE 144
COMhANDFRAI'TEACKNT]WLEDOE 148
DATA FRAI'IE t49
OPERATIONCOMPLETE 149

Bu6 T ining 150

H e n d1 s r E n v i r o n m e n t 192

B o o t a b 1 e H € n d1 e r 193
C a r t r i d g e R e si d e n t H a n d1 e r 153
FlolrEh€r'tE 153

10 PROCRAI{ENVIRONI'IENTAND INIT IAL I ZATI{]N

Certi idge 147

Ceitiidge Without Eooted Suppoft Pac&age 158


Cartridte tlith gooted EupPoit Pstk€9e 154

Dis kette-Booted Sof tuare r$9

Dis lette-Boot FiIe Fordat 1s9


D i E k e t t e - B o o t P r ' o ce s 5 160
Saftpl6 Dis kette-Bootab le Prograln LiEting 161
Progia$ to Create Di6kette-Boot FiIeE

Caseette-Booted gof ttare L64

C66satte-Boot File Foroat 165


Cassette-8oot Proc esE 165
S a o p1 e C . 6 s e t t e - E o o t e b l e P r o g t a L i E t i n g ,.67
Prograo to Create CEssette_Boot Fi1e5
1 1 ADVANCEDTECHNIOUESAND APPLICATIAN NOTES 170

Sound eenere t i on 170

Cepabiliti6r 170
Conf I iE t6 l.lith OS 170

56?een Graphi,c5 171

Herduare Capabil ities 171


O S C a p a bi l i t i e g LVL
C s r r o r C o nt r o I L71
Colo. Contr.ol L7L
Alternat€ ChaFacter Setg t7?

Plager/i.1i€5 i le craphics L74

H a r d | l r a i e C e p a bi l i t i € 9 L74
Conf I icts lrith Og t74

Rerdint esfte ContFol ler'g 174

Kegboard Control ler SenEing t74


Front Panel Connectorr is I/O Portr 176

Hdrduate Infor'fiation: ,.7b


SoftuarB Infor.nat i on: 177
Othea tliEcellanaouB Softuare Infor.fiation: 179

10
APPENDICES

A p p e n di x A CIA COMI'IANDBYIE VALUES lAO

A p p e n di r I CIO STATUS BYTE VALUES. 1e1


A pp . n d i x C Stg STATUS BYTE VALUES LA2
A pp l n d i r D ATASCI I CODES 143
A p p e n d ir E DISPLAY CODES ( ATASCIt ) 144
A pp . n d i r F KEYBOARDCI]DES (ATASCt I } 1€9
A p p e n di x c PRINTER CODES (ATASCI I ' 146
A p p e n di r H SCREEN IiODE CI.IARACTER
ISTICS 1Sg
A p p e n d1 r I SERIAL BUS ID AND COI.ITIANDSUMMARY 191
A p p e n di r J ROM VECTORS 19?
A pp e n d I x K DEVICE CHARACTER
I9T ICS 154

Neqb odrd ts4


Di splag 194
ATART 4lotTf.ll Progrem ReEoid er 194
ATARI 82OtTM1 4O-Column Impaet P.inter 195
ATAR! ElOtTMf Dist Drive 197

Appendir L -- OS DATA BASE VARIABLE


FUNCTIANAL DESCRIPT IONS 200
Central Data 8a9e D€sct iotion 200

FUNCTIONAL INDEX TO DATA BASE VARTABLED E S C R I P T I O N S2 0 1

A. !{EI'IORY CONFIEURATION 211

t1
B. TEXT/ORAPHTCSSCREEN

CurEor. Contio 1 2L2


gEreen Mirg ing 213
Tert Scrol I ing e15
A t t r a c t M o de 219
Tabbinq eL6
L o gi e a l T e r t L i n e s 217
split Srreen ela
DiFp larj ing Cont?ol Charact€rs eeo
E5cap€ (Displeg Follo{ring Control charactet'} ezl
DiEp lag Canttol Cheadct€rs l'lod€ eel
Bit-Happed erEph ic5 2?t
I nterna I llorking VariebI.s
Interna I Charscter Code ConverEion

C. DISKETTE HANDLER e25

D. 223

Baud Rate Deteimination


Ca6Eette ModE 227
C a s s e t t e B r r ff e r
Internal Worl in9 Vari.EbleE

KEYBAARD

X e V R e E di n q a n d D e b o u n . i n g 229
9 p e Ei a l F u n c t i o n 5 eeo
Star. t/Stop e30
Autol'ep€it 231
Inverse Vi deo Control
Console Kegs: tSELECTI,tSTARtl, and tOPllONl

PRINTER 232

Printer-Bu++er'
Interna I tlo, I ing vaii€bleE
E . C E N T R A LI / O R O U T I N E ( C I O ,

U s e r C e1 1 F € r € o e t e ? s
1/U L O N E P O1 IJlOEX 233
Device Statu6
D e v i . e T a bl e 233
CI O l H a n d 1 e r I n t e r + a c e P a t a n e t e r s 235
Zeio-Page IOCB 235
I nterne I l,lorking Veriables

H. SERIAL I/A R O U T I N E( S I O } 237

U6ea Call P€r'€oeters ee7


DeviEe Contro1 Eloc*
Bu6 Sound Cont.ol
Ser io I Brrs contr.ol
Ratrg Logic
C he c k s u n
Data Buffering
Generel BtJ+fer Control 244
C o o o a o d F r a m e 0 u t p u t B t J+ f e r e40
Re. e ive/Trenefii t Data Buffering 241
S I 0 T i m e o ut
l n t e r n e l W o rk i n g V a r i a b l e g

ATART CONTRf]LLER5

J o r js t i c * E
Paddlee
Light Pen 249
D.iving Control lerE 246

K, DISK FILE HANAGER 247

L. DISK UTILITY POINT€R 244

. FLOATINO POINT PACKAOE 248

N. F o u e r - U p a n d $ g s t e f l R e 6 et 249

RAM 5i zin9 245


Di 6 k e t t e / C e s 6 e t t e - B o o t 2eo
Environment Cdntrol 291
P. INTERRUPTS

Sgctem Ti nea6 e$3


Rerl Tifie Cloc I 253
Sgrtem Timer 1 233
Sgst€|n Tim€r 2
SgEteor Timers 3, 4 and I
R A t t l n t e r r u g t V e Et o r E 295
NilI tnte.r.up t V6. tor5 295
I R O I n t e . r u p t V e ct o r E 255
Haiduare R6giiter Updates 236
Int€.na I tro.L ing VariabIes 254

F, USER AREAS 254

Alphabetical List of DEte Bese VeriableE 259


ilFoo.g AddreEs Ordeird LiEt of Date 8€6€
Varieblee
Float ing Point Pack€ge Variables 270

I NDEX 271

t4
TAELE OF ILLUSTRATIONS

Fi gure 1-1. ATARI Home Conputer Bloct Diegram


Figure 1-2. leleoorgLegout ChErt

Fi9u.e 4-1. 650A Sqst€n llefiorg l'lep 2S


Fi gur.e 4-e. I'lapped t/O

Figur€ 5- 1. I/O SubsgEtenEtr!ctu.e Flou Diagram


Fi gure 5-2. CIO Celling ilechaniBn
Figurd 5-3. A n l / O E x E o pl e 49
Figure g-4. KeVcode to ATASCII Conversion Table 53
Figure 5-5. Text Hodeg 1 and 2 Dsta Form 56
Figuie 9-6. Or5!hiti Modes 3-11 eET D6ta Form
Figure 5-7. C r ' € p h i c s l . l o d e E3 - 1 1 P U T D a t E F o r m 59
Fiqure 5-8. Str.een Dicp latJ Elort Dieqiefi A4
Fi qur.e 5-9. C a 3 s e t t e H € n dl e r R F . o r d F o . m a t 74
Fi tur.e 5-1O. Devi ce/Fi lanaoe SgntEx
Fi gur€ 5-11. F i l e l . l E n E g € n e n tS u b € q s t e m D i 6 t e t t e Sector
Utiliretion MED B?
Fi gure 5-12. FiIe l v l a n a g e m e n t€ i u b s g s t 6 n S o o t R e c o r d F o . r . m a t 90
Fi 9u"e 5-13. File l'lan:genent S!bsgstetn Boot PpoterE
lvleoorg Mep q2
Figure 3- 14. File M e n a g e n e n tg u b E g s t e r nV o l u E T a b l e
of ContentE 93
Figure g-15. File I'lanagenent SubsUEtem9olufle 8it Mdp 93
Figure 3- 16. File Dir.ectorg Format 94
Figure 9- 17. File Manaqement Subsgsteo File Sectof FoiinEt 95
Fi g'rre 5-18. Re5id€nt Device Handler Vectors 96
Figure 5-19. D V S T A T4 - 8 g t e O p e r a t i o . r S t e t ! s F o l " n € t 100

15
Fi gure 6-1. List of SgBtem IntetruFt Eventg t02
Fi g u r e 6-?. Interruo t RAll Vectof Initialiration 108
Figure 6-3. P O I ( E YI n t e r r u p t M a 6 t E r a m p t e 1to
Figure 6-4. I n t e r r u p t a n d T i m e r V e c t o r R A MS t a c l
Content Tabl e

Figure I / O S u b s g 6 t € mF l o u D i a g r E m 133
Figure D€vica table Forlll3t 134
Fig!re H 6 n d1 e . V e ct o r T a b l e 135
Figure Serial 8uE Coflnectot Pin Descriptions L46
Figure Seriel Bus ConnEnd Ftafle Format 144
Figure Ser i61 lls Timing Diagran 151

Fig ure lO- 1. Cartr i rlge Heeder'Foroat 137


Fi gure 1O-2. D i Ek e t t e S o o t F i l e F o r n e t 159
Figure 1O-3. DiEk€tte-Eoot€b le Prograft Li6ting Ex.mpla
Figure 1O-4. S e l n p1 e C € E s e t t e * B o o t a b I e P r o g l . a f i

Figuie 11-1. UEer-De+ined cherEcte. Set Eit lelenorgAddress


Figure 11-2. lJser-Defined I r €} Charact€r' Hatrix git Table 173
F i 9u i e 11-3. C h E r e ct e r B a E e D i a g r ' a n L73
Fig uie 11-4. Re€ding Data Frofl an ATARI Keqbo€rd Contioller
Figuie 11-5. ATARI Ke!bo€r'd Control l ei Variable/Register
v a l u e T a b1 e 176
F i gu r e 1 1 - 6 . U 6 i n g F r o n t P a n e I C o n n e c t o r r A t l / Q P o r t s : P i n
F u n c t i o n T a bI e s 179

16
PREFACE

This rl€r|oal deEcribes the r.sident Operating ggste|'l (US) +or the
ATARIe Hofie Computea. tor readers oho are f€miliar urith the
int€rnel behavior o+ f,he E96tem. It diBcusEes:

Sgstem funetion6 and utilization techniqueE

S u b 6 q 6 t e mr e l a t i o n 3 h i p s € n d o r . g a n i r a t i o n

Cher€ct€risticE of the ATARI peripheral devir€6 that can


b € € t t a c h e d t o t h e A T A R I 4 O O I T H ] a n d A T A R I A O O IT t r u H o m e
Co ! uter

A a l v a n c e dt e E h n i q u e s f o r going beqond the baEic Og


carEbiliti.eg

The goneral featur.es of t h e E o f t p r . r t e r .s g s t e o h a r ' d l r a r e u s e d


bg the OS.

It uould be helpful to have a f€oiliaritg { r i t h p r o g r . a m m i n gc o n c e p t E


and terninolog!, assenblg language proqramfling in gene.ral, th€
Sgnertek 65Oe in particular, and digital herduare concepts arld
ter.ninologg- rrou uill be provided !rith the infornation gou n€ed to
uBe the OS reEouices, trithout r.egorting to trial-and-er?or t€chniques
or the Og !isting. Supporting information *or taskE that involv€ OS
I iEting references i9 also pr'ovided.

T h i s l n € n u € 1d o e E n o t p r e s e n t a c o { n p r e h e n s i v €d e E c r i p t i o n o + t h e
hardqrEre used to prov:d€ OS iapabilites. T h e p i o g r ' a m m e t .u h o n e e d 5 t o
go begond the rapabilities descr.ibed Ehould consult the ATARI Home
C o m p u t € r H e r ' d { r a re H € n u €} .

O P E R A I I N GS Y S T E } 4C 4 1 6 9 5 5 - - Section 1
I7
1 INTRODUCTION

CENERALDESCRIPTTONOF THE ATARI HOMECOIIPUTERSYSTEI'I

Bper€ti.ng iqstenr i n t h e A T A R I @4 O O t T M l a n d A T A R I E O O I T M ] H o m e
Computer are identicel. The primarg differenceE bet{reen the turo are:

o Phgsicel Faclaging

o The ATARI 4OOComputer con6ole h€5 one cartridge slot, the


ATARTBOOComtutei console hes turo certridge rlots

o The ATARI 4OO HomeCornputer contain6 l&l{ RAMand cannot be


expanded. The ATARI 8OO Home Conputer can be erpanded to ts
mer iflun o+ 4AK RAt'l.

o Th€ ATARI 8OO conpstei' has a nonitor Jack, th€ ATARI 4oo
Comouter does not.

The Heiduare Circsitrq

o p?oduce6 both Eheracter and point g.aphics +or blac& and


uhite (B/tll or color television.

o Produces four independent €udio channels (trequenE"


cont?o1led) u,hi€h use the televi€ion Eound sUsten.

o Provides one bi-level audio output in the baEe unit.

o InterfaeeE uith up to +our Joqsticks and eight Paddle


ContTolters.

o Interfaces uith a ser'iel I/O bus for sxpanEion.

o Contains E built-in k€qboerd

Figure 1-1 preEents a simpIi+i€d block diagiam of the haiduare.


See ths htsrdureren€nu.l for Eupgor'tinq docu|nentation.

O P E R A T I N GS Y S T E HC O 1 6 $ 5 5 - - Section 1
1B
r 6502 |
i p l ' o a e 6 s o ri
+----+----+

+---------+ ROM +---------+


IDgOO-FFFF +---------+

I RATI

I OOOO-r x x r

iCartridge I
t---------+E I o t s A&BI
I IBOOO-BFFFI
Pforessor
externEl +---------+
bus i +-----*---+ Jogst:€ks I cont?ol- i
I I PIA +--------+----------+ I er oorts !
+---------+ +-------- i -------+ I i
1......... ID 3 O O - D 3 1 F + - - - - - - - -i - - - - - + | +---------+
; IRO +---------+ I i t
I : | | +---------+
| | ilegboard i
i I idata legsi
+--------i-----t-i--+ + BREAK I
i . . . . . . . . . I D2OO-D21F+-------- i ---+ | | +---------+
I IRO +----+----+ audio | ! ! I on/off
i +------------- i -+ | | i +---------+
i +----+----+ trig5 I i i i + - - + cassette I
i I CTIA +--------+ i i i linterfacei
+-----+ i +-l-i----+ I
! DOOO-DOlF+----- i -- | -+ i ! +---------+
+----+----+ i I i i +----+ eerial I
i video I I i I i t/o I
DMA +----+----+ litpen i i +------+ bug I
.....-...1 ANTIC +--------+ i

1......... iD400-D41Fi | |
NMI
froo I console
' i
CTIA -+ speeker
conpo6it€ t"----+ i
audio/video i +---------+

i +---------+
i i START,

I OPTION

Figu'.e 1-1. A T A R I H o f l r €C o n p u t e r B I o E t D i a g r € f t

OPERATINGSYSTEII CO16555 -- Se.tion I


19
CONVENTIONSUSED IN THIS MANUAL

T h i E m t s n u e lu 6 e s t h € f o l l o u r i n g s p € a i € l notetions:

H €r a d e c i | n € l N u m b e r s

A t l t u i o - d i 9 i t n u { n b e " sp r e c e d € d b q a d o 1 1 € r s i g n ( $ t d e s i g n a t e
hexadecimal nuobers. All other nunbers (exE€pt ftemorg addresE€E)
are in deci.nal +orm snless other{ri6e EpeEified in the suppor.ting
t€tt.

Me$or.gAddreEEes

A11 ie+erenEes to co puter nenorg ard mapped I/O IoE:tion5 a?e in


hex€decimal notetion. Meoror! addres5€6 fieg oi lnag not be contEined
in Equeie brac&etE. (ExaflpIe: CD2OFI snd OzOF eie the sarne
Bddf esE. )

Ki lobg tes of l,le|norq

I t l e m o r gE i z e s a r e f r e q u e n t l g erpressed in unitE of kilobqt€i, such


as 32K, urhere a tilob{te is 1024 bgtes of oemorg.

P A S C A LA s a n A l g o | . i t h o - S p e c i f i c a t i o n Language

T h e P A S C A LI e n g u € g e ( p r o c e d u ? E b l o c l o n l g ) i s u s e d a 9 t h e
specification l a n g u a g e i n t h e + e u p l a r e s | , h e r . €E n a l g o r i t h t n i E
ipecifi€d i n d € t a i 1 . P A S C A Ls g n t a r i s 6 i n i l € r to ang numbei o+
other bloct-strlctuied lEnguag€i, end gou Ehould have no
dif+icultg follouin9 the eoda presented.

MeoorrJ Lag out s

Diagrems similer to Figure 1-2 el.e used uhenever.pictures of bqtes


ot teble6 .re oaesented:

7 6 3 4 3 2 1 0
+-+-+-+-+-+-+-+-+
i i --- This i6 e single bqt€.
+-+-+-+-+-+-+-+-+

+ --- This is a uJord (2 bgte5).

+-+-+-+-+-+-+-+-+
i i
--- This iE a blorft o+ |tlenorq
r i of unspecified length.
+-+-+-+-+-+-+-+-+

Figure 1-2. Menorg Lagot',t Chsit

OPERATINGSYSTE|4CO16S53 -- Section ,.
A i t 7 i E t h s m o e t E i g n i t i c a n t b i t ( H E } B )o f t h e b { t e , and Bit O
iE the least Bignificant bit (LSB).
'
In t€61es snd figure6, dtemorgaddreEses a1{r€qs increa6e touard the
botton of the figure.

Baclu6-Naur Forft

A nodifi€d version ol Baclur-Naur Forn (gNFt iE uscd to Exg?es9 sone


sgntaEtir forras, rrhere the +ollouing o€talinguistic 6Vmbotsera used:
: := is the sub6titution (aiiignnent) operatoi.

< ) a netesgntactic vErieble.

i sEp€?etes al ternat ive subEtitutiong.

t I an optional conEt?uat.

Angthing elEe is e slntacti€ literel conrt€nt, {rhiEh Etands for


it6€lf.

F o r E x a n p1 e :

<device Epe€ification> : : = {deviEe nafle)t<devi.e nurnbei}l:

< d e v i c e n a . n e >: : = C i D ! E i K l P i R t S

<deviEe nuftbei>::= I l2 i3l4l 5l6 !7l A

A ridevice specifi.ation,, con6ists of a lnEndatorg ,,devic€ name,,,


fotloured bg en optional "device number,,' folloued bg the mandatorg
colon charecter. The device neme in turn llluit be one of the
char€cters shoun as alternativeE. The devi€e n!flber ( if it iE Diesent)
muet be a digit 1 through A.

OS Equate Fi leneneE

U p e . a t i n g S g s t e m R O M ( R e e d O n l U l ' l e o o r { } a n d R A l " l { R s n d o { t lA € E e s s
l ' l e m o r g l v e € t o i n a m e s , R A l " !d e t a b e s e v a r i a b l e n e m e s a n d h € i d u a r e
regi.ster n€nes are ell referred to bq the names€Esigned in the Og
p r o g ? a m e q u a t e 1 i 6 t . l ^ r h e no n e o f t h e g e n e i n e s i s u s e d , t h € m e m o r g
e d d r e s E i E ! s u a l . l r J p r o v i d e d , s u c h a e E O U T A Dt 0 2 4 2 l .

A P E R A T I N CS Y S T E MC O l 6 5 5 5 - - gection 1.
2 OPERATINO SYSTEI{ FUNCTIANAL OROANIZATION

This seation descri.beE the various subs{rsteos of th€ regident OS in


genera I teitng.

Inputl0utp ut Subigiten

The Input/Output (I/O) subsgstem provideE a high-IeveI inter'+a.e


betueen the paograor and thE harduar€. Ho6t functions are
device-independent, su€h a9 the ?eading end uriting of chaiacter dett,
vet p r o v i s i o n E h € v e b e e n o a d e f o r d e v i c e - d € p e n d e n t f ! nctions as {rell.
All periphrral d€viceE capEble of dealing uith .haractei data hsve
i n d i v i d u € 1 E q l | l b o l i c n a { n e E( E [ r c h a E K , D , P , e t c r . € n d c a n b e a c c e E s e d
using a Csntral I/U (CIO) routine-

A R A t ' ld a t a b € i e p r o v i d e s e c c € 6 s t o c o n t r o l l e l ' s ( J o ! s t i . k E a n d p a d d l e
controller6), i l h i E h d o n o t d e € 1 u i t h c h a i a c t e r d e t E . T h i 5 R A t ' ld a t a
base is periodicallg updated to sho{, the states of these device9.

INTERRUPT PROCESSINE

The inter.upt s r J g t e mh a n d l e s € 1 1 h a r d u r a i e i n t e r r ' ! p t 9 i n a c o m m o n


and €onsistent manner'. BrJdefault, al I interiupts aie fielded bg
the OS. At gour discretion, individual inte.ruptE (oi
gaoupE of interrupts' can be fi€lded bq the appli{ation pioqrem.

INITIALIZAIION

The rUstem provides tto Ievels of initieliz€tion: po{ter up and


s{stem reEet. The OS per'formg pouei-!p initial i zation eech tirne
the E!stem pouer iE snitched to ON, and sqstem r.eset
initi€lization i . s p e ? f o r m e d e a c h t i m e t h e t S Y S T E I 'RI .E 9 E T I f t e q i 5
pressed.

Pou€r-Ut

The OS eranine6 and notes the configuretion of the unit uhenev€r


the gqsten po0rer is suitched to ON. The sqEtem perforos the follouing
tasls at pouer up:

O P E F A T I N OS Y S T E MC O 1 6 5 5 5 - - SeEtion 2
o D e t € r n i n € E t h e h i g h e E t R A Ma d d . e 5 5 .

o Claari aII o t R A I ' It o zeros.

o Establishes all RAH inteirupt vertors.

o Foi|nats the device tabl€.

o InitialireE the cartridq€(5).

o Set€ up the 6cr6en +or e4 r 40 text mode.

o Boot6 the cesE€tt€ if directed-

o ChectE cai'tridge Elot(E) for diElette-boot instructions.

o Boot6 the dickettr if diracted to do Eo and € disl drive unit


iB ettech€d.

o TainEfdr's control to the €aitridge, dislette-booted progralnl


caFsette-booted prog!'a|n, or blac&boafd pno!lram.

TSYSTEH.RESET]

|.ESET] teq ceuses the Og to perfo.|n these


P i e s s i n g t h e I S Y S T E | .R
fo l l oqring ta5t3:

o Cleari the Og por.tion of RAl,l.

o RecheE*s tor of RAM.

o Reestab liih€5 ell RAl.lintel.ruot veEto?8.

o Foiftats the device table.

o Initializer the cartridge(s).

o Eats up the Ecr.een for 24 x 40 tsxt node.

o TranEfeF: control to the car.tridge. a diskette-booted pr.ogr€n,


a casgette-booted prograo, or the blaa&b06rd program.

N o t e t h E t I S Y S T E F IR. E S E T ! d o e 6 n o t p e i f o i n all the pouer-up


tas*s listed in the pouer-up section.

OPEFATINGSYSTEI'ICO16955 -- Section e
23
FLOATINE PAINT ARITHMETTCPACKAOE

T h e O S R O Hc o n t a i n 3 € F l o a t i n g P o i n t ( F F ) p a q k a g e t h a t i 6 € v a i l a b l e
to nonrEsident piograne such as ATARI EASIC.
The pactage i6 not uied bU the oth.|' pattE of the OS itiel+. The
f l o a t i n g p o i n t n u l t l b e r sa r e i t o r e d a E 1 0 g C D d i g i t F o f o € n t i s E a , p l u s a
l-bgte exponent. The pactage aontains theEe routineE:

o AgCII-to-FP and FP-Io-ASCII conversion_

o tnteger-to-FF and Fp-to-integer convFr€ion.

o FP add, 5ubtr€Et, oultiplg and divi.de.

o FP 1og, €xp, end polgnomiEl €valuation.

o FP nunber Elear, load, store, and nove.

OPERATINo SYSTEI'ICO1655S -- Section 2


3 CDNFICURATIONS

T h e A T A R I 4 O O a n d A T A R I 8 O O H o r n €C o t n p u t e r s s u p p o r t a
t id{ val.ietg of configlreti.onE, eech urith € uni.{ue operating
envir onment:

Ca.tridge(E) ma! or €g not be in9erted

F l e m o F gr a n b e o p t i o n a l l g a d d e d to the ATARI goo codtputer


Eonso 1e in 16K increm€nts

Hen{ different p€iipheral devi ce6 can be attached to the


EariaI I/0 buE.

The OS accounts for all of th€6e veriBElei urithout .equiiing E


change in the resident OS itself (iee 9eation a). The $€chine
e o n f i . g u r a t i o n i s r h e c k e d { r r h e np o u e r i B f i r s t torned on and then
i 5 n o t c h e c l e d E g a i n , u n l e 6 E e t J s t e mr € g e t i s u t e d . A general
discus6ion of Eomeo+ the velid ronfigu?ationE follous.

PROORAMENVIRONITIENTS

Tha OS ElIo{rE on€ of four progra(n tqFes to be in contrdl at ang


ooint in time:

The Og b1ts€lboBrd (ATARI Meno Ped) ptogratn

o A c€r'tridge-reEident progrem

o A diskette-booted piogi€m

o A cassette-booted pl'ogram

Conttol choice is baged upon in+oroation in the caattidge(5), upon


urhether or not a diEk drive is Ettached, snd upon operstot kegboard
input€. Th€ exact €lgorithms ere di5cu55ed in detail in 9ection 7.

Bl€clbodrd ModE

In blactbosrd oode, th€ screen is €stablished aE a 24 x 40 text


screen, Angthing entered from the kelboard goas to the screen
rrithout being etalrlined, €lthough eI1 of the screen editj.ng
functionE ai'e .upported. Elacftboaid moile is the loorest prio!'itU
e n v i r o n m e n t . Y o u g o t h e . e o n l q b g c o m m a n d+ r o | n e h i 9 h e r

OPERATINGSYSTET'ICO16555 -- Section 3
prioritg environnent, or bq defa!:t, if there iE no other
rea6on€bIe envi?onoent for the OS to enter. For er€ftp1e. t{ping BYE
in BASIC cauEeE the OS to enter the bleEkbos.d mode. The b1€c|(boeid
n o d e . a n b e e r i t e d b ! p r e s s i n g t h e t g Y S T E t ' lR
. ESETI keq i+ it uas
ente"ed froo a higher envlronment.

Ca.tridge

An inserted Eartridge normallg provides the tnein Eoot?oI e+ter


initieliration iE conpletE (for erample: ATARI BAEIC, SUPER
SREAKOUTITIT{1,EASKETBALL, COI''PUTERCHESS, and otheF6. All these
caitridqe programs intelfac€ directlg uith rrou in sone uaq). Although
a cartridge ran paovide a suppoiting function for 6ooe other Frogr.ao
€nviron|nent, this has not qet been done. Some€a?tridgeE (perticularl{
fteqboard-orisntad oneE) can Ehenge environoent5 bq entering spe.iel
a o m m a n d s( i u a h a 9 " B Y E " ) t o 9 o t o b l a c k b o a a d m o d € o r " D O S " t o e r t e r
the disl utilitS. Other ce?tridges csnnot chEnge envi.onnentE. Note
that a haadu€.e interloc|( p?eventE the remov€1 or inse|.tion o+ a
cartridge {rith the pouer on; thiE fe€ture rsuser the entire sqstem to
reinitialire !rith ever.q cartridge change.

Dl skett6 Eoot

The diil€tte marl or oag not be booted {rhen the 6g9ten pouers up
qrith di6lette-bootable ioftuare. T h i s p a r a g r . a F ha s s u | l l e st h e t a
di6Lette boot did o€cur. See Section 7 for boot condition
erplanations.

The diEtette-booted Eofttare can take €ontrol EE the Dist Utilitg


P"ogr'am(DUPI doeg under certain conditions, or ran provide a
t gEtefl (FMS} does. Thi.g
s u p p o r t i n g { u n r t i o n a s t h e F i I € M e n a g e ( n e nS
envitontrlent iE so +Ierible that it is difficult to generalize on itg
cepabilitie6 and a€Etrictions. The onlg fiachine Fequireo€nt (other
t h a n t h e d i E t d r i v e ) i E t h e t 6 ! + f i c i e 1 1 t R A Mb e i n s t E l I E d t o s ! p p o r t
th€ p.ogran baing booted.

Cassette-Boot

The cassette-boot enviionnent is sinile. to the dis*ette-boot


snvironment, elthough the caE5ette is limited as an I/tl device. It
is slou End can ecceEs onlq one file €t,a time in Eequence- Note
that the f,a6Eette-boot fa€ilitq ha9 no relation to the sse of
c 6 6 s e t t e s t o s t o r e h i g h - 1 e v e l l a n g u a g e p r o g r . ] r n g( e . 9 . , p r o g i a 0 n E
uritten in ATARI BASIC), nor to the use of r€s6ettes to gtoie det€.

OPERATINGSYSTET'ICO16595 -- Sertion 3
RAII EXPANSIAN

Altho!qh golJ can erpend RAHnonrontiguouElg in the


ATARI AOOHooe Cooputer, the OS orill onlg recognizs RAI'I
that is aontigrrols Etarting froo loEation O. InsteLletion
diiettions a r e p r . o v i d e d u i t h t h e p u r a h s s e d R A Ml l l o d u l e s . R A M c a n b e
edded until it totsIE 4gK. After 3eK, additionat RAH ove.lagE f i.rst
th€ right-certridqe addres6es (32K to 4Ok) and then the
left-c€l.tritlge edd!.eeEe6 (4OK to 48K). Note thet in cases of
.onfliat, the inEerted cartridge has higher prioritg and diEables
the confli€ting RAMin EK incaenentg. gee SeEtion 4 for a detailed
discursion of Eqstemo€ftorg

AE € result of polrei-up, the OS lrill qener3te t0ro FointerE that


d e f i n e t h e 1 o ! r e 6 t a v a i l e b l e R A l . ll o c a t i o n a n d t h e h i g h e s t a v a i l a b l e
R A F Il o c E t i o n . T h e U S a n d d i 5 k e t t e o l . c a s s e t t e - b o o t e d i o f t u a r e u r i t l
dete?oine the locetion of the loueEt aveilable RAt{, uhi.le the
nl.|lber of RAfl noduleE snd the current screen node uill deter.(nine
the highest available RAM.

PERIPHERAL DEVICES

Feripherel devices of several tgpes csn be sdded to the sVstem


using EtandBrd cables to either. the 9erie1 bus or' the connectors at
t h e f r o n t o + t h e € o n p u t e r E o n s o l e . T h e $ o r t c o m r n o nt g p e 6 d e a l r r i t h
€ith€r tranEoission of bUte6 of data (u5ua11g serial bus' or
tiEnEfiisEion of sense in+ortnetion (u5u:l1u oan€ Eontrollers).

GameControIlerE

The OS pefiodic€1Ig senges (90 or 60 timeE pel Eecond) the Etefldeid


gaoe rontroller6 (P€ddle9 and Jogsti€k5) end the vaIue6 read €re
Btored in RAl.l. You ran pIug in, remove, and reerr'ange thege
controlleis E t r ! i l 1 { r i t h o u t d + f e c t i n g 5 g s t e m o p e i e t i o n , b e c a { J s et h e
sgstem uill elua{rs trq to reed all of there rontrotlerE_
The Driving Controllers €r€ l.ead, but not de.oded, b'J the OS. sp€ci€I
inEtiuction5 are requi.ed to read the tegboard controller (Eee
S e c t i o n 1 1l .

Piogaafi Rer ord ei

T h e A T A F I 4 l O t T M l P r o g r a r nR € . o r . d e r i 6 a 5 p € c i E t p e r i p h e f a l . It uses
the seriEl bus to send end r'eceive data, but doee not confo"n to
the proto€o1 o+ the other peripherals th€t uee th€ serial bus. The
Prograo Re[oider must also be the last d€vi€e on the Eerial buE,
b e t E { , t g ei t d o r s n o t h a v e s s e t i e l b u s e x t e n d e f c o n n e c t o r e E t h e
other peripheF:lg do. Ihere Eal| never be moae than one pr.ogreln
Recoider connected to €ng sggteo +oi the sam€ re6son. The sqsten
.annot €€nge the pre6ence ot abgence of the Progra& Recoider, Eo it
€en be connected and diEconflected at ui11.

O P E R A T I N eS Y S T E I IC O l 6 5 9 9 - - Section 3
SeriaI BUEDevires

A Eeri€l bus dEvire conforrns to th€ seiial I/O bqs trotoEol aq


defined in Section 9, but thiE does not incl!de the prograrn
Recoi.der. Each seiial b!6 device hEs tuo identical connsEtor5: a
Eerial bus input, and a rerial b{rr ertender. Eithei connector can
b e - u s e d f o r e i t h e r ' p u r . F o i e . P e r i p h e . a l s c e n b e . , d a i 9 q E h a i n e d , ,b q
€abling them together in a cequenti€l feEhion. Ther€ are usuallrg no
t.sstrictions on the cdbling oide. because esEh d€viEe has a unique
identifier. lilhere re5tr.ictionE erirt, theU o,itt be mentioned in
S e ct i o n 5 .

0PERATINo SVSTEfi CO16555 -- S€ction 4


2S
4 SYSTET'IIIEHORYUTtL I ZATtAN
H e m o l ' gi n t h e 6 9 s t e m i s d e c o d e d i n t h e f u l I 6 4 K r a n E e o + t h e 6 S O a
mrcr.ocodrputea end there €re no piovisions for 6dditionel fiapping to
extend dreoorV. Memorg i.. divided into four be9i.a regi.ons (uith 5one
over'1ap poi6ible): RAH, cErtridge area. I/O regiot| and the resident
Og ROH. The regions and theii address bo!nd€rie6 ere listed belou
( a 1 1 a d d r e s E e sa r e i n h € r a d e c i m e l ) :

0000- lFFF RAM(minimufl rsquired *or o0er.ation)


eooo-7FFF RAM e rpans i on area
BOOO-9FFF C6rtridge B? Cartridge A (hs1f of 16K size) or RAll
AOOO-AFFF Cartridge A or RAl.l
coo0-cFFF UnuEed
DOOO-D7FF Harduaie I/B de.ode6
DSOO_DFFF Fl oat in9 Point P€rkEge (US)
R e si d e n t O p e r a t i n g S g s t e n R O t ' {

Figlre 4-1 6502 Sgstem Menoru l'lep

This secti.on {tri11break the5e regions into even 6maller function€I


diviEione and pr.ovide deteiled explanEtionE of their u5age.

RAH REEION

T h F O S a n d t h e c o n t r o l p r d g r e n 6 h a r e t h e R A Mr e g i o n . T h e R A H r . e g i o n
can be fuither EUbdivided into the follouing sub negions for
d i E c u 6 5i o n p u r D o E e s :

Paqe O = 6502 page zero Eddiess mode region.


Page 1= 6502 st:c|( region.
Pege6 2-4 = OS d:teb:se €nd uEer {rorlipace.
PageE 5-6 = U6e!. progran uror*6pace.
P e g e a 7 - X X = B o o t a b l e s o S t u , a i e a r e a / f r e e R A l , ln.
P a q e E X X - t o p o + R A M= S E r e e n d i 6 p l a q l i s t a n d d a t a . *

Note that XX ie e function of the screen gr€phics ttloda€nd the


amdunt of RAl"i in6tal Ied.

T h e p a r a g r s p h s t h a t f o l l o t , d e 6 . r i b e h o u t h e O S u s e s R A ME u b r e g i o n 5 ,
e n d p 1 " e s e n t 6u 6 e r p r o g r a r n r e c o m e n d e t i o n E .

O P E R A T I N CS Y S T E i 4C O l 6 5 9 5 - - Sertion 4
29
Page o

The €rchitecture of the 6302 microconputer instruction 6et and


addr.essing nodei givEE psge O speci€1 EignificanEe. ReferenreE to
e d d . € s s e 9 i n t h a t p a g e ( O O O Ot o O O F F ) e r € f a s ; e r , reqoiis {euer
instruction bgtes, and provide the onlg oech€nism +o. ha?duere
indirect €ddr€sEin9. Page O should be used 6paringlg so that al I
porEible use.5 can have 6 portion o+ it. The OS pern:nentlq tal e6 the
l o u € r h e l + o f p a g e O ( O O O Ot o O O T F ) . T h i s p o r t i o n c a n n e v e r o e used bg
ang outer.nvironment unless the OS is comptetelg disabled and A I I
inteirupts to the 8S aie elininsted.

T h e u p p e r h a l + o f p a g e O ( O O B Ot o O O F F ) i E e v a i t a b l e t o o l t e r
environoents trith the follouing restriEtion: the ftoating point
pEElage, if ured, fequires OOD4through OOFF.

Page 1

Page 1 i3 the 55OZ h€.duare €tack region; JSR inEtruEtions, PHA


inEtauctions, snd inter.uptE all cauEe data b{tes to be l,ritten to
pege 1. ConverE€lU RTS, pLA, €nd RTI instructions aII €ause data bgtes
t o b e r e a d f r . o o p e g e 1 . T h e e S 6 b g t e 6 t a c k i 6 e d e q u e t € + o r n o r m at
s u b i o u t i n e c a l l s p l u s i n t e r . r . ! p t p r o r e s s n e s t i r g , s o n o r . e s t r i . c t i on6
have been l|ladeon p€ge 1 uEege. It is obviouE that a stact of th i 9
size is totellq inedequate for dEepIg reEUisive proce66e9 or +or
ne5ted proceE6es uith large loc€1 environm€nts to be saved. So,
Eophistic€ted applir€tions. Eoft0rare rnainteined EteEfts nuEt be
i m p I E m e nt e d .

The 6502 6tact pointer iE initialired at pouer-up or 6q6tem reset to


point to Iocation O1FF. The 6tack then pusheE dounusrd touard O1OO.
The stict uill u r a D e r o u n d f r o m O 1 O Ot o O 1 F F i f a s t s r k o v e r f t o u
condition occu?s, because o+ the nature of the 6502'E 8-bit stact
pointer r€9iiter.

OS Data Eeie

L o c € t i o n g O 2 O Ot h r . o u g h O 4 7 F a r e e l l o c a t e d b r t t h e O S + o r u o i k i n q
vtsri€bles, tableE €nd deta buffers. Poitions of this region can be
used onlg after gou deterftine thet nonconflict rrrith the US
i5 guer.snteed. For' exeopla, the printer and da6sette bLrffers could be
used if L/O opet'€tionE to the5e deviceg are impo€sible urithin the
controlling environment. The amount of uor|( involved in deter.mining
nonconflict seemg to be coopletelg out o+ line 0rith the bene+its to be
gained (erc€pt for a fe{r trivial c a s e s } a n d i t i 9 r e c o m n e n d e dt h a t
pages 2 through 4 not be uged ercept brJ the US.

I O16555 --
O P E R A T I N GS Y S T E I ' C Section 4
30
User Nortspace

LocatiqnE O48O thaough O6FF €re dediceted *or outer environment u6€
ercept {rhen the floating point paEkage is uBed. The +loating point
package ureE loestions O57E through O9FF.

B o o t R e gi o n

Prge 7 is the Etirt of the "boot rEgion. " Whenso+tuere iE booted fron
eithef the diskett€ or the caesette, it c€n st€rt et the louest free
o $ t n o t l a d d r . e a c ( t h r t i 6 O T O O )a n d p r o c e e d ! p u a r d ( a l t h o u g h i t c € n a l s o
5t6tt at.ng a d d t e E s a b o v e O T O Oa n d b e l o t r t h e E r ! . e ! n d i E p l a r J l i E t ) .
T h e t o p o f t h i s i a E i o n d € f i f l € 6 t h e 6 t a r t o f t h e , , f r e e ( n € { n o r r j ' ,r e g i o n .
[,lhen the boot pr.oEess is EotnpIete, a pointe" in the d€t€ baEe containg
the 3ddt'esEof the nert €vailable location above the goftdare JUst
booted. Whenno softuare ha9 been booted, thi6 rointer contains the
velue OTOO-

Screen DiBpleg LiEt and Dat6

Wh.n th€ OS is hendling th€ screen displarJ, the di.pl€q liEt that
de+ines the srreen ch€raateristiEs End the .urrent d6ta that i6
contained on the Fcreln are rlec€d 6t the high address lnd of RAM. The
b o t t o . n o + t h i s r € 9 i o n d € f i n e s t h e end of the free oemorq region and
its 1oc€tion i6 a +unction o+ thr scieen ftode cuirentlg in ef+ect. A
pointai i.n the data base aontaing the addresE of the I€Et availabl€
loration belou the screen reoion.

Free l,leftorg Reg i oo

The +r'ee nenorg t€gion is all the RAt{betd€€n the end o* the boot
region End the rtart of tha screen region. Tfte outer Ievel applir:tion
iE r€sponEible foa managing the free ftefioag regi.on.

CARTRIDEESA AND 8

There are tuo 8K regiong regarved for. plug-in EErtridge6. Cartridge E,


that i€ th. right-hand ceFtr.idge stot +ound onlg in the ATARI AOO
Home Cotnputer, ha€ been allocated me orq addrosres 8OOO
through 9FFF. CErtridgs A (the 16ft-hend cantiidqe slot in the ATARI
BOOCo$puter. ronsole, €nd ths onlg rlot in the ATARf 4OO Cof|lgutei.
. o n E o I e ) h € 3 b e e n a l t o c a t a d m e n o r g a d d r e E s e s A O O Ot h f o u g h 8 F F F a n d
optionallq S O O Ot h r . o u g h B F F F , f o r I 6 K c a r t r i d g e s . I f E R A t ' tf i o d u l e i s
p].uggedinto the lagt slot guch as to overls{ ang of thes€ addr€sseE,
t h e R A l , lt € k e E p r e c e d € n e e e s l o n g a s t s c € r t t . i d g e j s n o t i n s e ? t e d .
Ho{rever, if e dar-ti.idge is inserted, it uill disable the entire
E o n f l i E t i n q R A I ' Il t l o d u l e i n t h e l a s t s l o t i n B K i n c r e m e n r E .

OPERATINe SYSTEH CO1695S -- Serti.on 4


MAPPED I/O

The 4502 perforos input/output op€r€tions bg €dd.eEsing the €rtern€l


support chip6 aB memorg, sofle chip retiEterE €re reEd/urite lrhile
others ere read_on1g or rrriie-onlg (the ATARI Home Computer
HarduEre l'lanual gives descriptions of 611 of th€ external registerE'.
t l h i l e t h e e n t i r e € d d r e s 6 6 p a c e { r o r n D O O ot o D T F F h a E b € e n a } l o c a t e d
foi L/O decoding, onlg the follouing subfegions arE used:

DOOo-DO1F = CTI A
D2OO-D21F = POKEY
D3OO-D31F = FIA
D4OO-D41F = ANTIC

Figure 4-?. tlepped I/u

RESIDENT 05 AND FLOATING PAINT PACKAOEROT,I

The region from llgoo through FFFF:lue{s containi the OS and the
floating point pa€kage. Cere 6hou1d be t:*en to avoid u9in9 ang entig
pointE that ar.e not guarenteed not to move, to €lIorJ for the
possibilitg that another, but function€11q competible, OS can bc
gen€rated in th€ future. ThE BS conteins mang vectored entrU points et
t h e e n d o f t h e R O Ms n d i n R A H t h a t u i l l not move. The floating point
paeldge is not vectored, but a1I documentedentrg pointB qrill be
f i r e d : D o n o t u s e u n d o c u m e n t e dr o ! t i n e E + o u n d b g s c a n n i n g t h € l i E t i n g .
A 1 i s t o + t h e f i r e d R O Mv e c t o r s c a n b e + o u n d i n A p p e n d i r J .

CENTRAL DATA BASE DESCRI PTI DN

See Appendir L.

MEI'IDRYDYNAT.IICS

T h e f i e e m e m o r qr e g i o n i E t h a e a e a b e t u e e n t h e e n d o f t h e b o o t r e g i o n
end the Etart of the screen r.€9ion. Aa ruch, its timit6 are variable.
M E M L At O Z E T l d e f i n e 5 t h e b o t t o | n o + t h e f r e e r . e g i o n , a n d t ' l E H T O pt O A E S I
defineE the top of ths r.egion. This section pr€Eents the conditionB
that ce!6€ tfie setup or €1te!.stion of theEe variables

O P E R A T I N eS Y S T E MC O 1 6 5 5 5 - - Section 4
Sgsteln InitiEliuation pr.ocess

The OS deter'nine€ the ertent oa the Iouest blocL of contiguolrg RAl,l,


and saver the limits. lhe Screen Editor iE then opened, thus setting a
n e { , ( a n d I o l r a r } v t s I u e i n H E H T O P .D i g k e t t e o r E e E s e t t e - b o o t e d s o f t u e r e
mi9ht be brought into fieoortr, th€t {rould pr.obebtg set a ne!, (and
h i q h e r ) v a l u e i n M E I ' | L O( s e e S e c t i o n 7 ' . t t E H L Oa n a U g n t O p u , i l l d e f i n e
t h e m a x i u f i a n o u n t o f f r € e n e { n o r . qa v e i l a b l e uhen the appliEetion
progi€n finallg 9et6 rontiol. Thdt Emouht of fr.ee rnenor! cdn lete.
d e c , | ' e e s e ,€ s d e s c r i b e d i n t h e n e x t p a r a g r a p h .

C h e n gi n g S c r . e e n l ' l o de 6

The Di6plag HEndlei interpr.tE t h e v a r . i a b l e A p p l t H I . t O O O E l, t o c 6 n t a i n


*he addreis b€1ou lrhiEh i.IEMTOP cEnnot €xtend. ThiE allotrs rJou to
pt'otect the poition of *r.ee menorg slace thet rJou aie uEing from being
overuritten €s a feEult of screen node Ehange. The displag h3ndler
l,ill 5 e t t h e s . r e e n + o r n o d e O , u p d a t e M E H T O P ,a n d i e t u . n a n e r r o r
9tatus to 9ou. i+ it deterrnineE thEt the screen oefioig uill
ettend belou, APP|{HI as E re6!lt of e scre€n node ahanqe. In other
cases the DlEplag Handler effects the desired oode chsnge and !pdEteg
t,IEMTOP.

OPERATINGSYSTEf'|CO15555 -- Section 4