m. parqpka&mui Apple IIgs Hardware Reference fe^fetoflnd Apple IIgs, Hardware Reference 1MB Apple ties by Apple Computer, toe 1MB Apple Ha Second FMian Second Edition Addisun-Wtaky Publishing Company, Inc. Reading. MaMurliLLsrtts McnJo t'ark. California New Y&k [k:\-\SU\U. OrAit\i\ WokirtghanK England Amsterdam Jkmn Sydney Singapore Tokyo Madfkt San Juan Apple twin-nil.;. Iv WAHflAXTY iNHHUUTTOK ALL IMPLIED WARRANTIES TTIE WARRANTY AND Copvfijtfu € 1989 bj Apple Computer, tnc ON THIS MAN I AT, REMEDIES SET FORTH JVC LH) NO IMPLIED I ABOVE ARE EMU SIVE AND All rights reserved N«* part of WAHKANTIES 01 MERUIAN IN LIE I OF ALL OTHERS, Contents publication may he repro- I ABULIA AND NESS EOH 1 1 1 ORAL OR WRITTEN, this- duced, stored Jn i retrisevsd \ l'.M-1'll I UK Ft RPOSE, EXPRESS OH IMPLIED, No \HE- IIMIIIO S\ hi K\IW)\ Apple deaScT. agent, or ;. -.ii ill Of oariSillilli'd, ifi any in mm n ^u:iI>a\si-koyi employee in authorized m farm -i m means, mechan- bj THE DATE Of THE iu;ike any modification^ ical, electrode, phorocopying, ORIGINAL RETAIL PLTO extension, or addition lo this recording cm otl erwlse CHASE OF THIS PRODUCT, warranty' without prior written dn out allow the Even iIkvliuIi Apple has . S'Iill' iUH-l'^ permission of Apple Computer, reviewed *Tu> 111jnu.1l. APPLE exclusion or limitation ui Figures and tables si hie- Printed in roe United MAKES NO WARRANTY' OR Implied warranties or liatriJin States of America. REPRESENTATION. EITHER inr nuitfenEjl or ton^etpientiai EXPRESS OR IMPLIED. damages so the above Apple, ih-e Apple logo. WITH RES PITT TO FHI.S llmitau r exclusion may not Preface / xix AppieTalfc, Apple lies, manual, rrs oiai.ity, ,lpjlK III IMLi Tlli^ WHHilOlV Duo-Disk, ImageWriter ACU KAlY, MERCHANT A i specific legal riaTirs, About tbis manu.i I KX LaserWriter. Macintosh, OR FITNESS FOR A BII.I1T, and voumaj also have other WliJl rhis manual contains is PrpOOS; and SAKE an PART1C11AR PL RPOSE. AS rights which van From state to A RESCLT, THIS MANIAL IS stati Cbrivenuoris iLnJ usage In this manual /' xxii IV^hIi-Ic-lI lr.ukili.il ks i\\ \\y\v Compi ter, Inc SOLD "AS IS,' AM) YOI I, Special messages / jmi THE Pf. RCHASER, ARE Apple Desktop ttu*. LIS OS, kind ASSUMING THE ENTIRE Memory .-.to - uriii UniDisJt axe irademurks of RISK AS TO ITS QUALITY Altering register contents ?oclll Apple d imp liter, Lol AND ACU RACY. EN NO EVENT WILL APPLE HQ Gantmond ;md El' Zapl BE LIABLE FOR DIRECL Dinc!^it^ are registered Introduction to the Apple QGS / 1 INDIRECT. SI'EtXU, ir;id\:iii:irki nj LnieFnmiunjil INCIDENTAL, OR Apple II compatibility I Typeface Corpomtido, ( nssOH ENJL\L DAMAGES KIM llNf, l-KOM AM I Apple ItGS feanjies / 3 Mi., rosoft fs a registered trade- DEFEC1 OK [SAM \{\i 1 i 1 MB Apple RCS addltbnal feann.. - iii.irk of Mn r!.--.:li Corporation. IN THIS M.\M4I_ L-\™ I I .Kin .ii rim- possibilirj I ' Rcmoslng the cover 5 Pqkt3ojft ls a regisiered v.kh darj J'enpherjl exp jnsit n ^k As i i • trademark, and Illustrator \* a ir.n_lLin.irk. -si Adobe Systems, Cllri^lL^CuT^ 1 Incorporated. Seoul pi Ifta / 7 Sinuill.ineiiuslv pubhhlicd irv tbe Deik drive port ." 7 United Stales and Canada. RGB video connector / ? Composite video connector / 7 ISBN o-_o:M2.wy-_ Apple Desktop bus 7 ABCHEFGHIJ-WU-89 First Printing. September W) Game connector / 7 A doner kxik H s Fbe . 'U':^a It subsvstein / fl The Tw Proctssor Irnerface (FPU subavstt-m UJ 2 The Core of the Apple IIGS / II 4 The Video Displays / 55 : The Mega II custom IC I Apple HGS display features - The FPl custom IC / 14 Video from the Mega II JC 56 SynehronizaikMi I- The Video Graphics G mtn >l le 1 56 "The Mega 11 eyde / 15 VGC interrupt / S9 Me^ II auxiliary memory Iton*- iceess 16 The VGC Interrupt register / 59 Memory allocation . 16 The VGC taiemLpt-Clear reaistet 60 Memory shadowine, Itf Video outputs 61 The Shadow- registui 19 Apple II video / 62 The Speed rrjy^i JJ NTX reiati RIGH video 7Q RAM cnntnul Video display pages -| I/O spa -" Display mode switching ~i M3atog address modes 75 -: Addrcssi n>; d ispl v pages dlrcctJ) ;i j ~ 3 Memory / 27 The lext uindou. " Built-in memory / 29 Text displays 73 Memory map J' Test modes / 78 Memory bank juration / $] Text diameter sets "H AdJre.ns wrapping Jl Color le.xi 81 ROW memory / 31 Text and badtground color hi ;ii nk SQC 1^ in- ay il I. kj i ion 32 1 border color 81 Reserved memory pages 32 Monochrome/Color teajstef a* Lin^uj.mj-Lurd memory ^pace J5 Graphics displays / 81 The State register 59 Standard Apple II e/aphh ^ uncles K-i BitnkSOl mnmIufi manor] i Lo-Res graphics 84 Bank jwiiching for auxiliary memory 13 Hi-Res graphics / 85 Banks $EQ and SE3 n Double HhRes graphics Mr Thf dfepiaj buffi i- MS Supa Hi-Res graphic Firmware workspace -17 The New- Video renter W Apple n program memory unc itf The Super Hi-Hes grannies hufier . 91 Banks SOU and SOI Si nr c* ml n ri jytes ( S9D0049 DC7J f . 1 1 1- 1 i 1 92 Shadowing / 49 Ci .1 or pa letter ( SPEO0- J9FFF ) 94 Screen hole? 89 Pixels 95 Memory expansion 19 Dithering 9B The memory expansion ^li!<: M Gulor Fill mcjdc / 98 Memory expansion .signals 9 Extended 1AM / 51 Emended RAM mapping / 5-2 Extended ROW 52 Address multiplexing i\ It Apple lliii hardware Reference Contents Apple I1GS Sound / 101 Hu.s communication 133 Commands and «loha si^n;) U I I ' I The built in speaker 102 Tramactioia 334 One-hat sound ' 103 Commands / 136 Sound synthesis / 103 Talk . 136 TteSouiKltf.r l'li Listen / 137 The Sound Gonad noisier 1 >-+ Send Reset 137 Da.u register / 105 Flush / 137 Address Pointer casters 106 Broadcast signals 137 'Write operation l&G Attention jnd Sym 13$ Read operation / 107 Global Read 130 The Ensuniu. DOC t 107 " Seina; Request 138 DOC registers common Lu J II ttfdltotors 106 F-rrnr conditions 139 The Oscillator Entemipt register ($EQ) " HIS G Apple Destoop Bus peripheral dexkes " HO The Oscjtojr Enable fletfster SH 1 i 1 Li Device registers L i') The A/D Convener register ($E2) ' 109 Sejgfleffl 140 DOC registers for individual oscillaior> 109 Register I Ui The OsLilliJinr Control Egteters C$A0-$BF) 109 SGG-$7F) u Renter 2 143 The i is Man * I j,m.i registers i l tegfeterj i 143 TbeVDhitnere^siJtra($40-i5n / 111 Device Kj.ndlt.-r> 1-44 The Frequency Hi^h and Frequency Low registers i SGW3F) 1 1 '" tl3 Device addresses 1 h TlieWaveackSi2eregiBtem(SaS-$DB Collision detection ]-rfj The ft'-is L-i.ihk- Pointer registers ttttH&f!) US Sm ice Request enable/disable I n< Mating sound with the txx: 115 1 MR Apple IR-.S lT Sound inpui and output specifications 119 Sticky keys , 147 Further reading i l£3 ADB mouse 147 The Apple Ileshtop Bus / 121 lin ill in I/O Pom and Clock / 149 1 l:i- mpui bus 123 Tile disk pi in L5P Thekeyboaid 124 Apple 11 cotupa.dhil£tv / 151 ADB and he upgraded Apple He 1 / 125 The disk-pon con neetor L 5 Reading itie keyhuatd P5 Tlie Disk Interface register 152 The A >H micfDcumjuller i 1 27 •- TfeelWM • 153 UkADbgld The Mode re^tex 155 ttteADBGLUregrstea 127 The Status- register / 157 \DH i. .:mimnd. Data register I2S The Handshake register ' 158 Keyboard Data register l> Tlie data register 1 59 Modifier Key register t 130 Mouse Data rsgfeier IV ADB Minus roister IJ2 vi Apple lies Hardware Reference Contents vil The serial pom 159 9 Power Supply f 201 NoriLumpaiifrility wilh AG A 160 Description / 202 The Serial LummijnkaEiijns CotitralJei 160 Specifications •" 202 The game I/O port ' 164 '• Power connects J- Gam* Q I 165 _ Hi'. luntl-L t)[iLr(>] HipnalN I 166 Summary of secoiufcrj 1 O locmJuns I Li!.S 10 The 65CS16 Microprocessor / 305 BuLli-in real-time clock 169 Tfte features of tfae 650316 107 The tfrhrft65C8iG 2M Microprocessor diiTerena I/O Expansion Slots / 171 The rasters 210 The expansion slate 173 The accumulator 210 Apple n compatibility [% X Index [easier / 230 Direct memory access 176 Y Index cejiisat-r _l" I In the Aupte ll"«^ 177 Data bank n^rer 210 Slot 10c;i rd* 177 Stack pointer _l DMAcaids/ 177 Expansion-slut signals m Program Status register Program counter _!l i 1 1 The buffered address bus ITS Program hank register / 214 The slot -In. i I His 179 Direci n ::--. i Jl> - 1 1 - : 1 ii].: and U.MA rkfcj chains 180 Emulating llie fi$D2 .' 1 i ImdJrgji:iik^ [SO Operating speed 115 Peripheral programming . 181 Further reading / 21^ Selecting a device an-i tnCfllti data sheets J I The Sloi reader Itij Peripheral-eard memory spaces * 183 Peripheral-card I space is t A RoadflLip to the Apple DGS / 239 Peripherals rd ROM spa re 1 8\ The inmiductory manuals 2-1 Expaitam ROM space ISi The icchnicjl introduction Ji^ Peripheral-card RAM space ll-? The programme sinttoductij n 242 I/O programming sua^l ion* W The machine reference manuals 2-t3 Finding the slot number wilh tt'.i.M switched in I AH Die hardware reference manual J tf I/O addressing 13$ Thtfinnwarereffri.'na'ftLiriiLiI Z43 RAM yddnwinp 1W I i i.- : s :]hr i\ ret'u rent l- ma n u.i Is J 1 Other uses of I/O memory space If) The programmers workshop reference iiliiui.iI J - Switching I/O memory l l ?2 Ttic pfogmmming-la ttguage reference manuals 1 15 Devebptng cards far slot 3 / 193 1 ne operating-systi-m rdcrcnie manuals 245 Interrupt 1 ; - 193 APW and MPTC manuals 1 16 ul i.s an interrupt? 1 \\ I .') I The a ll-Appte manuals • 246 Timing diagrams 194 viii Apple lies Hardware Reference Contents H I nuTii.ii Umi.iI hi:\ boards / 247 C The Character Generator I 251 Figures and tables "Hie character generatoi ROM 252 LI.S. characters / 252 International characters 252 Mtn.iM.Texi characters 253 Chapter 1 Introduction in the Apple lies / 1 Figure I- The Apple Uos . 2 D Conversion Tables / 255 FLqur/e L-i Rdeastng the snap ks k> to remove liie ci wer » :"- Bits and bytes . Figure 1 -5 The Apple IIh'.s with rtif rover removed / S Hexadecimal and decimal numbers 257 Fijyirel-4 Apple Jfes connector > Hexadecimal and nejjative-deeinia] numbeis -- Figure 1-5 Etiodk diagram of the Appk I J ] t-ripi Ltnit ideniifioriion numbers 260 Asni code conversion 262 Chapter 2 The Core of Lhc Apple Uos / 1 Figure 2-1 Mega 11 and FF] subsystems in ihe Apple litis / 12 " Figure 1-2 Sfrdd*ed flO dock cycle li E Frequently Used Tables / 267 Fi^un: 2-3 Apple ilGS memory map / 17 Figure 2*4 Shadowed itfeas of memory I* Figure 2-t Shadow regEiter at % 0035 20 Gfo&ary / 2fti Figure 24 Speed regfetcr a) SCOjVi 2J Index / 297 Table 2- Bits in the Shadow noisier 2' Table 2-2 Bits in I he Speed leg&ef 23 Addendum Schematic Diagrams Chapter 3 Memory / 27 FiLiiirL 51 Wemorykithe Apple Acs 7$ Figure .i-2 Memory map of the Apple DCS 3 Figure J-3 Shadowed display spates in bunks $00 and SOI / 34 Figure 3-r Lmguage-cand memory map / 36 Figure 3-5 State register m $C06fl 39 Figure JH Memory map of main and aux liny menu iry i \2 Figure 3- 7 Memory map of hanks Istli and S3- I Figure 3-3 Memoir c% pans* u - k 3 it * Ftflute 3-° Extended RAM napping ' 53 Table 3-1 Lanjjnage-aird honk-select switches ^ Table 3-2 Bits in ihe !mv n .l: :.! HJ Table 3-3 Amdlwry-rnemon select .switches n Tahlt 3-i Mriimrycaid interface sign. Apple MGS Hardware Reference Figures and uhk> xl L Table \-\9 Bits in a scan-line control byte >3 Chapter 4 The Video Displays / 55 Table 4-20 Palette and color starting addresses -.S : ~ Table q-21 Color selection in (ViO mode 96 Figure H-l Video components in ihe Apple Hi IS Figure 4-2 Scjn-lintj Lnii-rrtJfH •" 5S Figure 4-3 VGC Interrupt register at SC023 59 • Chapter 5 Apple Qtis Sound / 101 Figure 4-4 VGC Interrupt-Clear regtaor at JC03I '" fil Figure 5-1 Sound component in the Apple Uos / 102 Figure i-i Map of iQ-cnlu.mn tesji Page 1 display / ti> Figure 5-2 Sound Control register it SCU3C / 105 Figure 4-6 Map of SO-euhmm test display / 66 Figure 5-3 Address Fomter registers " 106 ~ I -ml- - Map of La-Res graphics Page 1 display / 67 Figure 5*4 Oscillator Interrupt register at SE0 / 108 Figure 4*8 Map [ Hi-Kes graphics Page 1 display 68 Figure 5-5 Oscillator Control register 111 Future 1-9 Map of [Jouble HUKes ajtaphks display 69 Figure >6 Wavetabte Size register ' 1 13 Figure >i*UJ RGB video connects ~ Figure 5-7 Final address calculation in ilie Wavetabie Size register / 1 16 Kiuorc i 11 -iN-column lest dt&pb) S3 Figure 5-8 Generating the sound addresses '117 Figure 4-12 tfiHniunin lesi display / flO hgure^-9 Combined output of riffle-domain multiplexed oscillators, lis Figure 4-13 Screen Color register aj (OQ22 HI Figu re 5- 1 u A wo-ehannel demultiplexer circuit 1 1 20 Figure i 1 Harder Gohwrigfefer at $00:54 / 82 Table 5-1 GU register! 104 Figure 4-] 5 Mcmochmme/Colrx regbtef i v 1 Table ^-2 bits in the Sound Control register 105 Hgu iv i -!( Hl-ltes graphics rfispby bits H6 Tabic 5-3 Bib in ihe Oscillator Interrupt register i 109 FlgtErc* 4-17 New-Vidro register L JI Table >-i DOC register addresses / 110 Figure 4*18 Super Hi^Re.s graphics display buffer 92 'able 5*5 Bits Ln tile Oseillaior Control registfl 112 Figure 449 Scam-fine contra] byre formal " c ^3 Table 5-6 Bits in ihe Wavctible Si?^ register 1 1 \ :• i-.ii in i J' ( i>!: >i palette forma* 94 Table 5" Wavetahle slzc dctennir>;uion 114 Figure 4-21 Fisd data byte format 96 TaNe 5$ Sound input and output electna! specifications Figure i-2J 1 Rawing pixels on the screen 97 for connector f-25 / H> L Figure^ Examples of drhering 99 Table 4-1 BUS in die VGC Interrupt register 60 Chapter 6 The Apple Desktop Bus / 121 Table 4-2 Bits in the VGC Interrupt-Clear regis vi 6 Figure 6- ADR components in the Apple tics 122 Table 4*3 Text and background colors >.j Figure ">2 ABB aanjKmertfs 12? Tabic 4-4 Standard Apple II video display specifications Figure 6-3 Mini-DIN ' register at $C02 S 131 Tabic 4S Video display mode combinations: 73 Rgure "I-" M'uisc Data register** SC024 / 131 Table 4-9 Tex* win to memory kratkxns 77 Figure h% ADB Status regisier at SC027 / 132 Table 4- 1 DiSj ila y c I la rat it-r sets ,• 79 Figure tv9 Bit representation via duty-cycle modulatioD Tabic 4-1 Bits in (lie Screen tailor register / 81 Table 4-15 Bits in the K2 Figure 6-10 A typical transaction f 135 Border Color register Figure 6-11 .\ttentton and Sync signals 136 Table 4-13 Hits In the Moflutliriinic Culor register / 83 Figure ti-1 2 Service Request / 139 T.i III.- f- 1 r b i-Ftes graphics colore s^ Figure 6-13 Key Lxurd register 111 ftbk H5 Hl^cs graphics colors / 87 figure 6-14 Mouse re^N it" 1 iJ Table i in Double Ht-fees graphics cdora sh Figure 6-15 De\'Lre register 3 143 Table 4-17 Efts in ihe Neu -Video register / 90 Unit -t- 1^ Memo™ hunk selection using I •! i i . if ih«- \ett-Videi i Tegi.stei xi\ Apple litis Hardware Reference Figures and tables atiii F \£\ ir 5- 16 i ADB mouse keypad 1 48 Table 7*B Game 1/Q signals lf>> Table 6-1 Pin assignments of the ADB connectors IJ S Table 744 Aoruanriatoc memory locations ' 167 Table 6-2 Keyboard Data locations ., 125 TaNc 7- 1 5 Sect mdary l/t ) memory h rations 1 1 Sfl T;ibkj ft-3 LSth in [lie ADB Cnmnunil Data register 129 "1 : 1 1 1. " I i Hi ; -. in I lie twin ml register I " : - 1 'l:- - i Bits in the Keyboard Data register 129 Table 6-5 Bte in the Modifier Ec) registet 130 I/O Expansion Slots 171 Chapters / Table $6 BiXs in the Mouse Data register IJ] Figure H-l Fxpansion slots and other components in die Apple PJG5 172 Table &- 7 Bits in Lhu ADB Status renter 1^2 Fiyuiefs-2 peripheralneinparisiDft slot pins 173 Table bS ADB timing specifications / 136 Figure 8-3 Daft buses within the Apple lies H9 Table r># Command byte syntai 157 Figure 8-i Skrt register at $CG2D 182 Table 640 Bils in keyboard register D t4l Figure &5 F^pnsion K"''M -iiii-l'. '..ruin 186 TaNe 6-1 Efts in mouse register M ill Table t>12 Bits in device register 3 Ftfiurutt-6 ROM disable ackta&s decoding 144 Figure fr7 1'0 memory map 191 Table 6-13 Reserved device handlers I B Figure s-h I > cfocfc and conud riming 195 Tahle read and write timing parameters * iili ;[\U active / 197 I ijiuiL* "> I Jyra puiilh in the Zilog SCC I- I Lih-lr. h ] I DMA read and write timing parameters 199 Figure 7-10 Game I/O connectors 165 Figure 7-11 Control register at $C034 ' 170 Chapter 9 Power Supply / 201 Tabfc 7- Pins on the tfek-poni connector / 152 Fi^iiTc >- 1 ?i wer-su ppl v o m netior 203 Table "-- lins n: die Disk Interface register 153 Table 9- 1 Pins on the power-snnply connector J' "J Table 7-3 Disk-port soli switches , 154 Table 7h IWM states / 155 Table 7-5 Controlling the disk select signals i 155 Chapter 10 The 65C816 Microprocessor / 205 i.r-l' 7-6 Bils in tlie Mode register ]% 1 1 ltv L(M &5C31ti m tin- AppbrtGS system 20* : ~ 7-7 Bite in the Slam- i- l\-\ i l hpire I'l-i ^SlXln rtpv cps : J"" Table 7-fi Bits In the Handshake register | £B Figure I"-. 4 Program Status register i: I Table 7- ( .J I'ins on a serial-port connector • 160 Table 10- 1 Some 6^)0 family ties / 208 Table 7-10 SCC Command and SOC Data register addresses LM Table 1 0-2 Bits in the Program Status register / 212 Table 7-11 SCC read register functions f hi I Table 7-12 SCC write register functions / 163 xlv Apple tics Hardware Reference Figures and lables xv Appendix A Roadmip 10 ihe Apple UGS / 23JJ Appendix E F requcniLy Used Tables / 267 Figure a- I Roadman to the technical manual 241 Tabic F-l Uiitftiatft'-cjid bank select .switches 26H Table A-l Apple uTGS leduijcal manuals ' 24D Table E-2 r Awdliaf) -meflJOfy select switches -" :! Table E-3 ttuimiard Apple II video display specifications -~ |: Appendix B International Keyboards / 267 TaMe F--t Video display locations 270 Table l-S Display soft switches 2"] Figure B-l Ui&nii& keyboard 258 Table E-ti Text window memory locations 272 Figure B-2 U.K. English keyboard 368 Table E-7 Display character ace 2" Figure B-,5 Canadian keyboard 2fiS Table F-H LcvKra graphics colors 273 Figure IM French keyboard HV) Table E-9 HHtes graphics cote 275 Figure B-5 German keyboard >' Table E- J Double Hi-fies graphics cotert 2~t Figjuretu ] u Li I r, keyboard 2ft Table B-l] Palette and color starting addresses 274 Figure B*7 Spanish Lvboard / 270 Table Eli Oil renters tli Figure B-8 Swedish keyboard 271 Table F- 33 DOC itgjtier addresses 275 Table E- H3 Disk-port sofi awddien 276 Appendix C Hue Character Generator / 251 Table E45 The TO states 277 Figure Li t'.s, characters 252 Table E-36 §€C Command ami SCC data register addresses Z77 Figure G-2 fttouseText characters / 253 Table E-37 Annunciator memory local ions _" TubleC-l IntemaunnaJ dial i -. 253 Table E-lfc Secnndarv I'O merni.ft ! ,:iiil He if nu I i if Pl\ numbers ji • i Table D-J What ;i hit on rcpreseoi 257 TabEe D-2 Binary, he*adedtnal, and decimal equivalents 257 Table. D-3 Hexadecimal and decimal p< m c rs j =tf Table D--i Hexadecimal to negauve-tlecimul converakjn 259 Table LJ-5 Codes for PIN numbers .• SlSl Table D*6 Conirol characters, high bir off 263 Table D-" Specia I cha racteis, high bk aS 2ft i Tabic D4 Uppercase character*, high bis off / 2fi5 Table M Lowercase characters, high hir off / 266 x\\ Apple DOS Hardware Reference Figures and tables xiii Preface This Ls the hardware reference m:inujl lor he Apple llGir* I cumpwer, indudinfi the original 256K Apple IIgs und the ] MB Apple I3t>s LumpulfTH li is prinuinK fnr hafiiwarc de^'ifis .mJ pnigraninieni who wan? to know how 1<> taanipulne the lurduiitv, I -in ft -II .ilsi i be u.sufu] |d anyone wanting to know how lo lake advantage of all the features of ihese ccrniputeis. xix Chapter 3. 'Memory," describes the organization of the built-in memory as well as die About this manual memory expansion slot and tells hou to design and access a memory expansion card for this special slot, hs pan of the Apple Hgs technical suite of manuals, me .-l/^e £fe v Hrtfthaiiv Reference Chapter *, "The Video Displays/ goes in depth tnto now ihe standard Appk N tfraphk>, covers the design and function of ihe Apple EIGS hardware. Ie provides hardware design modes woefc, and how to make ihe Super Hi-Hes graphics wi irk lnr v> p and iniertace IttfamtaJtiofl and is iniended for people who have an understanding of digital microprocessor dearootcs and who art interested in taterfarina the Ap|>Jf []> Ejq Chapter 5, "Apple [Jgs Sound," shows you how to use the $2 digital oscillators ti i geoa Me the outside world Progn ens* sing the sound ami graphics capabilities of die sound. Apple EIGS should llso refer to this manual si iIl.il they can have a good understanding of Chapter 6, The Apple Desktop Hun." provides details of the hardware and protocol hoi software, imsta the hardware required to design and conned an input device (keyboard mouse graphics tablet, and SO The Apple lk:.> is, above all. an Apple it This manual introduces ilk- cpntputer'a features on> (o this input bus. and also describes how the Appk' lies maintains compatihitirs with ;itm-:>ih \ppk |i Chapter 7, "Built-in I/O Ports and Clock/ dtseffbes (Ik- h-k jx>ir i . - ii .1 :-::irs 1 d,,. models. game port, and the real-lime clink Specifically rh:s manual Chapter H. M l O Expansion Slots." lists the 1 ' ) sie.n.il> .n. .nkibk- ai the expansion slots, and introduces ihe feaiures of ihe Apple llc;s hardware e Ives Uiiimi: precautions anil programming suggestions for the slot cards. IMA and describes the Apple ll-compaiible fund ions interrupts are described here also. provides jd-.ln v„,- - , i iripuldting the hardware Chapter 9 briefly describes the Apple UGS power suppl) and lists its .specifications. pioiides input.' output 1 1 O i information for interfacing .sajj.ru.ls to rite OUlskfe Wodd CI i j pie r 3 covers 1 ie 6SCS 1 6 micrc >pn: * < sh 1 : i Crilike previous Apple technical iL^crrcThri." manuals-, this one does riot document fumware Appendix A coniafas a raadmap to ihe Appk- lies n-chnieal suite of manuals. Keatl this features; they are covered In detail an [Jit- Appk flfe5 ftrmwmv Rfftwntr. Tin- Apple ItGS appendix to determine which books will help you to fcani more about a programming use? a sd of fctf-Jevd ted utilities to peifi certain Futvettons. Programmers art lansua^e. the Apple lies firmware, or ochcr aspL'd of ihe computer. expected to use tftese tools to perform sound and graphics operations whenever ik l« m 1.1 1 ie Appfe fit tSTtn \ihox Rpftmtc* for more Information. . i a : 1 1 1 1 Appendix B has eight International keyboard layouts Appendix C shows you the contents of the character generafor ,ill the chfiiaders Tht Apple TTGS can display. Api^endix D has taNes ihai show what a hit and a hyte can represent. Conversion tables What this manual contains k-iueen hexadmiiial decim,il, and negative decimal, as well as 7-bii ASCII, are provided. Append Ls E coma ins some of the mosi frequemly used tables taken from throughout ihe Kadi chapter in this manual describe? a different aspect of die computer. Each chapter is manual. modular in scope, describing ihe particular aspect of the Apple ACS and nuking references to other chapjens and manuals where accessary; A glossary follows the appendixes. chapter i introduces rhf features of rhe Apple Hg$. An addendum, after ihe index. ctfflftainS schematic diagrams showing all of ihe electrical l components of the main circuit hoard. Chapter 2, The Core of the Apple Tit*," describes the htari the Apple litis, the Mega tl, and the Fast Processor Interface (FPU aistom integrated circuits. xx Apple IfGS Hardware Reference Preface XX Memory sizes Conventions and usage in this manual Throughout tins manual, memory is given in kikifytes, abbreviated I' 1 - the letta * ot In The Apple Tl and Apple ll Pius are stiftuiunl Appk> U computers. In ihis manual, reference megabytes, abbreviated by the letters MB, A kilobyte equals 1024 (Z ,c^ bytes, and i is made ten the compatibility of the Apple PG5 with *[jiiJ.iuI \pph' II umputets, This megabyte equals lOZviK. or 1024 x \tili bytes. Therefore, memory sizo in kilobytes ml means lhat die Apple Mcs will run software ^^ i irrk ii I'm ;in Apple IJ Of Apple II Plus megabytes are not in even thousands and miliums F« cample, 5 MB is computer, a particular Function that me Apple IIGS has in common with the Apple lie or 1024 x HJ2-i x 5 = 5,242,880 bytes, not $000, i bytt - Apple lie. for instance, will be mentioned specifically as such. A revised Apple litis, the 1 Mb Apple litis, was introduced into the Apple II family in mul- 191*9- This new main logic hoard differs from i he urinal mam logic board in several ways, hui primarily in the amount of RAM suppled on the main logic board. The wfymrf/ Apple Ilf.s contains 2^K i if RAM jikI ibe / .Iffl Apple tiGS contain^ 1 me^hyte nl HAM Other Altering register contents differences between the computers are detailed in (he pertinent sections of each chapter. Information throughout ilxi.s manual pi-ruins, lo Ixrih u-rsions of the main logic hmLol VC'hen programming the Apple lies, you will need to manipulate certain bits within unless otherwise indicated registers and snfi switch locations in order 10 achieve a particular result. Some bits in these registers or soft switches must be teh alone, or the system roukJ crash. These hfts arc labeled fbserval; du not modify Special messages A Warning In order to manipulate the desired bus in these registers and leave those reserved ones untuuihed. you must uic a read-niodjf\ -wnte Some test in this manual is set off from, the rest m special ways: technique. EiTlier of two assembly-language Lommands can be used to accomplish this: the test and-set-bil understanding of (he main text. modify any one bli and leave the Others untouched. * To read ahout using the TNH and TRH instructions, refer lo 65M J6o^, ,j Important Text seL oil hke thi> pretamEs especially important information Language Programming \<\ Michael Fischer. published by Osborne McGraw-HOL A Warning The warning message contains irtfofffiata that, if tgnxml, couM result in toss oJ data, damage lo equipment, or possibly bodQj injur)", a Numk'rs preceded hy a dollar sign we bexadeefniai rathe! than decimal representations of values. This convention Is used throughout this manual Words that appear m boldface in the te\t are delmed m the gjossaty bcaied jl die hack of this manual XX i i Apple I li is Hardware Me rem e Preface sxiJi I Figure II shows ihe Apple lliv Chapter 1 Introduction to the Apple I1GS Figure 1-1 Tl i£ Apple CGS The Apple HGS* is a new compuiLT in the Apple* ][ family. While maijitainim> to roots in the Apple lie and Apple ]Ec, this computer also provides new Feature* that make ii the most powerful Apple H yd This Beat chapter desalt gerieftlty how the Apple Ik* fits into the Apple II family and fell- tthai lets Jt apart from previous Apple II ctunpuiers. Apple II compatibility The Apple llos is compatible *itl the Apple II Family of computers, Some of the tenures the Apple llGi shares with [lie Apple lie and lie are 6502 processor compatibility whft h is matoialried hy the 6SCM16 mieroproee*Mir u.M'd h the Apple I!- 15 standard Apple II graphics which inetu.de Lo-Kcs mode. Hi- Acs mode, and Double Hi-ttes mode cotoi video graphics l2fiKnf mafn RAM huil 1 in Applesoft BASIC ium I :- 1 1 i I r - 1 1 1 serial port* Apple flew Hardware Reference seven peripheral expansion slots, compatible with the Apple He a built-in disk interface pun like the Apple lie that will accept either ^tnnch or 3,5- 1 MB Apple IlGS additional features Inch disk drive;. huil -in Apple II Monitor program i En mid-t9JJ9 K Apple inmxlueed the 1 MB main bgk hi -.irJ for the Apple \K&. This logic- board tncorporaieh several features ntf found on the original le#k hoa-nJ 1 k-.se nav. -^-column and Ntfi-column text display capability functions of the 1 MB Apple llos computet an- .is follows: j game I/O port (or joysticks and hand controls like the Apple lit- md ffi The mam lojfic board RAM has. been expanded to 1 MD A memory expansion card confining up to 4 MR may be added to expand usable memory. The main tagfc hoard ROM has heen expanded to 2%K. The ROM now includes all ol the toolbox utilities, previously resident on disk. I tteter to the Apple AGS T(h$kix Apple IIGS features tfyfam&far information on the Apple HCS Toofcas utilities,) Willi a ROM expansion card, an additional ~(i8K cf ROM urn Ik- a^rifessed Aldiough the Apple 11* has many ieatures iri common with previous Apple IT products, if A new version of die Apple Desktop Bus (ADB) microcontroller IC provides two has several new features that enhance iis performance. Here iire a lew examples new features;: the to-bii CMOS 65CS16 micropracesaffl whjdi uses a superset of tlie 6502 Sticky keys instruction set. includes 11 new address mode* and 36 lir* EftSUUt ttofls, ind is compatible with 6502 code. To learn more arxnjt the ftSnl and the 65C02 Keyl>oard mouse microprocessors, refer to Ihe /l/f/c tfe Trchmtit ftxji'rvna and the .i/yj/j- Kit fecfotfctf 1 Also, the new haaid revision nn longer supports the huh- in (Apple llei keyboard; only Nefervna: respedfrety the Aim keyboards are supported by ihe I MB Apple flGS, Ihe Apple Desktop Bus is Nijsh processing speed, which is selectable between L034 MHz of 2.-H HHi covered in Chapter u Super Hi-ttcs video graphics modes, which offer eUher 320- nr Mil-pixel hodzoclaJ * Shadowing of text Rage 1 memflf) te available for the 1 MB Apple DGS A hit in the rc>i.ilLiii-;;-n. displaying 16 colors per line; these colons may Ik chosen faun a possible 40%. Shadow ie^«er(fO035) controls whether or nut ihis address space in banks son and So! * ikiuii iwrtl into banks *lifi and %l hapter 3 tfcscrtbe* menu uy shadowing in E Analog RGB color vide* r outputs I the Apple llos. 2%K nf RAM biill onto the main logk board Von cj.ii increase ihis HAM lo nvcr i MH ! The new Apple: lies bgk board provides j Teliahie meatis fur programs to determine i-i'i.u an op aJ expansion card in ihe enemo^ expansion slot tf%K of ROM also under w|iaj dicWMtanoeSi a cold hoot sequence was tniliaied; a bii in the Speed un he lidded by urni^ .1 memory expansion card. register is set when ilie power switch is turned on. TTie Speed n •'.-: -\ i i > -^ered in A Control Panel screen, a huh pro* hies users wftb means for setting system parameters. Chapter 1. Buih-jn AppleTalk' network firmware IJulli-in real time clock (RTC) win a backup battery, which is accessible throujih The Figure 1-2 Releasing the snap h k k5 co remove ibe cover Gootiol I'anel. Selectable display border, text, and background colors. A a urn J v, 'nrlvsi ?.« Integrated circuit ilQ with 32 independent oscillators and i>4K Dl dedfc ni-:.l RAM. h detachable, internal iona keylxrard wilh keypad. I 1 Apple Desktop Hus ", whose protocol provides lor mpni device* hul'Ii a> Jirapliics pad-, mouse devices, and keyboard* Enhanced Monitor firmware, which supports ilie 65GE16 rnlcroptocessor Chapter 1 Introduction to the Apple HGs Apple Ihis Hardware Reference Peripheral expansion slots Removing the cover The Apple Hgr, like die Apple Ite. lus seven expansion slots at die rear (if the main logic The Apple TEG* has a raided two-piece case The cover 3s hinged at the Front and is board These slots a ill accept mast Apple It^compinible peripheral cards designed for secured j[ tint: rear when.' ihe upper uml lower halves meet, A snap toe); i* located at each any of the Apple LI computers Note ili.ii The Apple IlGS does not hate an auxiliary slot side of ihe rear pane], an shown in figure 1-2, To remove ihe cover; press in on each snap as. is found In the Apple lie For more rnfcrmatJflfi or the peripheral expansion slots, see lack while lifting up it ihe rear of ihe cover. PhW lie cover at the from and remove it Chapter B, 1/0 Expansion Slots. I completely- The maJn logic board Es now exposed kn access r " trie i sparnsioti dote. Figure 1-3 shows die major components of ihe Apple IlGS. Con net tors Figure 1-3 The Apple ITiis with the cover removed The 256K machine is shown at top arid die I MB nwi line .n Ixjih .m. I At dre rear of ihe computer are several connectors. These connectors alkw ihe computer to be connected lo an input device such as a keyboard or a mouse, or a peripheral device such as a disk drive, a primer, .i modem, a network. H th* tiki . Figure l-i shows MttfticrfV illpurthii n Ji < ihe connector*. ROMll4WiHrK^ii!i-^l!'l.'--l iil-i.. I'.irul fttygpffl Figure 1-4 A |>| >l . 1 h . . . Minectors raproccaor KuylJuuiik* .flu i MikIlt-i ftlfiffeMfetiQQb Prinetf 65081 SniteipcDcrsstH Chapter 1 Introduction to the Apple CCS Apple IlGS Hardware Reference Serial ports A closer li 10 k Tlte two RS-232-C ;mdRS422 compatiNe .serial ports u>e nuni-DlN (Deutsche Industrie Vou on think of the Apple BOS system as containing two ^pmh> ;ind unique Normal) M-pin connectors. To transmit and rei efve data in and from da .....: .1 .-, - stems Tlu'^' sutaystems are not mutuallv l-m. Ihm-. u. un the contrary., the -1 1 1 : serial 1 in. use the ttrmwift calLs in the system read-only memory (ROM). Hr serial 1 11 subsystefi - shan - vera! Hrrnponentl without wbLch they could noi ninction. in ports ctescrfbed in Chapter?. "Built-in l/G Ports and Clock." £"['o read about haw to nirc." particular, both ahare the microprocessor, input/output (I/O), memory, video, dse the firmware jn the Appic Dos ROM, refer to the Apple Ik;* Ffmu&re ft-ftretice.l .in J expansion support circuitry. Disk drive part The Mega U subsystem This, connector vvtll accept either 5 -^-imh nr 3.5-mch Apple disk doves made t-«r ihv The firs! subsystem, referred to as the Mega n portion nf the system because tA the Apple II Phis 19-pin connector is similar in lunctn -n In ill*.* one cut the Apple tic. For more controlling devfoe, consists nf the parts of rhu computer th.it mike the Apple lios information un ihe disk drive port, see Chapter?, "Duiluin I/O Ports and Clack/ compatible with irthcr Apple H products These .m, the mCrtUi microprocessor K(iB video connector Ibe Mega II custom Integrated drcuii (IO Tlii---i:'iiiii'i Mr 1 t >s.\ des analog red, green, .md blue (RGB) video signals fur an analog- 1 j!MK of standard Apple II menu iry inpui RGB video monitor. Use only jn analog Input RGB monitor with this i III- Video Graphics Controller (VGC) and video generation \ in Liiin. l^-pin connector, See Chapter "The Vita Displays/ F01 more information i. liLiLh-in device! and extei n.il I 1 1 slots Mrhi u^h the iHgitaJ Oscillator Chip (DOC) sound synthesiser - sup] ott rircuftrj . Composite video connector new m the Apple II family of computers, ihey also Fall undet control oi tie Mi-gii II ^\>\>. >>( Composite video bs available at this connector A standard Apple composite > aloe the computer monitor can be used to disptey video- A. television may Ik- used 10 display HtRokimn tend Of graphics- This requires a video moduLiior to conned the Apple Bgs to a television See h 4 The Fast Processor Interface (FPU subsystem Chapter 4> The Video Displays, for .1 description of composite video The second subsystem, referred to as the FPt portion 0! the system because of the Apple Desktop Hus contftiUJnfj device consists I components of the computer that are unique in the Apple Ikis. 'Jnesc an- Q>rme« Apple Ueskiop Bus (ADB) devices to (his connector, These devices may be the m in this coflnecta See Chapter 6, "The Apple Desktop Bus, 1 fur more inlVimutk)n UMK ot dynamic random-access tnemory (RAM); the I Mtt Apple Ek.s has 1 in using this txmnedof IMH oJ SAW !2*K o) read-cmJy memoij iRu\U the I MB Appk- flea has >%\ of HQM Game connector Note thai ilie 65C8J& micfoptuxessor is lisit d as a amiponent of both subsvsienis. Bcin^ j a new microprocessor, el has many new instructions mat provide thus computer with new Connect standard Apple U hand enntjot or |oysUck to this connector I>n not adapt an .1 capabilities. Also, the 65C336 emulates the 650(2 micropract^sor ,md will necojoii^e the ADB device to this connector ADB devices are completely different and should no! be 6502 instruction sec, which means a \\\\\ run cnocst exisiinK Apple II software used. See Chapter 7. ' Built-in I Tuns and Clock,' for more rnfarri ai on n game bora and senilis. Chapter 1 Introduction to the Apple lies Appk' IKS Hardware Reference _ L Figure 1-5 shews dw Apple litis computer in Nock fwm. Note [he dolled line separating the tuu subsystems. Although this is j logical dtvistoft, n is Ml absolute '[Tie fp] portion h&s access lo the expansion slots, the Video Graphics ContrutLer, jnd other component* ontheMe^T] n.k figure 1-5 Kl i Q*ird!t?r .urn ...k i:iki"j- H.V.1 innimlkT L_ Euqnlq p,in \ pijitB HP* |T I"! (ZSft tapir 1KB I _. I L ' I A K *' lis!™ IlKliTTnil IV.i- Chjpier I [nUoduLtion tfl the AppEc lies Figure 2-1 is a simplified hloelt diagram of the Apple OGS, showtns all its majo* components. The Mega II and The FPI are shaded gray. The dashed line separates the part of the Apple lies controlled pnmanlv by the Sfega [1 from the part controlled primarily by Chapter 2 The Core of the Apple IIGS the FPI. Figure M Mega II and FPI subsystems in the Apple ncft The design of the Apple tlOS is radkafly ditfereni from that dF the Skin I 2 3 4 S & standard Apple If. The cBffeituce arises primarily from three major portents: Geo? the CsSOl ] 6 ntiouprocesscH \ htr Mega EJ custom IC chc FPI (Fast Processor Interlace? lusttmi IL The moM obvious of these iii the toCfllo microprocessor, which is more powerful duo the 6502 used in the standard Apple U. yd irnkrtsms die ability to execute programs written for (he 6502. The fifiCBlo micro- processor is iinp;:.r.iiii mou^h to have ;in mum: chapter, Chapter 10, devoted to it. TheftfGJtfi has a Ur^fT address spacfc bigger renters, and the ability to mil fester than the standard 1.02-1 -MHz speed of an Apple ]L How can the Apple JlirS take advantage of all these capabilities and stHJ be able to run programs written for a standaitl Apple II? The soswcf to thai question is two i ustbm integrated cmuih the Mcjp [I and the fin. This chapter describes the way those iwo ICs worfc together in the Apple TlCi l'rv>.:™| L>I_>L W 9 I S6K Apple IMS i A _-.-. ii. .ii vie: I 3L sl^^Mf** *prArt 12 Apple Itr.s Hardware HeJerence The Mega II custom IC The FPI custom IC The Mega, II custom IC combines the hmciions of several ciniaits found in the Apple He, The FPI (Fast Processor Interface* custom IC supports the 65C816 mJcroprocessof aod its J Those circuits are large, fast memory. Its name Is doubly descriptive: The K1 I controls the fast memory- the MMT (Memory Management Unit custom IC t and aLso mediates its interaction wjih the .\k-ga [] skfe of the machine itself, Independent control of the two suits enables the Apple Ifr.s to run programs at 2,9 MHa the 101! (inpurnotpin unit) custom IC while maim;! mine, the 1.024-J4H* operation required for compatibility with the standard [lie character generator Ht J Ms video and I/O circuitry the video display circuitry For the fntiHb and its last memory, the FPI provides address multiplexing and control Except for central processor and memory, the Mega [I incorporates rhe logiu circuitry for signals. Memory under the control the FPI Indudes I38K of Imilt-jn RAM i if vm on the I 1 1 all the major functions of an Apple He on a single chip [t works with the L'O expansion MB Apple mis logic hoard}, 12flK of built-in BGM [2%K on :1k MB \pple litis logic I sluts and the I/O pom built Into the Apple HCS and supports the part of memory thai board), up to 4 MB of expansion BAM, and up to MB of expansion ROM. The FPI also I contains the video disptoy buffers. The Mega II side of the machine consists of generates the refresh lVcIcs needed hy the fast dynamic RAM devices Tin- rime required for the refresh cycles reduces the effective processor speed for programs in RAM hy about the Mega II 8 percent. Programs in ROM run at the lull 2 s-Mlf/ speed 12flKof memory The additional 128ft of ftOM storage on the MB Apple AGS bgH board ls used lor I the I/O expansion slots storing toolbox utilities as well as enhancements to the system firmware For complete (he built-in L-'O ports information on die Apple Hon firmware, refer io the Apple litis Firmware Reference For the video display circuitry ini.rTiuibn on the iooIIok utilities, see rile AppW litis Tm^jo* Jtytoncft The Mega [] contains the drcufcxy thar generates video display sLgnais from the data in the display hufiFers, alon^ with the soft switches that select the different display modes. AJI I/O in theApple Hon is memory mapped. The Mega [1 provides the address decoding and the soft switches that control the I/O slots and the built-in ports. The Mega II aba Synchronization l--uukleH the refresh cycles lor the 12HK of dynamic RAM under its control. Because the memory controlled by the Mega II contains the display buffets, it always runs Whenever data have to he iransferred between the FPI '-id., and il-e Mega II side, the FPI at the 1 .024-MHz speed, rt is sometimes referred to ;lh Appte H standard mmtny, to EC must first synchronize Itself wirJi the iMi-MHi Mega IT. Synctironi^tion may consist distinguish it from the rest of the memory in the Apple Litis, which normally nans at i.l'.i vr.L-.l.. Mega II cycle, as when a single I/O location in the Mega II must be accessed, "f IS MHz and hence i.s called fitol nwrnvry. consecutive Mega II i v. les as when Apple II software must lx nisi al j I "- 1 MHz far compatibility. For a single Mega If cycle, there i> a delay of up to I imimseccnid i average 0,5 microsecond i while waiting for me beginning of the nod cycle. For consecutive fcfega ii i petes, the H'l generates one processor cycle Fot each Mega Ji cyde, thus running the processor al I "Jh mh?_ In all Apple lhoiiipnuT^ iim lath pmcosiir c\ tie is elongated m stretched, hy 140 nanoseconds. This practice Es required U>\ COWJO Cokus in the NTSC " National i- Standards Committee) video dispel I igure --- shews how evuiy fifth dock cyde in all Apple II computers is si retched. Chapter 2 The Core of the Apple lies U 14 Apple HGS Hardware Reference Figure 2-2 Stretched oO dock cyde Mega [] auxiliary memory bank access •:'.!||L!iii^kHK'klK'.1 T'.j allow direct access to lite Meflii If auxiliary memory bank, the FFT passes lhe least by UQinnnwomxii of the bank address to the Ut g.i 13 during each Me^a IT cycle, if J sfgndflcaanrt bii (lsbi shadowing ih enabled (as described in 'Memory SWow&g " laser in this chapcei 1 or lhe 1 1 h cycle software is addressing hank SEOor SE1, an odd-numbered bank address wilt access lhe Mega El auxiliary memory airtoraatlcaJlyi wiihoui using the soft switches, For intonnaiion i cm iht soft switches, see Lhe discussions on main and auxiliary mem<>n m h tptei J). For ( uuin 1 this setup lo work the pnigrammer musi first ad bil m lhe New-Video register to I. (Sec Chapter H for information about the New-Video register J Otherwise, tlie Mesa IT ignores the bunk bit. and ilte soft switches musi then be used to access lhe auxiliary faKihmugh an cver^mirnltefrd, shadowed bink .n The Mcj&a n cycle A Mega tl cycle is needed For any central processor or direct memory access (DMA) operation Thuir requires access to lhe ] 02444Hz ride of the sysjem. (Refer to Chapter H, Memory allocation "I/O Expansion Slots,' For more: Enrbrfflsikro about direct memory access) These operations an: The FP1 controller can access a minimum of 128K of R \M I MB 11 the I MB Apple PJG5 external und mosi Lntern.il I/O operations logic board 1. which Is expandable to t 3 MB, and to 5 Mil on the I MH Apple UGS fogii all shadowed video-writ* operations (described in "Memory Shadowing," Eater in this bdwd This RAM is separate from the L2HK ..f RAM supplied by the Mega 11 The m also has access to 12HK of ROM (2%K on the I MB Apple lies logic board), expandable to 1 chapter- MB. Figure I-} shows a simplified .system memory map. inhibited memory accesses For a full descriplion of memory in Lhe Apple ffGS, sefef to Chapter V Mejp \i roemni 1 banks SF.0 and SEI A Mi*iij N vuIl L-tin-i-is nf cht-s L Mer>: 1 j J . A Mega Li cycle begins wtLCO rJacr FP1 reepgodues an address [tut requires access to the l.(U4-MHz .side of the system —one of the operations just Listed.. 2. Approximately 90 nanoseconds alter the processor til dock signal goes low. the location address and kink address from the processor become valid The IT! tlecodes these addresses, and determines the type of cyde to be executed before the o3 clock rises. 5. If the cycle is a. Mee,a II cyde, the FPI holds the o2 dock high until it synchnanizES iisell' with the Me^a II. 4. Memory or I/O access begins. Chapter 2 Tbe Core of the Appk- tKtf 16 Apple OcSS Hardware Reference _ I Figure 2-3 Apple Itcs memory map Memory shadowing i,sM ]!;mk STT !'.!r. ^i h..nk?l-K Memory shddu^in^ w the process ol trading or writing ji one memory location in two H.icik 5.FD •JiIIltltii hanb. tnabling shadowing duplicates ihi.' I '() locations and portions of the ^,.nk Sll> Bttitl IPC bartkSPJ _ 1 video buffers you select Cm (he Shadow resisier) in the shactow-erahkd RAM bonks, HankiFH Wrriing fnto those locations En banks lb which shadowing bas Ixrcn enabled lusulte Ln duplicate writes to those locations in hanks SEO or SHI. Direct access to I/O and the I .n WOM -^ video buffets Is not inhibited and may still he chained (htough hanks SE0 and SEt. (See (Coairal«tlwPPD •[.'O Space Addresses,* later in this chapter, far more infocttadflD an J addnsssesj " TtaiifsFZ 1 %ire 2-* shows banks SEO and SE1. 1 \ temkm L*uii SKI Figure 2-* Sbidowed areas of memory RankSEfl Bank SEI vll- S I :l ]!;mkn:i H.i -^ 4 5fa» HAM &H» • ^^^ h.m\ -I- iGoninilLedl '. Mi 4.1 I! I ipjLL1 OT\^VAV SCOW Rjnk -ST - i r. i aw* 4$71 Bank "ItofcfTE i '___ I ISjnk~S-12__n : agifcgtr~ ~j I I -- 7i.mk~*N 1 Slrptf I-- 1 Bank $11 <-- „Jkjnk»J__ tfOOD ft _ mm nil-.. i'-rk no Hunk fell HMto graphics Pa^e 2- twftw [kir,k 5L1F (Gwitralfedbyfl*ft HjnkS-iL H.lliK WE fcnk WD Jlr&k \|ipl. 1=1"iS ii- ! urjjilm-* Page 1 - SiK 'in BadJtttlJ Tm fryp t sum .i.i scm» ]Lmk SUM toooo I MB Apple IMA Stafcra refibn rini- i - reetyiedicSooofuse) i*l MB Apple IIG^irsfllvK ( : ha ptef 1 The Care of the Apple litis 17 IS Apple Hfr.s Hardware Reference Figure 2-5 Shadow register at $OG35 The purpose of shadowing is to provide optimum system speed By shadowing the I/O and video buffer locations m \v. high-speed J-'PI address spate, only wriw instructions to rhe video locations require [\k system to operate ai 1,02-i MHk. A wtfte instruction actuaQy writes tn an address in both hanks, the Mep IL hank, SEO or SE1, and the shadow- enabled hank, SOU or SOI, Read instructions access rh^ hiuh-speed shadowed hank. 100 or fteswvtfd; (k) r*a modify Shadowing therefore, helps minimize the impact of video display updates on the O ind larguapc>L->. I.lLlt in tins dapter, fa more ' InhihiL Juduwinji, lest Papc2 information on ihe impact ol I read operctiofta and write operations on system speed) tnJiiMi stodowit^. auxilnrv lunk ffi-ftttaraptoa p.ipts The shado^tnjt options are ljuiihir .^inLkm m^, Supa Fti-Xesgnphli s buHei - Enable sbaifciwkig i n ba n lis M (0 a nd 5Ai 1 only tnhihit siud™dnj$. Hi-lto*; priphics Page 2 — Enakrie Shadowing in all RAM hanks 4 nui Femmmeni led) "nl ui •" shaiWing Iti-Rra Rripho Page 1 Inhihil JiaEfcraiaifl, Int Page I * Sole; Although shadow in^ is possible m other banks, jiludnwinji in banks other than $no and SO] should not be attempted under normal operating clrcunLflances R operating in othef hanks will be. tomipred if shadowing is enabled in those batiks, resulting in a system TabJe 2-1 Hits, in the Shadow retfistet slowing ill i|n" system lor each write operation is. very hrief and won't affect 101 [>rst rjptii^n program execution speed significantly I )nly continuous write accesses wnukl actually be noticeable. Reserved; do not modify The I/O and language-caul IOLC I h Inhibtt hit; This bit controls- whether lite iK range from SCGQO to SCFFF in banks SW and SOI arts as HAW or as I/O When this hit The Shadow register i*. ". I ( > is enabled In tht! SCxxx. space and the RAW that would normal ly occupy this space becomes a second he Sfc tdow TtKisit-r, located ai SCQ35* determines which address ranges of each I SDm RAM space m banks S00 and SOI, forming a shadowed 1.02-i-MHs; RAW bank are duplicated tn die FK RAW display areas. The Shadow Language card. Note that ihe I/O space and language n, determines whether of flol the [ space and Eanguage^atd C10LC) areas for card in hanks SEO and SF! are not affected by (his hit. each bank are .uiivated. Figure 2o shows ihe format of the Shadow register. Table 2-1 is a rhis >p;ue is always enabled. list of the bits and their functions. When this bit is l the I/O space and language card are r inhibited, and contiguous RAM is available from SOQflO warning He careful when changing hit- •>'• .m [ se only a read- Through JFFFF. CFor more information on I/O and modafy-write tnstnictJofl sequence when Enaoiputatrng hits. See the language- card memory spaces, set- warning in the preface * Chapter 3» 'Memory/ ) Text Page 2 inhibit i available only on the 1 MB logic boards w'hen this bit is 1. shadowing is d tabled Jor u\i Page 2 and auxiliary test Fage 2. Chapter 2 1 I Apple Ho s Apple tics Hardware Reference Tabic 2-1 Bits in flic Shadow ruglstLT (Continued) Ychj can turn shadowing on and off for areas within each shadow-enabled 64K kink hy setting the corresponding bit or bits in the Shadow register. You can turn off shadowing Pii VjJbc DrttrtpliQfl too banks shadowed) by selling ail hits in the Shadow noisier. When the Shadow register is cleared on reset, it defaults to shadowing alJ vidua areas. When this bit is 0. shadowing is enabled for text Paj^e 2 and auxiliary lew Page 2, Each bit in the Shadow register is active high, which means that the shadowing i if ilk- selected area is Inhibited if the corresponding hit Ls set. Programs thai Use the Shadow 4 i Irthibii shadowing for auxiliary HHea graphics pages: When this bh is I, shadowing is disabled fur ITi-Res register can mm nff shadowing in unused video areas by setting the appropriate bus. ilui> reclaiming die memory space in the unused video buffers in Mega il banks $00 and SUl. graphics pages 1 and 2 las determined by bits tf through j} in (his register) in all auxiliary [odd) hanks. Shadowing of Hi-Kes graphics p^ge^ in the main hanJt remains unaffected. The Speed pcgiNter " tt'he-n this bit is 0, shadowing is enabled Bar Hi- Res graphics pages '.as determined by bit l\ The Speed register, located at $0036, contains hits lhat control ihe speed of operation 3 1 Super Ht-Res graphics buffer inhibit; When this hit Ls and lhat determine whether a specific area wnhin a hunk is shadowed The Speed register 1. shadowing is disabled for the enure jUk video is cleared on reset Of power up. except for bit ft. which on power up is sec Figure 2-u shows buffer. the format of the Speed regLster. Table 1-2 contains a description of the bits. l! When ilih bn is ". shadowing Ls enabled lor lite Super Hi -Res graphics buffer 2 1 Mi-Res graphics eage 2 inhibit When this bit is 1. A Warning He careful when changing bus within this register. Use only a read- modjfy-w rite induction sequence when iiiauipul.uing hits. See the shadowing is disabled for Hi-Res graphics Page 1 and warning in the preface * auxiliary Hi-Res graphics Pagp - ... When this bit is 0. shadowing is erased for Ht-Res video Page I and auxiliary Hi-Res video Page I unless jumILir Hi-Res graphics Page 2 shadowing is Figure 2-6 Sjx'ed register at Sttyft prohibited by bit 4 of this register. 1 1 Hi-Kes graphics Page 1 Inhibit When [his bit is 1, shadowing is disabled far l&Res graphics Page 1 and auxiliary Hi-Res graphics l J age 1. " When this bil Ls 0. shadowing is enabled for Hi-Res Central ptnxescxfspL-pd ipeed — graphics Page 1 and auxiliary Hi-Res graphics Page 1, T^wer-uit -urn* - unless auxiliary Hi-Res graphics Page 1 shadowing Is prohibited by hit 4 of this regisitr. : ilnriiiMriiitliFh- I Text Page 1 inhibit: when this bit lh |, shadowing Ls SI:.i:J:.«inirr.-n.ili|f. jII RAM ninta disabled For text Page 1 and auxiliary texi Page 1. S|nc 7 disi mctOf-i in drtetl - M When thus bit is U shadowing is enabled for text Page L ii;.! .hivlury rert Mage 1. Ski n disk mnlor-nn driL-a - S!../ *> ilisk mi.Hrjr-i.in delett — 51 1 idfck iniiliTHindLiLxi- t: h j pier 1 The Gwc of the Appte IfcS 21 22 Apple [k".s 1 [ardw j re Reference Table 1-2 l J .i i s in 1 1 K 5 m set register | I Table 2 2 Mir- In the Speed regteter COorttoufid) Dl'K rlplion VpImc i.VSiLrip* jei ii 1 System operating speed, When this hit Is t, ifoe system W'tien tlus hit Is 0, the Disk II motor detectors are operates It 18 MHz. tinned off- Q When ilus bit Ls 0. (he system operates 4 1 .021 WHS ' as Hiis il through 3 detect tin- following addresses: in other AnpklJ a miputers.). I'.il Sloi Hattr mi Motor off I Power-on status available only on the 1 Mb* logic i .1 l SCIK9 sctx^ hoard): this bil Is set to I when the system is turned on " 1 SO0D9 jcoue using the power switch, A boot initiated by any key 2 6 (G0E9 soil* combination will not alter thfc biL This is a read-write ) 7 M |P9 SC0F8 bil. D lift Reserved; do not modify I Bank shadowing bfc Thfe bit determines memory shadowing in the RAM banks. Shadow register bits ti RAM control throujili -t will determine which portion, if any. of the hanks mil be shadowed. To enable shadowing in all I'lie PPJ alone controls die high-speed RAM Tliis highspeed memory consists tA a NAM Kinks, viii through I7Fi set this hit to 1. inmimum of I28K oF RAM 1 1 MH in the I MB Apple flics) on the mam logic board and I To enable .shadowing in harks > ( h.i . uv SO I I only, clear additional expansion HAM on the extended memory eand, for a total of 4.5 MB in the Z%K this bil, For proper operation of the Apple II' - kiflje brant .ind t MH in ilir I MH version of the hoard operating system, this- hit must always be set to Disk II motor-on address detectors: To retain Apple II The FPT piLitJdes memor> refresh for the high-speed RAM, which incorporates imemaJ r 0-3f 1 peripheral compdtibEftfy the moior-on detectors refresh-address connreT^ Thii icfresh seheme frees the address bus SiT thai the FP.I tan change the system speed to 1,024 MHz whenever a execute KOM cycles while- K.'iW refresh cycfel are ocetidiig, thus aJtomng lull-speed \hA II liintor-on address Ls detected* When the disk operattfin in the ROM. Thest' eycles occur approstmjtvh e\en h ^ miciDseconds ami motor-off address is accessed, the system speed reduce die 2.8-MHi pfDLe^in>; speed by iippmsirnatelyH percent for programs that run im increases, to IS Ml Tz again. For example, when hdt 1 is RAM. When nmnin^ at 1 ,024 MHz, refresh Cycles are executed during an unused portion of l r the W\ switches to 1 tJ24 MH* when address SCTO is the processor cycle and do not iffect the processor speed. .: Bind returns to 18 MHz following a SCODB ace ess i See list of addresses 1 Kksw . Drifts designed for iKil Appfc j 1 DG5 qnttn mIikuIJ u<* ibe >pet\3 bft {Speed ri'jjisk-r hil " lb change llie i processor sped wboi ^'CtSStrig daks, rather itan (hL- dink linn m ' !- Pi Speed rep-Mer htiri ft li i- I I/O space addresses ihruuRh 3). Uy tiripg bfl * ... .:. i ^ ilnvft in 4t*s other dun slots i rhmujih 7 by tku^jr^ itlc sywfll speed manually. Ik iv*K thai u'nlpl ppnrcssnr spetii changes fa drive iinirui^ilnv m.iv JlTeCt ; applkaliun prttgHfll timing; .iviud usinji the qmtar tddttSH* UfdeK Chef are used in a fashion Ik- I ' ' space in the Apple Ugs consists of all the addresses from SCOOfl through SCK^P. toqstana nvtlh die dnve'j central pe^esM ir >n«d rtquireitWtlW Alt ijik'rnjl device addresses, register addresses, soft switch addresses, and sEnt addresses For tompalibalHy WtJl fumft Apple rwexiucfe, um: rMwife «lh only to nunipuble btH 1 in J of itu- fall wiilim rids iK jddress range, Any of these addresses an be accessed through banks Speed nrgBler -I SEl r 100, and jln>and SO] is mntrojlfd by hit o . if the Shattew register, and mug alwiys he I Continued t enabled for conttct system operaiion. i::hjpter 2 The Core of the Apple DOS 25 Apple litis Hardware Reference When estimating the performance of timing-critical code, you must consider the impact processor speed changes have cm execution speed. The Apple DCS Call operate ai 2M Mil/., but must slow down to 1.024 Mi 1/ when .iae^ine . cri.iin " ) jJ-.ln ^< .-. The*- I 1 addresses include I/O read* and writes, and instruction reals of firmware at slot addresses of $000 through &CFFF. AiLdiiionally, all reads and writes in soft switches, and slat I/O devices at addresses SC090 mrotigh $COT also occur at 1.024 MHz. * Mtf& In Older to guarantee that pur code will rematn compatible with furore Apple II computers, do rot develop tirnine.-cntical code to will not function aJ system .speeds greater than Z&MHz, A miaoprwessor instruction consist of hetween two and nine individual cycles. For iiisinicicms executed from fast RAM Of RDM, only the specific instruction cycles thai read from or utile m 3/0 addresses will ston the system to 3 "^i MH/.. All other cycles of .such an instruction will execute as fast cydes. The resull Is ihat the. majority of instruction cycles occur at high speed The few that occur at low speed ;irv I -I I .iri.ihk- length. Thts len^ih i .in. hi iwever, he estimated The following rules provide a simple method of eaJcuktiflg ihe minimum and maximum time thai an em ire instruction will require to execute: I ft' a single (IJ-bttf slow J.O read or write eyde is perfectly synchronized, li takes nearly ihree \\*\ - -.-. I< % io complete. A double <16-bft) dow I/O read or write qtck Cakes warty 6 hist cydes to compter Thus, an fl-l>it read si write instruction thatwould normally take foui last cycles will lake ai least six last cycles, an increase of two cycles. A H> bit read or write instruction thai would norma v take live fast cycles will 11 lake at least nine fast cycles, an increase t.\\ four <. p tea J li iihtr a single of Jon He sli rwey* le b nol synchronized, the maximum delay for synchronization is one extra stow cycle adding ft* equivalent nf three East I ;.- les "' the count Thus, the worst-case 8-bit access becomes 2 + 3-orS e\tm fast cycles, and the lu-bit won* case becomes 4 + 5 or 7 extra Eos cycles. These rules on he applied in the cycle limes for any fostruction executing in fast RAM Of ROM to approximate the minimum and maximum u'me> lor instructions (hat reference I .I'.ldu sk* Remember lo allow an addhional MM in total cycle time to account for RAM refresh delays. Certain registers internal to the FPI (the DMA register, The Speed register, and the Shadow register * are read and wrinen at high speed Similarly, reading the interrupt HOM addresses tSCCF! through SG17FS does noi slow the system In addition, two registers (the State register and the Slot ROM Select register} thai exist in both ihe FPI and ihe Mega 13 ICs are written at 1,024 MHz and read at Zj MHz in the HM address spai e Chapter 2 The Core of the Apple llus f Figure 3-1 Memory In the Apple []GS Ska i Chapter 3 Memory This chapter despiba die Internal memory of (lit- Apple Ucs, and sh a Sktaukn the RAM nod KONJ memory layout und how the memory is umiruLk'd There is a memory map for the entire system, and there are individual maps ksr sped*! features tike Standard Apple n compmibiKiy and memory shadowing, Hie memory m the Apple Has is divided Into several portions Figured M.y'lll Ls & block tK of RAM J7 bS^jr" 1 iLmk JFI 1 dedicated lo sound generation, The sound RAM Is not direeily addressable by application \- BMk m 1 programs- far more information nboui die suunJ memory, refer tn Chapter 5- Sank IF Etu —I J Memory map M;inkSt:i Kb* RAM Hunk >W ItankSfiD fGailidlBdbjMc^ini The* (>5Ctfln microprocessor is capable ol addrc^me up to th MB of memory, hut only portions of this memory space are utilized in the Apple Litis. Figure 5-2 shows how that memory ffp* e is caled in die Apple IfGS, A portion of the lower memory space— -ill' 1— H.mk *7F -1 J_ _ ~l maximum of 5 MB— ls available fur fast RAM under She contra] nf tht- FPI The fmsi 12HK is ••..ink 171 I "I huilt into the original Apple |[iiv I MB in the 3 Mlk Apple litis, the rest an be ,nlded h\ 1— junkro_ Ri&k~STJ -H means i a memory expansion card. i Ttie 12BK of RAM controlled by the Mega 11 occupies banks SEO and SE1. No further expansion of i his parr of memory is possible -1 H»nk SCH - H I-- H ROM under the coniiol of the FPL The top IZSK of liiroll Etonk sni The highest lb banks are allocated to 1 ROM is built into the original Apple [JGS; tht uppermost 2%K of ROM Is huilt into ilu.- I Lkuil SID I .hi MM tfrnk snj Hff ii.nikilltdbj- FFb Mb Apple Has. Additional ROM can be added \w means of a memory expansion card. M.i i-. tkirik M-l Bank ME LkuLkv'i JttR Apple llos Hank 5m aSjnk ?n I MB A|ipJ> HGS Chapter 3 Memory 29 30 Apple Ilos Hsrdwutr Refetente Memory bank allocation Bank $00 memory- allocation The memory m ihe Apple 11= . -- \s addressed as 64K banks, as shown in figure 3-2 Bank Memon bank $00 preserves many Features Found in ihe ft-tK ->l main memory in the numbers are in hexadecimal The built-in memory banks are shown with sulkl outlines Apple lie or iht- Apple I!', thai make ir possible ro run program* originally written for hank."* (00 and SOI, SEO and JEJ, and 5FE and $FF in the 256K -\:ipk- II- IS The pans d the those machines <>r fi rr the Apple li Plus. mefrtorj space from h;knk 502 to hank 5"F and from bunk $F0 in Kink $FR are allocated lor memory expansion; hanks iFB through SFFare reserved for currenl system and future expansion of system firmware Memory spaces from S8Q through $EF are noi available m Reserved memory pages the Apple lies. Most nf hank S00 is available fur storing programs and data However, a lew pages of The memory hunk distribution in the J ML5 Apple tlGS is .similar to thai of the 2%K bank SOU are reserved for the use of tlie Monitaf firmware and the BASIC interpfeter The system, with .l Fen variations. The huilr-in hanks arc hanks frOO through $CFi SMI and 5Et. reserved pages are described in the Fallowing sections. atf£$FG through SFF Banks S10 Lhrtm^li ^F. and SH'il vM >l 15 m: Hie l MBsytfeman available for memory expansion. Iniporfani 11k- system di >es not prrtt nt your usblg tfiese pages bi il it you da use them, vim musl be I ueFul m-i to disturb the system data the> Address wrapping Contain, nr you will cause the system to malfunction In ^-u-nii the 65C8H5 rrderopTOcessor used in the \pple Hgs addresses memory as continuous across bank bnundanes, but there are exceptions. One kind nf exception involves [lie 65Cfll.6"s instructions themselves. E-or daia a* the highest address m a hank, Apple ft tivtt?: Some of thu r\. SL r\ ed areas described in tlu* ^^;i' ns ih.n folfi vn .ire used i , , ihe next byte i.s the lowest cine in the nexi bunk, but instructions themselves wrap around "- by programs written for moiMs of the Apple II thai preceded the Apple Sios. on hank boundaries, rather than advancing ro the nest bank. Thar means that ihe Programs written specfficalJ} for ihe ^pplelfGS normalfy do noi dual with hardware mi a mum size of a program segmeoi ia normally Hmfoed k> 64K. Fo we m/otmarJon features din-^riy. but rely on routines in ihe toofbox, as described in the Apple tlGS about the 65CHl6 r rek-r tcH li.ipu.-r J" Tbofbox fiej&moe Some msoyed areas are um.j J hy ihe huih-in firmware; Refer to the s\ppfe ff( ^ Fbwti&rv kefivL'fjti'. Another exception to ilit- continuity of memory arises horn the waj ertain lo : used for special purposes. Foi example, parts of banks SEO ;ind 4\] are sel asfcde as video display buffers and _i t- not normal!) used for program code, although the hafows Direct page: several of the 65C816 mlci^processof's addressmg modes require ihe use of prevent such iwe The Memory Manager which is pan umIk- Apple His Toolbox, takes addresses in a speeifsed pn^ m l-.nk m«i ...jl'ed ihe direct page, take ihe zero page in a audi restrictions into account For informally about the Memory Manager, refer to the 6502 microprocessor the direct page Is used for indirect .ii.li-. - Applf Hi i.s i oi .:>" .;>: ft va'prce. 'the direct page works JilTeremly in the two microprocessor modes, When the 65C8M is m emulation mode, the direei ^^- is located -il address SO0O0 in harik WO, like tbe nern ROM memory pa^e in a 6=S02 miemproeessitf's 64K address space When (he 65C8lu i.s in native mode, the direct page can he located anywhere in Hank 500. making it possible for drfifeiertt The two highest banks In the 2SfiK ?-y^eiii. .irul ihe Inm highest banks In the 1 MB system, programs to bave Uilferenl Jireet pae,e locations. (For more inh-mi.iii-..ii about emulation an: used for built-in ROM thai contains system programs anil pan nf the Apple HGS mode and native mude. see Chapter 10 i Toolbox. Additional memory in banks SRi to St'D iSFB in the J MB system) h .mailable for ROM on a memory expansion card. Ofih.il memory, pan. i> available for application To use indirect addressing in yourassemblyiangua^e programs^, you must store base programs stored as * ROM disk* and pan is reserved few I re expansion of system addresses an u diiect page Ai the same tfcne you must avoid mteifedng ^vith direct- page programs. Fot EnSormarioc aboui ROM disks, refer to the Apple Has ProDQS ?6 Refemh memory used by nthei piTo^rams such a.s die Monitor propam, the BiSIC iiiterpretei and the disk operarlng systems. Tbe lies? way to avoid conflicts is to request ymn own direct-page space from the Memory Manager. Rerei to the Af-^r Wis Toolbox fte/emux. i. haptei J Memory 31 M Apple IfGS Hardware Reference The 65C816 stack: 1 k 65C816 ffiicroproceswr uses J stack to store subrouting return A.-riV Display buffers in bank SiK.i art' normally us*- d only by program* written few earlier addresses in last-In, RrawnJi seqwertce. Many programs also use die slack far. temporary models of the Apple H, except for texl Page I, which is also used bv the Quitrol Panel storage of the registers and for passing parameters to subraUl s desk accessory. Shadowing ol the display buffers is enabled by a switch in the Shadow regislcr. described in Chapter 2. The 65CB16 uses the staci two ^jvs — mode and Dative mode, to emulation ta emulation mode, tbe stack pointer hMnh long and the Stack js baaed in p tions S1Q0 through S IFF Ik^jLleLimalund can hold 2^ Suits of information. Wheel you store the Figure 3-$ Shadowed display spaces in kinb ftM and ML (Shading Indicates 257*h byte in die .stack, lhe stack pointer re-peals itself^ or wraps around so thai the ni.v. shadowed memory locations byte replaces the fitsi byte stored, which is then lost Rib n ritlng wet old d.ua Is called rttid1 uivrflnw. The prognini continues to run normal!} until ihe hist Information is needed, Bank 900 iSOl whereupon the pr^ram may behave unpredictably, of, possibly ^nmnaic StTtT caUisErophii..i|k bn^mi^-ord spjcr - A. Warning The wrapping around of the stack pointer does rw d consistently; in some addressing modes the stack will continue to I space page 2. In cither case, j '.-. m . i. -h i^ iir.cn" * si 000 s: i»-ii [n native mode, the Mack pointei is 16 bits lona;. and the stack can hokt up to 64K -I -\'H' Information ai a time. To read awe about using the 65C8tfi scat k see Chapter Hi. The input buffer: TheGtTLN innul routine, which is used by lhe huth-in Monitor program and Applesoft BASIC interpreter, uses page 2 of bank M AS fcs keyboml input si.|n: buffer. Thf sfee of iKls buffer sets lhe maximum stoe of input sum^s. (Note thai BASK _ D Ha type m 156 character*. I uses only the Bret 237 bytes, although Li peoiuh you r. i > know that you won't I* typing anj long LnpuL strings, yon can store lefflporaiy data at lhe , Hi-lt(. hH1ipliii> I '.:..- J buffer upper end of page 2. "^ ll'M' - II li.-. r.i|iln.s| J j^ I • $0%; Routines that use the input buffet run m L-mulaikm mode: prt^rJirh miming in native mode must first switch to anulatfori mode to call such routines, Befcs to she S30W Appk te Fimwaw Refermcefor mote informaoun, IV vi fug -. | SHOO • kwoo SflfXIft link address storage: The hfonftOJ program ProDOS and DOS Jj .ill use lh.e upper pet! of patfr 3 far link addresses or vectors. BASIC programs .sometimes need .short assembly-knguage routines. These routines are usual!) stored m the tower pun of page J. Shadowed display spaces- The display buffers m the Ipple IfGS are actually located in The primary text and Lo-Rrs graphic display buffer uses memory locations Sfr+OQ through banks $BG and $E1, hui programs written for the Apple [] Plus, the Apple Fie, and the S 17] F rhis 1034-byte area is called itsi Page [.and iT is an usable fa program arid data Apple iic pui display intomuiion Into me conesponding kxarions in batik (00 and storage when shadowing \& on. There are in locations in this area 'Jul are not displayed on require display shadowing to be on. Figure 3-3 shows the shadowed dtspby spaces, For tile -screen: diese locations, oiled screen boks, an: reserved lor use by the pertphera] more information about shadowing, refer to Chapter 2. cards and the built-in pom See rjie seitn.r. l^ripluT.il-t Jid KA.M Sp^ne " in ChapterS; for the locations of the Kreen holes Chapter* Mem ty Apple OCS Miirdware Reference Text PtW 2 The original Apple lies doesn't shadow text Page I Tn make n possible Switching differenr htoeks of memory Into the same address space is called bank uw texi E'age 2 for their displays, the floiiware rncltides a to run App-.i" II pi Minims chit switching, There are aoually two examples of hank switching going on here: First, the desk accessory p Alternate Display Mode, that auiomatically transfers data from icm entire address space from SDOOO through SFFF7 is switched between BOM and RAM, and fage 2 "it I -.ink (00 faflo text Page 2 of tank SEO, when? it ran he displayed. Refer to second, the address space from SDOOO to SDFiT- is switched between two different the Apple lies Fimm-ar? Reference for more information. NVtfe thai the I MB Apple blocks of RAM. If ihe language card Ls not enabled, the first of these blocks of RAM, Hi is has at .ii table a Shadow register bil that allow!; yuu to shadow Text Page 2, fcdock 1, occupies address space from SCOOO to SCFFF, as shown in Figure H tffotethart the banks im-olvcd here are not the same as the 6-1K memory banks.) When the primary Hi-Res graphics display buffer, Hi-Re* graphics I'age 1. is shadowed, it uses memory locations 52QGO through S3FFF. your program doesn't use Hi-Res graphics, II this area is usaNe foe programs or data. Figure 34 Language-card memory map Hi-Res graphics Page 2 uses meraofy locations S40O0 through S5FFF Must programs do GDI use Mi-H-fs grapblcfl Page -. so they can use this area lor progrim or data stoi \-.< RAM In m v \ v space . RAM mapped as language card SFFFF M 1 1 Hie primary Douhfe Hi-Res graphics dLsplay buffer, called Double lh-kes graph:, x I' i-;. I Mm: hi SFDCW uses memory locations 12000 through S3FFF in both main and auxiliary memory (banks SOG and SOI \. If your program doesn I oh- 1 fi-Rcs « Double Hi -Re* grjpte, this area of SBQ00 IEIXH> memory is usable for pnigrani> Of d.tta Bod J Btockl SDOOO SUOUO * Language-card mtmory space JG0O0 Appfi* If note The Jane.u.iu.t-card space is a carryover from earlier models of the Apple II and ts normally used only by programs ft rilten for those machines ami running in emulation mode. Like the hank $00 shadowing of the display buffers the peculiar features of the language -card space are enabled by a switch in die Shadow register, Setting Language-card bank switches: You switch hanks in the language-card space in which is described in Chapter 1. the same way you switch oilier functions in a standard Apple []: by using soft switches Read operation lo ihe soft-switch locations do three tilings; select eillier RAM nr ROM in Memory banks The language-card space is a icaturc IkuIi of hank Soil jrnl of bank memory space, enable or inhibit writing to the RAM. and .select the first oi second 4K 503 Refer to the section H:mk $01 (Auxiliary Memory)," Jaier in ihis charter, tot more ml . .1" RAM in the address apace SDfKHi to IDFFF, information. Vi hen the language-Lard leatuie is enabled, ihe memory address space from SlMXi through A Warning Do not use ihese switches without careful planning. Careless switching SFFTF is doubly allocaled: It is used for both ROM and RAM. The 12K OJ ROM in ihis between RAM and ROM is almost certain to have catastrophic effects inUrevs space contains the Monitor program and the Applesoft BASIC interpreter on your program * Alternatively, there are l(*K of RAM in this Space The RAM Is normally used by die iii>k operating system* Table 5-1 shows the addresses of the soft switches for etuhling all comhinatkjns of You may lie wondering why ill is part of memory has such a split persomHty. Some of the reading anci wnting in :his memr^o" space. All Lite hexadecimal values nl ihe addresses >'' reasons are historical: The Apple UGS is able to run software written for a standard of ihe form SCDHx. Mc^ice thai several addresses perform the same function: This is Apple I] because it uses this part of memory in die same way a standard Apple If does h's because die functions are activated b^ single address hits. For example, any address of convenient to have the Applesoft BASIC interpreter in KOM. bui the Apple [li> i^ also die fonn SCOStwtth a 1 in die low-order hit enables trie RAM rci wnnnj ^-.itaiv -:i \ ahle to use ih.it address space fba other things when Applesoft ls not needed. of the address selects which iK block if EL^M 1o use far ihe address space SDHOO (0 You niiLy ,ita> Ix- wondering how L&K of RAN] are mapped Into only \2K of address space JDFFF: if hit 3 is 0. ihe first bank of RAM is used, and if hit j is l the second bank is used. r The usual answer is that ifs done with mirrors, and that isn't a bad analogy: The tK address space from SDOOO through SDFFF is used twice. Chapter 3 Memory 35 36 Apple UGS Hardware Reference When RAM is not enabled for leading, the ROM in This address space is enabled Even When you turn power on or reset the Apple COS, the bank sw fa hes are initialized For when RAM is not enabled for reading, can still be written to Li Li write-enabied. it' Li reading from the ROM and writing lo the RAM, usin^ the second hank of RAM. Note thai this is dilferenr from the resei on the Apple it Plus, which doesn't affect die bank swiicbed memory (die language eardl. On the Apple [Igs. yon ami use the reset key Table 3-1 Lan^uage-caid bank-select switches sequence to return control in a ptograni in lunk-swiTched memory, .-.- «. >...u >n ilu- Apple II Flu*. RemfiiiR ami writing to RAMbwih You can'i read one HAM bank and wntc to the R >|ViM Read this location to read RAM, wffte- other; if yaa select either RAM hank for reading you net that one for writing as well. pmlecl RAM. An.il use IDQOQ bank 2. ROM IN ::!: $0081 Read (his location twice To read ft* :,,, 'l R&iding RAM arid ROM: You csm'l read rrnm R' M in part of the hank-'. 1 , i:-. hed write-enaWe RAM. and use SDEKXl memory and rt.MiL irum RAM in the res Sperificalry. yon can I read the Monitor bank 2 progi ROM while reading bank-swiehed RAM. Ifynu want lo use the Monitor R Read this location to read ROM, wrhe- firmware with ;i pn&gfam trt bunk-switched RAM. copy the Monitor program from ROM protea nam locations SF80U through 5FFFF ) into hank-switched RAM. You can't do this from .ni.l i-r JO000 hank 2 Pascal or PfbDOS. |.i F1A\K ' EtR h\iM Read this Ickjiicmi hvne la read RAM, write enable RAJt and use M JOOO bank J 1 1 1 see how to use these switches, look at the following section of an a&Crfibry4sn£Uage program: i Read tins location to read HAM, write- protect RAM. arid use SD000 hank 1. LDA 9C0S3 * SELECT 2RO 4K BANK BSAD/HRITE fi 1 use auxiliary INC SUM bunk. page.O and page I The LDA instruction, which performs a read operation m the specified memory location, ftDALTZP ir $O0l6 Read rliis location and i^si bii " fur ts used for setting the soft switches. The unusual M.'quence nt iv^n ctEtseculhe T.DA switch status: auxiliary U) of main (05 instructions pefforriis rlu- :;>,>• n^.. urjve reatfe i^«.ji write enable this area t.A RAM: in this bank , case, die data di.it an? read are not used Chapter 3 Memory Appie Hgs Hardware Rei'erence I Reading bank switches: You can find out winch Lingua^e-eard hank is currendy Table 3-2 Bits in the Stare register switched in by reading the soft switch ac SC0I1. You can find our whether the language Gaidar ROM is switched in by reading SC012. True unEy way eIil-ic you can find out whethei Dc^crirHlf>Ti or not the language-card RAM h v. ritC'Cnabled ls by tiding to write Mime data to the cud's RAM space, ALTZP: [f this bit is l, then bank-switched memory, stack, and dirett pagt* are in main mentor) The State register II this hit is ii, then bank -switched memory stick, and direct page are in auxiliary memory. The State register ts a read write register obtaining cEght commonly used standard Apple ti soft switches. Compared to the use of separate soft switches, the single -byte PAGE.!: If this fut is I. lexi I'age 2 is selected. format of the State register simplifies the process of internjp* bafuilng, Reading and If this hir is 0, text Page I is si- 1..-, ted Soring ilii.-. byre before executing interrupi routines allows you to restore rhe system soft RAMRD; Ef this hit is ], auxiliary HAM bank Es switches to die previous stale in minimum time after returning faro ihe imerrupi routine read -enabled. Write operations to the State register will slow the system momentarily. (See Figure 3-5 If this bO is 0, nrain H \M kink h read-enabled. and Table 3-13 RAMWRT: tf this hir is L. auxiliary RAM bank is wriEc-enabJed A Warning when changing hits within this register. I'm- onh read fte careful .1 II ilih bit 11 0, main RAM bank ls wri to-enabled. n 1 : :>lI i I when manipulating bits. See the v- write instruction sequence warning in the preface, * RDROM: if this hit is I, the selected btiguage- card ROM is read-enabled. II this bit Ls U r the selected language-card RAM hank is read enabled. Figure 3-s Male register at KM LCBNK2: If this bit is 1, language^ard MM bank I Es selected ]f this bji Ls 0, language-card RAM hmk 1 is selected, r-WAN K Hi im hank select su itch 1111N A4TZP-.. ::" I h.L- always be ii To maintain system integrin do not modify 1 h is bit. KV^IKM- INTOCROM; If this bit is 1, the interna] ROM at SCxOI) is selected. kUWI-l this bit (he periphemkard ROM at (sou Es RDRO.M - 1 [i is 0, selected LCBNK2- ftOMBAM- ENtCXlDM- ChapterJ Memory 39 40 Apple [Igs Hardware Reference _ [ Bank $01 (auxiliary memory) The other large section of auxiliary memory is the language-card space, which is switched into the memory address space from ^2K to 64K (SDWJO through SFFFFV This memory Apple It note: The following sections describe the operation of the auxiliary memory space and the switches that control u are described earlier in this chapter in the section I bank $011 &9 it applies to programs arigtnally Written lor tlie Apple J Ic or for IJftK "Ufiguage-Card Memory Sparc." The language-card soft switches have ihe same effect on recskios of the Apple lie. Programs written specifically for the Apple [IGS donl the auxiliary HAM that [hey do on the main RAM: The language-card bank switching is normally use bank SOJ tn this iiLshitin. hut use [he Memory Manager to obtain whatever independent of the auxiliary RAM switching; memory apace they need, without specifying whether it is in bank SOU. hunt m.-i. ck expansion memory in higher banks, Figure j-6 Memory map 1 main and auxiliary memory t When display shadowing is on, some of the display modes list hil-iih in m auxiliary memory (bant SOU. Specifically, half of the BCkolumn text display page is [here, along with half of each of rlif Ptiuhlr f&Res graphics displav pages and ril nt the Super Hi-ites iPPbt- 1 display buffer, If those displays are sijadowed For descriptions .irul memory maps of those display pugcs, refer to ChapterApple Ii programs chui usi- one of those display i. modes cannot use the corresponding pages of bunk SOI Ibf program and data storage. £0000 A Warning Do not attempt DO switch in toe auxiliary memory from a BASIC! BOOM program The BASIC interpreter uses several areas in main RAM, including die .stack and the direct pa^e. If you switch to alternate raemoi) in these areas the B U#C interpreter foils and yon iiun reset ihe system and suit over * As you can f-er by studying the memory map in Figured the auxiliary memory i.- diuikd laid two large sections ;ind one small one. The fetfjgeri section \s swft bed Into ilie memory address .space from 512 to 19151 CSO20O through SMITH Tli* space includes the display buffet pages Space in auxiliary memory is uicd For one-half oi the SO-cnJunm tead display and the Double Mi-Res gmphsci dispto) V- ti cm switch to the auxiliary memory For this entire memory space, or you can switch just the display pages: See the section "Hank Switching for Auxiliary Memory," later in diis chapter. „ Important A program that um/s auxiliary memory onh foi 'the ft '-ci lUinni displa) taiuk utkI -dircU page vii n can write imo he display page In auxtliar] memory bj using the I SFTBQCQt. and DCTPAGE2 soft switches described in the section "Display Mode Switching" in Chapter 4. Chapter;* Meffioq 41 42 Apple Hto Hardware Reference • Xute Trie sofi -.'.hilIil-s fcf ike tat^guage-cstrd memory, described in the previous Table 3* Auxiliary- memon scltxt swifo hes - so lion, do not change when you switch to auxiliary RAM. in particular, if u. :-vi i-, L ,"i,Hin.| enabled in die language-card space before you switch So auxiliary memory, die ROM N*flB FhikLIliii II f-i l-.. S — Write direct paj^e and the fnCSHi stack when running in G502 emulation mode. The Star h m.i WKMAtNRAM Write main memory scow 49lSti Write direct page are switched this way so thai standard AppLu II system software n inning in " RDRAMW1 Read switch status M "I- 49172 Read and lot bil the language-card space can ma into in Lh own slack an J Uirci i pjjjr while it nianipulaies U-auxiliarv-. Omaln] the ISK address space (from S0200 to SBFFfl in either main memory or auxiliary memory. SETSOCOL Access display pa^e SC0O1 49153 Write CLRflOCOL Use RAM switches (*G00&5,13,H) miii 19152 w'rite Bank switching for auxiliary memory RD80COL Read switch status sans 49176 Read and test hit 7 i^SOH.'olumn access on, Switching 1 1 ^ ^k section of memory is performed hy two soft .switches; The switches i>8D-column access orT) named Kl.iMAINK.VM and Hl)t:ARI)RAM select main or auxiliary nifruory for reading, and thf switches named WM UNH tM and wTORDRAM seleci main or auxiliary memory tor TXTPAGE2 Test Page 2 on (auxiliary memory** $CQ55 i'_^- Read or write writing. As .shown in Table 3-5. ihere are two switches breach function: one to select main TXTPAGE1 Text Page I on (main memory)* $C0>4 m$ Rf ad or w rite iiici::: jit, . iiiid I lie oilier to sdect auxiliary memon". hnahlimj llir lead and \m\w Inn: i i-. ?i - RDPAGE2 Read switch status SC01C mm Rearj and tfisl bil 7 (1-Page 2, 0-Page 1) independently makes it possible for a program whose iiNin. lions ate being fetched from one memory .space to store data into the other memory spate. HIRES Access Hi-Res palest SCOT 49239 Read or Write LORES Use RAM switches & " 2 5 h 1 1 ; SC0% 49238 Read or write Read switch status SCftlD 49181 Read and sest bil 7 A Warning Do not use these switches without careful planning, ^areiess switching RDIIIRES i 1=1 [IRKS on. (J-ohl between main and auxiliary memories is almost certain to have catastrophic effects on the operation of your program * SETAITZF Auxiliary stock and direct page tOO09 49161 Write SETSTDZP Main stack and direct page Write " ELDALTZP Read switch sts&w h;H:i [9174 Read .irni u-^i lm Writing to lhe soft .switch at location MM} turns RDCARQRAM on and enables auxiliary tl-auxilian. 1 . i:=m.iiir manor) For reading: writing lo location $C002 turns RDMAlNftAM on and enables main me n tor reading, Writing to the soft switch at location SCD05 turns WRCARDRAM on " Wbtfl SrrSJCOL is nabtrd, TXTPAtiti jnd T3CTPAGE1 Hktt main lht ausdlbrt display s1HW>n. and enables die auxiliary- memory few writing; writing to location SC004 turns TChcn 5£I«>GQL is tSsOkd, HIHFS jnd LORES enjhltf J**J m us. TVlTAlTF: aid TXTfACrti L to w.ih\\ 1 I wHMAJNRAM on and enables, main memory for writing Bj -uiin.u toe switches bi'twtvn Ik; lli-Re?. faft! 1 urca m nuin l™.•^lon rnr ji : I mi rourj, I r-. independently, vou e,m use any of the four combinations of reading and writing in main or • inviiir-, memon. As shown in Table M die SITSUCOL switch functions as an enabling swiieh: Widi i: on, you can select main memory or auxiliary memory hy writing to eiiher TXTPAGEl or You can use auxiliary memory corresponding to text Page and Mi-Res graphics Page I as I iTTPACE2. With the HIRES switch oif. the memory space switched by IXTPAGEZ Ls text pan of the address space from &02Q0 to 5BFFF by using RAM read arid RAM write soft Pa^e CSWOO to $07FF); with ]TJRf.S on, tXTPAGEZ switches both text Page 1 and HHtes I switches as described above. You can also control these area* in auxiliary RAM separately graphics Page UiSJOD to .$3Fff). bj using the switches named SETOOOL TXTTAGEJ, and HIKES. Chapter 3 Memory 44 Apple lit iS ! f ardwa re Hel u n. n , If you are using both the auxiliary RAM control .witches CSET8QCOL CMDCOL, * rV&te- In banks SH) and SO. language-card mapping. I/O space, and display TXIPAOEl, TKTPAGE2, and HIRES) and the auxiliary display page control switches aie always acrne. (K0MAJNKABI, RDCARftRAM. WJUtAtXRAM. and WRCAflDRAM), ihe dLsplav page control switches take priority. Thaa is, if CLR8GCOL Ls on, the RAM read Figurr 3*? Memory rtuip of hanks SEO and 5EI and write switches loggle the entire auxiliary ynd main memory space from $#200 to SBFFF = B&nkSED K.:ik m . HIRES are huh on, TXITAGE1 and TX1TAGE2 control both text Page ] and Hi-Res graphics Rage 1, again regardless nf the RAM read and RAM write - OipKT- switches. 1 A single soft switch named ALTZP (for alternate zero page switches die hank-switched J memory and the associated stack and direci-page area between main and ataflfciy memory. As shown in Table H, wrifins Efl location. SC009 turns ALTO on and selects 1 Mtmon- v|;i-i,i.u. t auxiliary memory stack and diiea page; writing to the soft switch at location SCOOB turns ALTAI off and selects main memory stack and direct page for hath reading 1 and writing. There is a third soft switch {RDRAMRD and RDRA.WAT) associated with each pair of auxiliary memory switches listed above, The high order him of the byre yon read ai rhh Super Hi-HL* legation tclJ you the setting of the associated soft switches. v id" li: huftt'r For example, die byte you read at location SGA13 has its high hit set to 1 if the auxiliary memory Ili-Rol'.i^trJ is read eruhln.1, i.. r [ - WroiHi' Hi-Ht^araplit> l .i J- : • io if the 48K block of main memory is read-enabled. MIHI Ki-Ri* PjflL' J - OnuHt Hi-Rw RnphKS. Pj.ul' ? - * Shorty memory- In order To hare enough memory locations fen all ihe soft Pitches 1 I and to remain compatible wiih the Apple [kind Apple II Plus, the soft switches listed in Tjhle 3-3 share iheir memory locations with die kevhiard functions listed in Table 6-2. The read or other operations shown in Table RL'ritffVtd 3-J for mntrolhng the auxiliary VMM memory are just the ones that are not used for reading the keyboard and clearing die strobe. 111*- displa> huffen> The display buffers are permanently assigned to locations in hanks 5EG and 5E] because ihey are tied directly to the hardware—the Mega II t< —dial reads the d ._ ^run-d dk-ic Banks SEO and $E1 and generates the display signals. 3)Lsplay*memory shadowing makes u possible (^ run olflV style Apple II program* thai state display data in banb SGO and SUl, as described earlier Banks SEOand S£l are the memory hanks controlled by die Mega Tl These hanks in this chapter in the section "Shkkiu-il Display Spaces," and In ChapfQ -. hive special characteristics ihat make ii approprjaie to use ihcrn in special ways. Fit>l, ilicv The primary levi and Lo-ttes graphics dhp scupj mentor) koiions i€-il)0 ! contain the display buffers, so they have to oin ai the standard ,r.. buffer? L024-MHz speed. Second, because these hanks are broken up by rbe special allocations shown tltrtHjjth S07FF in banks $H5 wd SEI Th- 102 ,!.!. jrca in bank SEO is teM Page I. the in Figure 3-?i tfiey are the logical place for workmg storage used by the toollx>x and Jhpiiu buffer fw 4u-column ivu mode The SO-ccJumn tesa display uses texi Fhagjc I other nrmware programs. anel and other firmware pn^rin^ 3 "^ing lunk< %ffl and *EI for .such purposes leaves bcitloDS in boih hank SEO and bank S|-| The Contlt?] 3 all the higher-speed memory I in the low- numbered hanks for application programs and daia. use these display buffers, so applications must nut use them for program or da la storage Chapter 3 Memory i6 Appie Ilu > Hardware Reference 45 Text Page 2, the alternate text and k>Res graphics dis.pl.iy buffer, occupies memory A Warning Several >& the I luili-in programs use HAM areas in banks S-EO and SEI I..:-. ifjoos %MM through 50BFF. Mu^r programs do no* use tew Page 2 for -JispLivs. and To avoid conflicts with those programs, applications must not use ihe wigteal Apple Hgs doesn't shadow li. file 1 HI! Apple RGS has j hii in the Shadow these areas; instead, applications should request memory from the register that iLlcvw-"^ you to enable shadowing of text Page 2. Memory Manager, Refer to the Apple £fc£ Toolbox lejkw for iiihiniiLi:i':n about the Memory Manager * There ire two Hi-lu-s ,-upf :. h ri^. each Ol which inquires M92 bytes (HK I of inemory Hi- Res ^i-jphks Pa^e J occupies memory locations SlttilO throuj^h S.WF in bank 3E0. Hi- Res graphics Page 2 occupies memory- local ions $4 - through $$m in bank SEO. The Don We Hi-Re. graphics bufFers require a total of l©84 bytes each. 8192 in each bank. 1 ! Double Hi-Hes graphics Page Apple [] program memory UK ] occupies memory h*a lions S2U0U through 53EFF in banks SEO and S El. Doubte Hi-Res graphics Page 2 occupies memory locations s^ono through SSFFF in banks SEE and SE1. Earlier models of the Applr n use a microprocessor, die iinttl, that c;m address only 65536 bytes (uhKJ ol memory The Apple tie and the Apple tic double this, to I28K. by- I Ik ^npei Hi-Re-S graphics display buffer, wiih its associated palette and soan-lirte curitFol switching loan auxiliary 6 . corresponds to main and auxiliary memory— hanks SOU and SOI. This section tie- I bea I host- features. In principle, programs thai don't use specific displays can use ihe conespontting display buFfens for data storage, In practice, programs call on the Memory Manager to allocate space for data storage and die Memory Manager keeps track of which display spaces are « Banks $01) and $01 available, If you try to load your programs and data Jlrectly into itjhpEity memory in banks 5E0 and SE1. you risk interference from dealt accessories ur other prugrams that may be For standard Apple [] programs, banks $00 rind &\] take on (he features < if the main and resident in memory along with your programs. auxiliary hanks. With the 65CS16 microprocessor running in emulation mode and shadowing set tppropriatefj all of the standard features arc present, including Firmware workspace dtred (aero) page, fiom 50QQ0 to SOOFF of bank SOO stack, from $0100 to SO IFF of bank - H As described in the previous secUon. hanks $E0 and ££] are always hfoken up In cfispk] test Page I. from $0400 to siJTFF of both banks buffers, so they are the logica] place fur working storage ust^l In the toullxtt and other system programs. Figure 3-7 shows the rnemory areas resented lot those programs, leM I'jcl L h SO80d to S0BFF of kith banks '..n;ii!ab|f in the I MB Apple lies. i mly i Several different system programs use RAH space in banks SEfl and SE1, mcludjng Hi-Kes graphics Page h from $2000 to S3FFF of bank Sffll the Monitor program Hi-Res graphics Page 2, fa m $4000 lo 55FFF of bank s. ..> * -k accessories 1 knibte H45es graphics Page 1, km S.2U0U to S3FFF of both bonks The Meniury Manager Double US-Bet graphic Page I from 14000 to >^FFF of both franks the Tool Lncaior 1 O space, from $GO00 to SCIFFF of either bank m the Apple Desktop Bus tool set language-card space, from SD0O0 to JFFFF of both banks ihe AppleTalk driver : i : j.uk J 3 is a memory mapol banks $00 and S01 showing these fe es. [n addiuon, portions of banks SFD and H-] are reserved lor future use. for specific uses oF these profifams and utilities, refer to the Apple lies ttrmwarv Refervmv. Chapter 3 Memory 47 4S A pple QCS H an ware Reference I Shadowing Memory expansion signals. The display buffers m the Appk- llGSire Inured in banfes $E0 and SEl, . - described earlier The memory expansion sku provides j group ejf tfgnali Go support dynamic RAM and i this chapter For compatibility with standard -\ppk-n ptrOgraim, shadowing must be addiiiondl general purpose signals to suppon BOM iki'iiJiri^ jnd selection switched On fa the displa) hull it* needed b) those program*- For more information Figure JHB shows these signals available at the pin 1 - of the memory Expansion sloi "Libk ,1-4 about shadowing refer to Chapter 2 -irnl to the section *Shadowed Dispk] Spaces* easier describes each of the sijjnds in Lhis cba.pT.CT. Figure 3'ft Memory expansion slot Screen holes When shadowing is on for tea Page I. programs and peripheral cuds thai use the toil Rage locations known as the ttflvn hate* run uortully. For more information aboui the t screen boles, refer lo ihi section j I't-ri |-l i .« .i I .u-.l IIAM Space" in Chapter 3 Memory expansion Tneoriginul Apple Bds has 256Xd RAM and L28K of ROM bdh in. and the ] MB Apple l|. MM RAM and 25*iK tot significant hits of iJie ROM address Extended HAM mapping IJ 1 1-: \\ Wrfce enable to RAMs; R/W from microprocessor or DMA liLM-i- .v' .1.. pi; ^a I MR emended RAM card using tour rowsof ZSfiK per row. totaling I r CCAS RAM column address sirmht? MB. The RAM Kinks above hank SI are ghost* (repeated Images of the RAM in hanks S2 ] i L* IJ CROTC'fM 2 hits select dm of (bur RAM rows throujjh 5 E ] . A partially populated card causes boles in die memory map unless there is an C ROMS EL Card ROM tel ed low for accesses to banks SFu-SFD option i m the card to after the address decoding, Therefore, contiguous memory for 26 /GSEL Card data buffer direction control; ti^rv^t flnes high banks $2 through 111 is- available only foriinK, 512%, and I Wfi expansion ards used with when reading card data the 1%K Apple Ugs. .Memory expansion cards using 256K, 512K, 768K, and 1024K ma} be MSIZJ Outpui f re m caul hulk-ales RAM row size i used with the 1 MB sy.u m D0-D7 K bits of bidirectional data—microprocessor daia hus The MSIZE signal: \ stgnal on [he memory expansion slot, MS1Z1 3ags the type of . M tsiCLK Microprocessor clock; rising cage Wales valid bank memory chips heinft used on (he memory expansion card, tf the MSIZE pin is not addiesa on D£M)7 connected (when using 2^)- kilobit RAMs), the FPl multiplexes IP address hits onto RAO A10-15 The 6 high-Gfdef address hiLs; used no decode ROM through ftAB and generates the CHOWO through CROW I mm selects for rows of 2%K. If the address MStZE pin Ls tied to ground (for I -megabit RAMs!, the FHI multiplexes 20 address biLs ABORT Cfflmeas to ti5GSifi ABORT pin onto RAD through RAV ami generates the CROWu and CROwl row selects for rows of I Mb. CRAS RAM r^. address strobe Ghost addresses: A I Mb i-\p:-:-i-i.;-i : ii.l i> enabled i-v-r accesses m hanks 53 through SW) +5V +5 volts ± 5 percent; ftOO mA mavjmum in the 256k system, and banks $10 through $8u in the I MB system. The card provides unl) I MB of actual KAM [banks Si through S Ll in the J%K system, and banks SIC through S19 in the 1 MB system) CR) W i and CK( W| itidiLkhialK sel. ;- hair nnvsnt RAMs on the aid. For a I MBcartI with &&& tuwstMSIZE -1), the srlecied RAM roft numlx/r Ls given I vi ended It AM by the hank number moduli i For banks $00 and Ml 'hanks $00 through SCF in the 1 MB Apple llijs system), the extended memory Laid is our accessed This method of card and 1 tsbg dynamic RAM ICs avaffiable n hen the Apple DCS was introduced, lip to 4MB of RAM row selection causes muhiplt Enngesni ftthnts ul'rhe k \\\ areas on die card: whenever can be Instilled in the extended menu in- turd That much memory- corresponds to 64 accessing addresses beyond the RAM expansion-card limit (hexadecimal address tFPFFP banks o] (hK each The memory on the card lh organized as 4 rows of H ICs each. With 2t6- with a 1 MB card, and S3FFFFF with a i MB card), loeaiioas In a corresponding low bank luLobli-by-l-bii RAM's,, each row would bold 256K for a total oJ" MB; with I rrtegflbfo by 1 J are accessed bit RAMs. each row would hold 1 Mil fa a total of; I MB While the memory expansion S*01 has sufficient address lines Jv;uLihle to decode i i- v.,. 5 ij n. S M:i. MB anc not E0enmi> expansion cards' of gieater than \ Extended KOM recoinuieMk'd. This is because memory expansion locations beyond 4 MB cannot be Adduiomil R(JM space (up to K9tiK in the 256K Apple DCS, and up lo JBSK m the 1MB accessed via direct memory access CDMA), and also must provide onboard memory Apple []gsi is available in hanks $F0 dmju^li JFD ($R» through iFB on the 1MB logic refresh support circuitry for the additional memory chips. bdardX To obtain this additional space, an additional bank-address btch-deccKlt-r is T... control and select individual rows of HAW, the FPl pi- n ides GRAS card row address i required on the memory caid. The tT] provides ^ siiin.il ic:.ROMSKLJ thai selects one bank: fln ilx- 1. CCAS (card column address siiobe), CROW! (card row select D), and CROW I however, the card must provide the additional decoding I" select individual ROMs wtthm " card r-:ny select J ) signals- Signals . CtL-VS and /CCAS are the bask tnenjory timing signals the selected hank. Chapter 3 Memory 51 53 Apple lies Hardware Reference Figure 3-9 Extended RAM mapping A J tin ^ multiplexing Sfamflffy bulk mapping irf * MmliLirt h;iiLk :LU[i|iiii^ at a ThrFW multiplexes die RAM addresses onto eftfref eight, ninu, oricn RAM addn&s lines to I MBtxpMUHnoiniJji * I MB 1 MB t t, \:±\ ,- ii n i ttlfd m a :=hiK provide support J4_t RAM with fn-kihhi[. ^-Uobu. or L-mcjtfrt RAM ICh. On the 256K <,|-j.|. -.m mi II- Appk ]ICj!< "h hkiil Apple ttOS, the main tqgfc boand RAMs (banks ^ii> ^rnJ SCI are Mtilohii chips recalling 1 iLiiik W ilimi.iml ' II --... v> 1 ei^ht address line*. On the I MB Apple tk;s. the main logic hxjrd RAMs (banks Sen} si 1AH . « through SlJFUre l-[ikj £ihh ckip> requiring rt-n jildrcss line* The HAM expansion slmcjn '.. '•J J 152 - -J - - support cards using i^-kilnhii-foy-l-hit, 2"S6-fcilubii-b^—i-hit imegabit-by-1 hn. or . M H lii!;^.ilifi-i>y-3-bi[ HAMs, Tin: expansion-drd manufacturer intotes word si/e of the S5 M RAMs on iJii! memory card by the MSIZE signal Froifi the card (See The MSIZE Signal/ ' turlier in this chapter I [ *7 torn hcurcl • RAM ifl HxpaniJcm - M - » - n. iiksji.^siI.-Mi.KiES't: tf If Sir,51F,OP.HP.S=iFSifST 11 esses 410 SJ-i >>i St.i S=. i >;h n-i HO - kj Hi hi s^j »] r?j . ill H H H yMMUTI Jtt MJ ^J 152 -J 172 -i III ij* iA|\JiL-|i fH - II ...kII-.VM M" IV &tP JJC tits Sll v!l I9CS4I I5E,«I Ml >.!M J L--- Chapter 3 Memory 53 Apple Has Hardware Reference Apple IIGS display features The Apple Dos brings new features to ihe existing Apple Chapter 4 The Video Displays II video modes, These include selectable screen holder coloa .selectable biickunmnd color sdcctable End culnr The Apple lies can display several video modes. These include dispk) Ik c tt >l< >r « >r bkick-and-white ml- i .1 1 'I composite video modes thai ;Lr*. compatible with the rest d the Apple El family (hut with j some enhancements 10 iliese existing mocks) uruS some omipleiek new These enhancements are described in this chapter. The new graphics modes—Supef display modes, These new video modes provide hitter resolution, Hi-Ri> gaphks and Cdot nil mode—are also described in this chapter. neater color flexibility, ;md ^rt-irei programming ease ihan was previously avaltible in the Apple II produtf lint. This chapter describes enhancements [u the tfamtof J Apple ]L video modes new rfdeo features including ific new video display modes Video from the Mega II IC J lit Ms p II geneftlfis all video information in standard Apple It video modes. The Mega PJ outputs HMt Lirtetf-wefghled binary code, which represents one of the iu possible .1 • ii- for Apple II colom This digital value Is input alio the Video Graphics Controller ! CVGC)and is used as a look-up address for .in equivalent 12-bit resolution RGB ccksr OUCpUT X.lllllJ A digital -m-analu^ convener changes the 12-bit color eoJe into three analog RGB video sfgnajs. Tile NGU output signals drive the video amplifiers and the NT^C video generator chip. The output of the video amplifier boosts the the RGB ssgnsb, while die tfftC chip mixes the RGB and sync sisals, resulting in a composite video signal The Video Graphics Controller The Video Graphics tjjnmto (.VGC) custom IC is, re.spuns.jhle For generating jII video (iiiipui The VtiC provides these rtmtrJofis takes standard Apple II video Information fram the Mega ir and generates the video - 1 1 1 . . 1 1 adds enhancements to existing Apple II video modes m supports Lhe neu l id \< \ les provides miemipi handling For two interrupt sources Apple lias Hardware ftetence The Vt'ri" generates .ill vhIl'd uutpui in ill video modes, whereas die Mega II is RfSponslhle VGC Interrupts for maintaining the video MM- Ml write operations to the video display hut'fcr.s in hunk SEOdruf bunk SE1 arc done via iIk- Mejm C. Frgure 4-1 shows the letatJonsrups of the VGC Video display in the Apple DCS is enhanced by VCCfenemted Interrupts, TI-mt VGC Meg j t], in j in KAM. jrul maxillary RAM. generaies two internal interrupts: the one-second interrupt and the sam-line inierjup*. A I -Hz input signal from the teal-lime clock {HTO chip .sets the tine-second interrupt Figure 4-1 Video component in the Apple IJGS status hn The scan-tine interrupt occurs nr the beginning nt :i video display scan line dial lias die gcneraie-intenrupt bii set in the CtitTrspoodhg scan- line control byte. Soin-hne intemjpLs are generated when the computer is operating in rite Super Ili-Rcs video Gone n graphics modes only P and are not available in <>JlkT video oifldca, pi[T Mulliplt'SIT Figure 1-2 depicts c!ie video screen, consisting of the tent display area and the display border. The sun -line interrupt occurs BJ tht bejfnningol the scan line. which \s defined as the beginning of the rij^t-hand border area, I HgtoMi>molcf Figure -t-2 Vlmi lint- ir.rnmpi bwbtna viiifi Scan-lint inttnupt occurs 1 Video ciraphlo Ik-n- fur e.n. 1 1 > L ;in Dflc Uqiall CoiilniLk-r lnM Kill line begins htK i-.-i ikne i— snrac - "\ iknk And ends hen: CujiulhIil . ii k-. iI£ H*A M ii.-lli.A Mil', I ffxtdiqdi) ma Sir.H'il RrUdfo Gtt I Lii i,o pud >i.il 1 1 I I~p f. . i I i • • 1 lakn- i m ham Gnrirolkr U IB ii- i r:-- N.rldl 5*1 1.1I ^ ; |i.Ltrufii Li it. .11.! IJ«Kiu pcin A pnn H (Vk <25GK \pn|.'IM -p. \|vi> . ->ivn || 1 . H6KROM Mi.Ti n Video display scran EJrsktDp h-i.Ti- ' ' ' N ^ikcr Chapter t The Video Displays 57 5& Apple lliis Hardware Relercnee The VGC Iniernipi register Table 4-t l-Siis in the VGC I hi irrupt register Thv VGC Entetrupt register (SCD2J) contains a status bit and tin enable bit For cadi of lite llil VuIim I> w; rip linn two interrupts, wlien an interrupt occur, the interrupt slulis hit lur that interrurH is set. - The VGC inienupt bit (bit 7? Is set ^irnl Ilk- iEicc-rrupc requey CIHQ) lint' i.s asserted if the 1 VGC interrupt status.: This hit is set when the interrupt interrupt siutus bii tfw.rV interrupt enable bii are seJ for one <>r more interrupts. Nt and (he status bii are sd Foi one ot more of the interrupts You enable an interrupt by untinn to the appropriate positions in the VGC Interrupt •1 This bit Is- when all interrupts have been cleared register; the imerrupt source hardware setn the status bits. Software can directly ' = interrupt has occurred I r ^ne second bitenupt status 1 manipulate odj the enable hir> in the VGC Interrupt newsier- writing to the other bii ' = interrupt is cleared. Figure 4-3 shows die formal of the VGC Interrupt register. \.\ positions ha* no cJlect Table j i gives a description of each register bit 5 I A sun-lire interrupt .status: 1 - interrupt has occurred. ' il = interrupt is cleared -*-< - Reserved; do not modify. A Warning tic careful when thanking bfcs within this reflistet Use only a jead- modfly-wrile instruction sequence when manipulating bits. See the -! 1 One second tntemipl Is enabled 1 interrupt disabled w;i.mmj;nnhepref;iie a i> 1 1 Scan-line intcirupt is enabled " Interrupt Is disabled. II - Reserved; do nut modi) H^rr 4^3 VGC Internet fetfstef at SGB23 The VGC Interrupt Clear register VGCIaterrupi statu Once an interrupt has occurred, the interrupt routine must proceed Do clt';jf ilk- interrupt and lake some predetermined iruerrurA-handltng u tkHi To clear the scan-tine, and one- t-rficind Inf.TTiipl JE.itw second status bits, write J IJ into the corresponding bii position in the VGC Interrupt- Scin-Jine Indnrup* slutusi — Clear register at SGtfi. Bit i deois the scan-line intemipi. A\\d hr r- clears ihe one-sei ond Kwtn'nl.ilnniii mfldlfj interrupt m the VGC [nteffiipt-Gleai register Writing a I into mese posiijons or writing imo ihe oiher bit position; has no cfled Figure i-t shows the format of the VGC Reserved; do ix fl n>: oilv — Interrupt-Clear register Table i-2 gfves a description nf each biL J-wcnnd tnlL-mip: enable St-an-linfLnk-rnLpK-iulil. — A Warning Be carehtl when dtangfcuj hits within this rejysler, Use only .i re i.l- Besetted -ili notrnodl^ - nindity- write Instruction sequence when manipulating bits. See ihe wanting in ihe preface * Chapter i ]"hc Video Displays Apple Has Hardware Reference Figure 44 VCC Interrupt-Clear register ;u ft 132 Enhancements to the existing Apple Tl video I bs Include the following- The abijfty to select unique tort and background colors (Tom the Bst in TaMe4-3. Hewmxlido ma modify ' The ability to select the border color I'nr the perimeter or' ihf video image on an HGfi t > monit'H: you tan choose iKi.s color finm the list in Table 4-3 the abOitj to display grajMi ale videot you can display color video nuiput on monochrome monitors m shades d gray rather dian in doi patterns dial lepfeseni Hewrn«J:iJiiflnr \\\\y\\\\ cok* which increases contrast between graphics cdirs nn :i monochfioase monitor. [3caf toll it* ]-.urai«l inltiruprt — Ckar hi ftir Man-line ifltetfupl — • Table 4r3 rest .i n J hackgn iutk coloi 5 I rr^ur " •! i nfex [.:ilni m Table 4 2 Bits in the VCC Internipi-Clear register VI ftlack S8 Hrcmn ... SI Deep red Orange rhrwri|Htni S2 Park blue M Lighi gray " - Reserved; do riLrt. modify. B Purple SB Pink fl 1 Undefined result M i):Lrk green £C Gtren " u nil.- .i here to clear the one^ccond interrupt - Dart pay M) Ydkffl Undefined result >„ Medium blue SF Ai| u.i murine 5 i n Writs a here to clear rhe scan-line interrupt. 17 l.^hi Nut: SF While (_0 - Reserved: do not modih Removing cotar from the composite video signal in itkolumn and 80-cuilumn text modes makes text n*nre readahle. ("i I -i i- nol removed when the computer Ls running in mixed Mi..- umdes. ;md the tour femes nt tead at the bottom of die display will exhibit Cfitor friu^inv; on ontnposfoe cobr piqjutors Video outputs Tht Apple Elc;s shares several display modes with previous Apple II computers Ihi Apple H video Apple HCS supports and enhances these exiting Apple 11 video modes: All Appte II computers can display video in several different w;i\>. displaying text as weD lO'Column and WO-column text mudes as color graphics The standard Apple II text and graphics, modes are discussed here, white mixed text/j^rnphk.*; mtuJc the new Super Hi-ltes graphics moqes are discussed hue; in this chapter. UvRes graphics itumIi: Hi-Res graphics (node Double Hi-Res graphics mode Chapter i The Video Displays ni 62 Apple Ugs Hardwau Reft n noe The primary output device is the video display. Von can use arty i n\lm.in. video monitor, Table 4-4 Standard Apptr 1 1 video display specifications ether color dc black and- white, to display rideo information tnim the Apple I[gh. An ordinary monitor is one that accepts compose video compatible with the standard set by ihe National Television Standards Committee INTSQ, If you use standard Display modes -HKohi]]]n lest; tttapi Figure m Jitl-column text; map. Figure i\ Apple II color graphics with a monochrome Csw^gJe-eobrJ monitor. the displ.iv will appear i as that color r black, tor example) ;ind various patterns made up of shades of that color. Lo Rescojoi graphics map Fig Hl-Bes color graphics; map: Figure kfl If you are using only -iO-colunm text and Lo4tes grapMcs modes, you can use a reJevisicHQ Double Hi-Res cojof graphics; rn.ip- I i^iik- i- u . w\ f:ji \::in viJi-n Jhplav !i the television sci lu-. .in inpui < c-nii^i " ' -i >.<> .\' , > , -'\:: TeW capacity 1± lines b\ 90 inhimns (character positions?. video, you can conned ir directly to your computer: lI' ii does not, you'll need to attach a i I under sel US ASCII el i.i utters, i See Appendix C for a liir i >| radio- frequency (RF) vkleo mL>pl_i v formats \unual, inverse, flashing, MouseText (Table i-Lin. Note The Apple IIgs can produce an BO-column tact display However, if you use an . lu- Res color graphics 16 colors (Tabk U41 4fl h*jfiiofital bj 48vettica^ ordinary color or black-and-white television set. Bfl-ccilumri r. w :>.\\\ In- too bhtfrj to T map: Figure t-7. read. For a clear HtKulumn display, you muss use a blghHesolution video monitor with 40 horizontal by Kt-Rej cota graphics « . 1 1 1 - 1 T . i i -k i - 1 5 i: 1 I 92 i erticai a bandwidth of 7 Ml to or Kreater. (restricted), Bhck-and-white; 280 horizontal b) 192 vertical; m.ip. Figure- M3 The specifrcatfcjns for the video dfcpkj are summarized in TaW i- Double Hi-Res color graphics 16 colors [Table 4-l6)i 14u" hnrixwiai b] 192 vertki i restrictions}, Black-and-white: 560 horizontal bj The video signal pnxiuced by The Apple II'. ^ i* M'S^-fqmpotlWc composite eolui video. l')2 vertical: map.- Figure +-$. Ir r, available W rwo places: at iJie RCA-iype phono jack and al the RGB video connector, kith on the hack of the compuier. Use the KCA-iype phono |a< k to connect a composite video monitor or an external Video nunluJator, use the RGB video conneetor in connect the H^LTihiinn and 80-Cntumn lexl modes can display all I2S A5QI American S:.iii-.l.n>l 1 an aoalug-ioput RGB monitor Code \'oi Information Interchange) characters: uppercase and lowercase letters, numbers, and symbols. (See the display maps in Figures 4-5 and ffi ) Tlie Apple IIGS can also display The Apple [fcs can also display Super lU-les graphics, although it is not a standard Mouse Text characters. Apple ][ video display mode. Super Hi-Res graphics are discussed more fully later in thts chapter, Arrj i -I I he graphics displays can have four hues of ted at the bottom of the screen, I he *x\[may be either m column w StuceHumn. except that Double Eli-Res graphics may have only HXj-coiumu text at (he bottom of the screen, Graphics display- unh wx\ at the hottofli ^re called mtxed-nt'^r displays The la>Hes graphics display is an arraj oi colored l>iocks. 40 wide h\ ffl high, m any c4 16 colors, (See the map in Figure i * i in mused mode, i lines nt k-si replace \fo- ItiIIoiii f> raft's i -I blocks, leaving m rows of ill blocks each. Tile Hi-Res graphics display is an array of pixels jwii wide by 1 L >2 hi eh i Sec I lie map in Figure l-fi,) There: are si* calufs available m Hi-He^. displays, btil a ghen piv^'l can use unh -in the six colors 11 cotoi bs used, the di^plaj is 140 pixels wkleb) 192 h^h If :i monochrome video Is desired, the display is 280 piseis wide b\ l^'J hi^h In mixed mode, ihe fou«" lines of lexl repljce tlie bottom 32 rows oi pixels, leaving ldl> rows of 1-iO i or 2SG) pixds each. tihjpter. 4 The Video Displays 63 64 Apple DCS llardwan- Referertct ThL 1 l)(Mi!>k' Hi-ltes jcniplijui display uses main jnd auxiliary memafy (n display an array of pixels, 560 * kfe h 192 mgh (Sue the map in F^gjure -i-9. * AH the pixels art visible in black and white. If color is u.sud. the display is In) pixels, wide by 192 hij»h with lb cobrt figure +6 M.ip of KO-crjhjtnn k'M dir-pl.u available, tf monochrome video is desired, die display is 560 pisels u idi by 192 hi^h. In mixed mode, the four lines ohcxi replace ihc boflom 32 rows of pixels. leaving 60 rows 1 Ck| ] H4 1 (of %0) pixels each, In mixed mode, iht text lines can be 9 1 columns wiJr only. (20 321 (22 S33 S^ S25 sJ H7 (few W .VI N SS Hi 57 3« » II s-m I M.'iH F^jre 4-5 M;ip uj Kki ilumn test I'.iul I display 1 Vdd 1024 [$400] ta gel Page 2 1 Slrti 11*2 addresses. I 2 %%0 12*1 5 SfiS I4t« - *3 | a T_ — r £ r_ ^ ^ : r _~ *- 4 s&ua ft£ .i. ;; A J 7. T 5 J ,• , * , ssau 5 >^ J» ^1 wJ *** 8 z — S - -". £ ti 3 ft ™ 3- ^ Aft 5 mi \m Re* *i I3U0 ITM (1 MPP 1021 7 ST80 !92ft ] «i»"i (152 , k^jh ;.. 1 2 SIOQ LBQ S M\« I I'M 3 fr^BQ lim Hi JiJH IJ3D 1 Sun |^h II S5M 144* 5 S603 tfti P BS21J !" ,. ,"„. |-.,J l- v,\k ri.| 7 £78Q IflSQ -. m_-. 15 r^R I960 . I!-.-: h- H50 lli-i II- H28 l : ." T L MDP 1232 II >\v his IS MW IJKl u J62B 1571 1.1 ttiftK l"' 1 2D Jir^l In In 1, *?> |n -I - • ^- 15 FAN I960 1HH 2j &7DQ 30M H S4D0 1 J-SJ ao -j 1 ^jj sis sj-i ijs s^ sr l-i fc» 1560 1 ^ \ 1 \2 to ii 55 ifi 37 3ti » 1'/ IflM J-iH* ~| AiitiiiAP'Xli !imp, f~ M IM- in in :i v-u.. I".. " 1872 .'• ma sxx\ Chapter 1 ThtVfckO Displays 66 Appie IIGS Hardware Reference Figure 4-7 Mjp of LoRes graphics Pag* I display (Add IK4 [I4C0] to get Figure 4-8 Map of Hi-Res graphics Page l display (Add B192 [S2000] to get J Pafle 2 addresses J ag£ 2 addresses,] -•- z 1 7" * ; § ? 7 §§s a s ^ .7 7 s u4 *- *» > 7 -. 2> **v *» s 3— ;' -1 T £ ;£ ^ 1 £ r. z- -e zz\ .. -:: .. &rU • l_ •f_ 2_ 5^ £83 fe Li" gg 3 v gS ••• Z N ^-* if J3 1- x o- [_ -. * -' Raw ..,., D J2000 8192 4 SWQ tltt ; I20HD Q2D !. S-Ml | !£-: 2 121D0 fl44fi * IfiOQ l-.V, i S21BD fl57fc |ii m-wi L-66H 4 *22tiO rw i: rro r^ % 52280 Mj2 ll |W l'!J" i- *:.*.«• <:i-«. n n.jk i.vi sj;.M' >••*. h- -v- M-: 6 J2l>ffi Sift ffl S=iJH 1320 P«flABA360 JJ tSAH hi" vj- 10 IZL28 am - Ji I":- LL HUB HUH \ 2rt | S72H | JHfiJ 12 (2238 mi \ ^ \ 15 &22AH JW72 4 u t^iOOO vi *-\i I960 14 $2326 4000 52 ^1 IHi 1 i Li S23Afi ¥128 t¥.\U +10*00 5h HOC UriJ J \ 1 l«- iJf.-Tij -J J " J LWl J55U |- 5201X3 JHD0 >»W+*SW 1 I mi CM >.|. 16 521^0 tf2S **n*ioo» 10 12LI>' gftg \ -.! '.,|>| r^ 20 z-JJ-^i H7W ^t09b **IM0 ii >">« .-."J . 2] i2J^« K91J ... stdo jood Hi 20 +5-1*:h:- \ 1 22 fttfO 9040 2J 12300 Hfe -I,, «,*: *Btt +S1CW Chapter 1 The Video Displays G7 GB Appk' [kis Hardware Reference MSC versus RGB video Flgiw* 4-9 Map of double Hi-Kes graphics dispku The romp Mite i'ideo signal, available ai the composite video eonnecLoj ji I fit- rear of the Apple JIGS ease, will drive a .standard NTSC eompoiihe color video J VLlui VI mi nit 1 monitor %m Hi-L m i (03 s&t iw ttfi \ \ S2JJ 121 $22 52} *2* $-^ i-!i: $27 Row L 2 33 - -^ *U. **.-. &,-&,—P. The RfrH video signal* are three separate cotoi signals., whteh indfaioualry smo mi control the three cotocs (fed, ftreen, arid blue) wilMn an RGB color video 1 ttKUHD monitor, The RGB video eaoaectof is located at the rear of the computer. 2 S2LG0 W4S Corned only an RC1H video monttnr uiih Jiialoj! input> to iKih connector. 3 S2I8CI BWti \ . Figure t- 10 shows tin- pin diagram of this connector, and Table m [tats the Signal 4 S220Q B7M associated with each pin 3 (KM 9552 7 i 6 i23OTWftO 1 Figure* 10 R(jH Hideo connector 7 J233U WSJ - I&UB 8232 ( S2QAJi $60 \ II 521ABSil6 \ \®©@©@©0/ [2 S222* .-P-h '. i —— i * i' tlOOOfl ,_ ~ 1 1 ny& woo M2-i tKMOQ 15 H3Afl PIS Tabled RGB ^"ideo signals \ *ann- +soem - i6 una -." A Signal Description \ I Ifl tZHO B$2i _r I 1 GND i.i-i..iii.l reference and supplj 39 *211M 9656 i \ : RED Red analog video .signal 2D S22?J S7£U \ [ - stats t&i-iw _ -i CO Ml 1 Composite sync 21 S22M JWJ2 A \ I No connection iien;ii 22 J235ft«H(l --Mi tiMH) i NX, 23 SJ3DQ91UI ^ \\ GREEN Green analog video signal 4 \ :-- 'ili.lH) — 5 f Liui till tn' tin iLu tilt; CiY, til - 1 6 GNU Ground reference and supply 1 D 1 2 i A J fi 7 \ \ i " -W — S-vali supply Hi i.i .^ V- ii" n. I s +12V + l2-voli Mipplv '' BLUE Mine analog video signal Mi N,C No connectlpn II SOUND Analog sound outpul IJ NTSC PA1 Composite video outpul L3 GND GfOUfld reference and supply H N.C. \i. connection i ..\>\>. r 4 The Video Displays TO Apple [k.s Hardware Reference Table4-6 Video display locations Video display pages HlftbcM addntw OJhpiay Pisp l:r. iuixk- page tka, ncc Bex rxrc The Apple HGS generates its video displays bj usmg data stored in specific areas in 1 memory These areas, called display page*, serve as buffets where your programs can pui .1-1 .l m be displayed. Each byte in a display buffer coniiuls an (rfTjtci at a certain location 4u-rolumn text, 1 SGlOU 1024 SOW 2047 ? SOOT 2048 S0SPF 1071 :.n Res graphics on the display. tn *exi mode, the ohjeci is a stogie diameter: in l.n Res graphics mode, the objeel is two stacked colored blocks; and in Hi-Res and DouWi HI Res mocks, ii \$ a Itne BO-columfl lexl 1 SOtOu 1024 S07PF 2047 of seven adfaccnl pixels. y vis-;n.i 2048 S0HFF 3071 lfi-Rfs graphics ] 120QQ BI93 S3FFT 163S3 The HKi-lumn tead and lA-ftes graphics modes use two dfeptaj pages ol 1024 bytes eai h j - \&m Ike-".- .in.- l ailed lext Page [ and Lexl Page 1. .ind Lhey are located al J"ii through 2lH" Double Higll-Res i; . B192 1WF I6JS3 ($0400 -hri.^ih SOW) and JtUH diroupji 5071 CSOSOO thiough S0BFF)in main memory, graphics 21 S40D0 1-oSi |f] | jh" \tm: illy, only text Pafle I is Used, hut you can pul text or graphic! data trup text Page 2 an J switch displays instanilv Ea'iher page tan he displayed as 40-colurun text, In- Res graphics, or mixed mode (four rows of lexl al the bottom c if" a graphics dLspla\ I * Ixj-fks umpliiLh *,m I'lisc J f nm supported bj !:niuv.hl\ Iot irKRJLlinrM4l hiM H -'' i ; > ! pj^, ri'lix b 1 1 k ni-i i Sfl ^i* -ii I >is'-l.r. Mi .!-' S* \U I nn^ The Ki>column text mode displays twice as much da la. as the lO-column mode—1920 ; See itn- s« rtai 1 tauWc hj-Rl^ ifni^iinA' inriT m ihte > I - " i bytes — but ii cannot switch pa^es, The HO-column lexl display uses :l comNnaiion page made upol text Page in main memory plus another page in jumIuo memory This I additional memory nut ihe same ;is text Page 2—in nu i.s n .. uples, the same address i space as text Page 1, ind there is a special soft switch thai enables yon to store dau Into Display mode switching it.(See the new section, 'Display Mode SnKching. ') The hudHn firmware I/O routines, described in die Afpk fl& I tomtwe fitfetmce die cure of this extra addressing You seleti Tlie iJLsplay mode thai is appcopriali yow tpplii arlan hy neadirg or wdtlflg I automatically; that is one reason to use these re mi hies for ail ynir nnrm.il u-sr ompui to a reserved memory focation cafled a soft switch. In the Apple ties, most snfi switches have ihrt-L memor\- locad.ons reserved foi diem one for turning lite switch on, one for 1 Hie Hi- He-, ^r.iphi-o mode also has two ii-plr. pages but each page Is 8192 bytes long, hi luniin^ it nft. and one for rL-.iJine the uncin state of iIll- ^vitch. the |i>colnmn test and lo-Kes ^rjphk> mi ides, each byte nantrcds .t dispky area 7 pixels wide by 8 pixels high. In Hi-He> e,raphic* mode each rule controls an area 7 pixels wide by Table 4-7 shows the reserved tacatioju foe the sofi switches that control ihe dlipbj I pixel high Thus, a Ili-Res display require? 3 times as much data oorijre, as shown in modes IV. r example, to switch from mfawd mode to fullscreen graphics m an assemhly- TaNc -1-6. language program, you COiiW ust- the instruction ->7h SCO 52 The Double Hi-Res graphics mode uses Hl-Res graphics I'.uji I m both mam and lusriUaq " To do this in a BASH pr-^rjni. you could Use -he jn^mclion memory Each byte in those pagjes of memory controls a display area pixels wide by I pistil high. This gives you 560 pixels p<^r line in black and white, and I iii pixels per line in POKE A -^£34,0 color.A Double li-Res display requires \wn-r rln- \»u\ mi-moiy of HHtes papto, and Lis- mufl be lead seme tsntSI He written to. and tor 1 S (49152) Disable 80>column store. graphics [node, or, If MDCSET si raocoi w ittwi C49153) Enable SiKulurnn stow mixed mode < - i Hi, OBSuVtD w *CA0C ' 1 i — 1 1 -!_- BO-column hatilwaTe TXTSET R \\ SG551 (492333 Select text mode only. w 1 SETB0VH3 M-.iilJ U9J651 Enable 80-coJumn baidwiMe, MIXCLR \i \\ SCG5Z (492M) ijL-ni mixed crHxfe CLRALTCHAR ff « :i> N.i ini i.i 1 kuweitase character WDffiET R/W 50Q53 149235) Select rnbjed mode. set Flashing uppercase :\ll"..i.:l R/W ICO54 i 19J36) Select te« Pajje I character set JC&S5 (49237) Sek'ki . v I'.inc J nr. SLTALTCHAK « SCCPOf ivJiiri tfc :ii inverse character &% TXFPACE2 K tt il i" flashing. SETROCOL on. text Page 1 in auxiliary memory. RDBflCQL a? SCO IK (491761 Regd !:i.tt>n^u:oj. switch, - BO-col LORES R/W SCtiin (49239) Select Lo-Res graphics mode. i store enabled, 11 13V HI. m 87 SC019 (49177) Head vertical blanking (VBL): I - not VBi HIRES R/W (49239) Sdeci or, I it- Res graphics mode, ifSETAN3 is' on, select DmibJe Hi- Res graphics RDtBXt ir SCOIA i [9178) Read mCLR.-TmET mode, switch: 1 = text mode enabled CLRAN3 R W iCO^E (49246.1 m-i I..M.- • ^ SETAN3 R/w $G05f (49247) See Table h-H. RDMIX R7 S031B 1 19179) lead MOCCUt WtXSET switch: 1 =mfsed mode etui bled * W nwiiu write tt&yttatg 10 ifae lw jikmi. A mtMns reid flK loaii a. * V 1 n a fc» cad » n ritt i '' " n H MM RDPAGE2 R7 SC01C 1 19180) Read TXTFAC i£ I TXTPAi E2 ". read the toafloq und dm twi k hn " ltd i ff i w.m- read fe \atoakm and then bed Ni 5 i switch ] = test Page 2 selected. tote You may not need lo deal with these functions lw reading and writing directh to RDM IRES IT SC01D (4918U Bead HIRES switefc the memory locations In Table 4-7 Maro, nj the kmamns shown here are selected t = Hf-Res mock enabled automatically if you use the display roufljies m the i'arious hlgb-krel laoguages on ALTCEiARSET R^ SCtitE f 491821 Read lhf Apple lies. CLRAtTCHAK SETAiTCHAR switch: 1 -alternate r character set m use. Any time ]POU read a soft swiccfi, you get a bytf of Uiira Howfier. tiie un iy mfbnnaikiu the byte conuins is the suite at the switch, and this occupies only one bit—bfl the REWOVID R7 SC01F (491182 Read CLRHUUL) 5£X80V1D high-ordLT bit. The other hits m the byte yie alwaj-s rj. swiuli: ] "30-colufrm read 3 soft sw itcli from 9 BASIC proflram, you pet a value hetween hardware in use and 255 Hii 7 If you has a value ol I2B, so tf the switch i- n, the i-alue will he equal to or gwuef than 1 2R: if the RDDHTKES R5 I9222J Bead SETAN3 CLRAjN3 1 swttduO - Double Hi-Re* ^viiih is i 'If. the value v, ill lie less ilun 12H. 1 1|- ics mode selected, (Continued) '. li.iptLT •+ Tlie Video Displays 73 T* Apple HG5 lt;,idw.ML Efeference Mixing address modus The Hi-Res graphics display is stored in rune h the samj way as text, but there arc eiahi times as many bytes to store, because e^lu row? oi ptxejs occupy the same space on the display as one row of characters. The subset consisting of all lire first rows hoa tlie g !( is possible to dtepby u mihinatinns of modes nn hie video display The mmhi nation of eight Is stored tn the first. U\2-\ bytes Jtion ui tike 80-co3umn display memtsty in Page 1 of main memory and the portion stored in tire so-enluum text dspEa) memory. To enable the Kkrolutnri text display, Addressing display pages directly torn the THPACE2 soft switch on by itadrng or writing at bcauon Jl 1 55 Before you decide to use the display pages directly, consider the alternauves, Mod high- level languages unable you to write statements ili.u toniroi ilic text and RniphJcs dispJ tys The text window s -'rly. iJ you ate programrmng in assembly language, you ma) be abfc la use ihe display After you have started up the computer or after ,i reset, the firmware uses lire entire video feamrcs of the huilr-in It") firmware. ^ ou should store directly inti i display memory only it display. However* you can restrici video aetsvitv to any rectangular portion of the display he cxi^iin^ programs can meet your requirements. " i i i '.'.i"h Tile active portion of ihe display is tailed ihe text window, YOU *.;tn set ihu The display memory maps arc shown in Kigmrs +-5. -\-w h- \ *8, and i " All the different top, bottom, left window k storing lire appropriate values side r and width of the lexi display modes use the .same baste addressing scheme: t haiactersoi graphics bytes are mto four locations tn memory Using these memory locations all. ws you conm tlie ti i il stated as rows of $0 contiguous bytes, but the rows themselves are noi stored at locations placi in-.iLi of iext in the display and to prcaeei other portions th< rn from hemg - i corresponding em rheii locations on the display Instead the display address Is written ovtl ' transformed mi ihji ihrtt rows that an ( Igl i row - aprnl on the display are grouped Memory location S20 ctfltatris the njmlx'r ql the leftmost inlumn in the test window. This together and stored in ihe Inu 120 locations ol each block of ISA bytes ($8Q number ft norm il«- 0, die numlvrof The Leftmost column in ihe display in a 40-co!umn hexadecimal i By folding rbe display data into memory this way, the Apple QGS stores all display, ihe maximum value Fbrthfe numbei Li S27; m wtSO-Dolumn display, tlie maximum 960 characters of displayed text within IK of mentor) value ss s il Chapter i The Video Displays Apple ilGs Hardware Ken i Memory location $21 holds fhe Width of (he text window Fur j, -iLkrolnmn display, it Ls Text displays normally S2H; for an ^column display, it cs normally 350- I he \|-| ! l- Id tf like all standard Apple 13 computers, can display ww \\\ two ways i-< A Warning Be caid'ul not to Set Lbtu som of the window width and (he IdLmost columns wide by 24 rows, oi EH columns u fde by 1 rows Many character sets are 1 position trt the window exceed the width of the display you arc using avad.ible inchklm^ ii.nnl.ini .. p t.-. u-m L-lurieieis special chafactcis, and MouseTexl 1 1 Of 80), Tf this happens, ii is possible to put characters imo characters. memory locations outside the display page, which lui^ht destroy Text on the Apple GGS tan also be displayed in coloi The irxi. background, and border programs or data. * each an be 3 differem color. The following sections fljve details about the text displays. Memory location 522 contains the number of the top line of she text window. This is normally u. the topmost line in the display. Its maximum value b $17 Memory location S2.^ contains die number or" the hottfrni line of rhu- Mam. plus I. It is Text modes normally SIS for the bottom Erne of the display. lis minimum c;tlut is sill. c\t characters displayed include the uppercase and lowercase letters, the ten : l i- 1 After you have changed the tad wiiidpw boundaries, nothing is affected until yon send a numerical digits, punciuiition tnaffcs, ami special character. Bach character js displayed in character to the screen. an area of the screen thai is seven pixels wide b) ciuhc pixels lii; . V Dec Httf Dec ILi Per Hn Dec lit) Dk Hn flashing, alternating between normal and inverse Left edge 52 S2H MM sun oq too no Vio J9 $37 79 S# Width tt 521 i.Ki soo to S2rt tfO >Sl> ,11 S2S 90 5 SO Willi the primary chamcter set, the Apple lies can display uppercase and special Top edge *-. $22 00 SOO :iu loo 00 SOU :- SIT 2? S[7 characters in .ill three I'ormab; nnrnial. imerae. and flashing, [.owercase letters can Ik- Bon edge 3^ S2? 0] £01 Ji m IA sis H SJ3 24 SIS displayed in normal format only The priiiian character set ts compatible with most software written kn other Appk-n models, wtucti can Jispi.iv tesi m Flashing formal but which don't have lowercase characters Chapter I The Video Displays 78 Apple llos Hardwair Kctereme The alternate character set displays characters in either normal W Kffrerse Format. In nurmal 40-coLururi versus HO column lext; Tlie Apple flGS has two modes of real display: liTiiul. you can get ii-i-ui .mini and Ni-column, The number oj pbet Is 111 each character does urn change, hui the characters in BQ-cotunm rwxk" a*e our) hall .is wide .is :k- characters in HKnlimin mode uppercase letters Compare Figures i-ll and 4-12. On an ordinary color Of black-and-white television set the fowercase letters narrow characters in theSH-column display blur together; ynti must use the aO-coJymn numbers i.im.i, todisplaj tefl on a tefevjawi .special characters In invent formal, you can get Figure 4- LL 40-cokimn |e.\i disptay MouseTeKt characters /UTl LIT! ES uppercase letter1 . lowercase letters _OCKS riODJ F= 1 ED Created ENDFILF fiLlR-TYP& numbers •STARTUP 33 1 -JUL -B5 p lOO WTE -if-JO > DOS 1 special characters 331-JUL-95 p OP 1 (NO WTE * DD3 L *SLE2C BAS 39 31 -JUL-65 Yuu select the charaetei sets hy mentis of the alternate-tcx! soft switch. SETALTCRAK, D Qp s > ^NO MTE 1SBBi descrihed earlier in this chapter in the section 'Display Mode Switching Tahle 440 sIkhvh 8U2E D DO B«S 34 31 -JUL-8S ! 1i«Ji5 the character codes in hexadecimal for the primary and altemaie character sets in normal, *SUl O BJ . BIN 31 31 -JUL-95 Q Qp 2 -S ^ A **« «2DDD *f? 13 OBJ 1 T BIN ^3 ai-JUL-as Each character on the screen is stored as one byte of dispU data The tow-order six bits tiDO " * U E£ D G t?U4 OBJ T JW>R i aai-JUL-as make up the ASCII code of the character heinfl displayed The remaining iwo (high-order} DO flQ DATE = JH 3539 bits select inverse or flashing format and uppercase or lowercase characters. In ihe primary tsys .o»j &IN 13 -jui_ -as 1 D on J ^3 f>-r*BiAC character .sec. bil ~ sdet is Diverse of norma! Ibrmai and hii 4B'1B In the alternate character set, bit 6 selects between uppercase and lowercase, according tPRODOfi BT5 3D 5-5EP-91I a aa ± (NO Df=>TE J 'IB'18 to the ASCII diameter codes, and Flashing formal is not avail able Brt SIC. 5V S T EM a^s si 1 fl-juN-e^ a ± do i o a +i d BLUL'KE USED 1 Z72 Table 440 Display character sets Primary thi»cljer *ti UHrnalc tturjrter 5rt Figure -M2 SH-mluiim leM display lira >.ilui- Cluir*rter type Formal Clkararlrr 1ypp fnrmai ^LTTILITiE'5 iswrf tvpE blocks "-'i :• I-..- CPEft1£0 EWXILF luBTVFlc S00-3IF Uppercase letters traverse Uppercase letters Inverse iffTAHTl* its 1 sr-^iLHsa d-ida AHJ lint S40-55F Uppercase toners •SUM ass 3* 31-JUL-B5 aiDa INS WTE' Ldlil Flashing MouieTe*t Inverse *eji .je: = r. 31 31-juL-aa jDD Mi; >-.-l 152 LI ^*32M S60-S7F Special characters Flashing Lowercase letters Inverse *SU7,D»J *1N 9 Jl-JPL-Bl Llltifl mo r-T • 3i*d ftsinaa^i •rj-.jE. BIN a:- 31-JUL-BS jOQ (ND UftHl 1 ^n si *-*&Eaa l5(j4,Q*J 'JHB 4* S3 -JUL "BE 01 DQ :H0 PATE? B135 SS0-$$F Uppercase tellers Korraal Uppercase letters Normal fiJi.BBJ BIN L J.-UL-EI* jDD (NC- W'E- vh n^etflC -E.Lc.CB J LtiR 49 3J-JUL-B9 q.Qfl "F rtE^B SAQ-SBF Special character* VlT!|l.l| Special characters Normal iMMOi frfS n LB-BEF-B1 aiDa hi: >---l I4ft*» •B*SI C ET STEM EV1 2L tB-JIK-Bfl D:DD .HC UTEJ LD24-D SCu-SDF Uppercase letters Wnul Uppercase letters Normal . PlUCKE- FRIEj L12B BLDCKB Klzl . 2?1 T{nAL BLDCKEl Lid-L 5E0-SFF Lowercase letters \ormal Lowercase letters Normal Chapter 4 The Video Displays Si? Appk- IkiS [-lard ware Reference Color ttxi The Border Color register is an S-hit read/ write register serving two uinctions. First, the least stgrificant 4 bits determine the border cola Second the roost significant I bits are the control bits for the rcal-iime dock chip interface logic. See the section on the real New to the Apple IkJ* is llie ability to di.spljy the test. Imkground. and border in color. time clock interface in Chapter 7, "Built-in I/O Ports and Clock." fof nit ire information on These colors may beset manually ibrougjh ihe Control I'.ind. ::•{ -.ini.JL program control, via r i control registers. the RTC. figure ^'-14 shows die Holder Color register formal. Tabic hll gives a descnptiun of each bii. Text and background color A Warning be careful when changing bis within rhis register- Use only a read- Thf Apple litis provides the capability of colored text on a cotofied background un m modiry-wriie instruction sequence when manipulating t>iis. Sec the KCti monitor. To select colois tor rcn and hackee mud. write Uu- appropnafe cola warning in the preface, a values id (he 5creen Color register located flJ $CQ21 l in Screen Gotor register is an H-hii dual-function register FiM. rhu most sjgQiflcanl -i Wis determine rheieM color Second, the leasl Mgnilic.ini i h^ determine the background Figure 4- 14 Horder Color register at SC054 cotar, You can choose these cntor> fn mi the Li 1 n\ .iiLihk Apple H colors given in T.iNi- i 3 'The use; uin also selecJ these cofars from the . nncrofl Panel figure 4-1.^ ?,|m\\s Hi i if the Screen Coloi register, Table + gJvi s dea rfption nf each Ml in the rpgisicr 1 v i 1 ! ^ i\ * . j, i 1 it Figure *' 13 Screen Color register ai sc(!22 M il' H.kk^niiLr..J. •Imi 1 1 1 1 | Table 4- 2 h"ir> m die Border Color register f ~Sf 1 » h 'hl>h I i < r>fSLri]illtin Real -time clock control bils: do not modify bits 7-4 Table 4-11 Hhs m 1 1 :_ n.r-co. < j 4or register when changing bits 3-0 5-0 Border color Pfscfiplld 1 - 1 T'-L-:si color 3-0 Background color .Monochrome/Color register The Apple UGS vidtf\ is displayed in either colOf or black-and-white. Located at SC021. ihe Monochrome Color register control* whether the composite video signal consists of Border color color or gradations of gray. It bit 7 It & 1, video displays in black-and-white; if il is- a Q. video displays in color. The colored border area suoounds the cideo ctispl.it :i \c .in .i Vim nm *uk\ i .l uJuf t\n the bonder by writing the appropriate coloi value do the Border Cokw register located at SOR54. You can choose rMs odor from the 16 Apple ]f colors listed m Table 4-3, AJtemaiclv. the user can select Lhu border color from the Qmtrot Panel. Chapter -t 11k- VWeo Display* 81 82 Apple ITcs Hardware Reference ]f you aie using a monochrome monitor. $3 bit 7 to 1 Displaying test in black-and-white resulis in a better^ktfjdflgi mote readable display. In test mode all cokrr information is r Graphics displays prmoved fiwn rhu composite video signal, resuLdn^ in a monochmmc tort display. Hie exrtptkm 10 ibis Is ihe mixed text and graphs trade, which results in color text and The Apple t]G>! can. produce standard Apple It video graphics in Three differeni modes, as CflJqf fringing, '.vl-.I .is r\\. . iv.', ;.!.« | -.In. v nj- ^ " li = I J n ms. Ail Lhc graphics modes Treat The screen as a redangukraxfaj d spots. Normally, your programs will use the features of some high-level The rcm-iiniriH bu> in ihe Moitndirome/Qilor n^5itT are Tt-^ervtxl; do not modify Them language no draw graphics dots, lint-s .md shapes in these ar:av> : ilu.s section describes the whiL'fi writing id this location You can also Select color or monochn.nrie video from the way the resulting graphics data are stored in memory. i » in.. Panel figure 4-15 shows ihe format of me Monodwomu Color n.^i^u-i TaNe i~ L3 gives j description tif t-j.ctb bit in the reglstfl A Warning Be careful W hen changing bfi 7 jn diss register. Use only a read-modify- Standard Apple U graphic* mtKles write inniuLikm sequence wnen miinLpukiiin^ Im " iliv warning inw the preface, a Apple lk,> graphics can lie displayed in several different resolution All standard Apple It -!..; !ii-.i modes aie supported: Lo-Res graphics mode Hi-Res graphite in-. ,!«:' Figure 4-15 Monochrome-Color legisier at $C021 ] Jruihle ! h-Ke.H graphics mode Ki^!hvd:dnrx»inHHy K.icli lit these graphics modes is described in the following sections f ^ - T n < \ \ I i Lo-Res graphics Culm ..< nil inrii-hromtvidi' '-'.-k- In The Lo-Res graphics mode, the Apple IKS displays an jjt.iv i it \H rows by 40 ibmiu I if colored Mocks, fiach block an be any of 16 colors, bcluding black-and-white, On a black-and-white monitor or television set. these colors appea* as black, white, and three shades of gray There ;ire no blank pixels between blocks: adjacent blocks of the same Tabic 413 Bits in the Monochrome Color register color merge to make a larger shape. l.i: Value rjcwriptinin Data for ihe LoRes graphics display ate stored in the same pan of memory as the data for the 40 column text display. Each byte contains data tor two Lo-Res graphics Modes. The Compos.i(*. gray-stale vnk'ci nurptn j twi i bkn ks sfe displayed one atop the other in a display space the sank" size as a ^D- Composite color video output ujhinni tea t 1 u racier. * pixels wide by 8 pixels hrflh 6-Q Reserved; do not modtf] Haifa byte—i bits, ox I nihhle— is assigned to each graphics block Each nibble can have A value Irom to 15t and this value determine? which i me of 36 colors appears on ibe l hanging hit ? dees not idln.1 ihf JWJW OWplltS screen. The colors and their tfxrespociding ndbbfe values are shown in Table 4-14. In each byte, The low-order tiibNe sets ritf color for the lop blink of the pair, arid the liij^h-order j jVo/ev RL atlin^ me Monochrome Color reiser petums a meaningless value. BU 7, nihble sets the color for the bottom blocjc. Thus, a byte containing the hexadecimal value herd MR-, can be refened to as write-only, >DS produces a brown block atop a yellow block on lite screen. Chapter * Hie Video Displays 89 *^r Apple lkrS Hardware Referenrv I be !li Res graphics dispii^ (a bit-mapped bach pixel on the screen corresponds lo a bit Table 4-14 Lo-Res graphics color (or, in color, 2 bits) in memon The 7 low-order hits of each display mem -n , . !-. -srii NltbJc^w V'.l-k VllL.. a row of 7 adjacent pixels on the screen, and 40 adjacent bytes in memory tomn il a p ra i it 280 (7 times 10) pixels. The least significant bit of each byte is displayed as the leftmost Dk ttn Color ptf Hex color phd in a row of 7, followed bv die second least significant bir and so on. as shown in L Figure -t-lfi The eighdi bji. nbc mast significant" Of each byte is- not displayed; it selects SOO Black * Si iS Briwn I -.\\m toliir set\ as described laier m thfe chapter. 1 *; Deep red ' v., Grange 2 %02 Dark blue Mi SOA lighi gray \ S03 Purple ]] SUB Pink Figure 4- 16 H -»es gra p h les d tspfa i \ bta 4 £04 Dark green 12 IOC bgln green 5 soi Dark graj 13 SOD Yi.-iUi £ S06 S07 '.I--, in Lighi hlue m blue In h SUE SOF Aquamarine White M h I • M I ' I i ilu viry, dLTKndirs un ike fttttrdb on. the rnwliK u or k'h'v imi m sci L 2 -l i 6 As explained earlier in this chapter in the secmm "Video Display ftiges* ihe text display I and ihf Lo-Res graphics display lisl the virile .ul-j in memory. Musi pn^rarrh thai 1 DntS fUl J^TJ-pltiL- SCTWfl generate text and graptiies clear this pan of memory when lhev change display modes, h*ir it is possible in store data as teafl and display them as graphics, or rice rem AJ] pou hive ta do Is change die muck switch described earlief in This ehapier in [he section "Display i hi .i Wack-and-white muniror. then- is simple correspondence- between hits in memory Mode Switching." wLthoul changing ihe display data. This usually produces meaningless ,i and pixels on the s< reen. A pixel is white it the hit controlling it is on and the pixel is ^mMes Ofl the display, hut some programs have used this technique to good advantage \ I ), black il me bll \s "I "• On a black-and-whitf television set, pairs of pixels blur for producing complex Lo-Res graphic* displays qufcfcly, Together alternating black-a n\l- while pixels rtietge to a continuous gray. Hi Res graphics On -in VTSC color monitor or a color lelevivi. m ^-r .i pixel whose controlling hit is off KU is black. If the bit is on. the pixel will tie white or a ccJor. depending on ir.s position, ilaj In the Hi-Res graphics mode, the Apple USS dJspJaysai] anttj of 192 rows of Ml pixels on eidvi sid< and the setting of the high-order bit of rhe byte in i-ii il I .kmiic- pi\.t-ls <•: l-iO colored pixels \:>x miuI3lt nc-rukT'.:! pixel* hu - -m* i' Call the leftmost column of pixels column and asMinn [for the mamcmi that the high- the l.ui "lui it i;i kes- two bits in display memory to make one color pixel on the screen; in aider bits of al me data bytes arc off (Ok if ihe bits rlui cootrdJ pi\cls jo aen-mimhered monochrome, one bh nukes one pixel. The colon* available are hhek, white, purple, columns (0, 2, 4, and so forth are on. the pixels arc purple; if ihe bits that control oddk \ green, orange, and Hue. numbered columns are on, the pixels are green— but only if the pixels on bi idl sides of a Data for the Hi-Res graphics displays arc stored in eMier of Wo ti] L ?2-byTe area* in given pixel ati- blmk II r v.;-> .idi;ncnt pixels jre both op, they are both while memory. These areas are called Hi-Res graphics Page 1 and Piisjpe- 1. It is in These buffer Vou can select the OOKI two cnJor.s. Iilue and orange, hy turning the high-order hit | A3 lli< I Bit pixels controlled h\ ihe byte. In othei words, l^-Nes graphics displayed on a cooler monitor of television set are mack' up Black IM S0(» soo soo ocoo of colored pixels, according Do the following rules: Uirprvd *i:S Ml S22 Su 0001 Pixels in even columns can he black, purple, or slue I Brown m - m su 122 0010 Orange sty *s $66 0011 Fixrls in odd column> can be Hack, green, pr orange. Dark green $22 -1, $08 Ml 0100 11 adjacent pixels in a row ife hoth on, they are both white, Lhik i>r,r, $2A $55 S2A 855 0101 The cok fl - i n each n W i W en pixel controUed by a single hyle are either purple an J I s Green SG6 $4C tl9 QUO green, or blue and orange, depending on whether the high-order hji is ofF(0) orondK Yellow S6E S5D S3B $77 Dill Dark blue su 522 $44 $0£ 10IKI lea . i il- suOTiwfeed iuTahle 4-15- The blacks and whites are mimhered En remind Purple sp: 133 Sno $iC 1001 you that the high-order bit is dtffi U|ht gray £55 S2A $55 >:a 1010 Pink Medium blue tSD B3 S3B 577 m 1011 V,l> S4C $19 moo Table 4-15 1 li-Res graphics c - 4< irs light blue S3B 177 Mil S>]> 1101 Aquamarine (77 S6E S5D S.ill 1110 White TF S7F S7K S7F UN A d| ,ii :eru columns off Black 1 alack 2 Even columns on J'urple Blue Double f li-Res- graphics L> a bit-mapping of the low-order 7 bits- of the biles in the iiuin- Odd columns on Green Orange memory and auxiliary- memory pages at $2000 through S3FFK The bytes in the m.iiu- adjacent columns on V-u ! W.ii'.c 1 1«- 1 1 ir-i 1 • r>- ij rvd auxrj3iar>'-mrmi iry pa^es are interleaved in ercit-K the same manner as die eh.i meters in ftvi-colnnin text: Ol each pair of identical addresses, the auxiliary-memory SteM . olflfS 'Mi'. '. .il". . «li pending "ii M^ Lxmmjls im ihe murmur nr itlo isu m W byte is displayed first, and the ma in -memory byte is displayed second. Horizontal resolution is ^i pixels wjien delayed on ,i rnQQOohrorm monitor The peculiar behavior of the Hi-Res coJojn reliefs the wa\ N'l'Si. color television works The pixels that make up the Apple UCS video signal ate spaced to coincide with the I i lik. Hf-Res ii Hor Double Hi- Res color has tut* reslrictions on which colors can be frequency of the color nibcamer used in the STN<] system. Alternating black^nd-white .i.l|.=i em. Color Ls determined hy any 4 .idjaccnt ri'rads along a line. Think of a 4-pfxd-wkte pixels at this .spacing causes a color nionitnr or IV set to produce color, I'M - or rnwe w indow moving across the screen- At any given u'me, the color displayed will correspond while pixels logetber do not ESeotJve horlzonlaJ resolution with color Ls NO pixels per to the 4-bit value from Table 4-16 dial corresponds so the window's position iFiguiv r--Ji line (280 divided by i J. Effective horizontal resoluhon \vith color Ls 140 (%0 divided by i] pLxds per line, To use Table 4-lti. dtvtde the display coJumn numlxT by 4, jnd use the reiium-lri ; . I r. Double fJl-Rcs graphics the correct column in the table] abi'i is a byte residfng jn juxilian- nuinwjiy, corresportdiog [ii ,i retiLiinder of zero fbyteO, 4,8, ,ind so oni. nihl Ls a byte residing in main memory, In ihe Double Hi-Res graphics mode, the Apple [IGS (fisflbys an amy of 140 Colored pixels, corresp. .ndcnfi jo a leuuimderofone (byte I. 5, 9 and so on), and similarly tor ih3 in 560 monochrome pixels wide and 192 rows deep. There are lh cdeics ;iv;iiLiNe fur use and mW with Double Hi-Kes graphics (See Table 4rl6.) Chapter -i The Video Displays ff7 Apple lEcrS Hardware Reference Table 4-17 Bits in the New-Vldeo register Super Hi-Res graphics ik -.i ji:i>i The Apple lies has two graphic modes that am dew to the Apple U family. These are the O'-piv-l :irul i.H'-fn\fl Super Hi-Hes graphics modes, which increase horizontal I'fStilutinn fl Selects Apple II video mode. If this bit Ls fl. all existing tn either 32fl nr 640 pixels and increase vertical resolution to 200 lines. The VGC i* primarily Apple H-cumpatibk video modes are enabled. The responsible tor Implementing the Super I li-Fiw video graphics, which prank these Mega II alone reads the video memoir dunne. ihr Udoii capabilities cydes and generates ihe video. 330* or o4l>pixel horizontal resolution I Selects Super Hhfies graphics video modes. [F this bit is I. all standard Apple H video modes are disabled, either 2HXKHne vertical resolution 320-pted resolution land Color Kilt mode) Of " ': txi i 12-bit color resolution thai allows choices ft 1096 available enjors n.-M'Iniion graphics art- enabled "The selection of 320 oi 16 ec ili m it >r ea ch trf \ he 20 Janes—up to 251 culors per frame ' 1 640 is made in the Scan-lln* control byte for each line, i < .ill- -I Till mode Also, when (his hit Is 1 , bit 6 is overridden, and the memory map Is changed to support the Super ll -Res scan-line interrupts tfraphtes video buffer, as described below. (See die j|| new x kleo mode features, prchgrammahle lor each scan line description of hii o. t line .11 display buffer 6 If this hit is 0, tiie 12NK memory map ts the same as die pixels contained within byte boundaries Apple lie. I If this bit Ls I r the memory map is reconfigured for use with Super Hi-Res graphks vkkn mode; Ik tfdeo The ttrwA'klco register bufter becomes one contiguous, linear address space video mode Uo-Ftes, Kt-Res, or Double HHtes graphics) is from J20O0 through I9PO0, (Figure 4-1B shows the Super When a standard Apple [] When Super Hi'Kes graphics buffer. enabled, the Mega ll accesses ihe video memory bulier-. jnd ^nftacfs video jli -Ken graphics i.i enabled, ihe Video tiraphics Controller has sole access to the video 5 If Hi is hi' i- •. Double Hi-Ko graphics is displayed En buffers. The bit lo enable this access, along wtth the memory rruip configuration switch, Ls CokiTtlHlbv L'JJ, Ifieolorsl. i the Ni ••'• Video register located a $C029. The bit descriptions for this register .ire I 1 If this hit is 1, Douhte Hi-Res graphics is displayed in - slum n in Figure -+-1 Tabic -i-J" gives a description ut' each frlr . hlack-and-tthiie (560 by lM i-l - Reserved^ do not modify. A Warning Be careftl] when changing bits within thh legists Use i ntly a resd- 8 Enable bank latch. If This hit Ls I, the rth address bn lo- modjt'y- write instruction sequence when manipulating bits. See the used to select either the niiin or auxiliary in>. mot] banfe If the address hat Ls 1. iln-n ilv ytmtllan hank is warning in the prelacc * enabled. IAlIlliIK Aju bn n n ihed .is ihe Plh address bit J. If ill:- ,i. I. !-:.---. bit is LS. the state of the memory mrdVuniikMi hutt switches determines which me r> bank is- enabled, See Chapter 3 for description 1 - "i the memory configuration soft switches. Table 4-18 shows how lo use this bit to select a memory bank. The 17th address bit Ls ignored. Sci hie d n h 1 1 wbHuever it^nji. tX^Mt tli-R^ gpaphlcs mode fras is ji^t-^n. to ^rsud: thui the rkkju diM|ilj^ -.m I n i .i .i priipi-rlv Chapter 4 Tne Video Displays 99 Apple Elus Hardware Reference Figure 4- 17 Ni-w-V idei j peg] si e r Figure 4-18 Super Hi-Res graphics display buffet Memory' tank $ei ' c *i Enahfc Suptr Hi-Ris flraphks iiuhJl- — SfflTF LncitiSE Sujwr In-Rm (paphlo nJrn memnn Cnh ii i:f bLiik-jiwi -uhiu- IIiiiiIiIl- Hi-Iks piphfc*' EfttNc hii'A bk i: - 2hpljy An added advantage of the new Apple LlCiS videographics Ls the ability to seleci ihc Sii|>er buffers union chid Hi-fles. graphics horizontal resolution for each video scan line. The 200 scan-line control bytes f located from $93)00 through fl?DC7 as shoi rk in Figure -I- 3 8* conircd lite features for The next three sections describe the scan-Line control bytes, cu3or palettes, and pixel data each scan line. There is one 8-bat control byte for each of the 200 scan lines. For each line, bytes used in Super Hi-Res graphics mode. you can Lhe palette 1 3 6 colors) to be used on the scan line Color Fill mode on die scan line an interrupt tu he geneim-d i>n I fie scan kite either 52(1- pixel or 64iKplxel resolution for the scan line Chapter -1 The Vidro Displays 91 <)! Apple Ih.N Hardware Reference . The sun-line control byte bits and their functions are Itsted In Figure 4-1?, Table 449 gives The location of the scan-tene control fyte foe each scan tint k Sffl "tox, where xv is the a description of each he hexadecimal value of the line F*»i evnrmle. iIk- mr.ii I hin: i-i ihe riw ^in line Nine i» is located lit, memory location $9IXiD; the control byte for the second scan line 1 line 1 1 is in location S9DIH, ami so forth. A Warning Be careful when changing bit* wllfain this byte. Use only a read.* modify-write instruction sequence when manipulating bits. See the warning in the preface * Afore The firs* MX) byies of the 25ft bytes in tlu- men ion p^ beginning at $91)00 are scan-line control byies, and ihe remainfng 56 bytes am nesejved ft* Mine expansion For compatibility with future Apple products, dn mu modify these 56 byti - Figure 4-19 Scan-line conirnl byte lnrm.il P'jJuUL' w!l\! i.r*Jr Color palettes (£9E00^FFF} A color palette Is a group of Invoke m |*< i]i^i:;iu-,l ;-.n Mir -,.m lm- n: line can |".i.. || .v. have one ol 16 color palettes assigned m You can choose die lb colors in each pa lent it. i^. r, nun.. Ir 7 frum an) of the 'iQ96 possible colors. Von can draw each pixel on the scan line m .in) of 1 1 these 16" colors ,-i-ii-iik' inimupt- These colors are determined by a 12-hii value made up i if Arte separate t-bii \ .Hues i 12 Cotnr Fill mi kU: - hits a I bus 2 IJ or 4096 possible combinations Cot each palette color.) Each H-lut quantity - ReKtved; dn not imdih- represents die intensity of each red, green, and blue The conilnnation of the magnitude* ol each of the three primary color- determines the resulting color. Figure 1-20 shows the format of each of these '4«bit values thai nuke up j palette colur. T*flle4-19 Hits in a SL\in- line control Hyic n«-M:ri|ilJLi]i Figure 4-20 Color palette format HuribjntuE resolution - 640 pixels. I'.i-.- Horizontal resolution - 320 pixels. I I I me mi pi enabled tot this, scan line, When this bdJ Is a 1 i - ' : ', .11 ! i"i s the scan-line interrupt Statu* hit is set at the beginning i if 1 he scan line.) Scan-line interrupts disabled For this scan line Color FJIE mode enabled. 'Tins modi' is. available in Super II; I-:-.-. tf-.iph.it* ±1\\ pixel resnlulKHi Lst:l mode. Higher resolution comes wv.h .i slight penally, however: " S.M JS Although in 320 mode j pixel maj be arty of 16 ikws chosen from the palette, a pixel may be one of only 4 colore in 64fl mode. 1 M J $9 2 $2 2 SA The pixel data are located in the dispbry buffer in a linear and contiguous manner; $2000 < ^ .1 5B i : -i u >pi is ai- in ilk' ij-| ..--;. ii ...imcrol rfit display, and S9CF1 , rresponds tod« tower " s. ii $C right cornel'. Each scan line use^ 150 CSAO) byte* Fqjure t-2l shows the format in which the ^ : 1 J Ml pixel culor data arc stored in both [he 32n-pisel and b4Q-pixel modes. 1 v.:> 1 *E 3 17 3 W ' h.ipicr i The Video Displays 95 Apple Ilea Hardware Reference Figure 4-22 shows the display screen and ihe pixels that make up each scan lim:. Also shown Hit tiering are the pixel data bytes for both 640- and 320-pi»el Super Hi-Res graphics mode. The scan- line control bytes, one for each scan One, are shown at the rifthr. in Super Hi-Kes graphics mode using in(i-pi\d resolution, colors other than the available A paiene colors may he displayed lw a means tailed dithering. liy choosing 2 adjacent piv.'l ii Mi. i! in in :: -I -I .iin a third desired color., yuu can forrease ihe numherof hues Figure 4- 22 Drawing pixels on the screen » Fur example, m Figure $-23, when red is selected fonn die available tutors; the scan line appears ax red. Alternating red and ydkra results in orange, and so on. Through the use of dithering as many as 16 t iktns can lie generated. >pi«l mode > 6-ifl Color Fill mode Another feature of Apple! In 5 video graphics is Color Fill, an option dial simplifies the task of painting continuous colffl Oil Hi) One Hoe Gokir Fill. which is available in 320-pixel mode i iN'. % used n i fill mpidly a lar^t area of the video display with a single cotor. \n this mode, color SO In the palette lakes on a unique definition Any pise] data byre tomainin^ the toloi value SO cruses that pixel to take on the color of the previous pixd instead of displaying ; p.ilrrn- . :..l-.;i This mc^is ih.ii.unh H unique palette colors ($1 through $P) .in- available {breach scan line, rather than lo colors. For example, assume that A. b\ and C lepresem 3 different pulette colors. i hits per pixel. These colors do nut include color SO. The desired color pattern for a series of pixel* on a line mignl be .is follows without Color Fill mode: AAAAAAAAAAftABBBBBEBBBBEBCCCCCCCCCCCC The same color pattern Would be created by using Color Fill mode as follows AOCQOCOOQCiOQB&ClOOOODDDaOCOnOODOBDODC! Method 1 would save time: The program only need* to fill the pixel area of the scan line in i '.M]h n. and then to write a color value into those locations where a color should begin age In the example just given, only one hyre needs to he wrinen lo implement each new color on the scan line using the Color Fill method, as opposed lo .six bytes per color without Color I'll I The only restriction of the Color Fill Mode is ihai the first pixel value on a scan line must S50C7 not he II: if the Mrs[ pixel ulue is d, ihcn an undetermined color results. video display screen Chapter I The Video Displays 97 P8 Apple njGS Hardware Men-ntc 1 Figure 4-23 I- s ;Lmples of dithering -- White fori Xlinipilt'il^ ! - Biue 1 ll.uk White RliJ Sdrefinfl ihu red jalrtte nrfcir HI.il- will nsull in j n-d >L;in iim.- IILuk •-. f White \iix\ "--000000000 Scan linr- Mkrijsakflej - bui? -. Ubilk •- White Red MitiiiuIlUx' l- HI-... 1' i - Color - Whig - ¥do* ?! 'iiIu'l^l- 1 i~,fi-i-.C\ hl.n.k - - \Umil- ftrd 'I | "j ',-~l J - Selecting iitlL-nUk' ted utteJ yelkrtv pih.n.- tSllu- «** will r^uh in jr orange *-iti Iim BftaA - I'v-K tfl-ik- Yl'JIuw Sjlllifc- .\:nii|i.knL- * Grew Bind - WT,ik- (ted idiiHfiahnte- -I — Milk i- . Chapter i The Video Displays 99 « Figure 5-1 Sound components In the Apple Ucs Chapter 5 Apple IlGS Sound Uiihiplrwr One of die Apple [1gs computer's nutstj ruling rVjtuivs i* ir.s sound capability. By programming the Apple He*, you an utilise sliis powerful i .nu- EG sound-synthesizing ability; youi ability to generate sounds is LLmiled .. ! :!« it" i-r-- only by your Imagination, This chapter covers the DJgfcd Qsctflatof Chip Afi*uMB (DOC), [tit- individual oscillators, and ihe many registers associated wiih m video video 3 : ' -s .. -. , . tbftst osdflwtiSL Also covered is the Sound GeneFaJ Logic I'mi implirkre (GIU1 ami Mcp II : Jts associated registers FTgme -l shows the retattonship erf the sound components to the teat of die computer, \|- KlmI r nl ' jpjidrjB* duck Me) COtnp rn |lL v ODD ( >'i:ii LullununK'aluifc liSkic i.-nih'lki I VI-.NW . St-rkl St-riil ^(:. .j potlB H iK 14 'M as pon Mob in I x | «. "»:l ik:4 The built-in speaker The built-in speaker is looted on (he left stdt of the baseplate directly below die keyboard j This sound output «fci Ice is used as the primary device tor standard Apple II sound output, and also for die output ol ihc Digital Oscillator Chip. 101 102 Apple litis Hantaan- fefertoce One-bit Mnind The Sound GLU Quite complex sounds can tic created simply by tog^lin^ a hit whose iiuLpuE lh connected to To. program (lie DOC or build a watetable in the Sound MM. you must write command and the speaker. This bit can be >ct jntl dialed by accessing (either reading or writing tni data bytes to registers within ihe chip. This process is facilitated hy the GLU which serves as l-::v.iii-;i-n *C'tfn. '['Ik' !.-:. i i, mi access this lucatiim. the Easter iluj snund hi toggles and the an interlace between the microprocessor, ihe IX3C. anil the dedicated 64K-Jby-8-bfi higher the pitch i if ihe kxukI l \in,« timing U ips in the apptieatii in pn igtarn will a Hi m you to dynamic RAM. 'I jus interface allocs (he DOC chip to run independently oi the rent of the toggle lkt speaker lh any frequency stalling ai jtboul 400 cycles per second Below this system frequency, the speaker clicks on every other access to SG030, The Sound GLU contains [f yuu switch the speaker once, ii emit* a dick; to nuke longer sounds, you access the a Sound Control register speaker repeatedly. a data register a pair of Address Pointer (high and low address) registers # Nqj& if you access this soft switch by using an assembly- language mdexeoVrnode (iiriiii;md, It Ouches twice in rapid STjecesston The resulting pulse is so short that the These registers and their addresses are listed in Table 5-1 and described in detail in the Speaker doesn't have lime to respond: it doesn't make a sound sections that follow. With the inclusion of the I KH m: the Apple Otis, sound generation heeomes much more Table 51 GLU registers sophisticated The following secttofls des rib the DCN and tWs unnpuierV powerful sound-making ability. ULL KfiUtH -.1.:-, Typf S tend Control register v r-.i R.AV Daw Troisier SC03D R tf Address Pointer register, low hjte SC03H R /W Sound synthesis Address Pointer register, hrgh byte SG03F R w Stsun-d is synthesized by programming digital oseillators to produce waveionns that simulate ordinary sounds {musical, human, or other) or generate unique ones These waveforms can he The Sound Control register programmed manually (values placed in memory individual lyl or through i .. I when altering bits in this register. * Chapter 5 Apple Has Sound 103 104 Apple Hits Hardware Reference Figure 5 2 Sound Control register at JOtiC Address Pointer registers When accessing the Sound RAW (hi 6 set to 1 in the Sound Control register), the Address —I Pointer registers point tu ihe address of the next byte in Scwnd RAM. The high-byte Add rush I x x : ! mtjf flj-jj, Pointer register contains the high 8 hits of the Ui-hii address, and the lou-byte register RAM JL-Lcsfl -I contains the low H bits. Uldn-^puink;riii:iHrtiii-iinni ru •.. — w'hen accessing ihc Sound DOC "bit 6 sd m u if\ the Sound Control register It, the high-byte Riam-til Address Pointer register is ignored hy the DOC. and the low-byte Address Pointer register points to the DOC reiiisu-r n i be Written or read fmm. Figure 5-3 shows the formal -I the Address Pointer regtjsters Figure 5-3 Address Fofttter re-gisiers Table 5-2 bus in the Sound Control register DHcrljJEton - h .1 j i ii When rhh read-only btt is L. the DOC is busy. Loop on this Iluli K^ jl Si LI bir unti! ii is dear, When in is hit is 0. the DOC is free. The I H .. II < » 1 a to ic^bEq reads and writes. 1. L All accesses are to the dedicated ChK RAM All accesses are to the DOC. 5 1 Address ;ujio-incremen(inj> i.s enabled. Write operation > Address Jim. -in..:.' iikimiml; is disabled; Address Pointer registers hold the last value. 1 1 . v. i ik to the ["h K or Sound IcAM: 4 _ Reserved; Ju nut modify. 1. Set ihe Sound GantroJ register -- Volume control: SO is low volume, SF is. high volume. n [Q point to either the RAM or the DOC tu enable or disable autiHnaemeniine. in the Address Pointer register* 2. Then load die Address Pointer register with the beginning location inn whk > Ii data am to Data register be written Do this by writing the high byte til the address to the htgh-byte \.!.!n ss Pointer register at (003F and the low byte ot the addros to the low-byte Address To load values into tin- DOC registers, write to die daw register at SG05D Von also write To Pointer register at JC03E (his register when you warn to place values in Sound RAM If die Sound Control register is set i ' . i <•, written to the .l.n.i regfctei '.'.ill be transferred by the Sound GLV into the i«! access the DOC writes to [he data rosier will result in data bytes" being loaded into the corresponding memory < if you are accessing RAM I -i I N H register i ii you are accusing the DOC registei indicated hy the Address Pointer registers. If the Sound Control register is set DOC i. to access the Sound tiA.\l, writes to the data register wffl result in data bytes" being loaded mi:' the Sound RAM address Indicated by the Address Pointer registers, It* the auto-incremeni feature Is enabled, i he Address Pointer register Is automaticaUy incremented to the nest higher hoiion or the register with the he** higher address after each W.ilf :: ilk- d.il.i ri'-islU UupurrT Apple lies Sound 105 106 Apple UGS Hardware Reference * Atote Do Got lisc indexed addressing mode when reading data than oi Writing data to the DOC registers common lo all oscillators data register. Indexed addressing mode ^ener-atcs a false read, which will cause i III- lound GLU lo lose ayttchranteation The Uscillator Interrupt repsler ($EQ) Thi* regigef contains the status, of die 1)UC interrupt request (IRQ) pin and tile number of die oscillator dial generated the interrupt, if any. Then an oscillator reaches die end of it Read operation waveiablc .tod the enable interrupt I El) bit for that oscillator has previously been set, the IRQ line and bit 7 of the Oscillator Interrupt register are then .net. and the register number is The Sound RAM read operation is thu same as the ^ rite upcrau'un with one exception: Reading from ihc data register Lags by one read cycle. For eEimpIr ir m-u ivim tu read ]' :r.h'iL-..l in hits i through 5< i the OsdHatoc IrJerrupi register Frgure M shows the forma] OJ the Oscillator Interrupt register. Tahlf vj gives a description of each of the bits. bytes from the Sound RAM, seleci the RAM by settij^j the Sound Cnnir- :l register bit and enabling auto-incrementing. Then set the Address Pointer noisier to the starting address and read the data register ] I limes, dtscafdfrig the first byte read Figure 5-4 Oscillator Imcrrupt register at SEl) iXill.ilnrriMnifctr The Ensoniq DOC ""I The Apple Hcs jses the Ensoniq 5503 Digital Oscillator Chip, a programmable sound tmnnip! ocmncd - synthesizer chip with }2 independent osciflators, volume control, and digi^hdng capability, Reserved; do licit modify - Tne synthesizer uses 64K of RAM dedicated to sound waveform Morale, and mfleifaces with the 65CSI6 microprocessor via the Spund GLt) Commands and data are ir.nisfeTred 10 roe DOC via the GLU, and sound is output via (he builnn speaker, external speaker |ack. or DM tot li ttinectt nn ir . 1 .M 1 k a rd : 1 1 1. 1 1 1 1 I , i, The DOC contains three registers mmon ft all cedBatm, These arc the Oscillator Interrupt registei CfBQ] the tiscillati if En a & c regl stet [f I I I BiSifVi.iJ: <:a The A/D Convener register (SE2) SOB $03 sm SiH S6B $sa SAB sch $oc IOC szc S4C $6C sac SAC sec SOD SlK s:d s+n SSD SAD SCD TTir \ n Ci inverter register contains me output value of (he .sucecssive-upprioximation $0E $0E S2E S4E $6E SHE SAH $C£ iinislu^-Lii-di^tuI converter- An aralog-inpui sjgmi can lie sampled tft pin of the ""-pin moles I $AF $CF connector QlS) The result df the conversion resides in the A/D Gofrvertej register ;le the Lnnipli'tJun : ihf i.onvefaion Heading this register at SE2 initiate* the 3i-mlcrosecoad S0>" $10 $11 $0F $10 $11 S2F $30 $31 S4F $50 $51 $6F r-i $71 S&F $9<) >"L m SB1 >[hi SDI conversion process. $12 S12 $32 S52 $72 ^'12 SB2 SD2 If this register is value ftiU be lost and a new conversiun will begin read before the end of the ooiivensAcm process, the H. $14 J , $13 M W $34 $53 -i $73 $74 S93 >-n SIH SH^ SD3 ii)L $15 $15 $35 $55 $75 I95 SH^ ^[>> $16 $16 >.. 156 $76 m 5HC» SWi DOC registers for individual oscillators $17 $17 S1H W i" ns $77 $78 $97 $98 SB7 SPS $[>7 $D€ $18 $19 SI A $19 S1A ffl m $m $59 M.\ $79 r\ SW m m SEM ,|N SDA Table 5-4 contain* the ytUlrttSes for the redacts dedicated to the Individual osdtlators $1B SIB $3B $5H S7B S9B 5BB v»M SIC i\C W. v... S7C $9C SBC $DC The Oscillator Control registers ($A0-$J*F) I ID tlD S3D $5D $7X3 $9D SBD $DD SlE* HI $3E $51 $7E (9E SUE $DE Ml" tlF ysr S5P S7F S9F SBF SDF Each Oscillator Control register controls all functions of etch oscillator, inducting which of L'ij^ln QpttanaJ external analog multiplexer channels .m i isciliarjuf will use * IliewcscilhmjrSiirt i\"h. i\ l-I rm , ^.-1:111 uv '. ^- ul ilu-M... niiii.ir- It, i iln. 1 user pay n.'>i:ll - whether or not an oscillator may generate an inicmipi tflsh. the oscillator's mode of operallon The oscillator may function, in one of seven] modes; Free Run mode: The usullaiur begins it die be^Mlig of the wivetabfie kind repeats the mot waveLnhlc. The osdliator will hiitt when (he luil r \»\ is sd 1 ir n hen 1 is ertcatintered in the taNe sJjIil Chanter 5 Apple HGS Si m ml 109 110 Apple ElGS Handwiire fteferenee - Table £5 Kits in the Oscillator Control register One Shot modei The oscillator begins ill [he beginning of tht- w&VetablCp stepping through il only once, and stopping at the end of the table - Value I V-v I 1 1 I Sync mode: You enable Sync mode fry selecting even odd pairs of oscillators (a lower evm-nu inhered asdliamr paired with an adpeent higher-mmiheTcd oscillator?. When the "-, ( h uiiiijl address bits Only the low ihrec biLs are supported even- numbered oscillator hegins its wd viable, (Ik- odd-mate ribcillator will synchronize by the hardware Hit* ""-i ilerermine to which and begin iis wavetabk simuh;irW'.:.i-b d>. kiplexer ouiput channel (provided \*\ uptiunal Swap mode: Uses even/odd pairs. oF oscillators (a lower even-numbered oscillator pa lied external demultiplexer hardware) ibis osciflalor will lx- with an adjacent higher ntU-mmihered jscillator) The enabled oscithitor pair runs in One i directed Connecting a demultiplexer to the "-pin mole* connector wfll allow you to use up to eight separate sound Shot mode, Wlien it reaches the end of its wavctablc, it resets lis accumulator ro 0. sets channels. Figure 5-10 shows an example of hoi the t-NiemaJ Its halt bit. and dears the bait bit oF its mate- demultiplexer circuitry may he implemented, Figure ^5 shows the 1'urmat of this register, Table 5-5 gives, a description oFeach bit. Interrupts enabled An mtemipl Rag will be set in the DOCi Oscillator Interrupt regies and the IX3C will assert the TRQ .signal when an oscillator generates an inierrupt. Figure 5-5 Ostflktor. Control register Interrupts disabled; The mMu.pr 11. ig will noL be sel in tbc Oscillator Internipi register when ,m i isolator generates an Chinm'l address interrupt J- Oscillator mode; Sekcl the mode desired by selling these two bits as follows: Btt 2 Hit 1 Mod* i " Free Run t One Shot l Sync I I Swap Hailed oscillaton This is- A read write bit To halt the O^HI.iriiimr.imJpCtfyhle Oscillator, set diis bit Certain modes CSync, Swap) will hah the oscillator anil set this bit automatic. ilk alter DadlfciKir mwta — completion. Running oscillator: This bit is cleared If die corresponding 1 JiafeLtxJjusfillj.1i.ir— ..-. . I.iiur is currently enabled The Oscillator Daia register* (SoO-S^F) The Oscillator Data registers are read-only registers and contain (he last byte read by an oscillator From the wavetable. The Volume registers ($40-$*F) The Volume registers cuntatn an oscillator's volume value. The current wavetable data byte Is multiplied by the fl-hii volume value 10 obtain the Oscillator Final output level, Chapter 3 Apple litis Sound 111 112 Apple Ugs Hardware Reference Tabic S-6 Hits in ihe w'avetabk- SiA regjtaei The Frequency High and Frequency Low register* (SOO-SjF) I •' -. ( i| i , The Frequency >Mi registers and Frequency Low registers are ci mcati-nuied to create a 16- bi( value fur Kiel oscillator. This frequent y v^Buu determines the speed at which the i Reserved: do not modify. wavctablc is read from memory. This spend indirectly determines the frequency of the output signal at the speaker. The relationship between output signs] frequency, wavetable Extt-ndod jildrfSMiv^. Tlu \pyik- IJi> usesofllj ihK far the Sound RAH and his no high merrion lynk .n jiLiMc scan rate, and the Frequency Hifth nrwl Frequerw j Low register values is Therefore, tins bit must always be set lo 0. SB Table- size: The wavdabk^ niuy extend up to ,12K in size, Output frequency h ni. 5^3 ?ir+K ^j but in discrete steps only. Wavetablcs- must bejn'n un a page boundary (S0OD0, SODOO. and so forth). Tabk 5 894.B8bKII/ where the .scan r.m- SB and where RES is die resolution vthie in the w'avetable shows ihe possible sizes of wavelables Unused lunik his QSCt2 within a wavetable should begin with a minmium of eight FHL Ls the lu-blt frequency value concatenated from the Frequency High and register. frequency Low reisers, and OSC is the riumlXT uf eruNeu iisdhikir?. zeros. Otherwise, ihe osciHatoj will noi I ".air when it encounter* these bytes and will imerprct them li-. d.ii.i J->> V.kln. ^ bus resolution: The wavetable is played back h) The Wavetabte Size registers {SCO-SDF} using every byte as data, or only intermittem bytes, aji desired TTie address resolution bus determine whether or The WavettUe Size registers contm! the shse of (te individual wavetable each oscillaior will not every byle Lh used during playback, Figure 5-7 shows access. Figure >o shows the Formal of the Wavetable Size rosier. Tahiti S<6 gives :i how these bits effect wavetable scanning. description of each bit. The size of the wavetable for each osdUatOf can vary from 2% bytes to32K in eight discrete steps, a* shown in Table 5-"?, Figure 5-6 wavetahle Size reglste* Tabled Wavetable size determination nit * , TiSlv *\tv ftbfe'dlc ri^.'l 2^ 512 1024 RtrHtneiJ; dGrjotraodily 2048 Hi.'-ltt l-c. rmsl he — 4096 8192 lf>384 32768 Chapter S Apple to Sound 113 114 \\*p\v IlCS Hardware Reference Figure 5-7 Final address calculation in the Wavetable Size register The Wavvtabk Puinitr rtgbicrs ($BM9F) Final address This scl of registers ccmt&Eite she beginning pa^e number of the oscillator's wavetable. All Ali A t4 Ali All All A10 AS Afi A7 Ab AS A4 A3 ti At wavetabfces must begin cm a psige bouodaj} (that is due ftrsi byte of (lit- pa$e) and cannot wraparound io low Qietnof) addtesse& The value in this register is used in '.he final address n^iMalilh HryiluiKH! :':iii.I.i AtLumubUir hit R2 Rl BU calculaiitm. - A2^ A22 AJ1 A30 APJ AJS Al \- I 9 1 Figure 5-7 shows how the final address that is Lined to obtain the nexi wavctafole data byte is Ali A-J ihniu^K I I (1 calculated, The bits from the accumulator and the Wavetable Pointer rii^LstL-r ire a:i ihnnjjjtly AM I ',' I enncaiemited in a vajylrig ratio depending cm the table me m\l .kMu -v. Im*. i^-.-.hIilIm>ii £20 ihmujcJi All mi. Sue register. II ie final address \s used by the DOC to fetch the jsci Vh Pt P-t P3 PI PI PI) AJ9 — " A « I :-i-v i'i il-i- s\ n.-: ihk' neu wavetable data byte I"t convention to .in analog value hy the di^itako-anabii Al» — lliriiuKJi ihrut^dl All I I L I W7 ihmuflfi UN I) | convener, yj (hniu^i A9 It u I) AZ5 Elm m uti I I i Utrc^h - tlmJtifih Making sound with ihe DOC |i ..i-l, - The oscilbtor.1 m ihr l'n>i: -.uy w-. n^-iLiim* m the traditional st ose rj.i^l r - ifaej pb nut generate a 1 1 1 i I tone Losteadj each osclDatar ;*ct> as an acktes generator pointing to a data byte u- l'i-.'i;j|, t Sound RAM 1I1.1I. toother with udiers rcpieM/nts a sijinal that Ls la he generated The data r M* liipuufih At? I I hyie Ls then convened to an analog voltage by the digital-io-analop, converter. These sequential series of voltages make up [he output signal, which is then filtered and amplified JliMi P7-" ihFjuRh PJ and used to drive a speaker, Alfi |"iiini|;I .-. n The data restd&lg io tile Sound SAM can k placed there either byte by byte, by manually li ii «,;. I- • Ml liutlume, the wavetable Unal-aiul-enur method worits He^t here; in' j sound, and mudiM. n 33 * 7 1 HB6 I ihruiij^ P4 you prefer), ^r by filling, memory with digitized input signal. Mn — a. ihmu^li A5 - M II The waveshape nl ibc signal ts detcimLncd by the actual values (if the data bytes that rnaku «3 ihruu^h. I L \ up the I'vavetable. The pitch of the signal e determined In the speed with wbii h the svavetaNe Ls scanned by me DOC. This scan rate fedie waloe contained in the \Vau table Size j P? P6 Pi register oJ each oscillator, and is arrived ai by using several lectors. Figure >8 shows die ALft In ii L! process used to calculate the scan rati:. As shown In Figure 5-7 and Figure 5-8, each address's U3 thnmj^i - W>\ I I I calculation \s determined by the Frequency High and F';l-..|ui im :.. n. -\w>. r- :m.i :h<- :_ Wsvetabk Size te^sier (made up of table stee and address bus resolution data) associated lt.J&t l hti with each oscillator. AH. rl.r : > 1 VJ n -I •; A2A d*rtni>tri .- IZ76S AM. tkuuRh J Chapter 5 Apple l It ;ssiu nil 1 15 116 Apple lies Hardwire Refen-nee HKtire 5-8 GcneiuHnu rhe sound addresses Digitized soundwaves are built by using consecutive data bytes i known collectively as a wavetaMe> in dedicated Sound HAM. Each nf the 3- oscillators reads ihese h\tes in sequential order 11 a speed thai is programmable This speed determines the frequency at which the waveform ts reproduce^ wink- the actual data in RAM deteimfne the shape of the frequency Hij>Ii .iiitl output waveform The volume lor each osiilUtur is ;ihn programmable. T T Figure 5-9 Combined ouiput of timeslbmaih multiplexed oscHkiaia ; 4-1 ill ,i. Mir OwJljtur i.i- ll.in • (hdllakv . -T nr J ir bJ L_ Address .K.n-,iL-rrLfji.f|(?r 2-t-hil jLLunuiUii ir I Tuvt-uhlLii^ihiLi I ftikftCM hiL rnulUptfs.iT I .ihk- m/i I : --> ; ill 1 1 ii hi Lifn !" I in addnSS ir|iill JHlffLT I h _, address calculation Ls performed 3ike ink Each rime un oscillator is updaico* with A nett address, the 16-bit value from the Frequency It^li md Frequency Law refers is added to die 2-t-Mi atxtimulator by the adder. The 24-bll result Ls abo pawed to the address bit multiplexer and is used to farm ihe final 16-bii Sound RAM address Thje resolution Karueift ihe wavetahle Size register determines which oFthe 16 bits within iJic accumulator in used in ihe adduces calculation. The obfesae value in [he Wavetabte Size register a]** detejmiries how many accumulator hit. will be used m calculate ihe final address The 32 oNefllaturs are lime-domain multiplexed llul to, the r>i £ sewji es eat h QScfcor id its turn. \\ 'nli nil oscUlatots (.'rubied, ihe DOC taks approximately 3* microseamds to sendee ill 53- Figure 5-9 shows an example of a sli^tiliI resulting Irom the combined output of 4 I DSdftgtora. -Iii-i signal i s then Altered or smoothed, to remove the high-frequency components, leaving onlj waveforms in the -judio-fwqiiency ran|te- Chapter^ Apple ]JGS Sound 117 1 18 Apple IkiS Ha pdwsre Retereftce ^ FiKunr 5- 1 u A ft o-chanhd dcmulttpte ster rcuft Sound input and output specifications Th* "-pin mole* connector b used far Sound input and oatpu! to and from ihc Apple litis. Tilt' ekctrkaJ speciEktUkwis sor thoe inputs and output* ;ire I Ned in Table S-K. AjuIu]" oiiipui 1 i |'ii -i ni" U.UHKdjUffJ2i Tabic 5-B Sound input and output electrical specifications for connector J-25 MRiial Pbi Mdratanwm 1 run Channel t LRJlpitfl Eci A/D converter input I 2,5 Vohs peafc-io-peak. full- I- .,!. |\|- scale convrreloa lilti-r fnpUl iili|X'd:nlif I 3P W0 ohms .^naJup, GND 1 - - Analog output --, |M -, Volts pcak'to-pcak 3 Qui put toad 3 10,000 ol m w minimum i iumv.l address i 1 LVI'IL load " h, el address I 5 1 is m. bad Channel strobe* fi ] LS TTL bad CAII - frum pan C.lunrii'l -IvIvLil^-h 2 1 LS TTL load * Channel StfOt* jjn** k*W v.hcn iht- cha iukI .id dree Is vaJ id I ": 5.L6 II*- ; -l" shows -in euutplc of a demultiplexer circuit thai can he designee] to produce stereo (tWD-duitfiel) sound, using the analog nutput Frcmi ihe DOC Tile sxnind mil put ji pin 3 will he demultiplexed according; la addresses suppled by pins i, 5, and 7 fliese addresses are those specified by each OScflLafct Control register, A more complex circuit could httndk as man) m eigln unique sound channels. For correct sounds, ha rmel demulliplextng, he Mire to Further reading sei me channel hirs in each O.seUlaior QmtroL register do the appropriate value. To learn more about .NvnLhe.sized music and sound, you may want to read ill is hook: Chamherlin, Hal. Musical Applications of Micmpmcmafc rtasbrouck llei^hu.. MJ, Berkeley-, CA; Hay den books, !9H>, Chapters Apple Ikis Sound 119 130 Apple 11(55 Hardware Reference FiRUrr 6-1 AQH components: in tKt- Apple ffGS sl-l-, e i S Id Chapter 6 The Apple Desktop Bus 1 i.inv n n The Apple Desktop Bus (AD3) is a mtiriad far ctimunini> input devices llfllLlkir ' j. — \ ' 'hi-Ji .is j keyboard or 3 mouse) with the Apple flcs computet The Apple Desktop Bus consists of the adh <;i r. rk- -\1>H ftifcrocfflirrofleT chip, and the Apple Desktop Bus cables Figttrt &4 showa die Aiuliii| Htill. ruljEii mshjp of the ADH components in the Apple HtiS computer. hi in UHKnr feh -|VJt.-.I The ADB micnjcnnffiilltf ctmifota devices on irw bus by receMrtfl n n.mds from the 65C8I6 rrtJcrnprocessar, wd then sending approbate U iB a lunds to jnd receiving dm from the input devices on the bus. Micrw^nitallef commands (those received fmtn the 65C9]6h are located In ROM. Figure 6*2 shows th* reLtionship of ADH l umponenis in the host computer to (he bus devices (keyboards, moiist- devices, .and so am 121 122 Apple EICS ILmJvurie Reference i For [he remainder of this chapter, die compute r ft ill he rerermi i<> ;ls ilu- host, and the input Dotal lor ull deities. All devices are Connected in parallel, using ihe signal, power, and ground devices (for example, a keybounJ or a mouse connected to the i I us as device* wires, tjhk's sbedd be no longer than 5 meters. :md totaJ cubit: capacitance should not exceed LOO picofarads per meter. Figure G -.2 ADB enmpi men Is Figure 6-^ MirH-DIN cotmector pin configuration used in the W IE H(i*l conneaar Tablet! Pin assignments ol rlu- AD8 connectors la-. ii|:li: 11 Data Unserved *^voJt power supply at 500 mA for all devices Ground keep compatibility with future Apple H products usinjj the ADD. use the Apple AlOte "hi IV.^op M.is Tcki-I Sl'c m l!OU. Dinxth accessing some of the ADB register* miLV cause die system n.i crash, (Fur more information on the \!>K Tool Set, refer to ihe Apple lies The keyboard The keyboard uses the Apple Desktop Bus to cot rilcate with the processor AJI inpui devices are connected 10 the ADB and are controlled by the keyboard rttfciocoflttoDer. This controller supports reading of the keyboard by standard Apple 11 application program* The Input bus Tlie Apple JLtiS keyboard has automatk repeat, which means that iTvoii press am key longer All IriptrJ dei Ices shart I he input by- Willi the hiM. This bus ci.msi>i> m| .1 t-wurohle and than yon would during normal typing* the diaacier code for that ke\ will be seni Uses -J-pin mini-DIN jacks at the host and at each Lifxke. Fi^unu i>3 shows the pin continuously umil you release Lhe key. The speed at whidi the key repeats, .md thedefoy conrigurauYm of the ADB connectors and Table d-l lists tin.- vk^ L rip«ii::ii ..if i.irh pin. Aim before n repeats, may be set from ihe Control Panel. (See the section "Modifier Key devices may use the +5*volt power supplied by the hus. lH.it must n<>i draw more than ^00 m.\ AegtacrV later in this chapter, for more hifonrmtion.) Chanter (1 The Apple Desktop Bus 123 124 Apple IHi>- Hardware Reference . Any number of nuidiiier keys fflaj be held down and m additional feey prised will be Your program can find out whether any key is. down, except the Reset. Control, Soffit, Caps recognized. Thrs is called ft-key nrffot'er. The alphanumeric keys do not have dn's ability Any Inck. Command, and Option keys, bv reading from locatiori 49152 (SOQ00V The high-orde? two alphanumeric keys pressed simultaneously wiO be recognized, A third key pressed will bit (bit 7) of the byte you read at mis location is called tmp-tey-dottm; it is. I if a key is down not he recognized. This is called 2-kev lockout and it no key ls down, The value of iliLs bit is 12H; if a BASfC program gets iln's informaii m with a PEEK, the value is 138 or stealer if .nu k". i* down, and less than 128 it* no key is Apple TIGS computers manufactured for sate outside the United Males have slightly different down. standard key hour J arrangements. The differem keyboards are shown in Appendix B The strobe bit Is the h^gh-order hit of the Keyboard Data register. After any key has been pressed, the strobe hi? is high. It remains high until you reset it by reading or wn'iin^ lit location SCOItt. This location is a combination ftag and win switch; the flatf itlls whether any ADB and Lhe upgraded Apple lie key is down, and the switch clears the strobe bit, In (his case, it doesn I matter whether the program reads or writes, and it doesn't mailer what data the program writes: The only action The Apple ll< i>un k use J with a standard Apple lie Li-yhi did when an Apple j lie Is that occurs is the resetting of the keyboard strobe (See the Apple fe f inninm< fltyglmta : upgraded with an Apple fjGS. logic board. The Apple He keyboard in dien used as Lhe primaiy for information on firmware for reading ihe keyboard, i input device, rather lhan die ADB keyboard. The Appie He keyboard is read just like the standard kcvlioard in an Apple tie. and is nol subject to the Apple Desktop Bus protocols. * Note Any time you read the am/-kej -dow n Hag, you lib i . lea the kevin ard strobe, U your prognun needs to read both the Dag and die strobe, it must read ihe strobe bh first. Reading the keyboard After die keyboard strobe has been cleared, ii renmns low until another ki is pressed Even j ;ifter you have cleared the strobe, you can still read the character code ai the keylxwd The ADB microcontroller genemtes .ill 128 ASCD codes so all the special character codes in location. l"he data byte has a different value,. became rhu high-order hir is no longer set, but the ASCtt character set are available. Application programs obtain character codes Jroiu die the ASCII code in the seven low-order bits ft the same, until another key is pressed. Appendix keyboard by reading a byte from the keyboard data lucaiion shown in Table it-1 (the D contains the ASCII codes for the keys on the keyboard Keyboard Dau n_-u>Lcj.i There are several special lurn.iion keys thai do nm generate ASCO codes. For example, pressing the Control, Shift, or Cap> Lod< ke\ directly alters the chantctei codes produced Iw the other keys, tn the Apple UGS i"ii can at ferorJoi the slate of these modifier keys k Table ft- Keyboard Data locations reading the mmlifWr key register wfthin lhe Al>b mfcreontrdber, described later in this chapter. DtKfftHll The Control -0 insula nd-Reset ke\ combination is ditferent from all other key combinations on the ADB keyboard in that tl generates a special key code, wlien lhe ADB iiiiLHs.ciioolliT SCOW 49152 Keyboard Data register and strobe detects the resei kv\ innibinauon. the program currently running in memory is halted and die SCD10 49166 Any-kepdowo Hap and chrar-strolsc switch system asserts the RESET line and rest trts the computer This restarting process is called the mei miime, (To read jhuut die resei rouiine, see the Apple tkft ftntmmv Referent. Your programs can get the code tor tlie East key pressed by reading she Keyboard Data register located at fGOOQ* Table t^-1 gives this location in two different farms: Hie hexadecimal value, indicated by a preceding dollar sign ($>, is used in assembly language; the decimal value is used in Applesoft BASIC The low-order sei~cn his ui lhe byte ji the keyboard dam location contain the character l'hJl'; the high-order hit of Jhis bjrte is the strobe htfl, described below - 6 126 Apple lies Haidwrare Reference ' 1 1. 1 1 ! i Tl le Apple Desktop Bus 125 AM Command/ Dam register The ADB microcontroller The ADB Command/Data register is a dual-function register used K) communicate with ADD The \l}[] niiuinnnrii.lkT is jii iniucheem uontroller tt: thai oversees the Apple Desktop bus. devices. To send a command to a device on the bus. write the command byte 10 this register The R45074Q trrlcrocorilroDer use.s a superset of ihnu 6502 nnin. Hon set, jnd conLur.s w* kk's j ai address $0026. To check the status of an ADB device, read this register a i the same of SAM and 3K of ROM. "Hie ADB mtoocontroller operates asynchronously, iraiismining address, Figure 6-i shows the format Di'ihc ADB Command Data register when it is rend commands and data to and receiving data from iIil- bus dm Idbs, lb ensure Compatibility Table 6-3 gives .1 dcscnption of each bit. wnh :uiure utmijiis of ADB. list the ADB commands in the ROM toolbox to ramffionicaie wim the AHB To tod nut how to use the toolbox in tht- system ROM. tee the Apple flfcS Toolbox Refewtcv. Figure 6-4 ADB Command/Daia register at SCU26 i Respite -MlM-- The ADB GLU Abort.- LTELSTH fltudi Thu ADB General Logic Unit (QUJ\ works together with the ADB rnierocoruroller to form an Rt x.T hey ^xjufix* — imclligunt input-device interface, Hie ADB GLi . located on the uuhi Ipgk board, uses two HuHL-r ilu^fi k^ sequawe - 1 indepundent data buses [hut serve as a communications interface between the ADB Savior ctfqpesf hjJid— ' nucroconcroller and the system Kk '['I lis interface is accomplished by using multiple iiik-rn.il read write registers to store key hoar J data, ke} modifiers, mouse X and V coordinates. command daia and stains Information P S 1 1 .! kCI i :t il.u .i tsyie* rrHimnl — Keyboard Data register The ADB GLU regjsiers The Keyboard Data register contains the ASCII value of The hist key pressed on the Thu ADB GLU contains live daia and tommJ u £i.su ^ These registers aru used for Muring keyboard The high bii Is set when a new key has been pressed, Figure 6-5 shows the format keyboard da<:i and commands, key modifiers, mouse X and Y uunrdi rules, and flatus of this, register, Table Ch gives a description of each biL in Inn rial ion. The rubers li i ADB Command Data register ESC036) Figure 6-5 Keyboard Data register at SCOOG Keyboard Daia regtstei fSCOOO) M.-.liliu: Kuv register CSG>25) ASCII cude Mouse Daia register ($CC24) -v T • ADB Status register ($0)27 i. 5 i 3 J II Ul register except the status register* have a status IU^ that Is set to wniLun lo. and cleared to when the register Is L when thu register is read. Each of the data registers also has an : tnturrnpt Hag that tfenerates system interrupt*, if interrupts m enabled rhese status and interrupt flags are baited m ihe status register These registers are described in the fotkwina. sections chapter bit is 1. ihe Control key has been pressed. is listed here when this lm fcs Q, the Control kej has not ken pressed. II 1 to lien this bil Is ] the Slut! key has l>een pressed. When this bit is n, the Shift key has not heen pressed. Tabic M Bits in I he Keyboard Data register DcHripiiau Mouse Data register This bit is J when a key has been pressed, and indicates The ADB mouse, when moved, generates movement data that aje transmitted to the host. that ihe ASCII value m hus fi through are valid This hit . along with the mouse button status ate available In ilu- Mouse Data leister. miLst Ixr deartd after reading the data hy reading or Figure 6-7 shows tlie format of this register Table 64 ghes a description of each bit. Writing to any address from JQQlO through SCOtf. - II A M.I data from die keyboard. I \n,v Read il Es. registt i orib, twice m succession The first read returns Y-coordinate data, and ihe second rend returns X-coordhiate data, Reading dik u-lKv.t an odd number of tinier will result in it random nit cement i if ihe cursor. Chapter 6 The Apple Desktop Bus 129 130 Apple Tlt;s Hardware Reference . 1 Figure 6-6 Modifier Key register ,n $1 (25 ADB Status register "Hit ADB Statu - register, lueated at SC027, eontains flags thai relate to mouse and keyboard -1 data and status. Figure 6^S shows i he format of the ADM Status register, Tahle is- ] gfyesa AppJektT. dnwnj description of each bii Optlnfikti 00*11 Figure 6-8 ADB Status register at SCQ27 L'pdilttd mndifitf ta\ i.ik i. — Keypad key demnn — l Hepeul lundkin — House UULi noisier full — GqH Ik k kcydtftffl Mouse itwt^i;y erahk di-Jik- — Control kfs dcroo - J — Shift Sect di ivvn — I'.il- ii JnlCf full Djti uHnrjpt ejuhle di.\alikj Ifeyboartftaia registry] • Figure 6-7 Mouse Data register M 5C024 Keyboard Intern^ enable di-ufoe — MtiiKt X- and Y-C™nJiiuile re^itf m avaujlile — MtMlMMTM Hl:II II I ll Gjmmjnd je^i'JtriulL— TV Table 6-7 AOCi Status register Quiwurtainsuiu* — Bits in ill*- [ii H;ri|i».iiui When this bn b I, the Mouse Data register a! SGJU4 is full I read-only bit) Table 6-6 Hits tn i Ik- Mouse Daia register When this bir is 0, she Stouse Data register Ls empty. Hc-wrtpiicifi When thLs Nt is L the mouse interrupt is enabled in.'Hd wrhe. bi[i. and. an interrupt is generated when the Current mouse status-: When this bii Ls I. the mouse button Mouse Data register contains vaHd data. is up When this bit is 0. the mouse interrupt is disabled When iMs bit Ls (j, the mouse button \> down When this Nt is 1 1 1 : •. Comrnarid f>ati register contains valid data i read-unit hfij •:ii hit; if this hit is I, the delta value is. negative. If iliis hit us Lhe delta value Is positive When ihi> hit is 0, the Command- l):ua register contains no t valid data. >0 "J'hu relaiiu- muuse riUHcment d;il;i are returned here. When (Ins hi Is 1, the Co tnd/Data interrupt is enabled tread wnie bit*. ;ind an interrupt i.s generated when the Command Data register contains valid data. Chapter IS The Apple Desktop Bus Bl Ii2 Apple Hgs Hardware Reference ' Tsblt 6-7 Bits m the ADB Status register < Continued* Hgiurr 6-9 Bii representation via duiy-cyele modulaikm IV-.M-i|.lh:.ii OulVLivie<3iS d hi-n.41 tiniL- III I Ml CI'll lUIK' Wlitrt litis ii-it is 0, tlte data interrupt is disabled, ftpnesenbO When this bit is J the Keyboard Data reg&er is lull only bit). Tills bit i> sl-i when the Keyboard Data register ta i rend- rh ^-^ written to When this hn is l), the Keyboard Data register is empty This hit is cleared when the Keyboard Data register i- iwd or the ADR Status register is rod, When tins hu is 1. the keyboard data interrupt is enabled (read write Jiiti. and an interrupt is generated when Tilt Keyboard Data register contains valid data When this fut ik M. i III' keyboard data interrupt ls disabled. When lbs hi! ls a 1. mouse X-coordinaie daw is auilaHe Commands and global signals tn ihe Mouse Data register (read-only hits Ckmtrminjcalions on the 1hi> arc of two types: Cnfnmands that are M. ni by The bos! to a j When lKLs bit is a D, mouse Y-coordinak- daia is available specific device, am! global ^nals that install all del lees lo perform a predefine*! function. in the Mouse Data register* i The l'iur commands in uV ». 1 1 1 .. I stf are Command register full (read-only bin Thi* hit Is set when the Command Data renter is written to. Listen Command roister empty. This hit 15 cleared when The Talk Command. Dara n,-| read Ik-vice Reset flush Certain signals, however, are neiiher commands nor data transactions. These are special signals that the ho** nr a device uses to brmdeast status globally to ..ill devices on the bus. There are tctursignalH in die global signal group Bus communication Attention Sync The host communicates wiih the devices on the bus by sending commands and/or data id a Global Reset device, A device may respond to commands bj sending data hack to the host. This form of Sen ill- - Requejfl communication us< - r.\ each making up a packet. A data transfer or transacu'on consists of a complete ci'mmunieaiion between die host and a device; for example 11 ma} The following paragraphs describe I r M h ol these device commands and global signals. be a uommand packet sent by the host tu requesl data From a device, followed by a data packet seni from the device Do die hofl Depending upon the type nl'eommand st-ni trj ihr host, roe device will send fwom e*ghl data bytes kick Transactions Figure 6-9 shows how duty-cycte modulation ngwesents bits on the bus. A low period than 55 percent of the biHeli time is interpreted as a 1. A low period of greats than 65 A transaction is a bus kiimnuiniuuion betwrcn die host and a device, or •> Ice versa, A percent of the bit-cell time Ls interpreted as a il command (listen, Talk. Device Reset, Flush) initiates .i transaction, A transaction consists Chapter b The Apple Desktop Bus 1J3 JJ4 Apple IIgs Hardware Mi u iv. of a command packet sem by the host t'ulkmed hi,- * data packet of several bytes by either Tabic OH ADti liming speeiftcadorts the host or a. device, A command packer consists of an attention/sync ^tgnal one command byte 1: bit-cell time 130 111 ico seconds one stop bit w time :i.i 70 percent nf bit-cell time A data packer consists ol T low time v. 111 percem of \-w-><\\ time Aircniii m 56C 1040 microseconds a start bit Global Reset 2. - J mtllisecands tttb to eight (fl-hit) dain bytes Sync :,u 70 pereem of hh ceD time Sendee request 140 J:-. microseconds one sn?p hit Stop bit to sfctrt bit lime i4a 260 microseconds figure 6-10 shows ,i rypk'iil iransaction on the Apple Desktop Bus, consisting of .1 uirruicind packet followed by a data packet. Figure 6-10 A ivpical transac! dp Commands S:np-k.-rf.i.i A command is sent by the lnwi lo one specific device address. Only the hum on send QxruTund pacta J v 1 — Uipc )f L ilj pacta commands. There are four commands; 'Hie Talk command is used Ed acquire data from device^ the Listen command i> used i" place lLill in a devke register nr lo get .1 del R to li " " perform some new function- the Device Reset c mand reinitialises the device; and the flush command is device specific L.r J J ^_ .in \ 1 land if. an tf-hii nurd ilui has .1 specific syntax (as shown m Table ^-" u 1 -! 1 1 A 44att field that specifies the address erf the desired devfc e. (The addresses ran^t- h • through I5tadditesshtis3throttgii0] 1 amtsjmi iddi Us «L't -I.I '1 stop llfLlllU S '< T P A i-hlt command and register address Code, Note To allow fear future expansion of the command structure; Apple Computer, \r\>. has reserved a ujtmp of instructions that are currently treated as no-ops (no operation To Indicate the end oj the command packet Lhu amiiiLirid t-nds with perionnetb. L'se of commands, not listed will result in possible incompaiibilkv Willi ,! stop I n 1 alter the future Apple products, last command hi -tell. Miui the ttanjsactJon is complete umt ? lit- liosl releases Ids control of the bus, transmitted Ln one of the initnul register HI through 3)- ft'hen the hen addresses i dcvjde in listen, the deyke receives [he uexi data packet from the hod and places n in ihe appropriate register After the stop hit following the data is- received, ihe transaction Is complete Mid the host releases the bus If ihe addressed device detects artnther command nn the In* before n receives any data, the orfginaJ ininviviion is immediately considered complete. Global Reset When the bus is held low for a minimum of ZJ milliseconds, a Global Resfl is initialed. Only Send Reset she hosi mav Issue this signal, which forces all bus devices to reset. N«ne thai the Global Reset signal differs from the Device Reset command: Ihe Device Reset command addresses When a device recedes a Send Reset command, it wfll dear .ill pending operations and data, and -a iJt initialize to the power-no state The Send Reset U n-.-i ilr-.ii e specific; ti is sent in one specific device, and resets that device. Trie Global Reset signal Is reoefred I"1 }' "II dtf bs jJt devices cm the bus simultaneously; and forces all devices to reset. Service Request Hush Tins is a device-specific command rhitr wit! dear .ill pending commands from the device. A Service Request signal is Used id inform the hc# that a device requijes service, as, for example, when there are data to send In ihe hosi. Onl device can Issue * Service Request. i Following any command packet, a requesting device can w^rs;il :i Service Request by bokKng ihe bus low during the low portion of the stop bit of the last command transaction. Hoktiog Broadcast signals the bus Low in tins manner lengthens the stop by a minimum of 140 microseconds beyond its normal bit-cell boundary, Figure 5-12 shows (he format tf the Service Request signal. Broadcast sgnaEs ore transmitted on the bus hut da not address any specific device- This way, aU devices receive die signals and itspond si taeousrj There are tour hroadcasl signals Attention, Syne. Global Reset and Service Request Chapier 6 The Apple Desktop Bus 137 138 Apple QGS Hardware Jkferenee Figure 6-12 Service Request Apple Desktop Bus peripheral devices Neural M. All db ices on the Apple Desktop Bus are slaves; only the host the computer) may .send i commands Devices transmit on ihe bus onJy after they have lieen requested by the fmst. A device that receives a TaSk command (and has- data to send sends ihe daia and then * releases control ot rhe bus. If a device has been addressed bin has on dau ten send, it does not respond and allows ihe host m time out (waiting for data, none airivesi The hosl may also send a listen command to ihe addressed device followed bj data in j separate packet '._ J Si <\i I'll T EKtrmfcd by ] Ji i miLiuirCi.LmLlh, whidi Device registers mdiuLes j fervid Haiucki All devices have four locations to receive dau. These :ue * Register Talk. Data register, device specific \ device ft ill hj^ii.iI ,i Sen ice Request repeatedly until ii is served, ^hen a device has Listen: Data register, device specific reqw sted service mi which pnini the h<»*i d<*'. u-i l.n- '.. .vj.'h /,- deuce seni ihe reuaie*i>. ihe Ii -.I •'.ill pull each of ihe deuces In sending Talk register command ulj^-i^al Livr in Register 1 this Lkj.ptt.-ri, tegfnntng ftith the tust active device, Only ihe device that has data to send Talk: Data register, device specific ithe device (hat sew the Service Requesl ' wfQ respond ! die '['.ilk cnteanaml. Data register, device spedfk Register I Vi ben the host commands the requesting device in LiSk, the device Is considered * a Talk register command. Figures 6-13 and 6- I \ shea die fbrmsDl of register as used in a If the bus level remains low for a significant time period, all devices reset themselves .nul keyboard and a mouse device, and Tables 640 and b-ll describe each bit in these regptet*. output a L [f a command transaction ^ tncomplete by staying Kij»h beyond the maximum In! ci II lime, all devices Ignore ihe command and wait for an Attentfetfi signal, Chapter 6 The Apple Desktop Bus 13$ 140 Apple litis Hard ware Referent e Figure &13 Keyboard register t> Figure 6-U Mouse repjMer \y t5 N Knv released p — Ekifini prci»d Mnwcdup— — ..,,:,i. : 'i iiiiiu^.iii:i; K^ retained — llwav*! I -* Mi n 01 1 n^hl — Ktvmtfc I —* X m -..iiin Table 6-10 Uih m keyboard register P^rrlption Table {v 11 lliis in mouse regettfl M Key released indicator; When jhis. bft is ], the key PfKrlptiim 1 represented by kcycode 2 is. up When this bit is 0, the key represented by keycode 2 Ls Button pressed nulkjior. When 1 Ki.s hii is L, the mouse button is up. di iu, n Keycode 2-. Toe 7-bit ASOl value of ihe toi kej pi ss J When this hn ML the mouse button is do*ti 7 Key released indicator: When this hit [s 1, the key \, Movement indtcaioi \\ lien ill is hii L- I. ihe mouse has represented by keyeode i is up. oved up along theYaxfc when thi^ bii is 0, the kej rtptesenird by keytode When this bit fcs D. the mouse has moved down akinp the V 1 lh axis. down M) Eeycode I The ?-bit ASGU value of the \.\-\ key pressed IK \ movemeni value 11ns held contains the value 1 rf" the relative mouse movemeni along the V (vertical) asks. Always a 1. Movement indicator: When lhis bit i* I. the mouse bus moved k't'i nlonu the \ jxis. When cliis hii is 0, the mouse has moved ri^hr akm£ theX axis. M X nn.iu-iiier.il value I bis Betd contains the value of the reiative mouse movement along die \ (horizontal) axis. Chapter 6 "Hit: Apple Desktop Bu*. 141 142 Apple DOS Hardware Reference Register 1 Table 6-12 Bits in device reglscet 3 Register 1. tike register 0, is 3 data register, kit ii is device specific, The function of this Uf-L ripilnn register is not defined foi use by itie ADB protocol, hut it mav he used by die application 1 program fen any data Limciion. 15 ftesetved must heft Exceptional event, device specific. En the ADM keyboard, this Ijii Indicates rial the Reset key has been pressed. Renter 2 No exceptional event has iccurred. This register Ls a dala register and ls device BpecfBc In resptaSC to (he T;ilk reenter 2 tf Service Request enable: ^ lien tins hi I is I . ihe device may command, (he device wall send the cameras of ihi& register unto the bus. In response lo the transmit a Service Request See the ^l-: "Kmi service Listen register 2 command, (be device will store the data sem to the device as defined by Request Enable Disable," Lam in this dmptei fat more lilt device's specification. details 1 11 litis rumtlorj When this bit b 0, the device may nnt Iran-ami j Service Register 3 Request 12 Reserved; must be n This register Is a stilus and innniiand renter that cotitahH j lundk-r code and ihe device :.'. If e address rbfe freW < - inr:iin>. elk- del k e s unique bus address. The host may change rhe contents of this register with a Lken registet ^ nn ind address. The possible addresses ate UsTeJ In Tal lie 6-14 Figure 6-15 shows* the formal of register 3, and a description of each lm follows in Table 6-12 7-0 Device handler: This field contains the speeial liandler . .-..|. ihai defines the function of the device. See the netf section I > •> I landers/ few .1 Ik "\ unique handlers. Figure 6-15 Device register 3 [--> ,1 Device handlers j Device handlers provldt a means foi sendlrig a nev. handler ID, die devu e ;i ik'x'wi lu function in more than one manner an be Instructed to perform a new function By Eici.f*k;ciaJ LTCtrr There are cwn kinds ol handlers; reserved, and all others. There are Fouf reserw : Vn . \i.v Request eiubk' handlers, Jisied in T;ihlc o-J.-i OChcr handlers may be used lui special device rkictiorts, hut Reserved, must be D — new device handlers defined by ihird"pa.rty developers must first \ie registered with Apple Computer, Inc. Dmn: iddrcsi — i pon ten >' lng a reserved device handler; the device will utimedJjttet) perform the new function The device will nm store the reserved handler in register ,1: only device-defined handler codes .ire stored All unrecognized handlers are ignored Device addresses Each peripheral device is preassigncd j i-hu command address, which identities w- u\ . , e lype. For example, all relative devices, such a.s a mouse, power up ai address 3. Most devices have movable addresses Thai Is ihe host nm assign :i new address to tht t evtce. The host Chapter i> Ihe Apple Desktop Kus 143 1+1 Apple Ni,> FLii-.k'..!-:- H^lnuin 1 Table 6-13 Hewed de\ uv handlers Collision detection Ml devices must be able to detect collisions It a device h attcniptiEg to output .;. bit and the data line is forced low by another device, u ha* lost a bit in collision with ihr other $FF 1 1 .1 1 1 .i 1 1. - . . se \i LesL in 1 1 lc .1 e\ i-. . device. If another device wends data before the device is able to J.^snt hn. r hiMimEs :lk- device m change the address fidd L" has ir> -,i;iri Sfl '.-I istel n :::-:-:: J . cLun. i lost •-. i olliston Tlic losuig device should ImmediateJ) vtop transmitting and preserve the eJjc ne* address sent in this host if no cottision ius been detected *- I-J'- 1 that were being sent. \ Jcvia setsso eral flag if it luscs a collision. SFJ) v- listen register 3 data, insinjcis the device tu change the address 5dd to the new aihtiess st'iii to ilif host iiinu. .i..:i- atot is pressed 5W As Listen register 3 dam, insinn ts the device ti i change The address and * tfbjtt Devices using internal docks that operate within ±l percent should attempt to ui.ihk- fields in ihi- new cities scni by the Imsi assert their start hit ai a random time within the JimLts of the bus turnaround ti sfHi , >ni in ropon.^ in .i t.i Ik register 3 command, indicates iliai the l- '. Ice failed a setf-tesl To aid in collision detection, the address Held of register 3 is replaced with a random number mi-. soonse ri. .i T.Hk register j command A device will change its device address to this new address as tongas it has not detected a collision \ device that has detected a collision will must assign a new address when two devices have ":1k- same default address such as two i not change its address during the rteti listen register 3 command. mouse devices); one musl be moved la a new address, A device ivill always default to its assigned address upon power-on or after n detei ts an 1DB reset Currently, eijjjii addresses At ihc systems level, a host can change I he addresses of normal devices by using this are predefined nr reserved The other eigln addresses are available inr movable devices. This technique. Hy issuing ,i Talk register 3 command and following it with a Listen R3 cnrrunand means that At>B can support up tu nine: mouse devices, keyboards, or graphics tablets ai the wiih a nett address in bii^ n to 1 1 of the data packer the hosl moves .ill devices iIl.ll did not ^nib time. each one with a unique address Tahfe 6 1 i ]ist> ill the possible device addresses. detect a cotttsioti to the new address Typically, only one device wfl] nor detect a collision Tim technique can he repeal al new addresses unnl rhe response to the Talk register 3 Table G-J4 I lei tee adon sses command is a EJme-ouJ intj rc .spunse), Tliis process can he used JO idt'inify and tx-|c x.dTt j multiple devices of the same type after system ini?ializauon. [UMU type temple A normal device maj tiave .m optiomJ orffttffcron it. The activator can be a special kev on a keyboajd or ;l mouse button. At the application level, addresses i iir'i be changed In the SOD Keserved - - host's displaying a message requesting a user to use the activator (hold down j key-. H\ 1 u>inj» SQJ Reserved - - the Listen register j command, the host can move the device with the activator pressed CO a 502 Encoded devices Movable Keyboard new address. This method can be used Isy an application program to identify and locate S03 Relative devices Movable Mouse individual devices in multi-user applications Also, u-nam reserved handlers aie used to S04 Absolute devices MovaMti Graphics tablet facilitate Ixjth address-changing methods. 505 Reserved - - - SCH Reserved -. S07 Reserved - - SOS Soli address Movable \\w Service Request enable/disable S09 Soft address Movable Am Si 'A Soft address Movable Anv 11 is possible to coniroE The ahiliiy of a devjoe to iransmit a Senice Re<|ut'St Tu d-sa:ik- j I0B v,i', address Movable Anv device 5 -iNho. m send a S^mce Request set bu 12 in register 3 ro to enable set this bit a I* it only do you run the risk of crashing the Operating system, hui the potential fur damaging data un vour system tlJsJi h high. Ii is GND Ground reference and supply recornraeridcd that you use firmware calls when accessing all disk devices 4 V5DISK 5.5- or 5.25'tach drive select connected to your Apple DCs, a 5 -12V -] 2-vdl MippK ^5-Voh supply 7,8 + I2V I - - • -r supply Apple n compatibility 9 DR2 Drive 2 select io WRPKOTECT wYite-proted input The Apple [IGS uses the same disk drive interface as the Apple lit and Ifc. PTOgraios written ii Phase " Motor phase output forhoih of ices* earlier comjwlera will run an the Apple lies. Hie linmvjre recognizes !J Phase l Motor phiise output ProDOS block device calls and SmartPort inienfaee calls to both ihe Apple llniDisk™ 3.5- ] inch and Apple DuoHisk' 12^ inch disk drives. 13 Phase 2 Motor phase I output i Phase 3 Motor phase ? output To find not how to use the ProDOS bfock device calls, .see the >^jDOS tf Technical Rtfervnec WREQ Write request Manual, To find uut how to use the SmartPon interface calls, see the Apple lies Pimwan to- HDSEL lleiid select Reference l- DR1 Drive 3 v i el ls RODATA Read data input L9 WDAXA Write data on pm i The disk- port connector l^pin Warning T3ie power conned ions on this disk port axe tor use hy (he disk drive The- rM-pOft cotroector is located « the reai nf the Apple IV S I ase It is a connector. Figure 1-2 shows the connector Tabfee '-\ $vt& i description of each pin. i id) Do not use them for any other purpose Any other use of these connections may dauupe the computer's mortage regulator. * * Figure 7-2 Disk- port connector The Disk Interface register \©©®O©®0©0(T)y Toe Disk Enterface register (SGQjtt) serves as 9 Control register lor the disk drive. By writing \©©©©@@@@©/ to ihis register, accessed. you select the type of disk drive being used and the side of the disk !o be This register uses only two hiis, which are hoth dared on resei. When the Disk Interface register is read, (Fs are relumed in the unused postals (fe t lhmugh m Figure 7-3 shows the Formal far this rcgNet Descriptions of each bit ;ire listed in Table ~-J A Warning I u careftil n I ien d u tigbtg bits witln n h is register, L'se mjy a read- i < un idity-writc- in>truetion sequence when manipulating hits, See the warning in the preface, * Chapier 7 built-in I/O Pons and Clock HI 152 Apple 1)4 IS Hardware Reference 1 Figure 7-3 Disk Interface register at SC031 The [WM contains several registers thai allow you to control disk access: Ltsu Mode tegistei • the Status register « the Handshake register the Data register tttud write head 5tleil.7 J he IWM is mapped as an imemjl device with *oli switches at addresses SO0E0 rhn^LLj^h Disk drive wfeci - 1 (CDEF. These arc the same addresses as in the Apple J Ic. Table ~ 3 shows these tbcsitibotu and thdr functions. * Taiilc 7 2 litis in lhe Disk Interface register Table 7-i Disk-port soft switches Vilm- l?i'^L ri|>iiiTi OesrrlpCinn Read wrfte head seleti Nt- A L in this position selects SC0E0 Stepper motor phase trkw head I. SCOEi Stepper motor phase •Iil-I- A i] selects head n SC0E2 Pepper motor phase L low Disk drive select bib A I in this pinion selects 3.>inch SC0E3 Eft |'-«".r motor phase L J-ii^h disks SCOEI Stepper motOJ p 3 . 2 low A selects 5*25*focji disks JC0E5 ftepper motor phase 2 high 5-0 Reserved; tit) no! modify. scuFh Stepper motor phase 3 toft $G0E7 stepper motor phase 3 hrgjh H \m Drive disabled The IWM SCGE9 Drive enabled SGQEA Drive 3 k 1 i he disk-port interface is enhanced by ike Integrated Woz Machine (IWM), which simplifies SCOEB Drive ] select tin V* task of reading and writing serial grwp-code recording (GCR) encoded tnteropn .iLi-ssi SCOEC Q6 select hit low data to and from the dEafc drives To perform disk operations, the mRroprocessor simply reads or writes control and data hytes to or From die TWM SCOED Q6 select bit high 5C0EF. Q7 select hit low *CQEF Q7 select bit hu>ri A Warning Writing diievih to die IWM is t-^nviiick dan^-mi:- Nut unit ilu yuu i.ni the risk ol crashing the operating system. Inn the potential for damac-in^ data on your system disk is hi^li. h ts reeomniended thai you use Soft switches Qfi and Q: art Seta I bits Ebr accessing registers within the IWM. By setting or firmware Latls when accessing all disk devices connected tn your clearing the Q6, Q7, and spindle motor SW-itches, you maj read or write to one of the Internal 1 Apple Tics. * IWM r.^-:vi-, k " as listed in Li- i. The IWM contains several typical disk support circuits, which make writing data to the disk posslhle. These are the discriminator, the pha.-.e-locked loop, the data sepaiatot and the write current circuitry. (. h.iptt-r 7 Built-in I/O Ports and Clock 153 l£i Apple ItGS Hardware Reference } Table 74 l\\M aiates » Tahlc 7-6 Biis In the McxJe? register Spfatdk lhH(riplii.n <*< mirtor (ifii r.n iiiji Reserved; do not modify. " 1 Read Data register Reserved: sdwayis write 0. 1 ( Read Status register I ft-MHz read-clock speed selected. s Read Handel uku register 7-MHz read-elm k speed selected Set ihis nil to i,i fur .ill I II Trite Mode register Apple Ucs disk accesses, ViiiV :« biH'ells arc 2 mieroser mute; used in accesses to Apple I ! 1 i register 3.^inch drives. Bir-cells are H ffllcrosecoflds; used in accesses hi SnurtJ'on 'Hit- driw-enable sfsft switches and the drivc-.-seleci switches control the state o( the disk- dei Ices and aU Apple 9,25-inch disk drives, select signals DR] and DR2 li Kated at the disk-p m connector Table 7-5 shows bow these One-second rimer i.s disabled. soft switches determine me state oi the dtsk-sdeti One-sett md tuner is enabled. When the current disk drive is deselected tiu difce wiLI remain enabled fen I second if this bii is set Tabic 7-5 Controlling the disk sded signals Asynchronous handshake pmiuiul selected, for all excepi PM jw-n +lnnal it Apple 5-254nch Apple disk drives. Synchronous handshake protocol selected; fur Apple SCCES SCI4E9 SCBM JCflEB OH J l)R2 \2i-?ruh disk drives. Latch imidc is enabled; read-data byte remains xalid for 1-1 I 1 - 10 ii I tall byte time 1 16 microseconds If using 2-micrasecond bfrcelb; 32 microseconds if usin^ 'Hnicrosccund bir-cellsi. Latch mode is disabled; read-data byte remains valid fttf ^proximately 7 microseconds The Mode register Figure 74 Mode reglsta IK- Mode register is a write-ortl^ register and contains Nts that control the state of the IWH These biis arc shown in Figure 74. Table 7^6 gives a description Of these bits. To write to tbe Mode register, set the appropriate soft switches required to access the Mode register (See Table Th, %'riiiiiK W» any odd IWM address (JCOEu through K#EF) will write to this ngbrtet i NtttrvixL Jn not muddy : SteMfnfKt ni'.M k- 1 1 — Stitt': Writing to 1 III- Mode register w ill succeed only after I lie i tie-second timer has timed -in Dttft rale — BdtceflittjEf l-^lllllllUlllLTLfuhk.'— Syrnhn inniK jwynctlti mi HJ> n« hJl- — L.I..I iMink-i-mNt— Chapter? Built-in l-O Ports and Clock 155 156 \]i pic I !: ,* \ j j rd war l- 1MY e neei 1 The Status register The Handshake reglsler The Status register is a read-only renter and contains hie* thai reflect tin. cLirrurn state of 1 The Ifandsluik- TL-^iH[L-r ii .1 Tejd-onEy register thai contains the Status of the ITO when the disk interface. These hits .ire shown in Figure "^ Table " eju^ a description of each writing out the data to the disk drive The funn.ii of ibis register Ls shown In Figure 74. hit, Tn read from the Stains register, set ihe appropriale soft switches required to access lhe Table 7-8 gives a description of the bits. To read from the Handshake register set die Status register. (See Table 74), Reading from any even IWM address (iCDESO through SGOEF) appropriate soft switches required to access the Handshake Jetfister. (See Table 7*4*) will read from this regLstei Reading from any even twM address SCOFi} through SCOEF) wflJ read from this register. < Figure 7-5 Status register figure 7-6 Handshake renter Safin- a* Mode h-^Ni fbteO I JteStfVod; dt*™* modify ..5 Rl-JlI li'filf il.ll.i rujpMn -§ iik reiid\ — - ilwrM-.!. iJiuMfflrttfy - ' Trite sste me eruhtud — Table 7-8 Bits in the Handshake mgister Table 7-7 tjits Lri the status register llrvtYipCiini nt-MTiptinii - 1 Read write data register Ls ready ior data. ' Read' write data register Ls full. Sense input line from disk device. Multifunction inpuh use determined by disk device. tt&ed as a write-protect sense '« ! No write undemin has occurred; the latf write to the disk in sonae Apple disk drives " drive was successful 6 Reserved, do not modify. i! A write undumrn has occurred; a repent data byte was i'nisL- iHm: i t ..Hie 2 is selected and the drive mom is on, missed and not written to [fie disk i-n Reserved: do not modify. No drive ls currently selected. 1 4^0 Same as Mode register bib +-U. (See Figure 1A and l.ihle--.' 1 lupir 7 Builr-iu I Putts and Cluck 157 158 Apple Hgs Hardware Reference 1 Tile data repslcr Tahfc79 Pins on a .serial' port connector Ita Siiiiul EJL'AiiTLprinii The Da& register is a dual-function register. Depending m the state of a i ifi su iu lies QG and Q" (Table 7-3)! this register (unctions .is j Head-Data register and ,t Write Data reenter. See Table 7-j for the state of these !nts when ru'_iJinq horn and writing to this regfetei To read DTK I5;tta terminal ready from the Data register, set the impropriate soft switches required to read the Data register. TISKT Handshake in (See Table 74.) Reading from any even lUM address ($C0EO Through SCQER will read from TX DaLa - Transmit data - this register. To write to she Data register, set the appropriate soft: switches requifed hi GND Ground reference and s w rite in the l^ta reRistti. (See Table 7-4 Writing to am; i»id [\\ \\ address (SCflBD thtough R.X iiata - Receive data SCOEF) will write in This register TX Data + Transmit data + tiHl General purpose Lripul li,\ D;tr,j + Receive data + The serial ports Noncompalibility with AC1A The Applets has two Jtt-132-C senal pons located ai cht- hack of the computer, which provide synchronous and asynchronous serial communications. Each of these pons may be Prei fous Apple El computers use an asynchronous tX)mmjunJcatfons interface adapter (ACIA) used to drive a modem, primer,, plotter, or other serial device, ot as an AppkTalk local area i hip. either built inl<* ihe computer jxj(nand sulci SO l^ira register addn sa s RfjiiiLL-r I ll.UI III I 'l SOU Command SCQ39 SO -.l-i i .i Si i JB *G03A i ' I u piuT 7 bu i li • m I J J oits and Clock l6l 162 Appfe Res Hardware Reference ' Table 7-12 SCC write register functions m Figure 7-9 Data paths in The ZiLog SCC i Reproduced by permission. C 1986 Zilog. tot This matetfftJ may not be reproduced without the consent of VriM r^Hlcr FnnrtJian;. Zilog, In^.i " Register pointers i'MC initiali7.atLon Bflj iv,.. 1 Mode resets UlI-k^ll-T mltir j" 1 Interrupt condiliuns "\v-njl] WM( DMA request rnntrciE y Oiannd A _ T- Quii QuiUH'l ekik-s |- ShTK 1 Imurpjpl vector JrJjrtnil Channel A HjLT|llL-h[ I nn I 'Ol.lll * Receive byte format ]ji>jii Receive CRC enable Ttaereit Control & Stilus MfJem. DMA, w 1 Transmh rea'iu- clock niie. synr byte format Addrcsi A 1 I;, iiv il liMr : iiii.i: Ihll.l CP1 riMul Hi_^ Transmit CRC enable Bt.il i J <= li 6 Sync/SDiC hyte formal <0. _|\ Dbckic __/ Cnrdral fi talw * — T~^ k Had™. DM*, fl H Transmit buffet ^ ":K-J i-ii... hilLri-jp: liUkimlll ttwnnd B >} m.i--m intemtp* bn* lin2nil Bcgbtra Reset bits ~~*J->.M..Iii..:.. imernipt daisy chain 1-.' Transmit, receive control tft » ff;ii|Ui i|.ii"J i Daia encoding formal <^ II Receive and uansmii dock control \1 Baudmte generator time consult, bw byte 13 Baud' rait' genera or linn.- constant hi^h byte 1 \A |1;u,lI-i Mi- i:ui! -ir.:: ...;ii]|..:| Phase-locked loo|> control Echo and looph.uk The game I/O port 15 Exiernai interrupt control status All Apple II compuk'rs have a jjame I/O port to which joysticks or hand-contiiih can conna i ITiese centrals albfl users no provide mecfaanfcil mpui to ,i panic pcqgcun, which analyzes ihese inpuis and jesponds accordingly. Four digital switch inputs fSW'.J through S^'ji are provided, as- welt asfouranahju band control inputs (FDtO through PD13) and Four dlgteaj annunciator outputs tANO through AN3). The following sections describe these input* and outputs in detail, Chapter 7 built-in I/O Ports and Godt 163 164 Apple Litis Hardware Reference Game I/O The hand control signals Several inputs and outputs axe available at the Ei'ipm 1C connector on the main logic hoard: The Mega LI .supports rMfld-umiid inputs MDLii through PDU and switch inputs SWO through four 1-bit inputs, or switches (SWO through 5W3); lour analog inputs (PDU3 through PDL3): SW.1 Ihese inputs arc available rJiraugh the 16-pin DIP game cosnfictof rj21) located below and (our Ibit outputs (A?fl3 through AN3*. Vou tan access all these inputs and outputs bum 4ir | and [linju^h the ;-pin connector CJ9> that is located at the rear panel Annunciator L your application program. Note that the SW3 tnput is new to the Apple lies. output- an- ihi (ugh .W are provided by the sinrmaker [C and are available only through the 16-pin DIP cftonector, nlikt previous Apple computers, the STROBE output is no! Ordinarily, you tinned a pair of hand controls to the L LI ikpih ionnector. Hie rotary i ontttifa available on the game I/O pott Figure 7-10 show? the two *pple ilGS game cunnedors use two analog inputs, and ihe push buttons use two ]-bii inputs. Hut you can afeo use these Table. 7-13 Ms ihf kK-.nicn.s oi the game I/O steals. inputs and outputs fot many other jolty For example, two analog Inputs c;m he u^ed with a two-axis joystick figure 7-10 shows the connectm- pin numbers The Apple lieskiop Bus will accept AIM* hand controls. joysticks and graphics tablets as well Figure 7-10 GaBe I/O cewmectofs is those keyboards and mouse devices specifically designed tor ihe A M H The ADli niiaiicontrollerbandlf.s mouse and keyboard input devices transparently; thai is, simply ©0®®0y v reading ihe siautfcioj im .itionn will return ihe current values of these devices, See Chapter \©©©®/ for more information, Annunciator outputs: The four I -bit outputs (AMI thruugji AM) are ealleil emmiJtcfators. Etch .mnundatox can be used to turn a lamp, a reiay. or some siniii.u decttonic device on and off. Table 7-13 Game J >ignaSs Warning When driving a device with ihe annunciator QUipm be sure noi to bad any one output with mote than one standard IT L load, * l-!l afeiu] ! '. v. rij.i .. i I Each annunciator is controlled In a sofi switch, and each switch uses n pall oj memory 2 Sw'0 -', nb inpuMJ I .in- ns, These memory locations are shown hi T;ible"-h. Any reference, to the towel 3 SW1 Switch input I address lit an address pair turns the ctHTespOTxting irtnunciator off a reference to the higher SW2 Switch in Hi address turns the annunciator on You can determine the state of only ortc annunciator, AN3. | I 2 To do this, read ihe RDDKDtES switch .ii bcarjon SCOiH and test bit 5 Ji this !nt ls a 0, then 5 *5V t>voJt pullup A\"3 is cleared ll ihh bu is a I. then AN5 Is set, i. PDLO Analog Input PDL2 Analog input I Annunciator 3 serves a dual purpose in the Apple ffGS: it also serves as a switch, allowing you 8 GND Power and signal ground to toggle between two display modes Refer to Chapter + fat more information about ihe v sfl 3 role of annunciator 3 in video. Table 1-U >hows the jmiuncintni memory- locations Switch input 3 ]:i PDL1 Analog mpui ] Switch Input* The lour 1-bit inputs (Sw'il tlrrough Sw"3) can be connected to the output of II P0L3 Analog input 3 another electronic device ono a push button, When you lead a byte from one of these ._ AN3 Digital outpul : locations, only the high-ordet lw— -n "—is valid information: the rest of the byte Is I undefined Tli.. sofi switch locations thai reflect the state oi these switch inputs art- •':" 13 AN2 Digital output 2 through 4925 1 1 $0 160 ihmuph 5C063), as .shown Fri. Table 7-15 Li AN1 Digital output J r i AMI Digital output h H.C, \n connection Chapter " liuih :n f i ) ftms and Clock 165 Ifi6 Apple lies Hardware Reference Table 7-14 Annunciator memory locations Summan' of secondary I/O Jot at ions lddrn> Table"- li shows the memory locations for all of the Iniilr-iu I devices except the I1.r llrx Ok keyboard iikI the video display and oilier primary I/O location*. As explained earlier, some son switches should tK1 accessed only by iiilmii^ of read operations; those switches are 'I l=i of SCflfiB 49240 marked n 49241 ! 14 Off IC05A 49M2 Ofl m : .|' &m Table? 15 Secondary I Q racmon 5CD>C >r H5WD i: off SC05J: 492* Soft swJilIi lln Oh Qrt sosf 4 1 -t 3 1 - , .. Start hnistwd -J flfato The parameter RAM in the RTC is wed For system paflmetera .nit b 01 A I .1 variable Itt'.id write — to. nor should it I* used by, programs other than the system. U§tbpe— Itawved. ilii-iuniiAhh — The control register (located ut $C0^>, shown in Figure 7-11, serves a dual function: as the control register far the RTC and as the Border Color renter. Relcno Border Color* in Chapter i for more information on canEfoUin^ ihtf color of the displiv bolder, Tahk^lo Bits in the control register Serial data oojnmunicatfon to ami from the RTC b carried out one byte at a time, (The terms raft/ and Jwffe are used in perspective of the system: A read transfer data from VjuL" DHcripiian the clock ihip. while a write transfers date to the djqclt chip) To write to the dock chip, the prograjn must Rest write the data mio die Data register ((0033), then set ihis On ii These slots nuke i[ possible m add Tenures by I'Iii^!.;ih:j in penptieriil cards with, additional hardware This chapter J^cTtljes [he hardware that supports these sluts, including the .signals avaiLable nt the expansion, slots. Figure tf-1 is a btock diagram of r lie Apple IfGS Thai shows the relationship of the slots tn me computer. Crnnunh^uiuni Cuilffd -•: SIB IU.M I ADS iK mum 9-.LAM - Hi i 1 1 1 .- r |_ . .- , , tlWCrftaj Swul DOC 2WK BOM m [ytI H Link ..I Speafea expulsion klup l.ii-ki.ip I.\k7nj ' * ii. ^prakjji • Airfe.- The Apple litis, has seven expansion slots phis memorj espanfiksni slot. This .1 memory expansion sloi ls not the same :is the seven expansion slum, nor should be tLscd ti as such. Also, the memory expansion slot ls nut the sainc as the auxiliary sloi in the Apple Tie, nor should it be used as sudi. The memory expansion slot is to be u* meninry expansion cards designed specifically fur ihis slot See -Memcuv Expansion." in Chapter 3, For a description of mis 5J0I 171 172 AppJe Ccs Hardware Reference I Tabic Kl Expansion stot signals The expansion slots Sljpiil Ue-wrLpriDn The seven connectors Itaed up across the back pan oF the Apple IIgs main circuit awl are /tOBEL NcrfiiLilh hj^h; |oes low during eO when the (tfOSlb addresses the expansion .sIdls (also ailed p&fphmat slots or .simply sta*^ numbered from 1 m 7. They bcatiion SCnss, where n is the connector numbur. This line can are 50-pin card-ed^e cqnucaoti with pins un 0.10-Ench centers, A urcuii card plugged into Jrivu 10 LN Hi loads." cme of these eonaedflcs his access to alJ the signals necessary to perform input and output 2-17 AIJ-AlT Three-siaK address I his: The .id dress becomes valid during nJ and do execute progiains in ram or ROM on the and Ifaese signali are described in Liblc 8-1 anil remains valid during till. Each address lme can drive and are sJicawn in Figure 8-2. 2 LS Til toads.* jh run w Three-state read Write line- Valid .n die same lime a* the address bos; hteh duFmt? a read cycle, low during & write cyek. Figure 8-2 Peripheral -expansion slot pin*, It can drive 2 LS TT1. bad*.' |M SYNC Composite horizontal and vratkal sync on expansion slot 7 wily. ("Hi is pin has no connection on the nthei 6 stats.) This (SC cm slot I) OlM F! line can drive 1 LS TTt bads . bMAUt"HN.C.cin4i^ (N.Cairic INTOtT^- 20 10STRB formally hiph; goes low during t^i when the 65G816 addles ses location between SG600 and SCTFF. This tine can drive 4 LSTH loads, 21 RDV Inpuuoihc 65C316 Putting this line bw during &1 halts the ,. -.'|V 65C816 with the address bus to ikfing die address of the location current!) being fetched This line has a i7(fovhn\ pullup resists* to +^i volte, (HUB Qftikx&Craautat TIKI 12 /DMA tnput lotht? address bus huff-eft: Pulling tins hne Lm during oi Otaonects.the 650816 Gram the address bus. This line I lis .i 3300-tihm puElup resistor to +5 votes 23 INT OUT Interrupt priority daisy-chain ouipuL- Usually connected to pin 2ft i INT IN). On slot 7 only, thts pin has no connection li DMAOLrr DMA priority daisy-chain output: Lfeaallv connected to pin 2" (DMA INK On sio* 7 cmly, this pin has no collection 2- -V, *vvuli power Mippk. A lotal of ^00 mA is avaUuHe fur all peripheral arrets 26 GND System common ground, r DlVIALS DMA priori^ daisy-chain Input su;illy connected to pin 1a 1 I DMA OLTi On sh-i ->nl\, (his pin has no conrtei J tfiofl 28 INT IN Interrupt ptforit] dalsvH li.iin inpm: Usually connected to pin 23 INT ' OUR On sbl J only, thLs pin has no connection # 'NMI Nonmaskable interrupt lo65C8l6 Pulling this line low start:* an interrupt cycle with die interrupt-handlin^ routine ji I • i;i' ii S03PB This line has a V*iii>-ohm pullup resismi lb --~ volts 174 Apple HGS Hardware Rek-rena- Chapters I Expansion Slots it;* Tabic H-1 Expansion slot signals (Continued) Apple II compatibility Signal l'i. '.ri|H i.-i The seven 10 slots in the Apple (ItiSare almost identical to the sbts in the Apple lie. the V /IRQ Interrupt request io65C«l6: Ming his Ifoe low starts an 1 i iiiS attentions being signals M2SEL and MZB0 M2SEL replaces fiPSYNC i m pdn 39, uu[ . inkTr-Lipi cycle only if the irUernipi-disablc (0 flag in the l Mil ai is available ai phi 35, "olv ,n %|. n J; CREF ts still available at pin 35, at slot 7, 65QJJ<5 is not .Ke« Llses ihe interrupt' handling routine at location KI3FE. This line has a J3QG-oton pullup resistor to Ihe slots behave like their counterparts in ihc Apple II wjjfi only a few differences, the mosi *5 volts. rmponanl lx mg die behavior of the address bus. Since the Apple HGS computer can operate j 31 /RST Pulling this ELne low initiates a reset routine. at tA MHa and has a 24-bit address, the address hie so lie slots is not always ulid :is was i it 32 /1NH Pulling this fine low during ol inhibits (disables) the memory in the Apple IT. The signal /M25EL indicates when a valid address for banks 224 rjj Z25 ($EJ oi on the main circuit board This line has a 3300-ohm pullup Si: 1 1 i.*, prcH-nt on tike address bus and so should be used to cjnahFy any address decoding resistor to *5 vdts. llmr due?. mM use IOSEL since thi^L- memory spaces contain iirtdeQ buffefs and I > ' -12V — 12-voh power supply. A coca addresses peripheral tfdeo aids can make extensive use ! these two signals tt I . the r 03 System 2-MHz asymmetrical clock: life line can drive 2 Us TTL - •., It address bus is turned trff until the hunk address has been latched When that Iwpptrw, ihe loads.* h \^ enabled. fHtinting "in" toward the FPi ami r.^c .s !.. The FHI detndes the w oi el dock: This line can drive J LS TTl loads.' address and stored DMA bank address to determine whether the. y. k i- m RAM, ROM, nr .. 39 M2SFI The Mega II select signal; This signal goes low whenever the Mega II. If :lk- l\j le is a DMA lo the Mega IE kw slots], the Me#a Tl sderjj line Is asserted by Mega [] is addressing a EoeatLon within thte I2KK of ftfega 11 the FPI, and the FPI data buifers are turned off if the R/W line is high. If the access Ls to the NAM Inch-spcci! ll\\\. ihe data buffers are enabled while nil is high. a. OQ ou clock: This fate can drive 2 LS TTL loads.' 41 /DEV5EI Normally high; #t>cs low during oO when the 65C816 addresses .We- Ti increase read write data liming margins to the high-speed RAMs. the PPI ' location SCtinx. where p? Is the connector number plus 8. This generates an early LA- lord address an be) signal for read cydes aod a late CAi signal line can drive 10 LS TTL bids.' for write cycles. This makes read data available earlier and requires less write dac.i setup 42-49 D7-D0 Tince-Hii.L- buffered bidirectional data bus: Data become time. valid dunng 00 high and remain valid until ofl goes low. Each daca line can drive t LSTTL load." 50 •-12V +!2-voit power supply: A total of 2S0 mA es available for all peripheral cards. Li Hdftig lin-jiLi \ut for l-.hi cird. Chapter tf 1 O Expansion Slots 175 1?6 Apple IkiS Hardware Reference 1 * .Vfjjf \'i i- 1 i.i 1 h Hie s\ Mem should be running at 1,014 MHz when performing DMA; I/O in the Apple QGS otherwise, DMA Lo I/O or Mega It video areas will not wort property, However, DMA can be performed while he system Ls running last as long its the fallow ing warnings are I The input Bud output functions are made possible by buflHn I " devices and the use of heeded peripheral 4 r ' ' and DMA cards. Tlitr following sections describe these ards Only high-speed RAM or ROM can be accessed (access i" I Q, video, or the Me| i D kinks does not work properly ". Fast DMA may cause a repealed cycle io occur to ihe location current^ bein^ Slot I/O cards accessed by the processor. This repetition could cause a rmlfuncuou ii the processor is accessing I/O when the DMA occurs; however, a repeated access to a KAM or ROM Most VO cards used tn the Apple IE also work m the Apple to Cards rhat use the ,-IOSEL location will have no effect The 65CB16 can be stopped indefinitely for DMA and and I :|-\ -I I bus signals will work especially well, because they do noi have it) deai wiili I lie does not require any processor refresh cycles from a IVMA card larger address range of the Apple Itcs, The 65C&16 processor operates with a 24-blt axldress; howevej the I > « sloes receive odj a I i-hi! address, Therefore, cards thai n^ the iMirl address decode -select method rather Fxpansioo-slot signals [inin i he DEVTSel and E( MH. s^nals a i:l ni iL work pn iperiv fhese c.irds include the multifunction I/O cards thai emulate multiple I i . aids and el add-on HAM cards, hi 'Ii: . : «t she expansion-slot signals can be grouped into three general categories; general, these types nt cards will noi he neeiied because ol the extensive Ituilt-in 1.0 s ind those that constitute and support the address bus high-speed RAM expansion already' provided. m those thai constitute and support the data hus Cards dial use INH will work praped) if those iliat support the functions of DMA and Interrupts tlie system Is running ,n I 024 vnt/ 'IhesL' si^nuls arc described in the following paragraplis. For additional information, refer to they assert /INH within 200 nanosex aids of ihe wfl f^LHns edge rhe schematic diagrams In the addendum at ihe back of the book, rotnpatlbilfry with this type of card mud be determined on - oMJual baaSj because many Monitor firmware calls execute code in bank SFF. and many cards are not The buffered address bus :. to decode hank informal i:>n. The microprocessor's address bus Is buttered by two 74HCT245 octal three-state The FPI will Ignu-i- .in;. muineiiCT nf INH when the system ts running fast (2J MTfa), oe The (flCaia R/%" line k atas buffered The ITI disables these butters bidirectional buffers. when ii is not in a hank wliere I/O and language-card operation are enabled, By ignoring when retjuesied by any peripheral and so thai peripheral DMA circuitry can control the /INH, compatibility with existing curds is ini-nrnvcd address bus. The DMA address and UR W signals supplied by a peripheral card hum be stable ill during oO of the instruction cycle, i Refer to the timing diagram in Figure ft- J 1 shown latei in this chapter.) DMA cards Anoiher signal that can he used to dJabk normal operation ol the Apple Ugs Ls /INH. J ] u!Rng INH low disables all (he memory in the Apple litis except the part in the t/O space from Many DMA cards tku work successfully in previous Apple N models' will work in the SC(JtKJ to SCFFF A peripheral card thai uses either. I\H or 'DMA must observe proper liming; Apple [Jew, but may require changes in their limiwjn.- ur associated software io function in order to disable RAM and ROM properly, the disabling signal must he stable all during o" of properly with ihe DMA hank regisier. tn general, DMA cards ih.il assert and remove the DMA ihe instruction cycle. (Refer to the timing diagram in Figure 8-10 shown later in this chapter), signal m 1 1 1 1 ii 1 1 ,e I list 120 iKnosec • i rising edge will probably « i irk pn >perlvi thi» allows Sufficient time for /M2SEL id be activated by I lie FPI when video and I/O accesses I'hc peripheral devices should use . IOSEL and /DEVSHL as enables. Musi punpherak-ard ICs are required require their enable signals to tie present tor a certain length of time before data are suohed IrHO i ir out i if ihe device, Kememher that IfXSFI, and DEV'SEL are asserted onh' dmtng ol} high. Chapter $ I/O FKpansion Slots 177 17ft Apple lies Hardware Reference 1 The slot data bus The 65C816 is fabricated with MOS Mela Oxide Semiconductor I I circuitry, .so it on drive capacitor loads rrf up to alxjut 13C* picof;iraJv II pL-jipheiat cards are instjIKI r- ill -.... m The Apple 1105 has three versions of the microprocessor data bus (shown in figure 8-3>: slots, the loading on the data bus can he ;is hijjh as 500 pf. su the 74HCB45 buffer i> used to the internal data Kli.s. LU3L \ connected directly to the microprocessor and the FP! chip drive rhe data bus peripheral-card loads. The t^irnf shuaiion occurs if yon use MOS devices and ill main RAM on peripheral cartfe They can'i provide enough drive current fof the fully loaded bus, go you the Mepa [I data bus„ MDBLS. connecting the Me^a H, VGC, Serial Cunimunk.iiioii,% should add hurt'LT>. A peripheral eard mnsi have the capacity in drive IWO LS 1TL Llijh_I> per ConiroileMSCC I. hitegiated B ..' M.n httie (IWM) Allti and Sound General Lf}£ic tnlts slot pin. plus additional capacitance for the Apple 1h;s data bus. (GLL'jO. and (he Megs J I KAM main Kink the slot data biis, SDBUS, common to .ill es pg nsfrin slots Interrupt and DMA daisy chains Figure 8-3 l)aia buses within the Apple ItiiS The interrupt requests < EJi^> jnd NMD and 1 1 it- dfrei i menu irv access I I MA -i^nal are availab]* .u all seven e*j instoi 5 "is ,\ peripheral card rcuuesis :in iniemipi or .i I - M\ transfer by pulling the appropriate output line ipin 2u law. If two |>LTipliL--a.l lanJs rajues* an Sound GUJ * intemjpE or ;i DMA transfer ai the samu time, tht-y will contend fur the data ;ind address buses. To preveni this contention, two pairs of pins on each eonnecior arc wLrcd as a priority daisy chain The daisy -chain puts lor ink-rrupis are [NT IN (pin 23) and TNT OlTfpin IM ADfiGUJ and the pins for DMA are DMA IX i pm 27) and DMA N T pin 24), as shown in figure 8-2, I Each daisy chain works like ihi.s The ompw from each connector ftoes to the input of ihe nexi higher numbered one, For these signals to be useful r'or cards in lower jiumbeied conneaors. all the higher numbered coirtneCtons musJ have unJs in them, and alJ uiose cards iihoi conned I MjmRAX^Ah DMA IN io DMA 01.7 and NT IN to INT OUT Whenei er a peripheral card use* pin DMA. J it must do so only its DMA IN line it" n nu- and h miM disable its DMA OUT Jine while Is is it using [>MA. The [\T IN and INT OUT tinea nniM be used the same wa^: Ktiahk the eard's DBUS ri-.uriipri'ii -! inicrnipi circuits ivith INT IN and disable LVT01 T when* i RQ a NVfl Es being used Loading and driving rules It'l Do mn overioad ins pin on the exj-jansEon stats; the driving capability ol -. .n h pm i> Un. ; | Linda each signal descripdon in Table H-l. The addtv.s-n bus, the data buz, and liic A2B/W line should be driven by thrce-^aic bttflcrn; nrrnember that then* Is ton.snierab3e distributed capacftatice un tfleae btues and thai }xkj .should plan on tok-raiing the added load of np to kl\ additional pcnpheraJ cards, MOS devii < s silt I as PfAs (peripheral Initriace adapters) and AClAs (asyrktonous do unJcatfa ns Interface adaptta) cannot siviich such heavy i.;jp.n iiive loads; connecting such devices dinxily 10 die bus v, ill lead in posstlilc linjing and le^'d eirors, Buh% all MOS output ^i^nals. I- .-.. II .i i :i „r. il.il ik M..MII liuin hwft. Chapter 8 I/O Expansion Slots 179 18G A ppie ] 1 1. ;s j fan Swan? Reference ' 'Hie total power-supply current available for .ill seven expansion s]i Ms is sysem ROM code associated with ihe sfol is executed. The u*er can select the appnipriate slot device through [he Control Panel. The user can access the Control Panel by pressing the 500 mA at +5 volts Comma nd-Cnntroh Be keys simultaneously. The Slot register formal is jaVen in Figure 8-4, . 250 mA at » Jl v- l"> Table 8-2 gives a description of each bit. 200 mA at -5 vote m 200 mA at -32 vote Mtffc Slot 3 device hardware addresses art' always ayaflabte. However, the slot 3 BOM The support ciraurry for the skus is designed la handle a DC load of two ls Tit loads per space is controlled by rlie SKTM." iTtjiK M and StmTCJROM solt switches to maintain compatibility wi:h existing Apple II ptoducts slot pin jnd an AC kud of no more than 1 7 5 pi pet sfcot pill. A Warning Vou ate encouraged not in iii.inipul.ii-L- the Slot register bits under 1 software control; ymi nm a great risk of trashing she operating system, Peripheral programming Hie seven expansion slots on the main logic board are used for installing circuit cards Warning ik- oirefid when ctta.nj3.ins b&s wiinfa ihi.s register. Use onh .i iv.i.1- containing the hirdwart .irui firmware needed tu Interface peripheral devices to ifre iiiodiJy-wriir instruction sequence when manipulating biis. See the Apple HGS, These slots -lit* not .simple 10 potts; peripheral cards can access the computers warning in the preface, * address nod control lines via ihese slots Tin- expansion slots are ruirabered from I in ~, and certain signals, described below, ate used to select a specific slnt- Figure &4 SJnt rejstfifai IC02O Selecting a device Tlie Apple IKS supports several built-in devices and traditional slot devices, with each n s.lnr (levite>drct- device ukinij up one Ii^kjI ilut. Each built-in device is iis^ned m .i situ, .nul peripheral caxdi jre plugged into any of the seven peripheral slurs. I Inn ever, only one device (eillier the Shiliiik-iM-Milt'cl— ' built-in device ot the peripheral device) can he selected ai a time for each slot. For example, '"•: ^ili-ii.fwk'il- you can choose either the peripheral device in slot I Of the internal device that ta associated 5ta i rJevfct.^afai- with slot 2 but built into the main logic board, the serial port, Bercrvtd.Lliiiiif iihdJv- Slur 1 device tided — The Slot register S ' 1 1 -A>.- I 1 The Slot register, located at SC02D, &s used To select which device is enaNeo fot each of trie seven slots. That device on be either ilie micrnal or a peripheral-card device If the enable bil for a slot is I. accesses for that slot* ROM space tjCnxsJ ire directed to the ROM on the peripheral card. If the enable hir is cleated, the iHiilt-in I/O device is selected, and the Chapter K I/O Fxp;insinn Slots 181 182 Apple HgS Hardware Reference 'tabic 8-2 Bits in the Sim register The memory spaces allocated for the peripheral buds are described bekw, Tlie.se memory spates are used for small dedicated programs such as L O drivers FVnpher.il cards ih.n u en contain their own driver routines in firmware an- caW inM^enJ perphemk They make n " possible for you to add peripheral hardware lo your Apple litis wirhi .ut having to change Selects ihu uHfrnjil-Llf\iLu 'AppleLiIki ROM code for your propane provided thai your programs follow normal practice Jbr dala input and Slot T. ouipui. I Enables IxjiIi the dot-card ROM space (location &OT IC7PF) and I/O space SCOFO to SCOFF. Ptriphcral-t and [/0 space Selects the internal-device (5<25*ineh dtsi drive) ROM code for sJinch disk drive) HUM code Table S-3. for jili ft 5 These memory locations are used tor different I/O fundfr&j depending on die desfen of Enables both rite sloe-card ROM space (location SC50O to each peripheral curd, mienever die Apple lies addresses one of the If. locations - -I • and I O .space SCBDQ to SCGDF. allocated ro a particular slot, the signal on r pin 41 ot that slot, called /DEVSEL, switches to Selects the interrd-dcvice i must) ROM code for slot 4. loc ... uwdfw) stole. Tnfc signal can be used to enable fagic on the peripheral canJ thai uses Enables the ska-card ROM spate i location SC4FF> KM) to the lour low-order address lines being accessed, M ilimugh AJ) lo determine whicfc of Its 10 I/O locations is Reserved; do no* modify, & I -• t£ the liUemaJ-devfce (serial pin H, the modem pun- ROM code lor sloe 2. Tabled Periphery -card [Q memory locations enabled by I /DEVSEL Enables both the ska-card EU iM spaa location iC20Q to v.. LociCitiiit S|*[ : ..Hriiil- SaFFiandfr-i-i,^. lAiiioSCDAR Selects the internal-device ( serial port A, the printer porti t $cm-$a#? 5C0DU-M i|i| ROM code (or ska I. 2 $C0AMODAF M/'FO-SCOEF tnabk-s both the afcffc-caid ROM space < location S-CIOO to 3 SCOBrMCrjbT SC0F0-SC0FF JC1FF) and I OspiireJCWtgSSCO^ + & :k r^SCOCF Bjesaveilj do not modify. u .i. i jjh ee fei si its KSO "BO to SOBFi ami] 4 rSGDCO to &CDCF! is MQ a enacted pi Peripherateartl ROM space -byre page of memory space is allocated to each accessory card This space is normally used for read-only memory (ROM or PROM I on the uid. and contains driver t'eri plural -card memory spacers programs tiiat control ihe operation of die peripheral device connected to the card Because ihe Apple litis microprocessor does all its I/O through memory locations, portions it the im-.:mk:i\ space have I'u-n allocated fan he exdusfVe oh- nt i|n- v.m> in riu- i'vp:,iisioii slois. In addition to the memory locations used Inr u-liluiI I O. there Lire memory spaces available for programmable memory LRAM'I in ihe mala memory and for read-only memory (ROM or PROM" on the peripheral cards ihmwiw-s Chapter Mu Expansion Sfoa 1B3 IS* Apple IJGs Hardware Reference 1 The page of memof) allocated to each expansion slot ht-atos-at location iGnOfl, where n Is Figure 8-5 F.xpansiDn ROM enable circuit the slot 1 1. mil n.'i as --lnjwn in TahJe &3 and Tablfi 8-1 Whenever die Apple lit* address one :! ilk 1 :hn KO.M memory locations allocated in a p;iniaj]ji slot, the sienul on pin L of that slot, called /10SEL swis* hes m tin- .ichvi- uow i state This sepal enables the ROM or PROM Kiulik- Lildi devices on the card and the eight low-order address lines determine which oj the 256 memory locations is heiJifl accessed 2KROM [ VIlIm-^ J— Tabic S-t Peripheral card I o memory locations enabled hy [OSEL " A program nn a peripheral card can gel ew tusfve use of the expansion ROM memory space by 1 M .|.li:->( IP] -SC5FF referring to location m Its Initialization phase lots locatkio is special Afl peripheral ty FF1 J scaoo s* 21 i- -j Si - sciSFI i .h'.Ih rh.ii use Eqpanslor) ROM musi secognize a reference to $t~FFF as a hi^ujI to disable their - 3 SC30MC3TF SCTiiPv: "1 F eupansian ROMs, Of course. dnm# so jJs<> disables me expansion ROM un lhe card ilut is 1 $C^O0^SG4FF about to use it, bin ilif nexr instruction tn the initwELziitBon code sets the expansion ftl )M enable cecuii un the card. Expansion ROM space \ card thai needs to use lhe expansion KO.M space nvusl lir^i insert BS ^lol address (ICn) in lotaticjn S07S8 (known -is MSf.OTi before il refers to St. H'E-'. I his .lLIows interrupting devices hi addition to die small ureas of ROM memory itfocated to each expansion ska, peripheral lo re-enahle the card's expansion ROM aher interrupt handling is finished. Once us sJol cards can use the 2K memory Spaa- from SCWCKJ to SCFFF tbr Larger programs in ROM or address has been written in MSE0T, the penpheral card hj.^ esctustve use : -i rlie expansion PROM. Fhis memory si , ailed eqjanslon HUM space. Vl- ihu memory map in Figure H- is ' rj space anu \t> pra^mm ean jump directly inio the expansion ROM, shown lata in this haptet Besides befog larger the expulsion ROM memory .space is i I always -h the same locations, ri.-^.irdk-h^ oF which >N ls occupied by the card, making As described earlier, lhe expansion ROM disable drcuil rt-sci.H ilu- ( j n;iiilt.' Hip-flop whenever programs thai occupy this memory space easier to write. the miLrnpmcessur addresses location vCFFF To do this, the penpheral card must dni-Lr the prvsciu .:! SCFFl-' i m die address f>u>. Vou can use lhe h iSTRB signal fur pan ol the This memory space to avaihhle to jny peripheral card that needs it More than one |x*ipheral address decoding, since it Is active for addresses horn H BOO thr mgji SCrTFF, If ynu can card can use the expansion ft to (pate b n!v one of them an be active ui a time. ahord to sacrifice SOI ice, you can simplify the address decctdmg even funiv. i and Each peripheral card Thuar uses expansion ROM musi h roc a dioii on it to enable the ROM save tircuiiry on the card. For example, tfyou give up the Lim 256 bytes I expansion ROM Use ciFcuil docs thus hy B two-fltage process! First, it sets a flip-flap when the /IOSEL signal, n-ikc. U'ur disable circuit needs to detail onh addfesses of the form KFka, and you can pin I on iItu slut, becomes active (low); tht- IOSEL signal on -i particular slot becomes active use the minimal disable oecodtag cm uftr) shown in Figure K-f>. whenever ihe Apple Mi,> microprocessor addresses a location in the 256-byie ROM address spice allocated to ih.n slot. Second, the circuit enables the expansion ROM devices when the tOSTSB signal, pin 2Q on the slot, becomes actfre i fow); the ,'TQSTRR signal on all the Figure a-6 ROM d isa bie.addi ;ss i 1 1 er id i 1 1 1| i-\| i-.TiM-; is si I--. In-u ::m . niiv: I- v. w hen 1 1 iv ii ik n 'fin icesst t addresses a location m the expansion ROM memory space, SCSOOio $CFFE The tGS'l'HB signal is then used to enable I in- expansion ROM devices on a peripheral card. Figure $-5 shows a typical ROM enaNe circuit. D— 3D°-s; J" n-wt, HOM L-n.ihlu lip-rlrip Qj iinimt^ j tO Chapter K I/O Hspansion Slots li*5 186 Apple Jlos Hardware Reference Peripheral-card RAM space Important To lunciitm praoedy net matter which skM ,i ptfdpta*] card is tnsjalled in, These an? 56 bytes of main memory allocated to she peripheral tards, w bytes per urd. as the program in rhe card's 256-byte mcaiory space must noi make any shown in Table 5-5. These 5*1 locutions are aauallj m due RAM memory space reserved for the called screen k#ks) are nol absolute references lo iisclf. Instead of usinfl jump instructions, you test und Lu-R.es graphics displays, but ihe.se particular locutions i should rbrcc conditions on branch mstructions, which use relative displayed on (he screen &od their contents are not changed h^~ the built-in rnuipui routine addressing, COIT1. Programs in ROM on peripheral cards use the* locatfons lor k'liipoiary data storage The first thing i peripheral card used as an 1 O device must do when called Is to save the concents of the microprocessors register, (Peripheral cards not bdng used as I/O devices - ilhU-S-S Peripheral -card RAM memory local km 1 tin no* need DO save the registers J The device should save die registers" contents on the slack, and xestnre them just befow retumtng control to the cafhng program, II llierc is RAM Skit numta" i in iln- peripheral card, the intorrmhi m nu\ lv stored iIil-tl- Lihlro* L 2 3 1 * £ 7 10478 $047? SW7A surn suri HM7D sun- S04"F $04Ffl SQ4P9 SCHFA KMFB v.-.|! KOTO villi- S04FF Finding the slot number; with ROM switched in J0578 S0579 S057A JQ57H S-n-l S057D 50571 SOTTF S05F8 S05F9 SOiFA J05FB S05B fcltfFD S05FE I05FF The memory addresses used hy ± program on j pertpheral card diner depending em which S067S S067A KtfTfl S067C J0u7tJ J067E S067F expansion $tc* ihe cad la installed in. Before n can refer to any of those addresses, die SiXiFK S06F9 S'Vi|-A I06FB vmli NtiFD SlKiFE SGtift program must somehow determme thecotreci slot number. One way to ito this is k> execute S077S 10779 S077A frl 7B S0^7C SQT77E fr0771 $ r/TP a jSft (jump to suhffujiinef to a location wnli Lin ItTS (return From subroutine) instruction in S07FS $07F9 S07FA I07FB J07p s.-||i $07FE S07FF it, and then deove thesioi number from the return address saved on the stack, as shewn in i! i- fo owing example. A program on a peripheral card can use die e:e.li: base addresses shown in ihe tahle to access the eighl RAM locations allocated for its use, as shown in the rrad section, Programming I Important Mike sure the return address ls located in Apple ElGS HAM, not the Suggestions." memory on the peripheral card PHP status •? BE! i inhibit intEi I/O programming suggestions JSR SCHQWNBTS ; ->a known flTB instruct ion. > < - h. = ; . , . -. va j A program in ROM on a peripheral card should work no matter which stol urd occupies, 1 1 ti_- T3^ ; get the.-. tit excepting any hardware restrictions (sui h as a signal not available mi some riois)< If the LDA SaiDOpX ; . s-prucn fttidresE from stack . . program Includes a jump to an absolute location in one td [lit: 256-hyte rnemor) spaces, then AND #SQP lit is slot na + PLP J festdre Status the card will work only when Is plugged into the slot that uses glial rncmof) space, EE you it are writing the program for a peripheral card 1I1-11 will he used hy many pcujile. you shoi d Hie slot number can no* be used in addressing itie memory allocated to the ]>eripheral tTiid, avoid placing .such a restriction on the use ol the i trd as shown in the next section i li.ipier H I/O Expansion Slots 187 LNH Apple (Tgs Hardware Reference 7 I Seixtitig your imget. You must mata awe thai y get an appropriate value Icuo ibe 1/0 addressing i- 1 index register when you uddress r locations mis wayH Fof example, stalling with 1 in the ^ccu mulatto, ihe instructions in the above example perform an LDA from local kmi 0n« four peripheral-card program bats the slot number, ihe card can use ihe number to address the I/O locations allocated to chtr situ. Table 8-i> shews bow these locations tfle SC090, the firs* 3/0 locution albated to slot I If (be value m ihe accumulator. (discussed in detail in Chapter 10) had beefl 0, the LDA would have acrc&sed loeaHoii related w Id base addresses siansinj; with $C880, Notice thai die difference between the base address und ihe desired VO location has the form $d)» where n is me slot number. SCttSO, thereby setting die soft switch that sdeets the wcond lutnk of HAM at location SD0O0 ami enables it for reading. Starting svirh die slot number in the accumulator, the following example i ampules this difference by fenjr left shifts, then loads It urn. an Index renter and uses me base uddrcss 10 specify one of 1ft I/O locations A5L r g#t n ASL « RAM addressing : : r A5L 1 * . . h. i a h. - order n ttfele. ,, A program on a peripheral card can use Lhe eipbr base addresses shi fwn In Table 6*3 to acflsss TAX ; ...of in dex req the eight HAM location* alloruted for its use. Tile program dues chi> h\ piming mh h!oi LDA ?COSC F >L ; load from first I/O Location number into me V Jmlev register (discussed in deiaJI in Chapter 10) and ustog (ndesed addressing mode with the base addresses. The base addresses can be defined as constants Tafak&6 I j l riphi'LLl end l o base Address* because they are the same no mutter n hk h sii n; ihe peiiptieial Card iH'Cupirs. Sim number [f you start with the Correct slot number in rhc;iwuniii]atof i.bv using ihe example shown Bpk earlier m this chapter, in the section "Finding the Slot Number wUh ROM Switched In" i then suUnrj? 1 1 ' -i s 6 7 Ihe following example uses all eitfliT RAM locutions alloc-jied to rite sk)1 SCOSlJ SC090 SCOAu TOttO scgcq KTO3 SCGEO 5COF4J SCD91 SCGA SCObl SC0C1 5CQD1 >: ;i ie i scon T-DA 5Q47B,V SC0B2 $i | 92 SCQA2 sc:t>H2 Si h 1 SC0D2 SC0E2 SC0F2 STA SC-4FB, Y LDA ¥D-57B,Y sew SC093 tGQA) $C0B3 IGQC3 scow SC0E3 SCQF3 STA ?Q5Fa Y r ft$94 *COlJi SO0C4 SCGD4 SC0E4 SC0F4 LDA SQ67S,Y SCOltf JC995 5O0A5 $C0B5 scons SC0E5 SCQPi S7A SOGFS^Y SC086 SC096 SQQA6 Nfl'lSUl $CflC6 5CGD6 SCGE6 SC0F6 LDA S07"?3,Y JC087 SCO"? SCGA7 SC0B7 $O0G7 SC0D7 SG0E7 SCOT? STA S07FS r ¥ SCOfiS SC09S SCOAS $C0B8 tooca $am SC0E8 score SC0H9 SC099 sew SCDB9 SC0D9 SC0E9 SC0F9 A Wirnbig \i >u niust l>e very careful when you ha ve your paipberakard program IC08A SOQM SCflBA fGQDA SCOEA scorn store data ai the base-address locatuom themselves because tbej n-. SC08B SC09B SCOAB SCOBB soidb SCOEB SCOFB tempofar>' storage locations; the RAM at those locations is used by the SCttflC SCQ9C ICOBC ,: n : SCODC SCOEC SCOT disk operating system Always store lhe I'ir^t byte of the ROM location SOOAD ICOBD M..I SCODD SC0FD of the expansion slot ihui is currently active ($Cn) in locatfors S07FB SCOBE SCOPE SCOAE SCuBE ,i H 1 SCODE (COQ SCOPE (MSLOT), and lhe first byte of die ROM location of The slot holding the SC08F «CO@F & DBF JO* I 5C0DP JCL7EF SCOFF contioEler can! for die sunup di>k drive in location SO^Ffl. a CHAPTER R I/O ExpanstoQ Skstti W 190 \ p| ilc \\< .s 1 1 j rd w ure llv I'erence Other uses of I/O memory space Switching I/O memory The portion of memory space from location SC000 tough SCFFF is noonally allocated to Tin- built-in firmware uses two see of Hut; swftches to control Hie alloeatet ul the I/O I/O and prci^fiim memory on the peripheral cards, hut this computer has built-in lum dons iiieiii'irv space from SCflOfJ in JCFFF. The laadons of these soft switches -ire given «n that also use tins merruiry space. Figure 8-7 shows the dhrisdon of die address spates assigned Table 8-7 id iriu built-in and peripheral devices. Hie sofl switches thai icmim] the allocation of mis memory .space are described in the next section \i'^v Like me dispbry switches described earlier :n iln* chapter, these soft switches .share their locations with me keyboard data and sirobe functions The; switches are activated only by writing, and tin- states tan be deteimided only hy reading, as indicated in Figure 8-7 I/O memory map " Table B ^ I I Lilik-s-" I niL-iii'irii switches Inlmul ROM I-, .. tow expaiuiun ROM ind peripheral i m |40fc| SETStOTCifiOM Enable slot BOM at SO00 SCOOn 49163 Write SETINTC3ROM Enable internal ROM at SC300 fGOOA $9162 Write IQWI RDC3ROM Read UA JTC5ROM switch ft l I W175 Read i \ - slot 3 ROM enabled, Stof7ROM AppLeT:iIk kOU = internal ROM enabled) SCOT Sb ROM IS HMttllfM ROM SEmOTCXKGU Enable sfal H' iM at SCxOO SC005 49159 Write SGMXI stotsnoN Vvinthd>kKi.iM MM KtCXROM Enable internal ROM at SQtOO S#»7 49158 Wriic m 500 RDCXKGM Read SIX J 1 1 :\K( >M sw fee h JC015 19173 Read 1 - slot RON3 enabled, s| -! i'.| Mr mw ROM SCtflO rj -Internal ROM enabled} sb 3 rom Hkiihmin $OH HZ30Q SlttZflQM St'rijL-jxjit ROM When SETSLOTC3ROM Is on, me 256-byic K< M area ai SC3O0 Is available to a peripheral SQflO SI r: 1 ROM Vn.i!->' : 'M eatd in slot 3. whidi in the sloi normally uied for a lerminal initj rfjLLf. Turning SETINTC5ROM leioo on disables petipheral-caid ROM in slot 3 and enables thehiiH-in BO-column firmware. The Interna ii >. n Ins JnLl pt'npiiLT.il 1 1 SCQDO BCN :jIimimi FEnhWftrc is assigned to ilie slot j> address space because .slot 3 is norrmlk used wiih a terminal interlace, i 3 la en when the 80- column hardware and firmware ate operating. Thus it Is always possible in use this slot for any I O peripheral that does not have built-in firmware. niAi'iTR* l/GE*panBfoft5k«a 191 192 Apple I [i S I l,i rd * are Reference When SKTSLOTCXKOM Is on the I/O memory space from SUOh in 5C"TP Is allocated t- 1 the The main purpose ol the interrupt handler is tu support interrupts in any memory expansion slots, as described earlier Ln this chapter, in the section "Peripheral-Card R( M configuration. You can hest handle interrupts by saving the machine's stale at the lime of the .Space/ Setting SETTNTCXROM disables the rxripheiakard ROM and selects buflt-tfi ft IM interrupt, placing the Apple HC5 En a standard memory configuration befote calling your -ill (if the J memory .spate except tile space from 5CQO0 to SCOFF (used fur soft switches pn gram's iniemapt handler, then restoring die original stale when your program's interrupt and il.i [li I 0) handler is hiii>kn.l \ftfe Setting SETINTCXKOM enables built-in ROM m :ill ..r the I memo*) spa e What is an Interrupt? [except ihe sofhswiich areah. IncJudtng the SCMX* spiice. which contains the 80-cnlimm firmware An internapi i.s a hardware signal ll~u.il tells the compuler to slop whal it Lh currently doing and devote ii.s attention To a more important ta.sk. Print spiling and mouse handline are e-uiuple 1 - lit inierrupi use things that 'Jen I cake lip ,ill the time available io the system, hut diat shoukl be taken care of promptly hi be mu wen effectively switched out of slot 3 when the system IntermpL priority fcs handled by a daisy-chain amiOjsement using twu pins r INT IN and INT was tumrd on (MX on each peripheral-card slot liach peripheral card breaks the chain when if maJ-es an inierrupt request. On peripheral cards that don't use interrupts, these pins should he In the Apple tlGA, onty the Control Pane] may deferrable whether or not the peripheral card in connected together. slot j is steeled. The i1,iih\ chain gives priority to the peripheral card in sIot t : If this card opens the When programming for cards in ska J; connection between INT IN and [NT OLT or if mere is no card in this sloL intermpi requests You must support the AUXMOV E and XFEH firmware routine*. See the %.. from cards in .slots I through <> can't ,eel through. Similarly, sloto controls interrupt requests elroniwrre Reference Uw mfemndon on these routine*. (IRQ! from slots I riirough 5. and s 1 1 in dow n the line ])nn"( UHf unpublished entry points inio the iiumi.il Sf,nCH.i firmware, because the} m r. When ihe IRQ line on the Apple HGS microprocessor is activated (pulled low), the i hangc in future Apple li Smtware i - 1. - - microprocessor transfers control through the vector in locations 5FFFE to iFFFF. Thts vector m If your peripheral card lh a character I/O device* you must follow the Pascal 1.1 is rhL* 4 address of the Monitoi firmware ! ink-mipi handler, which detenmines whether the rrrmwaie protocol &e the AppfettGS Firm-tire Reference far more Infonmtion. request is due to an external IRQ or a BRK instruction and transfers control to the appropriate routine via the vectors stored in memory l a^e i [For lunher deuuls on handling J Interrupts in the Apple \]c\ see The Apple fe Ftnmmv ftfemtct \ Interrupts The Interrupt fo >M code Is available when shadow^ \& enabled mutate inhibit I/O and Linmia.Lje-eaTd nperaiion UQLO hit in the Shadow register is set Tike 5ET7NTCXEOM and The original Apple lie offered link firmware support for interrupts. The Apple ITtis firmware V.IM.' '. XI': 'M ;-fr switches do not jft-L-ci interrupt ROM accesses. provides improved interrupt support. Interrupts are easiest to use with FtoDOS and Pascal 1.2 because they have interrupt support built En. DOS jj has no built-in interrupt support. riiiiiiiy diagrams [he fattowin^ pi^es contain titntng diagnuns for the slot signals reouired to handle DMA and general skrt I ( i CHAFTCK 8 I O Expansion Slots 1» 194 Apple lies 1 litrdwate Reference figure tt-K I O dock and control timing • Nvle All clock signals present on the I Q slots are buffeted hy the Sh>i maker custom IC. These dock signals are delayed somewhat from the conrespon ding signals on the main logic board because of this buffering, All liming parameters in ihe timing diagrams in this chapter have been adjusted to account for this dek] ..I The standard Apple lies slot [ O timing is shown in Figure 8*5, The liming parameter* are given in Tahle K- LJ. When the p 'ih|'uiilt is running in highspeed mode (2.8 MHz), the address hii.s op the IQ slob Is not valid during the entire oO cycle, and therefore cannot be used Do perform Unqualified address decoding. Hie M25EL signal (which replaces the jiSYN't: signal found at pin 59 m previous Apple IT models), indicates when a I. "_! \W\\y. synchronized memory cycle Is taking place and, therefore, when the value an the address Ihjs will remain valid dirt ha the current tfO cycle. This means that cards thai use the Apple 11 technique of J g3 "phantom slotting to put multiple 1,0 devices on one card toast use M2SEL to qualify their address decoding. IRQ. ROY Figure 8-9 I/O read and write timing r x TahJe 8£ 10 clock and control timi ng pa ra to ets 1 1 Siinihcr Uescrtpiian MkkMMtf MsxiirnmT 1 iSHJ low time 48C SFf r J oil high time 4.H-- J ol high lime tfu I *] luw time 460 JZDd 5 7M 1 * lime 60 -. " Fall time, all ckxks ;i III IF-DOlwriitthLii '"S////// 7E Rise time, all clocks |:i ty//////. § ~M high time fifl '" 9 Q3 high time m rr-fhiiri^liLiUi '"/////////* I'- Q3 lav imii 200 ll Skew, oO to other clock signals -l-i : 12 Control signal setup time 140 • Tin* at njni^.iirnU CHAFTCK H I/O &tpsmsiofl Slob 195 196 Apple lies Hardware Reference 1 Tabic S-9 I/O read and write timing parameters Cards thai use iJiel\H signal will unci iun properly only if the computer is funning ai 1.024 I MHz. I!' the computer is running at hi^h speed, the addresses thai are wen liy cattte in the I/O iKsu ri|:ii,.n slots are not guaranteed to be valid during an entire 00 cycle. Also, since- the upper 8 bits of the memory address are nut available 10 cards 1 nn.lv 16 address lines are :s\_i Lil>k- ;ir ihr i 1 M1SEL low from oO low M 160 slots), ihe potential ol r\El is greatlj reduced in this machine. 2 /M2SEL hu3d time -I" 5 1 ' ' l njhltr km from oO high N L5 "DFVn. lOSELn. IOSTRB) figure S'10 3 O read and write timing with INH ai Ave 4 J enable high from olJ tow 10 (DEVn« A05EU, .IOSTRBJ * Address and A2R. ¥ valid from oO low i:- 100 UO "\ "V -. " Address and AWW hold lime 15 Wriie data vahd delay S 9 Write data hold time Bead data setup time ha i>u 140 JO IMI 3L X |i.' Read data hold time 10 V r Time m iy rnw^i iniJ>. Read and \\v\h- > \. h> ilui are directed to ihe I Slots b) F\H have Tilt same timing ^GD: :^c parjrnfCff^ as norma; I o read and wrtte cycles, as shown in Figure B-10 and Table H-iu When 3N3I is asserted, the computer responds as if 3 SEep [J memory cycle were being performed. P llnl' VICfiLLl:M 1 ' W/////M ' W/////A Tabkfl-10 t re&d and write timing parameters with ."INH active ||-|'"rL'.jdtLiUl " v///// s,k \ w//////, IJt:*c:rl|Hlitn Mkilnui^ Maximum" 1 inn v.i lid after 0Q Ion 175 2 l\FI IimIiL lane 15 ; DMA devices will worfe m the Apple Lies compujer only m 3 024-MHz mode, rr the computet /INH Low to MiSEL 1. 30 Is running at high speed (ZM MHi) onl) DMA accesses to ike high-speed memory banks .0 INHlilghto M2SEL high delay l! 50 through \1~ will wort Accesses U) all I O and mien memory musi be done at 1,024 MHz. To 1 5 Address and A2R W valid from 00 low II 301 s3ok the system, set the processor speed bis in ihe Nntt'd reglstet -ii location SC03d bel n 6 Address and A2R W hold time IS requesting DMA. " w'rile daia vaJid delay 30 DMA can be performed toot Mum am p.m of the Apple IJGS memory map, provided thai the H TC'rite data hold time # DMA lunk re##ef Is Risi set to the appropriate hunk DMA read and write tuning h shown in " Head daia setup time to ofl Liu Figure 841 and ruble 8-11, in Read daiii hold time 10 Bane in naiuweeicfflds. CHAPTER 6 1 O r.xjxin.siori Sims 197 1*18 Apple llf.is Hardware ket'erencc Figure 811 OHA rL.Kl arm vu u- :,/, r £ZZ _ \ L=-:V.I A2R/W — im; r M25EI PMAlwruedsiliii mi\ £ DMAIrruddatil '"//////////A l ^777777Z Tabfc a-ii DMA read and witte liming parameter H,JX- Ducripiinn %! LSI Klin 1 Maxlmumf 1 .DMA Low fjomoO \lf lir.% 1 j Chapter 10 The 65C816 Microprocessor I j G*fW . 1 pud ^ nliipk uT 1 < The microprocessor is the intelligence of die computer system, it is this ; device that recognizes [he instructions encoded hy the programmer and manipulates, the other devices in the system JVGC the Mega II, the ii.n result in output such 35 video and sound Figure km shows ftmluttRCn the Apple tkis block diagram and the relationship of the microprocessor (0 the rest of the computer, h.,.Mi The Apple tk;s uses the H5-htl 65C81fi microprocessor ;i CMOS design based 00 the &5C2 chip- The microprocessor provides this computer with greater computing power in these ways: It can operate a* a Kvhil (^i rt]h • if .111 S-hii (viiH The -j MB uddtess range increases the potential pmgram and data size The 16-bb Internal djtj registers tacrej.se ih< ipiuvi'.s data- handling capability, The 2.0-MHz processor speeds compulation*. 205 206 Apple. IIgs Hardware Reference " This chapter describes the new features of this mkroprocejwiir and its Table If]- 1 Some fnOG familv lies capability to emulare the 6502, Abo, cacti of the 6ft»l6 internal reisers h described briefly. <.«.HKi CjipwtrJ-lsllc Const ructioji NMOS CMOS CMOS AIU bits H a i. : The features of the 65C816 Address bus hits 16 16 24f Data bus bits 8 8 ?^ T i|r-" 1 *'Ll ' ^itoccssoi -h.ik 5 many chzoiaerisfjcs with thi i.^U .mil — Maximum meinorv 64K 64K 16M (: - i > -J u.vL L i - m otbfr Apple d-femfly comptucrs. largest 256 256 ihK it also introduces $m, features rm found in other Apple J I L(..iii|iu!'jr. :li^-. .in- Defined opcodes 151 ITS 256 Addressing modes 13 15 14 the 16-bk accumulator Relocatable difect i^tnr . The nine registers within the 65CEH6 tie described below. • I. . I.. .mi 1 1 :..., n, use the rasters in iheti5Cftl6, seethe Apple UGS Programmers W'tMuip Assembler Ml V V lnili.-\ iL>ji:iKI - 00 i I Mm inkjtgater- The accumulator DO 01 - - Suci pt linlL-r M s The accumulator (also known a the Arithmetic Logic Unit—AIL") is a Ift-bii regfete ihat holds iiU values while arithmetic and logical calculations axe performed. The entire 16 bite - t'ru^T.un St.iln- • i. i of the accumulator Ln the 650316 is avsiable in both emulation mode as well as nattve mode. The low half of the accumulator is tailed the A fearer, wMe the upper half is - ftfcgpm ojunlLT - referred to as the H register, Some documental ion on the 65CS16 refers to the entire ifi- hh register as the C register; hut ft ithin thb manual, wc will refer to the register as (he - !> ^r Jin lunk Plainer 111-: accumulator tall 16 tim\ or the A or B register ^ l-n values ^ iUiin ihe accumulator). -Ihv.i k'-Ku - 00 The results of calculations wiihin this register sifted the status bits in the Pn^um Status register. K s J Ih Ih X Index register li. L.1--1 ! i^n in bits Register JL-njqih inline Hie X Index tegfefei is j ii-hu reiser that is used as an address offset value when calculating an effective address V ben the Program Status register x hit is set. the upper N I., m '..I-..IVI-. . hi ^-,1 .«- .I..I . .i-i-ii i U i l-mui\! bfts of the X Index register are filled with 0"s that cannot he altered. Y Index register The V lades register is a lo-hir register chat is used as an address offset value when calculating an effective address When the Program Status register x hit is set. ilie uppers Microprocessor differences hirs are filled with Os that cannot be aitered- The (nCHlu microprocessor differs from ihe oitri ]n several ways. This section describes Data batrk register some i if those differences and sheLr impart on program eat n n [ii native mode, the data bank register ts an frbdt register that contains the most significant bite of the effective 24% address specified in the X or V tndex registers when onk 16 hits of the address are provided. fa emulation mode, it contains o s that ! cannoi he altered. Chapter Ml The 65C3S16 Microprocessor 209 210 Apple lies Hardware Reference . " Table 10*2 Bits in she Prog/im Statu* fegBter Stack pointer iH'^-iTijuimi In ihr eaiiJO Apple H computer, tbit stuck was Incited at $1110 through S1FF sn memory* En die iCfilfi. the stack can he Iolmll-..I anywhere in bank $00, but may not Exceed S4K, iH negative result): This hit Deflects (he liifth hit of the The stael pointer contains the address of the nest arable .slack bcntkm. The stack accumulator ?bdL 7 or hdi 15, depending upon the .state of 'grows* in j downward direction (toward lower addresses just is with a &W2 stack); PL5H and P1T-L Instructions place and remove bytes from the top n of the stack J the m bit"). When it Ls U, die wduc in the register is a signed positive value (actually the lowest address), This bit wfll he set lo 3 if the last operation in the accumulator resuhed in j negative value, which Will set the Program sunns register jccuniuialor high bit, v ( accumulator ovtrfiowi Thfe hit indicates whether oi The Program. Status register is at! &4tfl register that contains status bits 1I1.11 .m- w: -.:: nut .in overflow condition h:cs occurred An overflow is cleared as a result of the condition of die jcaimulafw .ilni each operation within titer when, an arhhmetk result is. greater than can lw accumulatot Also, ilus register contains the o, m, and x hits thai control the emulation represented by the register (either 8 or US hits, depending mode and register size. This u.y. >. i >.. ui.ni H hits in siac in both native and enuilmion upon (he state of the m W0. The overflow bit Kg set when modes. Figure 3D 3 shows the formal oj the Progtam status register. Table 10*2 describes he curry .r.ir ol the most significant bit Ls different from ihese Nk I Ihe . my nut of the next most significant bit. The value of die nvedlow hit may also be described as ihe exclusive- Ott of the curry fttto art J out of the most significant tril Figure Hi \ Program Status register When this bii is ft, no overflow has occurred -,- I .I" II ll.l I. ". I I Hi |-I!i;l; This bit will be set to 1 if the last operation in the accumulator resulted in jn overflow. i in sue iriieiuon .ml I .< the accumulator stae to 16 bits: i umulatoT sfce); Setting this bii to will j\ < nivalis l- rL-iull i „ Setting this bfj to 1 will set die accumulator .size to B bits. In emuljticm rru*k\ ih is bit is permanently set to 1. v(cwrerikit* result)— x CTndes register -i/ei- Setting rhss bn to wrll set the X liL-fnul;iEJi:ififljc.iJfiirilyi and Y lnde.\ registe-i sj/l-s hi hi His. TTie Index register m ;. Li f Setting this tm to I will set the X and Y Index register X (ifldes noisier w& — sixes to 8 hii> In cm nlarion mrxk: this bit is permanently .! .ii .Irn^JL'i set lo 1. h i break flap); Reading bii I Will relied the -state of an I H .':.| - interrupt. If j is read in this hit position, the current micrnipi was caused hj software, tf a l is read in this bit -..Mr. t -i -i i .ii : • I- — position, the current interrupt was caused by hardware. 212 Apple [ft is Hardware Reference 1 hapta I" The CriCHlfc Microprocessor 211 Table 10-2 Bats, in the Program Statu* register t Continue J l Program counter >jlur -. -. f-f i ' The program tf winter is a lu-bh register I hat is concatenated with the program bank rueMer lo obtain the resulting 24-bfl address of the ne*t mstnictiofi to he fetched for d (decimal mode); Setting rbi^ hir u iMruers the execution. Note ihal the Upper S bra nKiht program cuuntet will nm maeiiieni across microprocessor [o carry out mathematical cjIcuI..Ui:-i:i ; page boundaries. Tn emulation mock, this raster plains its 24-bit siae. tSer the next hexadecimal, representing values in hex values between SO section, ^Program Bank Register.'* and SF Setting this bit to 1 manias the microprocessor to treat Program bank register all 1 1 ial iiiii.i I v.. at computations as h-narv- coded decimal. limiting the represented values to numbers between n The program bank regisiei i* an K-hir register thai I ttttftirc the most sJgnifk^nl b] I and 9. the 2-t-hir program counter address. In emulation mode this register is available, although t f interrupts disabled): Setting this bit to allows interrupt limited in trs use. requests, to be serviced. Setting ilii.H bdl to 1 disables all interrupt requests that are Direct rrgisicr z (zero result).: This bit will be if the Last operation In the previous Apple computers, (be zem puge frilled the direct page in the 65CS16) wa> resulted in a nonzero value. This flag Ls not limiied to use located in the lo* $100 bytes ul memory, and could oof he moved. In the 65CS16. the with arithmetic calculations direct page can be louicd anywhere in Kink sou The Waning (low-byte) address of die This bit will be 1 U' the last operation resulte J in a value Jitlx I pjgc i> Lk-kTinined hv ihe t>irect register. This address can be any value from srxX'O of 0. through SFFM. Although the dttrect pagei-tn begin anywhere in kink $00, there isne- c {carry generated'): This bit will be if the Jast arithmetic cycle penafry u hen u di ies not cgfa I m a page bcrunckr) when the krw byte of die Direct . i calculation did not result in a arty, register is not SOD). Tn emulation mode (e bn = I). the higb bits of thus register are set to f\ This bit will be 1 if the Last arithmetic calculation $01, and all slack rdfitftnees ait limited to page 1. generated a carry. e (emulation model: "This hit sits "behind" ihe carry bit and h exchanged with the carry bft Setting this hi |Q 3 places the microprocessor in 6^02 emulation mode. In this mode, the Index registers (X and V) become 8 bits. Emulating the 6502 Slack commands and arithmetic caku lotions are tf-bit operations. All others remain 16-bit operations. As mentioned earlier, rite EftC8lr> i^ , tpabted emulating a 6502 microprocessor. In Setting this hit to 1 places the microprocessor tn native. emulation mode, the (nCtftn will execute [be complete 6>t>! I (> instruction set (which 16-Nt mode. All operations in this mode are lo-Nt indudes aJJ bi02 instructionsi, but many of these instructions will he of limited use 1 1 perm ions. because of the reduced widili of registers For instance, the X Index and V Index 1 lit- registers are \b bits wide in native mode and are reduced to 3 hta in emulation mode, l^ote in Figure 10-2 dial certain bits in some of eJk- roisters ;ire filled with specific values dtat cannot be altered when the m bit is set. To emulate the n"502 microprocessor, set the e bit to 1. You may then run program* ih.u wet* written for the oVij: CJtapk-f JO TJie b%&lb MiaoptQecssor 22$ Hi Apple TEUS Hardware Reference Operating speed W65C816 The Apple DCS can run iheftCflld process®] .n one of two speeds 1014 MHz and iti MHz. The V! controls [he docfc input ugiul to the nticraprocessoi and select the J CMOS W6SC316 and W65C802 appropriate speed as indicated, by the clock speed W\ m ihe Sp^-cd reciter ie*Blt Microprocessor Family OflnanJ DeicrlplKMi » *&tV*£ta CMOS a* nun I Lib ,iTHr cnnuimplipn anri inrmpnaij WUf: VltaClfltt anil WdoCilH ji* :".MfJ^ Ifl-bil mi:yi,i|iia:p«uiiia laa- noMc.lmwvtv PJMlfl lull' vat\- *-*CO"*iLC«tiy *-(ti IhM 4 01 NMDSJPd CMDE-6-EO& » Si'tya S-oV cuwii itcjplY. aV ipkiImiI hiji pmlK mmf ha ATi.M;B;i' :a pin-lc-pm cumpjJ.hla will- Hhil «-iL#*Il^iin|l r IrJiM}' D #nJa1ha WrPSdHElnlmKJl HCW^MIHrfJ "C-fl Lanpalaalrip- wilh tfijif tumoral KU It mncuhvlaa Thnia: ra»n»a i:Hbi II-h man. advu-Cmnai at (lUO$ • H-b«l K^MI Dili l"3*l KCHi TO Gl nrtTlQf p 4 MBpW HUH i«ii^>Bffl «xiudi^ inirMHd nan immunilp'. hinhP' iB*iD™tf "upi ecro»i vt wing | AiiMhin ^in*f^fx#ucv progjHJmmiUfj mecm iMi^Ltunuiio *Lu, Tu lorn nil iru jihoul pic^r.iiiiniin-j, rhe h^Cfllh [tkifiopf lessor, read the following books: UurtUM kUy [nr uiud la mplamanl iatlsraE ml ariupL daipan » *4ht| lAfJ&Btl inpyl nnd Kjnf.alan -KtoriJjpprjrtl -irtjjj m*mnrr H a-^n Y -wjek ipfjijirf i. pnfj Ijlar* F\H*r ing aivr ha.i" (II haan - ranUaUlu li'jili Aran «*-Qn DhMfP afl* I'a^Uti' augiWdMl|.IErw[>rKI Tklmi \\tn*y. Pl4d kdd P«p* iddlWrnO/i SCd^lp • 3K-JI J|i? ivnnrjm jrrj doll [WW [*flilloll JltC* p4GOr» ,*j ^ngram HMnL ird Dala Bmii» laj^Mn aJi:» i'4-til mamur, ria:l>uiii"u Fisher. Mi'. m-J :.i.S7Gv>5SS&Z AsswMy hiti^im^! Programming. Berkeley CA kaarnaiili^m ui 1JI ltHbjlH liiair ulrimaLPn *in MO man ad oy hnqar KKPTOS^rj I • **E+ DrKlfeg-VM'li-^allCk iMIlFfl IMI«lH>}pruildHCapaCa-ii'lilnl la-curawai a'td <*-i:k alk-rH ;r::yummrij I , FGui "fl- Iv'JI'l >" WJl"** l^liPm daiiflnaf wm many (jmsoraj Ttm • i* rtdi»5ng modH-U ann^MI «JL: mOOta pidl II r« ABOAT h-i^J! tu- rnariupl lliu il juplly aiauair^. F-aliuLlrj--. ail Ti u u I I .ddiauri; iuikmb wlh- Ul niilr.i: iiiini iiiing j~i.*i lapcndaja mmlttpina wiitrnjl mflrnff, Ihiynltumnn ,ir.jt]l mempp, (.yilnm^fVinTi • «** M4 (C* wit? iu« ** fHd ElOp Ilia OiH.1 I-3TPI PBlluuhUrili Vflid A*l!aia^C^| and VbiU FYupram kldiu (VW| tajOLft* :.iiij ;.-.-. David, Lintl Hon Lcliiv. FnftrmTiitwi}> flit' «ir«f » oili Hormm w -pIMb- laMma ikihif rjx-n.itict-.CJi. ^Lrcrapja mlBtrqra \n\prr.f and I 1586, t\Kftrt Mf^ClNVA! JI'llH vpL'. aitai 'Ml MHU pf p-niam 4«ranan| .a ariiBiiarl Mr-rtilvrifl a <*ft\\\\r i| dupa madaj aaiv t»V rviy. r In-J'in-rwji.-i' innlr^KliQn |COP> Y»H> !#*>:« VKinr Sup- I M miMiiluhnfl I'k- Hif.i..' Pub flfPl £->1I W^IUWU LuiilrjiTBlu-a La teulmu ;kipI preuaimii nKaar lu aaliil ll'u daa^A anQiftaai. C*\uu\ in! AppliLabui'i lului • Hmu. h\vk "-,-** r,-ri. if milior. aaoiOn hpj p«an rxMiM Milhi-. Ir.(. aalp v»"i WUCTIftPn HIT *fH [rimiTcjni qpg ~| a* m^i^w Hi r ,; Rtddiip Lu»~ __ JDE# 1 'KMI ,KLl i 'f 65C816 data sheets ___!qrw f.Mjnlt-- 1 ! 'I ... $3 F Ha^ ! < |3LT I On the foil wing pa^es are the data state from nne of the two manuLkiurers $ the i . *x: uj^hlahir i I 6 5C816 iiiiatjpfocessotf ("""flf* I'lwiun i'PCHI rii.^TT P(bn h I CiL>fcn n>g Lo* 1 .-. i *.i 1 1\ ii f i ; . I- *i V M * D £ C r- inut £EHO I IFJULT CEna I— -^ j nfJDiaABJLE: OlSABL£ DECIMAL MODE 'I.. I INDEJtHEOi ScLEC" I agiTp- .FjBIT UEUOPlf 5ELEJCT i aSlTQ. ru BIT OYE5 TLfW ' i l..,. f NEGATIVE I NEGATIVE Adlrinct tnlDrrnilrcn Dili Shecl THEWESTEHNDESIGNCENTERJNC ^.*--n.iiH'Viii F.'ji..-^jOii4i:t+Hn^ .i Tpiig ig sorb-anGfld iniofrttocicih aM specnicaporiB are suLw^tt id change wilnou( noliCff. 215 216 Applu lies E^jidwarv Reference Chapter 10 The 65C816 MI< raprcx ess n 1 A*M*±m MpMlniMm ftrtngg {WW T] AC CliflriCl+inlK. W«5 C8 16 i j: a-..-, i p* in., v.. ,;•- i . , r „ ve twmi l|-*-i *Mp» Ttrl dailC* COOUiPb "Ddl pralKDOn jgjinKdvn JDfl duE IC rigr ilm-Z i "* H J 'whe iuht IMHi Suptitf votnpi H.:ll -OJVlolfflV •fi&aqmvr 1*^1 ™= B^Si.ft^-f™- rjracaijliiini ihueu Uka-*KiJ*rjO j "''arriHtf V« Mi- "- khn Mai M- Ui. yiu Mil Umr IrpJMifi V* -O dV | u Yu U ,d IV AHrtUliH «a ru*l*3*# hiflhii Ihyn |n p .nj. ,n,,,n i|i.ng Dfc»Tima j t»c [ w | Be Pan | DC | IB? 1 DC 1 m DC i^ taVHIflg Trim pan al lira Ta ,» " -.j . Vm. ii2*0 ID Siau ^ 10 UGW 13 0lH4 iD -«• I E -CMainQ ll>HH mlmai mi, CM* par- irnni n j j EU'Jyu 1c.. in.ji,.,^ T. •b-C - iW C • npnilmn undar Hint unndihuii • r>ul i-oiil j IKAh ?a0 » '.' :.- - «S J p P io m nS i i- ,.,.,:, i .... Umt ttfi i'; Barlufl + f> < -.1- uj« f ** ' " *° erE *° h-. bi -...'J raaq t pt- 10 IP - 10 'i£ j f DC CharKlHiiMcs [All Drvlm): >*. -niv -*». v» -flv i I » 1 i* - "' 1 «CErH T.ma- | KC lfii 'w re ni l'...m.'.r i T -.L..« ^im w.. UM „ ,, . | io- - K J : j .C j__ nB IBUUIHIBI -'."ajr tlH toFS". itbv.iffirait. IS, il MjU-UJ HiKl.uU>!.,|.i,n,. | mf| : *g 1 » M ' in 'iS #2 1 'JI NMl A,£OH r Vud*0J U bam 1«J I DO _| «]"«, V*. ^i-*D,lla-...: ' -h itHw 10 — : ID > Ilia. RDv IFTQ Lmu DJ 0.1 fruwm CgniHriS^ji' ' - l^m;i 40 :, o ^ j 1 #2 l*Jl rM, *flORT -U) U I *> - "• - "- W . 19 fl£3. nMi imu SO mi aumMi n-i r- r | Ihi:. v.-M,.^.-.. )B- » • j • j TnS RDY {Inlnml Puhup Opflp[>»ri m • ^j1 »«mri time an H -- - as - t 9 ' _ „j*i *a mni 1 i .. Addraa* linm .m.i 1- ... Clui- AAfTVK. OKI. R'W jCrH SiaiE BE Q\ - -ID IMPtl 1 *> 1 | » » nl SYNC. Dill ArJUItti fl.rt ML UP V X b. V. - #1 ifiMTl ,#3|OUT| OT Vic V Hi, V ValU OlU |a,i u in 1 In' hi ! do us i HVMC, Dill AdUlata fl/W ML. Iff, MX E VQA. VPA # iouri.*aiouTi U* 1 V Timlna Dugnm ;irVB5Cfl1»5| hw m* mm- fiid-jin l.^... wfcBm v-.-m vi u.. u.di BE5.HM" -*Q SO BE AB1RT #3 Vet! i- iDaTn J| — HUl Br m ; tuirTtjBn [ Nft 1 OMCf*«M WHII DaTl, Ml HI . *-^ md — \* — SjC^- «"..- _^ 4— In A&AtS AAkwi Bkd «C MQC0iir.KI"2n ^c X ] ABDRT fr... i. :l 'vV- NariMlJklE^ Inir- hut BE But £'.>* ROTi =*an f #211*1 a *l iw 2 >n Dae res «*#* • i #Z|OUt ? ioutj •tllM 1 OJI "i-.,-.,- I f - QsjkI *VW so P*J«d^Mi tut OwrlL^n i*aHT Irr-i — a^ Jp PB-fc? Co Baii u r/nw P«MPlln5HHCflS!l DtHlyfe, M.iM^.Md cinvjijtfihi Birr-c MEM ||4i0MMtM Valid MaliAUiliifti - -WMMW/wwwm n_«. -^mm. /:.- -\ - — E Emulates sal B=f W y,..!.- Fun hl _J* -. III Iffi Irllairiiul Pwi^biI UH v* .! F ..ij.jii. J . i WL Ucynai'ir Lack Villi Po*tf Supplies VWIU ; v/M/////////////////J//m J * M>jc if Ikc F" j- P- Vu miai-jji l>s^ ij-a^na I ttTdUr lu.b-* dm V II -IV if- I>fu J Trpihy iTBiBiiiramfnr pdnu |ih ij BrV J' '1 3 KV t :nph- I ! I ... '-I-','- ^ktapnce5ac€ ! 2i7 218 ^ppk hgs H^rdwait Reference AC Ch«rict*ri ill^i |W€5C6DJJ FlfACllonii Dtietipttort . ->c> ri<\ vte. • &v I* -G> Gt»*W£ *» «MH* .. t^rlj Thfl WHCPO? C^^lint g«ign *ng.n«, m* riDDu.r.y«i p » uh'd* urn" aiaM Tn» lauiillp vJIub -b "i-K>pJ»iail anlh lha Uaut nalua and b pmrnanl pp j- CMIn-Adurni |mn dur>^gi>ib linn hiMul a diii inr*i*i phitmhy 1- I h tulMiij lullwaia pi:iy'anii a-rt mr.-l**?* -r-rliniir.inrni upiiLp .il|n W»»^ bJbbM WN Ha 4bbb Mn ! Mm Un M» ' Mai Li. Pi Khir-ng |he Kkt» javinraQM ^r ."Cid Jliia ngiudf *ngtri iralulf 1 LvClr^CH [TBlWEaCBlE Thu Dula BlAk Rufl bMbi li^inilu-Hd In m:i iliu *'"*" "«* ThtWISWHTi *IH9<>LJ«il fldi n-il* ird -W.K.BU Ike WflSrCHH lul rMy -la""?* HneltD] lii t A u'l Dh«£I AugillBi pluviduanadu-BuullHil lui all t«:.|.i;Ii:iii 41 . wmh Hi D h yllflii* snl|*jjie EOmpaiiP'ilr Otfl ! a'l" ci=ci k'mH I»n I 1» - m - H | US IfcUU- **!* nS*!? iIhi.ijiii J-J-* 'i- i»' '-J l-"l l- - ^i,f il nirvinnj Ihn Bd^nlp^, pi Tfr-bH 1 .pp. niiarl •Uu'rniinq hn pIIkIiwp KbpI jwp mi-nil . Ir-m*- \yf I Fall Tiitw, Mauj T*r# * In - 1D 1 - 1 US «K»n» DDValilVi ) 6&M tOTpaliD* *£*hL*S.<»* Trai rt6:Cftii; 1 ail Ki>pg mt B dil I'll-uLhir, upland JddnUl II- Mib CiibiH fluj-.ili-- Tpb L1i-hi.l Hnjilf ii nliBl/BiJ li: fain r)i:rr-k; Mnii>i D#IPp r™. #3 |IN| tn # l JO\JT| ^T S JO M - » *4 axLBluif_d Ili prcnidav -Iha draoji anqmpw fcilh lin^mi* mr.hilnp flnr] IMttOtHdVl n .':;- ,i?' -i y h«.i. Lursfiguii- Tl-ani «ru lw4> ImiIbx Hagalam 1 JniT V) wftch Tjy ba jiFd si fPTBirjl Addreu HuU Tip» lw in 1* - "S il 1 | 1v-"kUHiii«d lha IfljflS^AlDt !t-hi1 KcrdaiDi? CVAgij'Pt^n. c^MJhHl puqnte r to-altii a' "»ChSl'B-i r r wlU e&OJ iluUifia li- uJdiliun |r« ffaC.Bih h mnUilria Vn aililiaia D> mddriftrm Indni. plnnnlni rnnlpnii Ip Ihpjtf- MM tm« rt*td Dili -:"i : "S J {.'jffuHul 'raliLElion Hi mi a.-L-lif pur^. mpdn t^J'jP >l jn *i(>rilpn| d!4K DUnr lfi Qtrtnrm--1-} TW- dfliiPHi DpfitllHin Pia *"pMmi»*Ci Of pull R«0 0"1# 5f*VO Tub* :nu.c; I'H f"- la&rdotigni. i-i»i^i*imUmhi.1 ulilnun -mv h» »l"=l«l In Ilia Vphv* miirtF- |l !l| MBS *? nS Aula Data Balay Tima li*PH"l MinjimznliMn ,y inn 'AffaCHB Jlld tfiiCB "R LJr^ btr dindfO llll balh Inch?- ^]ici5 a>« 4 dpi wdc ;p"Ovo>pg t>p- Indbi 5«*:i Bn ;a i l«4»l I ' tu - ' *3 ..: t*flp*rtl rn u fluu^lu' Sutt^-- *rJ «i 1 h« Lunlrj- imcUsp Inilruc- 1 1 Ejtntll m| "I lha Inrtai :;nl»cl DM (Ki aquala dp*, both rmjiuwn will ha ^'Ih Dili holJ r,m« 111-*- | 10 j « -, id .,'. linra .ni nptad»«,i nhla.-wl Ir^m pr^ji^m mempr, *r fliKifHMI Qip 3 p. ii »df- it:?* h.gh p pin ii iprcndKirya Pr^:f 5JC-- CdKIl j= L«*up Tipib MX 40 mpKTfinling a Inn jl dall t-a-itU-ii v» Ifun IF* Rvipfelm i*>.liiiii Pi ;ii.Bi»:ir Slaainl (Pp 1 90 ID -a mnv PYuCtilW CdiWul *1tiH Tbbb ^•Mnh« LlMd |Addl*» Olla and PhW| hw Cut ic MB HM Iff .1^ ID : v^t«ii i»ui ^p*» ttnntianjip fp^iKiil^d *•? gr^si aJ^d ni|hm ihe CcmiOl &H.T01 Bam mi WmCoUl aiJ IMB^bB Ma** a t&lJil .iiiht.ii ir r.iK:-..'H *ti ii> Hr. |'.i-i-jl |«| bull I » Thfl B llfl PlOCtlSDi SUMX*Amdn*e L'^JJiPJ Haiul haga InulflHua UnaCl mil rneCtrr, iCl. p*ga|i p i>J|. O-pinow |V|. and Emb i^I luMva llica fc kaiM-H lapiKl lha UIJlb ul >hutl AL U uuvalmiii r -ma iIkji lla^ b-b iMlFd h v .*» nl "nnd,- .tmI Munch mplriiconnii Tluj DK>hbI r-| =IO i inalfucllan H*fll»l** i*e) 0K4ft L^'i'Uv Accuniipalfl* iWi vd liiaai i>i ba hi una 1 * An OpCdda inlon Ina pt0I*UDI .i» IN DJU Bui ahu JIl ImZ rw Ilia PilKHT HpFCI llig* hH|f HHni itf 1*1 if lhp prnaiam hj p>ungp mir.-n- I I'-iIi-a: l-itp PlaqiBlar n j-iiiij lhp inil-hi l.:n B"h;h -yi; m "i li.it mil ...ii:.n piocciiiii ooaralinnii II ••tt^OKudlM] te04'a>flniimrf|n|fldrf1W^MFllBR)nfJl li? ^Malaiyina VYVrra.i 'Tilivrlinn rVOUhlf CC*i|rDl IMBTMJll The E"SMlinn E.i Hirer wo Iht BVon ;Bi « only Ihinunn lhp I'liH-Piii.ir ^Har.n Hp^ajlif rh# [.mulphija nimJi- K«Jjn dan TnrilnEl Dlagrnn C«? pnj r*4C»H P4j>Jpj CowpSPSO" UlUrptTl |hf I Hr.-Vil Tin* FCU Wl tgt^n ffKh Hmr*™.ninu!:l'Dn Itlm Kul^l !« liuluiii Ul IPd NalrFtsE 111 ia"OEiTidUhu|i l£ i* ifKaMa T>b1 M IiU . Ml >> d !- J -afl JC ir-B tajiul'iiiu l* bblK i vlu >ji *i miti) F1=ka* ui i 1 i Magi pip aliPi" r«lll*l IP C"? ip lh* Lmijlaion piffljf- Whf" iPlPmjpl " iviiniihTlr sr:F.rlFlplhp,ni.iii.r|.pn Ei.h .tii.i imiijIpi |iki.w.t i(gi| .- :- mfj md E". j aimii tnaM, ma Bi«k 11*0 it wiiitpi id muk Imi dKpc^» ii|iun MtDui'ig mn Kim ami ^..yn "-'.'Mir «h'l ul lhf I'lLX-aiiin .'ilal.ii Hmjiilai lu. uuil ir-M r«anlg IJiiiilrnlOi/ Phuh-pii BaPik Hculilar (PBRI Afilhmrlic nd Logic Ur>l (AL J| I I'M rl --I I .i:|i.i'ii -Ihiii T4HUUBI hnldi Hw bans jifripnap kv all mill -k- • !• .THi.ll.:nn mi^iiuwp**!**^ Ilrhil *LU «n io'i k*chri Th r j>d nij aadif5icaniJiii.ol ihc *G-bn ^mip-litm pv\iU%f *-,-. r,-.H.^.i.i:lniH-SiPgPiii.|H< Thp i«.Jtrf I'Lilq p|rprnl.y\ p^pdd apnTO drj i jinta^o" >rf#r4pd dp rhtOaiiv Aoof«j y* Ul lhP - LiUhl III ulnp Nib im.iiapui.Tai:ii TimuijIi mi|ui:iiIuI piiiuia iklljC ..il ..I 'lit .null. I In III* no Sewer Bn de Uki PirinhM 4*-] >• ":':, i.>- |i.i .::: , i .' h LMmt Iiii Iupd-jhiv ibK^r ' '...iiii'i ii j. h; n 1 p-jili'i dblm-'i ii nvil In mrliLUf Ihn iihi-I 1 i-l WD'H incoolun - '< ^*i imiiucban i. j'i-!' " iulkoa -. imp iijdi iiid'iiDiv ana li win airra-nlfnrhrf- ja =tr Dalrf p.... ft»g^laa fCSAt Dul 'J "OOCi Df uf»IJllUII. lhf d E>l Djli BJlik BngdlBr imkll lh" « *H«J"lhPC*l KfcdPSliJPg mirf'l -mwill-aa puhivMiT" "Pd iPHppp^ip!^ .uiiiilj. IYl«3lBCKi PaWBtl Mldnilr^OTl iilipwmDillilOn Dl PHIdil lub- Dul'Pr5 a^O" "^hplr-hTpri in|r» ..IE-1J Ddimg IheCmdbllDP nXKlt lhp la||«| pjrfc w*>ni py PTftnnr, t'pn^lF-i frw y.lfit\ uvf.i if ii.imp.iii»i 1|be« P-nrtw high filial hi»» l»H| n.alaia|-a agual lg dp- 1 ha hank jut- ul i*^ I&-DM 'nsifuill'j" i-il'-. )'r. l'1'i-^i and IMS DM DaUBaMh Jd- =fcr i o>ui ld> all UK' ooiraipiiii >i B*tn idio 3^3 Tuning Hdeh: I lnHl«0# law* ai» VI BL4W, V" > 3 'V 3 r.m.pg mM Hj r#.Ti|jn| paiMl aia flV aid J :w OiApiit 10 The 6^C8]fi Mkrapmressor 219 230 Apple UCS lluidx^ik 1 RL'tVrt-riLL' dd-Htki it M'UiHiil Juhnj IPy i *' n>UI ^ j i«a mDlY Cy^M JMU inc- Dill prDUUtf * ill* >-UI hpH lr* mii^iipiDEanu- 111 >li lui '"- ue IHl Dr .iiihwn A^mn ipj; xtpnd h " H !' Ht» mwmniY if Twra ri»milalF |uuli Ihil ainiW'|-*n^ E-~>J >ulijn IhF rtMCW? atqcp* mo* x'-> "J .iw^i-TrcYLjM ur«i**ji*3Ki 11 jniAf tb&i vMuui rrau linM awy nr i .. J--4Y -JVFig I Wd if&il nalu-nnji rlUY lu 4clrpk Jh Mild JlKmHJ H m ID 1hf ninh .Tt^dpnfHi j|a|f- by IhF fl.n l-vhJn ip[ h P*!"^ 1 Irv ",,-ix-"i"-™ui qQJnttw l||i«u*i,»Ji 111" ne>1 Phrnt 7 lr Clpck WfllllrF IraiWBMI 1 hf WL>* •jgiirfl o. mWrrialY pulhfl Id* KjiOWinn tPB EfT-oli-«n 31fU#f 41=)- Wi^qa 16 TKd E-^lH Jlpjn Si Jlul OulpuT iiil*illl ir-t V-JH; Dl >7m E««^i1on lE made VHKUttBTI (* 1 Wirt « "tmh- mjfC |rMl iilHrui:i->-. IWP |hfc"i In r«^n« 4 fhr rial* tlal* *lWy.*flEE. ABOHT MUI ni iBy itniul uilH-iupl ii I llpg in Hw HYnatMfir SKih.^ I' Mpsjf.tFr Thji. unn* m>Y . Ihuuuhl u" = ty.j. idrd rnn iFBiiim -thy ba sin.' Id iliPi^Jld i.lllBITUpl talD m(V!».> , ^.JlpMf." i^n^^MiFni (HdLMthtWAI mil! iKnun H |hr lu-ynmiiu ul Ira lrlD%wiiLi«d;rDdiH» : jm*h (mail il In? Ih4 |]i-an#> ildq liai bmr iBK "1 | run uCr^O" *JI b»> F.BtijiwJ « I i-ii|il IlLM.inl iipjl tiuiii* jui -n nuttlttf hM«i - Wai itim jenen .... _- ,-. Mqu&nHM-n.|.llHi iVntn in; (RQ DlJflhlrl! H*U ' C "J rt^ aln»in- lllDE. IVHPl lllllullLdll riHPTI^d HI3LHIILi Jllv> IN Lixla>ll KWIm* unn .j Lo*»>fllod Thr'»Vji| "o*- HTlnrFupl i'*Y*ii mlrwrttFi m n , t>i i-i I | J HC-> hfli hi*#r. B^-i-ad lu a l>i|H UJIu '.i b'i-JL.1 0"i nDr> 1 'ir Swp iS-T F irwuiCliy "91 . < KiJpri li: iniLFi IhF rianu^t arl bti iHii.:ii|iiirirJ '-— uilijln'. Thu llilv* > W Heicl ;3Lji Thr Hf**I .npi.l _**! •> nnlii'Jc |nd niCmpiOCIHIO' KVfllafl cm- o 1 1. 1^*1 PuhauCH -rt^ia' K^WPlJ-iI-OlirFFE .F Emul«! <\IS < >i iwrnH indiHtH ^*^*ufl ifliMlflr j. n.l. Jhi-.n ^ int r*.i t^jf r r cl(- Mcmoiy I en .«.ln* dunrijlhji LnJt*VM ar'ft* r.^lnal 'M. Ut HCL ROfl TPE Ji'il rgH ![»''jFvlrflfiiiiiiLiiainsliiil'C^ dtccnd'nQ nil IhF lira el lbs U H^g < .'illll-lill ; 1 * * i * i*ji InitipwZDul Mlirurf lladlH Sl4Ki SiHhll H. KJ I W65-CB 'B Tl^«j nuilfVIMdi Output '"NKi-y IhF .!»» iy tnf Ai^iymujplui -.M| .nil iTP jnd iVAl .niln^hnni, an «Jbj IMm X HluiC lliut ILilk b J"U 4 ul Fnr PTuLMAIH Srilul i^l R*niltEt . 1 M iJ +*-d *F"ing ln« PniT* F -Zlnri '"i^lli-r lrpn>rf.^n m-t? h Lid E n -I FlBfl h'Jhd UuiMha IIU PhUrir }£h*G> putilira IrlhLihUi! lhr«nrv c' .1! UPCO* t-'ienijnn* »nd mfl r hr -,wij hju Tr4SU hll "i.y C« mpmG»v flnd M-J{. h n I T VPh • 1 -. k.|>ilviri ^jn»jiin»nl -««0<] d-.li>. bam fMnit^ jjjjBp JSj - —yJ *\ s NHi-MAdhiLti* ImHrrupl (NMJ» A nFy»i.JFiiin>-rC"->nihrh|MI InOUt ^"n'P! 1" niniriipl yiiMHn;i A riiQuErt-luBi IrinWujfl -nliifn #* •Mi iupf M .nilruno-- -\ r-iTlHli^i pf hVi.l "'r ir>Fr-..pl IAiAI inilr,i=hnn mw, ba 1 h .'yniunl-iFUl LN( init*i-.uJ n-JI aK*KOQr**iUll inu««duM*r'' T"n« i W*^n FitKl i] hir. .jrr rnjli *r iiiIm'i jyl •hxju>>i.i ii i>i>J - II T7 u'nuini >* n>|jn llllb H>,» -J rTH |Jnri flJi'Fii pt In a -^Rr^rf.liiiuildiB^iiUurfrCD 9«l a-wUana K 5: Nnr MnuihlF irwnupt mlIiii tldinun •Ml A U jtmulttui tu-Jh Of D0FF£i B iNK-Ft mooe *rH»"AW ! Ji" t-JJt S"ni.' I I . A rpEgyi|„D eanjrio'- lul 1h 1 '"P4 " "'' *>ipt;Bttm ^liAut |P| Fted/Mc! L>hv-I|ubi |VI 1U|| L>l & Li' niniriipl *t«tul ill-aitj n | r«u»1.« Irjnuhmi #*-Ih mi #»-iliy i lt E.,ncr,.*iP4K (Sy-WCJ-^WCA-W . -5. VI 'J ^tJuL'iMMiillkk "»T* J wuul inlBLuDl *|1Q no P«fTlup(¥nJI| GCEln ! NMI i(m*ni Hid PTWM 1 OuH#1 I0ut||-rt (it mhuilatl uta:K isunpul tijF ul uiuwJui Umnj Ilt *ilHinai nud *r«: J Ini- ,YNi: iii.lpi.l lifBundadlu-dt-niili |P>JM L rlt* dur.nfl i*rirti B>aj j.ldr iJ- Incrinn; pn ncr-nd" I h« !iThHT. uuual n h-ftri dullPQ IP npr&rt- hflnh rurJa in! vWHm LOfCMlad iVull flPlOp iflQ^I. CIP tX inns-ispfit^ni t'tCuhnn ^m* 5hoo 5TP| injIlUfllDn HmVChHt I WMl jw^.f iiliy-J miUCr'Uii Ei«>J*ijn nPilaa .Ifllr Dan AddTMi 4V0A) #«uj Vilid Ph*» 3 In ^2 |1Hhl ViW PToaWm ANPtH rVM "WUCl1|i P pn * IhH if,->+n rlnc' r«M In U^i miFiQprflHEtwgi nlFrniJ c'->:.« n^n- I iq.,1 vt^-jili mdiuilB iil-J iBBttTlur. MdTHlIt If*W1 muh i-d!.|.ItChJirJnnl h: «u INI #.Hiibl^: l-_-.-.j iml v, p .war SUHQUf g r and mi.il ba uuid *£* rWirnDlf '> 1'D »rt.1iHM piiBli huhui. Fiflurn 1. Block Dugr*m — M*rna4 ArchUBflclidiai M-.ii- #-r i i N| »ni;..lr1 p*y n»« n ** r,, v „* cffflVVQ *PJ vrmnii r , : , 1 1 1 1 JCJA . 1 1 VPA Ii I! Iran-nil OpVrilidU ->ddl«K ami OHtn Phi Ph*ie ! OuMfHOfTlJ- jTfl«lhHJ- THF AriiliFfu, Hui -uif Itu imi^ HgnU DMtri|*1lwi . pill piET.ctva hmrij liy Hi.Hrn* mad. and wtHf up- B 1 Mi fcrtil 1 1 1 nilT tl -Jlbd iQi- pngcBam T H Bl pi I PtltMHTI Auu't^if-iiifl tlt'H i J'k" I"*- P-iTaJi S^hip T.n. •:x"t innlrw ThB M*iO*nqi iflrai-l &m;ritiIiDn ipolm K. Mm IIU WKliHCU inrt IhF mui CniM* U E I - Wi&caiB- | Inanng lha nagaliin IrjrniriKjn ul f**ii»a V Oil t CFCulmn.^-- | 1 Q Valid dala addFint 'Uf Dd jMO Idr daH riclw WASftBIB . ir«r H CTPirwi* ftulld ThH ni.p ( mUm .nnul 5.5MI .iUjhI. i-laii-ul eunlrnl i:T IIif AddlHI inr| rnlM'jClintl nQ»3t FPltfJ QUI IP IPC »+gr 1A1IB €on|hrt AB*lt 1 Xil f>RT . - WB^CB I* PallBiiMnl', il atUI iilhn H rt „ D nnl .'.ilh BuS EnUM -pOI- iniRW Hi*d.'TV«i4# CNrWp :ipi -rfa lrfcl> uy .v jmij !& p!->.rHm rjh-hF f K *WI *-Ol( it -jM lu jlw-rl .mjsmrionj »uHjii Y a- lu an Addmu .J Au:1if.l M.|llpi| fe-n jn H l Tna Ojli AdUini ili.llFra |n-K||i| 0_...ng inf faH iMIl o1 Mry l.-,t:If and |hc 3KDnd h|ir itf J frhli CVH rtn#h lhF*l iV uulpul .uualik.iM 1Mb iiy^> .!*• Ilw mii.'upracaiuif w COPIfDl invj F>nglF uap euilral But icfid-lia-i| Hi nFgiVr* irii>MOri mil iiilnhri mr.ftihr ihr.r nl dPy in TrVlnrn BE 11 Inw !-** p,.ll P a 'n aUDiM] But EiiuJi* « pn jiyni-^m- rria'-^g iairi Ir0"» mHnnn^ flj I O When .n [hg L># WJM Pit Csili -BliT VWWfIWI l^r-ill itq'W juIti* Ifai Linrinl nilrjcwy". Lp>>-- s-iiiliMta-.d- iir It-n i>>. CsnlaiMft ipaBTflpM liumlhinn.iupruiai.i-j> *in.l> .x In ±a iluiad^l Ilia •rtJi ii Tr* Ht(.|i,i- >y«j^ h^Hi" "hd u\k nl tytlim tOQ< gFddnd P-** I 1-rtliuLlKi'i v rhciTiipi »qut«» * ih*«ta± TJw^jrjhnn ^ |hf ifeoOtC *-^.>4 t-J^II rfjiUJMJ lyniMi luUl-Cn "rtlW^Ul Tht VdLKM FVJ dulpul md*.Htni Un* mmilul mXIiWMdi WinQ HMlMHll 1 1hm ABOUT in puhiiFinrw ••.TO : -^ >.tjni Hf-1 But iiUM prunUi in H-Z>t hiriiipn.TlL-m|l UKJ BKTJ n> w» H«Kly (HDT I I. 4 af. if»r utuui aih*rj-.H> (T-J-.ng an mlairupl Mdull-C* MP 41 ID- during h * '»' *"" "il'irupl , . Qui *O.OilJ yMrjuum |M¥nWI IhF mijfnppxnMO' Jnu IHtIibI itt*m- fr.-.Tjo.rrrl>ijnnl |>pn*l ,na,r.il-?l r.^jl 4 ijyari Inicnr^dTl iWAIf-nJIijC- IPi-i 1 nagali.F nni V tar if-Hh". Qr| Ilia Mftlf pui dlir."^ 1 a2 £iO£t Mrf-iftJj- T nu !|i#t^^Jtk Lycln lu)n 'Ji UW "i/iulad Jllj(--TJ 1 1 uui lu 'nil -j^alrJhiui ul H-« "inru- iaKpillKI' CrtlH S.'i'ng phich linn ITai pruiatiO' ifddl V* 'nli-iTupl ! iir P iir innimnrl Igr ^hf Ir^^lpi at » lliil Addi-iilflu./At-.ATH IE Dil idlun .*f lui !» Vr . ui dl HULy hb uIWi !C M'Kl-jjnd pc^-vilirF m#i 'i.|:!i I'uih H-fif -i...,,, ulp- hp JVHi'M Eol I: i | m-:ii. a>i:l I : I l*v*i |1 IduiCFl b>r mndilY"^ Irai ia '-:rgn fl toM!liC«lifli(» kVhm uw-t] |n, bW£tr| IfflMnlHW I'JJI-AririrF"! Hut C 3 E*fl DT BA ? - Wh->£:ni4 My ba Hi In H-a r.QT .moioi^ii «** h , IhF Dili EnMB iBE". ui|na | Tntli »i/- i«n rn.il.ptF> Kk^MS D-U B^C- B-i villi lhHi.1* nk> .' I r-H Chafer W The 65C8i$ Mi^rqproceasoa- 221 221 Apple ETCSi NLiTti^LiiL' Referaice q r*bi» i wGscaifi Cqihp«i»iii|i«v l»u« WB5CM2 nd WESCBf E Mlcmproeaiuef MdTMdnfl M*tf#* thrvmciiq 'l cipabh? oi *7J PljQfrlE Ul l:*l*wn (Mjf rfcg |mfr M*»« h.tpapa jiM- ,- a i, , SUch J.E li " it SlKt mjy UH Hlt^'Y 'lO^i GODOOfl 111 OUFFFF Thv rffcpJIiva ad- drra ul WjlI anri SUci huhw snHiFHini] mitdn »iifllMi r i.|»Wiliun UQ dllaUrK JJJlru Inij. r|f gr%iM Mi AccumulJlor-A S. P iFl^jflBU'llLiN •r« / liin* .jlrp in H V Jnd £ Imb> lalid pi DlrKf Tr^i lo in or MDIdlH^ a>wlyi uhrt a li'»JNr ufM rdkll^-liull Ital N. V and I "*jii iriiid J "CO* I ilKinm mprfc* Th« LthjI nJdnurf'-¥«>^irymiilf HWOlD »nxr nmnarr rt^ll«ri npmanrl n iIif *Ki^»»jiilai allpi rn*t.^ r^ffrupj D J"li< iuti'1 !•'.! II -ll a!|f IdHI >G pDinleri ThB Et«»yi in [Link i>MKUIHKFFFR « imp4l«4— r..r..n,| ij -',1-ad i-.1 Ji«in'iJ ulii a bAQIH brat iFlllruLliOM T>H> UBalJnd DJ ThQ Piagrtm SflnL iqgmoi 4 lidl llldCnd Dy mi FnX Jl>f RuUlmv Ldi-g A AftS. K *SL LSR. RDL 9. AbtdlulH Absxiubi InriiiBEl anil Atainlnla Irsirjrtl lnrtu«cl iitnT-^iinn unpl^illj'OehpBdTjp H^« milru^Kin ROR rtilli Nu Rapp mDdlH nr p f incntfnaniing Cf» Riflgjii-i C*jn|&i if u in FFFF Tn#atj^ - PJ b»rto JiywiE. iiihd^Vj-rt llidl llaC* ma PiD-prlim Bunt mgiilai hih If 1 mi IHl 1 T, DHrtcl indlPKl lnd*M*d-idj.- Qd-nunil KHII Ir-i. m-Veii riliHM li OtlBrt iuluimi lb al 1-OfpJI T lha Hfi>W ; .pilea *pd ini4kil paff JSL. and juf Ahwuw Ldrg Procjinm edde «jy drcon E4rt upiai *•- dpn-o»T*»iPHiijn->n -i K4ea romt D.-otr Hcgiijat |r>j Tha m-cl zrauing indugn L-yJ« hju'iiw'.Ii rtivy. mil ifun harvi bnunila'iFi [CHitfrfhi pi Ihn mampiV InCTlnm |h^n i:nmtmtn anlh lha :U:i € FK»-rKI Idl PHR '-^ ^j»ii«i5 i,E li * DtracL IrdFVEl Lang | nePiL-.i"' * AfcwMe a M»™'imfi I«L- Ml ll 1 .'in W03-f f Bfli3 Wild" * AUfOtuU Lung li * Amjj>i,.la Ldng Indeed l< E Hit nml nl in.HM F^ni « SlKh FHIkln* l^arta.1 IHdauU |u i p 1 ha Inl^iMing p%->J.'aj;jng mr.qt ni- jrnnnnn j.^m.igc tOOHdna' SC J>l 15 1 * RDV FUIKI Ckjnnn Vtarna Igmurij 90 IWM anMnhpa dUUmm if* LbluubiI i: vr iF T**nr r U uf uddMWi''ri mGOai Vi JvdilaE>B lui ukj win EFbI hVb5C-ilJ »' | WAI HW STP IrvkdhMjItpnt +nprli<"Jidifrrii J Vi 1 WinS!'D *mir:'>jtvrnr^i.jnni Thp. Igng" ad*«|iIMJ msrttn nity b* .tiul u i i: ' ^3 UnuMd DFCflMSi On* rrWf.pd -DP COOG ipiKihH lHO nilM CM F/SiCSui hrnilmir ll* -i-^l bp-t*- jI Ma riililiuui jb-fliUcdq lO !hr hBinw*ra HrnUrrl tiVKHW&vs nrih*' ?J adrilVEVrig fl. EJI-WC1 indlifd Long tnchisiiicl-[d j,y Ml AEW will Eh iiihJ r Ktj-v i-pilpmi rhu WBJCa IB p^lM-i Inudadk Vi U V»C4Tl aVilh ir-% fcyycihng iHO«. Hid J4- Ciil DdH Hldiau rl poniad fcDbr |fw lum oi H-fl wtdnd bpli o* Ihn iniJ»ur1i(vi ind iim i>-pci i nQ-d#BMIiu-- nagiplai hn pilpclna aililiau m Ihn J+til Imih addiau y-JM Ihu Y I PBR (Hi JIIiii 'vwrf a 'i '! F_ IH* D C-.-'v fcto*li" *-.' H« u it, n„imr, ,Ti UiMt»Ljn WlilacyLiB* 2.AUMIILIM-J C 0. n w 3 i^if jj-iiiij iVir -"CtOiuH JDJmSt ^jVfC WKuHU add ITald dpWi Dl IPd iniiruC rtlfl* B|dHl hnr ronm |ha lD*-OI«r VCC-rj -3l iPPtrtKUlS HditH Tnt-rjala barai Hw^i'ar -,7-rl ji-,i lha higrv-nreairi hnli .v lh« -.Tail inri ild'Kii 1 .;. | ..ii.-- r COP!nv>ui:i..i-> V^i iviiUnti- SiuraliiiBt np-TF jit" ^gr>,ilni4l flil-FF "*?» 1 Sw Cjh"m Hcnon ; judih.in« : miuj t>-«^«:nnii Irnrd. anid Ipiplh bjrtPOl Infl in;ilt'Urlipn \ V m |ha ^-bri ^r 4. Ousel Itidflicd InAKf-Cd,!! Thu nddias-s hWp • o+ibh laian-ad in h ind'iicl.51 Tnc-jecnnd addpi In lha 4pm nl lha IJiibhI IhdiIr tipla ill bra: iiiil-iirliini * DXrKl-d and mt- A -J u ? Ri-y-.lu- i - ha: ibiull MbbBbB mil Mvr-inOtt M bill >' IPC r"lKiiv< Jddl«M TPd! Dala Etl^i PtgiSlti Cdnrj.n; --.f -..3-. tiIpi H n'* nl Ihp HVnirF- .ir1rir#w i h.i ptei 1 1 i Tl ic )5( 38 I f-< Mien iprocessof 2*3 2^ \ p| ilr ll- ,> m.i uk .lie EteTenenc^ IB pir K indlrtcl Lp*ig,-[d] l 23. SLlCh hlalAU-CB lndlr«l IndviHf — [d.!].* » juudu r»-w HLui-d b|4ia1 inr pwrtjebon io if< Dir«d bajw h> Tin? MT.5^.1 nviB nl Ihn inilr.n 3jw-. ii jddad hj ll-a SlaCh P«rntf 10 W UnjclHrf Jddntw |nrm j uU>n|fli Irj Ihfl ii- *-,.-n I n i:inln< Id in* luai-uliMI 1fi-4M blH iddrtH in Bint fj Th* DilJ BV-M Rtfl-IW -:oniain| |hg ifli-nn*»rl hill uriha liiUJil upLuda >.->iul T.J1+ r>-H F'lF-rr Hh Bddraaa 1 Ltm mm ul I'w i'H-tiil fitvt aud'aH i',| Iha Y IpMhi MHynly I bIIwcImb addia** DpbII flaurllll lh«iucilOn •Icr/M* II AbieJul* indwd WHh Y-n.r ThF t«und irfi Ihind h-flFi nl in* !i!ir,u-i,-,n n* »-hfv: In ll»T Y Infloi Rofliifli ib Form Un law n rg>» in l^i .ii ilia tlidLiip* *a- 0i*14 Thn gplp, njjnk Hffl-Hf HMtuntlha r<^r>ar^tt B D-11 O'lnr •IrachdP Jridmu <.rimiii liarFTi adl'Hi" 1 ill'uMl.ift 30. AJhtfuM lnd*H*d lndlr«l - I ii, nj '"ir MLU>id i"0 indO bytB jl T^e .mVud-Un ji< I& |hp MUrt rfmjIlW BddlBIB lr.^f . Hhj sifi in Irjfm a IQ-s»r nnml^i in HanL n thn miIfiIi cH 1-1 btb la*tSaU in tfm r'luurB"! LLiulllal Tra Piuqfa-'-flJirt RkflriilBl il I'Ul Ci.#^a ID. DptkI ImfaiHl WJDh 1-(U '! Mcunil hv If ill Ihn ifnfrufipjgpa bOOKID |npi u Df"nrl&*'Kr I m bUkIl-b addnni '- H-t^ilr- and Irar J. Iiidai Angular la Inm* Kit l f. hii fIIft* m Program Cnunter Ralillvr Pflfc»Ml Thfl JWJ'.J M Ihftayi -n Ba'rt 15. r a^... Thii i.Hmii nyidf-. rF^frmrJ lo IBflFlpyw* Bdiirtfiiing. aj UHHl Dn||r 0££Oual (rilUI j *•" H Bl JilLTi ttiIi jiDUr-B |i i)w liiii iIiIiiiii h^-ni iBihjri n itifE **p«Dnd byir dI ihc .njir-jcoa" -i jaadd to top Piogr** Coj«i» I*, BICrtK SdUrtt Elink., bnllnaibDii DmA-PVC: Pfl U b HIbI WT.Chh.jp mn littdlffla »o [.n.ni ro |hp opcode 0' Ihl "dK.l niD'UL PS* .«.-« Th.i addmnnu hiuda itbMil[<| inp BiOC^ MD'* inu-.Mirliunil n*j IJ her. ha iHIibI » a tigied d-b«l quanhlym lh.Br.anaa linr- -17010 I MCdi', d DrF* O1 ""i^ !! ,..i-ii. " - •-•-« 1 '. liiH High .r^*> tD-WdTinf' ! -ilr«i i;r Tra Prnniim-Bjin Hag-lldi ! *iH dlhKlH Inpn ?{l.--nMi--.i ulrfrF^i Tha ¥ iiiiIfi Hvu tlr l JHIa rnlfic-w-Dnirr lp 1 I °C aJ.li«ll bBBj Mif .InlMiil.ji. IddlHl Tn« lh.-d Orlfl r/ lhp inilruulii^ ,:l dFBzi- addraaa 16 Program Counter Raljliri Lanrj -rt cdfrjiiiii iha 'Far-Diojtf » hill af ih-p unir:* su-m Tn SI Inoan, r-*l.Bdr|nn»modB ifllpmtd lo Jl.«lBl|hfcB Lang fddldM-^gi II uwd P-L-^aie :crj-ni ihp ia^-pro>i 14 pill ul tha ii;Lr t a iddi*il Tnt I 31 51*r;fc-i i:«l,w ^I'mi i_ rEuiidihuuil Biapi.li Lung mihiii.1iin |tlfll and Ira Sikk JddnK^ tHn ia -an nHfriw3**"j t^ui puiii « jsoii d*n AiMnmnlatv uuHlaand uiHt'oinniv T*fi>nMI Ol bpWID n>ui« I \ SP-nfl I Rjh Ellfr:rv* Hilil'HB i'illruLlr.'in iPEfli Tral Wi-iniu .mil "I'll | vi.im|h*]lp»riL.|..iifc*l iiO- I-..1 JjTCjkjSuLTUul^. R4r>jmhnm , I.: T>ai PKDDd I11M :' '.'* DlOCU ."Orf ii||rLirbrjrai n iJeo InMatd inEO hj"|B| ol !i* miNychnn vt BddKl IO |hd D rocydT, C-Ojnic-i wr.cn nm :-.i!hiujln» --MipijuIi did -=lylu''i Irom mifllfupl "Tnt art- hK* |nr PUUI BfT* IVgnJar » ! bIIbCDvb addiait hai rv«n iipdiJflri In pninl In IhP nprnan nl Ipf Ilia &*a»K.r iMiluL-L-^. 1Mb F'T.ui.iin Cuunlai in|h-,jrnnn k'j.in tcudBd w»M\ Ihn dr i-il .* llnlrl D Immrupl VlinmiK" *1*4i*S l*1rrtfd,Vi.im aana II updiNla HChnl, Itaaal rt-ln in» Pjjn E'^LI-hf Rt-'JInO ^lliuCliUn "1 -ahjll rt II- CMral indttri WHi V—d, r toap!«nPmJ)|-, rha nllul i| l-tajrajB] 'frT>'o->iniih .-^^J-^'' tt. Slack RaUHlH-d,. TntMhJuMU Eyyla ul Vw irsiibdiun <• jirlrlF.i In ir* Starta! ini; D'rtCl IrLini -13 JM |jl J J 7flT Tna PKadjcam Elink riajilv in:l allachHl Inf kraF-UMFW In bill nl Ira nlln:t .v Jidrii«u iBrlrlfd bflfrl *> Flr-jj.jii-i jnai 'lit * ln«^ °4g>ii*> In iwpti IPa ln-&L anachha • urn ul Lrai wcand li/Hi >« Ih* ^SHiuilidii *nd in* 5WC* Pj rrFr Tr+ I.'. add'au frBi upaianri nj plutfpng -n lin* Q 1 r. Abiulul* hndlrKl- («) "p^T' DlOf B DM1 aT||r n Inarind aiilh Ihn hnl and puinlai ir BanK LI m inimut!'4" 1- " '"" Inr/WMfll 1V.N1 gr dKiama^ |M^f| Ji dDd T rtiM' ird Jump LuHl) JML.i raThlattUHl IfliC-'-I .OwflH4e*- IE Wi-ul irrt- olluf. « dJ TriBtKLHid tYl" ul ir-a i-rtlrucJtrtn-a aMwi In thm Dracl Flrg ilir Id nltilhi* dddiaU 7 diBU ThB U1I1 rJurk Flng.ilBi GnJiliin l.fht»« i-DrdC<' B hm OfBn# Inn^jtJOJ^Wf hjihBlcpiO'*fll 16 nnio1 Iht L^lfrjr^* Juui«I Tf* PlCf narai W pjiaU p C74Hlui| |f* hujhHOi.dBi B PH CH thf bII«»w ' ^M I D*W Hognjlpr | 1 dllalrt I bIIftzIivb idl'FII IX FibtDluLfl Longj p do i ed Win X— Thfl pacand. prhid W I r*u*lh Trr't* ul in* :umidddiPiii.i|.Tnei add IIYa K ludai Rwuila- tflpCh't lOO/Ha ChiiptLT E 1 -- Ik r^l >i]i-. Mh i.iin.iL.-L'Tvsiir 225 226 Applu llGS r].iiJ^:irc RcfeieflCtf Tabl* 4. Opcad* MjiLtIi Tib* 1 WSSCeoa lid W&5C* 1ft Fnib-uclian Sn1 -AlpPiJb.1lc.F 5*Cjubmc:p ri & V D LSD 3 11 mtti r*" P PH* Pjtn 4j.lutuiiIi;i bti :i\tr* I 1 I t i i 1 r * « c r «mu "AN|J -Usmnrf rinin feCumuUlflr P jih DA B*^ He* ver on Sutt 0U *SL 5">h; Oi>t- ail LbM khniDrfuAKgni|iln> [*nfl Prt3 P-ii'l D-'t-.r flu jilr- un Hia4j! 1 I „: .| »* J*4 TSPd OPuM AfLu «J.ld| *m JiM* - TSBl flfUal u flCC liinnmCiriyCiHi.P, ,i, "m I'jih PrctoraTi flnm HPig-nH- -nf! 'EIJl'K 1 : t I 1 3 1 ± 7 1 I " I 3 I J 1 i*4 BG3 SEO bit E^an:r- Li1 C Jn-y ^«i 'i* Hvn-irr il bt r6 ][ EmI iP; 1 i) PikP FtHUL Pf > P,jjr. Pi^mfci> Fjlalut l\j»h IikIpx M un "Mi: * Puin ir.dn T an Sidu un Sfaua ... I I iHi A»P 14 *J MAruif if 1 jBlH 1 T4b0.i 1 * " Fl»fl 1*1 air a AHPd JJ « 4M d ncx* CLC 1i-i AND* 4A I. 3 m Mi, J. IU J J** BIT J II*. 4 * 3 i\ 1 , , AH 4 3 i-i . 7 • ... ***. , BMI Hrivhiin^^TM.nuiiPM I, U LA HUI i*ci nm jali.ir linm Stic» i e : e 7*. 1 j 7 3 j a 7** 7 T J 3 * 4 A •y? 1 ! I BNE 3'» _-:n .1 Kjul Eaujl llrnTrh il BbJt PUI iPh !l. PLB Pyi DMJ Bn R*4ikfai *ium f.U:.i AND|dlY ". **#?* Hi 1 -J * •-•-," i • .».,. HCl air. Wll f*CV4- BPl_ Or. PlD Iui |u.«:h MHn«ir Uc^- Sul* *-. J** 1 . : BR* BfJf^r. i *,,.,* I 1 t \ > * 7 1 ' L*f 3"- J * 3 r * *« = LP PuJ|fl|«M(W ElJIuh hriim-JlKlt BftfL f nrrp IVpih UL I iidH Irpm S!k» I'uil Fan | B. tLKId» 1' 1^ I . -I- I .0,„ PH-i t LSHA PUK* jUP, EOftl Lltha ." BPi Brirtn hmtvi Limn flL' Fuiiinm-Tlutm^lkit Ji . 2 i J** r-r I 3 ! J J 1 ! 3 ,»i ! 1 3 3 1 - 4>S i BvC arjmr.li (in OwrH™ On* l*"i G> flEP hWl SUU^ fi.|, tUH : . I i. ...i - CPP-Jdl * GlH ... j. , -. ISB|> T-r i 1 , , • . Si's BTjnt:h tin -Qh-Hii.jA. -H- i. • POL P^'-.lIK On! Br Lull iW'Mu< p ill Aimmiilirlni 1 ? 7 1 1 *1 I 7 k J I*J * *** J 1 * * 3 4*11 m Righ) iMpn»W &• AuumauM^ J 1 ' CLC ClB*r C*rrr F *; HOB fl^iln Linn | UTS *r. irxidi -:> a 11- ADC* GLD Our DKilhri MiiUp ..,.,„", IfiMTl InuHTufrf I j . 3*! 1*1 I'LAi • -.v . -. Rj CLI Clair lntKT,un BhjkPC P*i H rL HbIlji-, "iiim !uihrnulk-u I i:ng i i J*d t 7 ! 9 • < 1 1 4*4 CL*" Citar Ortit&w '"u Hr:i DatUI flVa- *L-. : . - . * ULd. , - «l. - * "1* 1 * IUH ,,. *.- ii .:i , , .4 tUrP Cdrnpna *mrr r ana „ SEC lubliJLl Utfnr.r, Iram .ir^i,jn„i|nni frilh B:Mlii- J J f !• : J** j i 2 « J i *+i ] i 3 r 4 "a 1 vi-yP CDtllOCinikur 5EC Sfil EM T t| StTd or. 11*. "• XITj 6Ti F B'a* = uT<.« i ClPPI C7Y Cnrnnp»F Ugm D rf a**] **f3*k *, Q.ji|.p»r„ ittiTiliij nf ™pj t Ef D SCI *** O^mql wl< 1-VhjUI U^K DiMUk ilil J. .' 1 WT 3*1 I 3 J J 3 3 J** « J a ,- 1 • 3 **a CrLC iitmr*mmn\ Mt ww m nCEu-u-jllii by Dtm i , 1 E - : 11A p || > i I . BT* d i j ' * .1 . 1 rvAi rtsi - . I aiAti :. . • . . . GCi* DK!4i|iu'il IiiUkp J hy IJnH 1 J 7 p 7 J 4 J 4 * 3 J 3 1 7 j i 3*1 * "a !='* E4nia PdCunuHloi M*-ury OC V [WuimmwTl lnr|p. r fc V Chill S f I" s;^p -ht» i.:inii - . f.l* 1 I . 1 .: .:> lP«-T Lfl*-! n l 1 .• , LD1H . *. ;.iii f. UP- E'Clu.uu OR VVmiiu , ailh A, i ..in , .11. . S« I! SKrf-? » Jt- 4 kV.i.ui r 1 J : l a 7 .' 3 j i J 1 J** 1 7 ^ - J A 3 4 IhjC pFKrwrmni tp^nto-y or pCDiMMMhy lip !> bTT ikom Irvtaj V in LVmni r BCflr • I . | . LDKd. i r.i J . : .. - iPff kKNrrndnl liiilui I b, IJtj* STi EOlfV 2»'U ' i i J*: a* r i 1 1 j ' * 1 * 3 4 INnr fc^nnnpni indf > by l>"*j T'.* Ii.iii V,;. in.|i*->- Iiim-. • | j- HEr-P .1- r;«P d ... CMi'* J*A Jump Ld'i-j '"i r-j-iklm 'iiri|iiliimfp In InilHi f ' , . IV. TJCli QPtJ : - 1 * 4*4 C ** Jump Uj Pfe* L«a1iCK. >i.:i; 1>.in]lpi C AlLiiinniii^. iu DiiL-.'. Rh-i tli»- .- 1 1 J j I 1 . • 3 * J 1 -L-L Jump SulinauAra I nnn TC5 T'li.nlui C AiuumuUliT In $lPK« P">n| B ( Rp>1H> ..yi-..,. , v, ... »L,» C"r:i DCC.i 3*«Ll*l '.- 1 • I". j* r 1 jlh Jiinip : -Nip* n>Ia!->! i*v^3 hnlmr Ai1:Iih» . 2 D 3*fl 1 y?i * - *% D Chrai i Nfiifrw h> G Aixiiimului* . I.- I 1 3 i LLlA LiMjllLJ-^Hllil*- 1 ^ , TR& TrtI JilU ftrial Bri . . **HL HKi IK i' . it .•., BM LDH li.ih,i hmm * wilh m- l!.H Ip^i .inn Eh-i Qbf J 1 i i 7 3 ' 7 r : 3 * ,-T* 3 * * i*y ^ .. * Mmvv i LDV Luua luJv* f Willi TEC ' I - -HiuuIl-. Id Li AiEijmuuJta LBH Stvlty nf t. •rill'- '-J.il itci Ppppjlpv |M lnd?> J 'HI. il* in -.Hi *, 3EKL.&I i. i .i! . - Utf-H BtQCh MM hKuuhi* I KA I k'.-i . * r^' "l 3 4 ?-; " 1*1 1 i p . * TliWlpi lnUf- Jl Ki Al'Il-.uUI.i. HVP Hkicp kit ih> PcirtrpE ( K% Tpnlrt Inilm 31 to Mrt flpurtf* Pig jj»| ( D 1 ,' 1 1 1 1 A 1 E B • ' MOP Nm , T 1C-F 1. >-rtlf IHiiO IO l-XMii f CiRA lhH w-mi|i P wih MfumuWqi r 1A lraralm Iiii|hi T hj -iKuniulBHi ?E* PL4h = Mill* n Auiululn ArfitT m nil ^Ipn h |.ji Pjth i ".i.i-I-JIp T fJ A'AI Ti +. -A n il. - t IO ii Ou- F! 'Mill Iiii Ii-i>i-..|:i ip — U"l L,mh..i iMwunirHi* *^l hiVi tll»libn IiiiJiiblI fl1»pii iiii M.i. , . , iftriU RpiEirtfl lur fulur* LIM 1h»IHii I'll -.I'tPTB DBrtrj" SUI - *&A i ii.hu-1 jf R jmiI A Ai;i:um, in|rn mi ii - - 1 1.1 < 1 It-.l.l :[ i Pin* E "i-.lihi. Pi ud/1.1111 UiiuiiIip if IvnuP *rmr«4 cin "Juki. I VCE € :n»-">!: E^sirp >ina Emuuihiii Biii piugj*vn tujiwi UHfppr imuw uunhn <»• « f at rnmrr^iM m m pgnl u . m &*T 1 i>n..|i.rii i Hapiflkj liKP i m *<.4.4r fHJBH MiHdul* ndvud ia.il- . rfiirur b.r.| 1 dnsl M* TBTPPd 1 d* tpiMl .MiJvnJ , n— < di 1IUI ir.ii*». > 1 1 i wo WArtmr* OOfffttl NMI Hrf||«,|.|. :..iuaii >jki'i Op CiHki Malrii Le-gcnd Afli JUT OQFFEai STiUTrT HBrUBiVH |. -JIILi. • I'^k ^uhwj.u ••"' : .'I-. :u iim . hi-* wi\K4 ia H2 OiKom rink NMr.W flriW DpCDdi-j CJ u pK r 10 *J1ilk C>tCH 3 j 1.- .\ I wn i]i n cessof 2Z7 1Q& Apple Hgs Hardware Rrfcwncc Tablr 5 OptfJlInn, Dp*rjtjpni Cotftl, tnd Sltlui fleglilw "ocnioi TtMc fl. QelDflKl Inslruclion Opqrjtion *iiu.N ^pruril lui H** hit 1 * ,p y,..i. .u none T , ^ _ ? 2 = ; S : i ^ r = € T i . : 4 s. "• •«.,•, i \ i j : JW • *• •uu-eii vn=t ,-.r.< ^.[HK t L4 HrAhn [ —mniiju. i ' 1 - ' . . j ' . i I -> 1 . - h .: . +oc A >H >C -A ': E Hi II LL **< .f ' " ... H »*. ! n 1 l :• I' jj h uS uru-it'c'-i it c "J " " i *. H 1 [ ML VUhOriirc > i dLI TO '.>. i • >; .. - JL vw | BIT nv - vp.po :r am catEi-r E D-DO-f I. Hi • j. •ft. u C flit hNVLHH J - 1 CIP a c d - i.i i>^— CLJ a i H EW a - IM * 1 ,. ••' a II • :• : . 1 m •- 1 . i It .V- HC r-HhU'H' > j» K s SI "I 1 1 - i OH HV in ppipr.-, ^-rt: ro" AW -A 1 •. » ... i ' 11 f -r -i M i, •i .. »•**-'. I fcWr« »c NOHIMII I - •i huiniuntt i* f- i HI si, s: 3 I iup -• JWMPUfW TO 5PJVJ wt^LK ;•. • 1 ft) i i- ' * pi H- ... -, H, m * 16" i ip.po lU'DOi — M» II u J I N I n"n: i 1 ii r TT] r ii * " 1 J - v -tfUljtfrM i * HVN * -uprjirriw * WW iW-3iT"*-n[jii > H3f *P U Ji i • pi a n •B -. - ..- V X DM IT*- r .. B 7 1 IT u 1 u.ci- -. u* . km «l 5 > 3 upr , m* i tv I H* t-J -H IV* ••I* FM D)M - U* * - I * 'ill rmmrz O^Ci PW » *HD pmc MH - JL I -\ * 1,1 P - i * I i * ii^i pti E u, 5- I S 1 FHV 1- ! Wi II "" S VI '-•! •ii mi tH-.fn * W, U B 2 ; 1 » « U 1 c PLP NT 1 J ki Plt > ' .< .• > j 1 ¥ ." : BK ... II • r 1 W.P F | '. '' i H « PJ fli - MiiiifC IT* IT, H . * IIP T -B - Hi v 3 M » 11J M • J ten C D C I c i * roc ':. I - J • if 'PH. IU a ! III. >W>K I... -i Ill nv 1 -T * TO 1 V -M I. I * mn Icr 1 v, ..... MM HD CMRUUHi l»*b*-v*ll, 5 i-i Lb i III I * m i. J _i» n,.,|4f H ^nlrfi l S^**.,! -v-t** Chapter ](J Tht- (i5C8l6 4it i ; n . . - -. i 229 230 Apple litis Haidwiiry Befepewe i HKMnmfnd*4 WfiSCfllfi and WG5CflD2 Aii*rn£it*r MrAdjnTWnB !.• '"ir.* w-ji me-. '^:m*> sn*i piavoaji •iinrafigh TlHt A. Deirflvd lna4n»N»[i Dptrillon kanllnurdji Synl»n Slindlftff piFiTirin vTi'* " laliHalPul t-Jn Tk ra^n pair fail r a ss •• •! - li I 1 1 1 -|> > .i . 1 [<•* H\i>mH W irtiijnalJ mifgii rU> H*fJ«l in l¥tu-XCampitfTWM naini1->-- , »" - ' at Hum Aiumhlw dpaitvuani IhiaM partial Hm lur-bf -i-'ijiagu WHiftJ". l«>a JhCS«q Ihn nc-ni.iinl n^mptr HiftiRh ihfll. h* 'niT^njjfiJ (jv rah IB program *fra» gieta^KDO*! «n "a BSMmbifT. Ihij .nciuo«1hPdeiim- I viiMiTilihjr Tna IyuiPiiI d it J laDW lV yJlub BihitPltnl UJHnruWf cin *.nrvi Ui linn r.\ ijala treii and rrnplamp ViilMin nin-qr a— "*i » ilanriHrd aicludva M KCDgmir D5> _»3 >H1 jhjn I HW 1 hn ijTr.v i] j IbhI 0* nllWWTKtv Mr ihilHin Oii Cri JSdKfllblK dllKl^H Ilia biihmiIiIi- Jj uli.^V-Jb jj •,. lOIyi iriifFF Ebd i man IlKOQ V* «U ymniii ai i» laliF* in vjimh thai Ira BBiamblar can 'p:..>jnirH hi bainj An mpptrciPi \----jr. (:r,inUi wjiy In nu an P inn :il II-h icur.K |.i BfJIBm ai*aif v\Mpr&t** Tnn lTfnDdi E'>u\ «:pik" m - Dv ihD HHnipIfy dl •* I'"*, "i* ^411-jChon 4 HHjniplH U^HIH "i- •inn.-! pi is j Lamme-m Tnt! r-rconnnndK] -a, o< umng !r»a >s le-imai nip imn» LlniMFi: ndnnamp an uiMn-blm n-ai luuni Ilia! £.A T lauaiEaiB I«l ii-r* it ana linn ihal liarii wnlh .1 uim.-Mioiji in ailni'ifc ai a :v-'"U"l Dvin teaq nu lynxKini i>-c m he * ird is Pri vigntd diiplicamonli 111- OllMT tpv.i d uiia^ili Ji 1 a>j v MuKd M *M ill iln I n, Ihn inin-falm Th* hHtncv Urn Anf hn* alum ai.ui Inn Bamaialinn cH a un^i W«£Bld i:r Wni^Bll/ : Nula n-.illlip Uptai*"im inr j anaciinTOf duocvwH U* -.-* l!« liixr; lh« nn«-a- iv- rndF lhn unwind anil lha cnrnmari hbI4 i TPh tmbwi r«ld hn Ubnl liadEaNxma n icmj-tt :it»u" Ilia kra A lifcal ihji In- Ihn aaifnitjlnr In ^f in una in Iwj» byln al «iiu:b tor :mma- I ihiia LujbiIla iSK«Chiil IhumUkJ Vull alCw ln|iirlOi nillBI "Cn in* miid P'JH WT 1*1 flUJOUMI.L ( HVKKII ind "a^ M ICplDViad Dv ff+ D * K^ljmuUjhpr «y|: mdpi ntniilaia mnnr^lnhinunwiLiniricliii An niarnhMr map dtahna a>i ii|i|"" HHH1 AM HI- N kn j HIllHl ftuniDf-" Ol rn B M Lini |h»i rp.-. [if .1 a fab*! jo lO^g M ,tm " '**(** i Thn ebIA^cm, uf UP „|,. Ira hmJi ii ipwlar 1hir a- aqLUl lu chauLlBiu An tttuiuU Bi riMBlnjdm ... IPh lfpMlh>1it Chlr'KHiniD Upp«fCBI* ChR" '•i|Mi'd<-ii|» QlhiM Chi i laivtah Enr -aCn DpBrjnd bn" snOnjirifl ln| y*lK' Dl |hp UMi jlc >" t" Bd- ii|iin » It«i uw- liivi nnl :inll-tl nnlh lliacu^nu ill uuvai-J 'm-Ji i iftn I hn ;rjJi.,mii Ihal ihnaii a Iwi. I:vln i-iraUula vJiunaulhB IITB brHt r'lnjhiCT^lhnj ifoa.1f-i% ri i uUa fi«l CunitfJ U" ItlM* 1 lar an ni^mtiw- #>ia uhi Ji' CHI mIlVhii CaleutlliOn], IKlMrMlIbB I- ChafaCH* MHuanDt (mn^wift^i luyp Tppif T II ihall iin- 1 HQIB9X !T*Jd DC 'tiAjCnd ID I 2* EHl "flliie (fain L-i:luimi 3 ill Pw Ira or tm iiiuui alTai II-h luDal » a IWHI -a i.->»il Mam l fi-Ljj inpmnen-.in.ij.LDi'i Mjj.andLdAmui*^llni!-!Fr.-»p- n UJIflMKM -.. •..' urv call • i-iii ah 3(an u>u T,r. u H *". Jddl4H afC-jtpilHbDn rni^lhnp in . JH Jddian.C-an t»! DV4«4 n-vaiaamhwr il dll iHijfli i-r I'M pralu CllM- "PL-. >J ii ih>> a>ij #'n.h i.>Lt > o Dyit- ia"iti uhje: 1*0 bp^tbwi-**! T4b«c 7. AKb+hbM Mnimonlci 0> fiifrf r> r iii ;lrinp aniiilnlP! jriitrpaiing In ebibi nrhaia '-"m jUUi »••'J -»aS» -lal liilLad ITVd lall~r iT ihjll llhni ttlPI a«B- pOSVnn n tbki tortaH uniHi Iha ts»-tJp' it din? B«Wffl)Pltr*Pfl»# ui tdiiiBiunn n BCr; ii ,j,i#arih T ranlaiS n BHuUSlii id IP Jl uPaiBVIMiD "iDdB -|bC*UB#gl An- BC5 ^iHHH HiJli C*HipX:aH«S amhnul iniy an addiuia ri3 modrni lu-Lud il •-, Hhch iIiifi 'mi ihuumh tru iniHB pivd nl Ina uddntB tar B«BPtriB t*i>> A DEL* :- ir-C* • HA UU IlKJOJ LDA MIMM hfijt: « JE4. I'M IOJPl|jnn:ny>ja ipnol lnrr«l. "nri Ihn ' l IMP h«aing i jnnnl h* iJnw-mraHj Iram cr-nlacl Hm aiiaiiiililir > I r.u WO ihril- bbiuiiid Ihal a l«0 !?,« WHInaBB ] VIW viBd in mpr:i.i:hnn iluai II r*a inan nildraKLn, nwii- l*» m U5A. whth 'iu U a#Kt f,tQ* . 1 1 rLn. rop -.J« ind by T aha a IrXnl id-lTll -l Uppd HI Ihfl npnianri Iha «wmnlF 1**0 i >ii ra* tlla' BjlDm*KB*» **|nni| rh#- kH'bii htf nuridmp Iha iuiiil'-uHI mm I P "* aMh ,'k.u-Hi in urUtri tOljUQIld lllB bCQ'KS.70 |hr i ,".- ;V.^ ii f IhP Jilriimi iB%uhpJ Irs.-* DM addlHlli Ju+KbtHl CMfKki m^. < an urn* uMd ontfl. totftya v^s- rHikii >:-i hichh'ih acaa u, Illl Inn iFii.uinu U4- Litinl. OUHBCaU jii jui-J".^: iMmfllJ«|ii anprn»r.wp "!""' *** I Tha Opwrand FhM TtW uU£ldnd hEld mHT ll*'< "O KKPiai than -jua • :d«Mi| PHI**"-*- HW upHMliun :o» lull] ! hn aiuimliBT muri L- «tlaal laialilv -nSU Uil JRUdtli LHLuUhWa Thp aaawnbllH ihnijld t>C A oig inilMFn add' in i i HiUkdluu Ui Hid UpBIBH J IIH404 m mllUCBnn bp lunuuiiduig irttSIKI OigB BddiBlft pihePff Hip rv-li pt! juhtrra n ijpaD* ?l ^Kili'wq H>|1i»*W« n Iflbtw Ringer cnnilanla d>Jhi-j lUUnd r, , H,ni n mi ji inli duai.1 papa tihlrniin ariiLn tCKiliyH BalhlPfl Bafimai ttfltlatlhl im-On m U |rily*i3HO- >OUKi,i;i^. ri-a lul JOdl rtMdi Ji t inniUIBfJ *r btW^g *.»"i»^y*rt bf CMjmraraiaBt Kl IhP upmond HP"* Ldbna ih^niptipiijnrTiJwl t* Taui Ihal IKu, H-ai liafl '.llalaLlaTi Qnimf ij-t^ii bninOf^Kuflniltld H COmjiii- L l--^K»i C i l| Pi bh .j •• r "'^ ^r.T-ll ij.gill U » B Uaipdncimpl ciinaLw-Ja ihal ni.ug iil-mJ L t prulmllU. I'-f l jiiU-il rt-'.-i 1 L-.*i Klt-i halDBfld fiy JCIO HI innnj-Ol e rv tne hHi.irinr jnai iliqili A •• F " Camm»H FIfHg frw >.umninl FmU iiuy llan'THCi Iddilal BMJi 0^* HMC* luaiai ljih allhn ara «lu«inJ w- Pal lK«l hi'O lt>dn ttlPf VMM ilip be alia- Hw iiUF-ahij" Cultfi ftB*a Uf DpfKjnd llt*Jl StnGwriliiig r*"- uulr.»rhi:r || !.. Chapter 10 The 65C816 MictD|ii«ieswjr Z51 252 Apple DCS Hurthvarc Reference 1 Ubl* 9. Addr*t» Mwft. Famuli t«fc|a ig Addraailng Uc-da Summit *iid™i4Jng. MQi3» Fuimal kah^flM Tlmta In rjumb*r I- Pum AhWlUlr tldfKlDf * 'd.v 5+out*C* irHa ' ..V *W .1 hi EKT '•' ftijuiiwim IBUNHQI, WHCllB » d *>t sue » 1 'E"tp 1 Imimdiala E Z' J ' « e>:t* 4.1. fpMI EM Atuiii Jir L img Intuit d.i 51* " H il &ta La D -J?wMH.nnn 1 ' t r m il 5 AccdmuWv Z J 1 ' EH EM a impirihi 2 1 r'll Program C-joto J PPH- '. MhjIi.h ir.; ."t>r«l h'LliiaLl tMaataal |d ( t ^, g. j.ii ClikIIui * C>rKl Inilinel Indaiad LUnq |d h 0111 Jl li-.ii..M l;.'I3 EHT n Ouarl Indaiad IhdnaCI -;d 1 1 '[iwbhl llldilai.1 :l 4.1 it. 10 &r«l. K Ml 1| M BttCl. V T 41XI 11 Unomri 41- 1. frllM .UJ| 13 *EV**i« i r.--3 fr- •: 1 1 4Pl ill 4Uit>4ulv L-j.rq 6111.I liidiidcl id| JMl, 1 II . *> 3* i EJll IT AoiDl.nHndiiart !jj-p| 1 S Ehi*ci hidiidci ii>"g Ml Si? ifl Dii«nn»r«i 19 D"4l 1 ^'Ki Lr-iJ 1 E^l . Ii Ahi::l.ilP IrdaraiJ !" J"U. : - .>. r C * AGhJlulu tnlraatl! \9*\ 1-A 1M Acuumiililnr 1'tt.iJ 111 ! ZZ Stage IWWM i'a- Z.J 3lKi R*ml"." ir^rtcl Indaiad Di-vrt Indu-a^i I'-Il nn. (Upca tanqlffli 1 - lEM.I NOTE'S. 1 M , 1 tKLindar^ add 1 -lyl"* r pagt QDunda f'DH44 w«ifr, Inmr t'afMi . • i-fiiing inn npMjindi Branch latnn. mtt CV^Ip H Onmsh 11 :iKh- Z I nl.i.- BfUli,i' I U U IW K U 'fitlf Llpaiihdn 133 1 LY-C'i idd C^l" immHpdala > V I i.-i*. "ii- 1/ i * D'i«r r#n.uar km |DL nc»*a ti*l «»n I 1 cytla ^d p naad-VrdilY-'AMIa add £ LpJat *> W add D Cj^lPl 1^ I Of « . Mll.p ii . M n.d li-dn«Ll £>r«cl Inilaiad Ii, Ij rViK-l ln.ip.^,1 rib 0*1» Oil-) | i-r::i -fm:h mi rpi .in-. ia |nn WAI illhffdLliuh Lhfpjr Ihp-i fiP"5. jhighnl I Trd Mvh and MVF 1 r?ili-.:l.i:p<. rh^-igp ir^ Djla Sjf'i RuyulB' Lo Brai Slprt AddrautaiB Wwr RUr t. inai irn liiu [l.^.| htvinirv; jjij Halnlai eCjIu |ia dji 1 prtWllVl 'BlXTdirTi* ri.il highnil pign| V 1oto**d &y IfflR iU STO • aueDl IhniKand b^W-Dl Hid rYJlluCliuh lihnhnalnn njnl .]ddr«J! lYhPti in Ihn rivw iroap 1Mb Blin.h r«r iw ^mgr, Wlinnp, iXHWUtl ngn:. Tht BunL adGnal hanipHiaiil iRlm Ihildld tK ItKlinG 1 IjDOFF-" Tn. uir.,:l,.F »,-vyi-?] d BiJKH. E*aH «hI*.Hv »:!%[ vrimi Nik dj.' :lnrt nr ^4C» m "I* Inf.rhupl hrluP.TiP. flaUw IndHBf* IndbPdn JUUiirt^nq p-rapM «*-ll a>„ Wl Cc m ! STP Intlfiacilapi ThD FOHMing Pil-rJMl prinnhni biiL be in etttci IhUui j Ihllf* llla'i I.-.1H 'a-Ji In Mm £ "i-.ul.nn mod#. Thf- EiJn aJdrPii iHiini- 11 OfflJlLKi Id M- N. Duipul fW^SCBH On*r| T^ aTP iNfflttaJirtW ihiahln Ihn hJcIKK [OiliCn luilh, Itttapi drurdP^t r*aniiDI DCDff K U^4 hhlp Un4 aavt Tn4njriQ*,pgo£" *?"=Ik» ! hpniin rt»e hign imp rniim _» ihp unit D>ii #'l nrmi** frTTi WighMI Ffo^ilT «CHarTnKV! EnvuiiU Ihn isngp *,-

Ihn* hite* yj^ji, Rp9 nip- Ihn HEP. SEP p^Gi PLP MYllruCKSrtii may chinat Hip n ihtojU i.J-t*V hluluandlhai Hint HJJHI a,,u -01 L* niullmUxwl I'.IIp! Oil T* M riild * hill >Juln 'j! Ihv Ln t Chrfviil .1 .n^i, u Oj<,ng -Pnt ' unlclhP DfltPlUI i-pOrtt»K U |ir.fl||. y £i"KiiiiJTiin/Ti n^nl?5*gnii il MLKT JEL. JSRii, a| PtA 1*1. flER -PHD. FT-D HTl mih jcbCTi ntnlr lulkln Bnahing Irp tl rS-y.h. «in.;p BCckaHp QH Im laung p.i.jp- r th*r«?B j LUBIBll PriiKllV I Olr«l AddrrHing Thai Iiippi A-jVJini#,ng mon u S .nu uIIhm iiihiI In m MlaRPLMIpul r lOfliUmi ^ \-* fx***r.W .-< .ill Ah h jniV* 1 '?nm nnn rtOjH4cf iDanomdl Bill 'uiiill inihJI Ifl-bh DUlput Lhim:l Y innvpafcng maDH art bw.i V i p# in flW Ml»U -00" IdliUi- MKBlJ ID O&FFFF Mhiin c- n-< Em„liw>^ -iiudu Una duad jilrji*Hj?.ng. i ,_,.-, uh iK-iihuLium and a-Llip^r.j mQdei ft iMUjndad hW c :- - r, ^«- 1 h. - frnm Ihi mXtLJ "Bjalui Tha ilnihnnlinn if^.^uy B2»H%I< dwlL-iTiMwIlH uumhni ul bihp -:-.i»Jly V-XPd in Thl> dmhniruOn ibuiiIbi uud trm .p.^-i angp n nooqOQ ln DMOFF * Lwp* lur |Uii«.l J and |D*Kr|.* nddluJ-Vi w>H iHnumm! frnm i«Xfl IE pi Tr.p^.io*.Mg P «ddn»«ng pnddllB HH-r^jr,. irfj, uujlui m t« v»iV Jii; I 1 IHUUi'1'BhLi.liiini and fcrvrnSJug iphdn ailUdHDII | 5-J-Jh>H DO ?* Huly b. i.wr dp1n«r -p^lB 1-gnild'ui flll-FF bib i-p- WTiBd Iru- milriin^ni or.ijiura .UiL-upt-jLBB*ai* * IWJ&CKI3I Cw |i T-C-ro .11 » IiiCJrttci Si*/ ji nBgnlar " h*> Inll;,^.-.} „in ji-lpl 1fi-hl h*pp*«ri 'pgprdlftal -3ri 11* nrcdmulMCr li'a crimjily r*enrtfH|lDi W»5CB*uM Mil WDC 'ul k'.*"*«irH amiiuhiTTi nl Ijidl "'C'OOuLBik-J' hardaiBiB oke» r imn |h n Sliu a-u» luni l.:im JA. RTL |d|. IdJY.jMPJI .IMI jl.Jl.i 1CS T5C.TCn.TDC *lwt >n lr< EmulHon i.jub n9 DH nnl pniifll |n rt»n. ir** lbi+CI 1 1w lalknir^ inih-nnoni mjlr Iw u«u wdt? ITWrpBaCntLI bvhii lh:iuuh jddKH#ng nruai •• uoCf*i] taWtWf F a-cepi Iw IDhau) dhu jnn»d| V WDH[Jipe4#iJM addr+Minn mijnpn. ind |tlf PEI iriUiuuhun .**ir,h "p" -n- *h(;iKiH!l j-i |t»- UhIb [W^ T-"< WDU Dpt->j#wi! bn uwtrin p m^rflpioctnnjri F u , ^b-^b niddB J ul ik Idtlbc) in .'dhnii ,p inr- tn.,|.ji. :•' !JM m n-.» cbH. ihn B I i.i WDHFE nrOuDHFF ihlu Hinra-*! ny^i njgp PrIK PtlB: Plfl I ha 1Mb WMf.'flS? |,p*| in.j octduu rj u. uiida U-hri ni>Hiiriri l-.-.ii g^ BfuuftiuUlkP w "I p.M bP WMHi#; BJ4ekHing TC3 iniDuuhuh InHan nlhn 32-DH ^Jin ar>J duly L>cairaJ:Qraj MqJp mv |raj W«CnJj ipM |„ » nlhapMin ««l». inflB o£Cu**uldlut lil'anilHrrpdln $11 hfrMrthajin Wr*n *- iPa EmulU^i mudn and DL -n -*j1 dun* IU J-pj Ihn Uiiui.I rn*lD^UH^initru{4WM«|alM Mhilud <.%* in Ihn 1 muuhnii m>> ptjglu-cuj^rppprnmf^: Ini n-+Wfi&Ca»b and u»n ba ..wn uKnin liign OOin ITU Efuahuu and Nahin -nij«p ihn a HUfll II'm BbkU Rb H ii I uJj-HibPg ru-ijp DHBMtcaiFFFF v THji HEP br4 SEP mill uLtu-a l jmlul -.vlf^ rr^ M n ^pwa 32 r-r »jm drocjiHing ii r«»^rTV7 r-^WttCniJ n<^ ainiabM ihunrrodai In Ihn mntfn Ihfj and » &ll Rlh«n and i D-UVWI *\HCf* ***%)$ M ti "** >i*ni Bfr Bin ^b»|liri|fiZ lu II--B A B a-d C AccuiU|JB|pii iPfjRinJPii. |n P & tlaHrdl Hip Vbil in Ihn -.Ifc-.n Upg,,| ri i M.iSpihU AririrPj.]ing ^W65CB1E Only;- lingii- \\ N-p Ar-jji j|£- .>, TH.J diJiIiui'-.; mpdP-I .iif- ,,f.|a ' j iUUiih dala nul- 1 * Whitn in 3h«- Eniulaion mada Ins 'aV? Jinl \1WU rnhi-in-.p.. u c-n v RDV F j||id D J11119 WjHq lida Ihn di-pp- fcnvjrpss.ng t„ .-jc Tf« Wcif. JL' hi-iI LVTJ6&4G? HDmt'ia rang" >1 QMM Ki FFFF Ircta-aing lnv-nr>ig" FF«X .t,, mUji| m nOUYV f WO ' h-.hKrlHiiiilHri *n. Ihn -rjimnrp KhlrflK Allit Jnd ihpMW :il J.%»-,.i!il.w:.-=J-.ngi*,i.lPUUtrtfllij>) InffMHHI bull- OaU hlch Mhnn iii>ng rh# Wfi&CH in Wht-CUUf Ir.-nnrri^i t WTi n^lr jrr.on^ La r UHly FHUv«ditU iIIiim IHp nwmrp^ rpngc DOOD > mt tMaCXtr »"-- mr ^Yu^Cflla jj Hup O-Pihu w.'ilpi .-f^i )l cij. Th< 1 r.>J"'«j WMCBO? liapi Ovihu a whIb aihnn n ihp »*]r„-* modi. r>_l J. ihi i:il fSauiua B-nKi Hi U>F iL^OTJiliiin Ban) h> |-r VVHCH1E arid fiOQfi '.•.- riOtZZFFRKmayrpBjih-r *n^< tf X-v I ukpg. Ihn W«AC|1| - i m e rtfitCMl I *«"*" in hin€m u \]|,Dn m«tt firimMlcrDftfKHidrt (if.. WE5CB3Z) f nE^P wdc »&#™mt WDC ToolbDR SvilHri-gmijliiQP ^4CiMyM.tiiuii wii ^n^ii- rtb&Ci-: ju+- ..i p RMI T ma amuLihcn ni h-fl W«CBCCfl1& -n J Irn «CitJlf ABORT lrg]lxt(WfiSCfll4Clnii r I• i |dh : n i^- • ! | p IJW* Jb* |ipr.ip*-nirrf. Ann* lip Cnrnpuliil tt hi2« |*:iilp.ain crpudPdl ABfiflf a-rj^j tit nfrOi^ni Iih bmiKri ryr) ln,t*t«d «>va Cjr He MM .1 *B3RT m nnu hiwd Jimg h-< Adun l"iu"' u|_l hvjuiilp t*m Ahi;i1 Inlni - SwllcHlH| MliOn p "BP HyIHi £.' EmulBl r»- RAM -jppBOC K Li-jr.pi "** * " ^ piyxitd li Nd i*luinnm-raiij t-i HtlDir |hn AdU!1 lnMiHu|JI II Vrt-^n ' *^".,^ Hi^t« Tn>MiDV*muda lulha tmulali.-in mgdT h-*K kxj M hill ul 1Mb L.UI111 Mppi-Vf ipp VH high p DVMftll HAM BipBnupn in KHK Tre A&.3RT ihlBtnal Mlch ifpgijn d duliifl.nwiiLflhd L-f iih c#-HwJlhix1 I >~I g > I '. |r •giilHi*. ^o o* mnt|d*D an lu til Tu uia pi«r^* inajpf.. Dh«« brIM ITluH Hwari hu ULi*^ * DpwnilBMfllBI:-MR|.jnPodUnil Iliad H««^-bMI». --.-.ubkj- iNIiil mwplird i iBEMf >1 Jii*-li+J Ija4a¥p«h»nflrgawd»l Nulu IhM inw L-wtrnl" ul Mm H Jl ani| r >lngi]lnj]. a E-ngH-Slip J^lfiF..-:'. . nd Ihu hia. and high r.,r* rr |h P AccuindlHui IA a-'iu B| aiw^iul allnbut a Jfl PjiF H jli mpn-crv pi ..l> h: ZT-i*. rT.|..n.i.f . r u^ii RTl- PTWHSHH il-lnl Bill b« «ngclil 4 d "I nBQflT -a jSMtlM ullm bpn modt- ClU¥«4d £jiLh_j_ a Tnit* «3.bi ,u«i h- j Rfm cr-iu y WOW H>rdWirr IralirrUffjLl, BRH, Ind CQP Inalruclupm AUrci -Mrpni pnj*ddF*H PBPd-id D&n ail' hnrrr-^ oq ;Em„ii|,t,ri .n^Olij ui l-Slfl x*JI t«gmp IU* Pray art Earth and lh« Cqla lafih Rcgliliri. Biaa> j" IjU co liHjih-r t«*i #rn^i 1*1 inu Nai.HL- .,. j Ji pfl n '"i .kj-hii. itir* rf^^ip. .pgni iiiaB'uain aihpn i rj|r3*. H ic inlpi-upl BPA m ClJ" n pmuJl#ra lr. r-H N.tL.p — ftnjii on CO^WDl I ItpAhjrt InliiidPT PM M mii lamn nnri J .- -r .11 - .- , Irtla** Fu- *v>1«1 if"ui:C jhW Ih IhiLni pr*vcuicrHi- a aiicoiian hm*f VPA pn< VPA Villd MBirwrr AMWM Otfipul Hpabi IWttCftlfi r^iui rJ ira PQR ir» >fi2C JuludiH calv 1F/fd 1 l a AHA haiaihai in In-^TtuM-EVlldBuun CiiS ul apVJiim Inl cnnl^ralipn Cflla) Whnn J|JA Df .Fft d >i£ Pitjli jrd d.inng ill Mnnhl [7|TilU in,. AddiuiA Bui PFcpnUftl Ql*«rPBrw 1 MwJr* lain UCiA n>? i'FA jhnuia M uUd lu qiiat^ > me- r^p ":.-. ry.* F/,sii*-..Emuiali:r =m|,iht,nl pj Mpn ijr^l jnd i^rH .niiji CaiJ i4i.M ip.ii ath,- vDA tnd ,i- j. «» i»?|h in. PHBad HTdMiHi mil gVntraMd Tha Hagn nntf Bata Jdaiiiit'l ljj4 unaiw-nval.^i Tn.i^n N IPbI plu£f r-ta rrji jl r-+ A«puj Cumpulal npamipn iKTll Thp Ml^- fp» HniP/ niGOfl IS.Mn a^nMr a inniwiit a' m.nlli*«r( .nhnnupl • Unri epiLdn |t nccuiBiY '-ccic hw C'MP.na.'ii.-.-| i.'.yt Hub pine bpc) hf d..n n> ly- Q r li Jddilitih Opic dehUfl Dplla- tiCCuri iLan iiniu-j-^l lF rT:ltl€Kinitl'uLiy>^B aihiurnn*rt««mnr|i *hgn |hp hnnj or uSI |h| "lidirxii n Ihn ( .»i jphnn Wrynj mdr- npu-ilDf cnnina* ul d hm t+v\.w\iw>M cr&*t*mrm tiiniiM WAI „ .1 •,. h. -i rtilh P-* MOJI Rral 'iPn Tnnnj Bagid Ira pr C-ftla lui Ihn !.lnin ,n>ir,^:f,OJi j|i mhlrui hum Ji.-iy |hn h]-Dn infldi «lpgnhjrm D nt 4rtflllHiflaBd.raiMl.ly Wi'lP nSilu^O'. *hir. dinq 1 ijr The VVAI rdUhjthuu bula RBY M.™ and H[R pbt m«fj- k|M|. rRCl'flr-R€5£T wll uJi-^ualp Ihn A'.l tfVfl pfUDHAur HI w N rMl IIJlp --amnrp- a-tvp a a,.pdD*i at KMB machmp cymj. A Dpl-unv r m FMha hui «! bdi nJ u l«hpn JAPJ EpipirdiEri Bnaut i] t\K> P-fiBD* WTW* intHUta* Bna 4 UN ludui Hhjmj-- mndn KVrJWAlir C'jfrtiul lu Ih* iiiIfiucf KirnJni ni u |.n t rnM-rTir jn ABJ _ uaf** LdftiutalRTi HAH h v 'JH p >nn or Mfir ^plai Birtn mtniqr p sonl*JV* - r ^CJLn pj|U |*»i m« WAI uijirulTIOft BJ a lt n£n ibiLiM IhH |iiv»- piu-t ihnn Hide inthMn COfllKri Applfl H, II., lie Hid It* Cuk Sa>mn> |W«&C*1»Oily) MhfeH T<* BUfiui HaupUBi lag n i«1 |mr5 *Hbkdl. lht (RO 4HMHh|H VLih ir n .'FA. snouifl uul bai nun lr.Q,rfl.l jnai«,H-i Quiniu diu i|pma- I Tha Tiagllw*- mpn yjiW hp »• ai »r*m j: Ihp iKihpnal Pp*J jr. Wim Tbi p »« tWW Ihfj n«| HMlruCIO^ l-luPOVfliifl IHa >/t^f inWUul>jn| 1n « PTJd Lph|. eNi ubbt un pjuo inlethf prnhKYpa- n r ciupf ucbiiet rami V* I I MffVTOn Aftjai B^lBTq Cnnwr ,o^^ auuhi rppiapnnlalh^ I... ax-KdliD 4iH>ujr aurc; In Ihn irnj *^tTi w-Jt mr^ni TPhI "HHH)I< htflaiarp rcnl.g.jf K"C-.-4 bull! .n lr^ h.jhpji 1DMM .flj j'.IO \i J» ISO r=ol Whan an inlmrupl laruHBia dnb.nj ^inrq-n-aj pJ ar-. Uhll nmin Ihn um> PT4i-n*vi .,1 Ihp -*cr0O-CC«M. jib-J 111 Wf Hjh .^71 "Jv* I& iblrr, 4 .... 1K 3 | | TOOICC' Luni'iurdii Ipr nprn _ ppn c' piOCHUpF *«3P if- 4 i »mMr+.Bih c* App^^surwjini Ipc Chapttr JO The 65C8l6 Mit-mpincessor 235 236 r\ppk' HGS HyRhwre Refetnct: pKhjglfig IntoffritfhiMi OreJ*rinfl mfemubAA Multc 1 C ti dip Pui l7t ii nh WE -*t • *o. W1 1U> * ("«i uu" *" •- I— h ' D.I DD a . J* - D urn UM | »*IP • •» _ ri" *l 1 |. D1H nil ikJ-i Bin:: -1- I *>!•< i« . ; >tn "' a IDW IHu i- itat .u w ascaTii pl ».l .— ...: - ' * ' H I— LfHtlHI C^-i; Cd'-i !nt -fl'C Ki TQ'C rJ —BSXKi -Ifl'C "vv'.i--.ili:' KMcrlicB|inni -J 4HK4- .. .i J-. , . = *mhu -L. PI *.. ' IMI -I t. Mhx 'H J-.- c n ni I'M ft>i> llhU '74 L-U w J B.W! I'll CHI 4 hi IK i. Ml w TKhhiLila-iBni tOllllin» miy Ea 'qiiwlFrllrpm tec -trliF M H 14 — IV !Hj HI 1 J II .-< Tha WUrlvii Dalian l^nnlfr |rx F1M Ell* Brown Roiu UttL A-iiLi-a WH 4 CI m uku TLXflT • ii WARNING Akpr*c#ni«d in VOvt hp6* by. MGS ClRClJUE ARE SUBgt-CT TO CAM AGE FROM STATIC DISCHARGE Irirmi H'dM-i .Jt- i.^-,, iffiuh m* bp***M "u ™rt.>™ M Da .. ar^un d-*- ii- - faUu ilin ^i m HJiahj . ,|,|. l II ItW mawnaBtJip ,!> I.. i.,™| .. N urj;. ] H> ...ii hi Jh;J--,|. h ,^j . vpA , , .„ r tii ikjm in mg^i i.*»ijn inn «n* pnf **k*4M >OhU b«fM Ml^rc>it»v "nil »4h=ul 'iibU, In an,- ..w Bfw*?* Mm hhi lm« ~«di •= hb-V lis kcitk, afu^ irlmnp.f.1 evi im> a. ft.i.i-i** iMmi „™- n K j dmujpm in *l*G0ttBa'fr artiur un hi mn mlincf r »i,*i nf m* .wirt—, i/*i 'jhi *: dilnnvm lha i,ii»nj -f,, I: .cnu-g-H nj" LpM- aMi nm" nJ*Mi i^ipcfl jp W w U(if "I "ll^hfl CUMMIHpHnM ilul b» irr |l i Ii irvi ri I P^Hkfli i u ppi, p.',* nul wiilihlr nn itfj jg-p,n rfi^dfl T-m, tO"t'' -w! ai iccn-m*-*iinr.n nj +a br^^,^ "hiMahm ul BiaJirq pilmli n" mtw v Ihi utadaPY WOC prcd^ > Ln*:i in V i«K T*«.*i I 14 1.1 1 npij -u in»-f 1 k i P*™ »MPPf|i •ih'ji hn-E twtfl uo«i lai n^^kfld p.ph uw^iwioi^it .ilmwMii 5«Jii Hebi rn|.M nl TfTctl |ir i-i'#a>* rar 'iz.\,iil pfliroHmipXi FAXfl03B3S*US J Nav pini. no* |-fti|hif O *&.p!*i tiiixr Tria Western Dusigr, Cg-ralar Inc 21BAE Broun fid ,MKa.AZa&3fJl flfli.^a2-dS45rTLX 683SD57 = " i"^J U3A 'i:i,--w IM Chapter 10 The 65< 38 6 M icn tpn ksssoi 1 237 ^» Apple TltiJi HLudwjrv Rcfeiroce The technical manuals are listed In TaNe A-l. Figure A-l is a diagram showing the rdaiJonsrilps amonn die I turner^ Guide is an introduction From ihe point of vfew of ihe user. Aflik- IIOS The technical Inin.HJuction manual descrihes the Apple IIGS lrc the mouse, or windows, or menus, Or other parts of the desktop user Interface, then you can ^et along without the toolhox. However, if J developing an application that uses the desktop interface, of if you want to use lhe Super There Are iwo reference manuals far rile machine iiself: the ^pp/e litis Iktnluw Reference ll: 5es grapha s display, y cvu'l find the toolbox to he indispensable. a lib bout) and the Appivfkx Firmware Reference The.se honks contain detailed I specifications for people who warn to know exactly what's Inside the machine, commands appear as options m pull- In applications that use the desktop user interface, down menus, and material hein^ worked rm appears in rectangular areas of the screen called windows The user selects commands ox other maierial by using the mouse to move ;l p; winter around cm the screen. The hardware reference manual The Appte ilea Hardware fle/fnrtfr? is required reading For hardware den-lopera. and it will aJso be of interest m anyone else who wants (ft know how the machine works. Information for developers iadildes the mechanical .md electrical specificatim- ill The programmer's workshop reference manual I connector bach internal and external Inlurnuiion qf genenl interest includes draripu'ons of the internal hardwire, which provide a better understanding of the machine's, features. The Apple lies Programmer's Workshop (AFW) is the development environmenJ for the Apple litis computer AFw" is .1 set d programs that enables developers to create and debug application programs on the Apple ih, s. TteAppie DGS Frqgwnflflwrs Workshop Reference includes information ahous the APW Shell. Editot [.Inker, Debugger, and ulility The firmware reference manual programs; these are the parts of the workshop ilui .ill developers need, regardless ol which programming language they use, The ApptittGS Firmware Reference describes the programs and subroutines that sue Sttfled in the machine's read-only memory I ROM), wilh two significant exceptions; Applesoft The WW reft/rence iiumi.il desi rfl>es the waj you use ihe workshop to create an application, and includes examples and illustrations in shrift how this is done. In addition, BASIC and the toolbox, which have their own manuals. The firmware reference manua] Includes inrormaijon about interrupt routines and low-it's;-; this manual documents the AFW Shell to provide the inrormaiion necessary to write an I SubfOutffles for the serial APTC' utility or a language compile fur the workshop ports, the disk port, and the Apple Desktop Bus interface, which controls the keyboard and the mouse. The manual also describes the Monitor, a low-level programming and Included in the APW reference manm! .irj complete descriptions d two MamJjrd debugging aid fora.ssembly-L;iO[iii;^e programs. Apple lies file formats; (he text file format and the object module format. Itie text file format is used for all liles written or read as "standard A5C0 files" hy Apple Tics programs n.i riuirie under ProDOS 16, The object module format is used for the outpiH of ;ill AFW compilers and for all files loadable by the Apple JIG* System Loader, The toolbox reference manuals lake the Macintosh* computer, (he Apple Ilos has a huih-in toolbox, The .tpple tics Twlbux Referent?. Volume I. ml njduces concepts and teifflinology and tells how to use some of the look The Apple Hcs Taolhax Refewhv. Volume Z, contains Information about the Tfsrof die toots and ;ilso tells how to write and install your own tool set v id ix A 244 Apple ItOS Hardware Reference \r« i i Hoadmap to the Apple DCS To.1mic.al Manuals 2$ I ^ [ The prog ram mi rig-language reference manuals AFW and MFW manuals Apple oifTCTtfj provides j frtCSle assembler and it C compiler. Other compilefs can he Apple provides two development environments lor writing Apple lies programs,, See Figure A- 1. used with the workshop, pttwidfid thai ihv^ follow the siam Urals defined in the Apple Hgs Pro^mm mer); Workshcp RefeRVfcv. The Apple flGS Programmer's Workshop APW1. APW Is a native development f system—-u reins on lhe Apple UGS and produces Apple llos code. ]t is described in the There is a separate reference manual fof each programming language on lhe Apple Cqs. Apple tics Programmers Workshop Reference and related language books, Each manual includes the s^ecifkattooa of the language and of the Apple lifts libra k s foa the Language, arwt describes hi ro to use the assembler or compiler for that Linguae. The • "Hie Apple lies Macintosh Programmer's Workshop tMFflfi: MFW is a crnss- manuals for flic languages Apple provide an. ilu- //.,v .'/.,•> Pn^rajfliflef j? ViirifcrAt^ devclopmunt system— it runs on the Macintosh, but produces Apple Hits code Much I--., mbter Reference and Lhe Apple lies Prr^rammeri QFbrfeftqp C tfe/eFepfce of MPU lies is described in separate MPw' lies language reference manuals, but the parts needed for eross-developmcnt—the editor and the huild rnnK— .ire described in The .L/Y-nV" f/d's Programmer's Workshop ticfivvfico and lhe two prograiiittung-languagc the Macintosh Programmers Workshop Refmnce. That book is the only Macintosh m;muLt[H are available through the Apple Programmer's and Developer's Association manual you need when using MPW ITCS, CAPDA W ), The all-Apple manuals The operaling^ystcm reference manuals En addition to lhe Apple Ittjg manuals menm-red above, there are two manuals thai apply There are three operating systems thut nan cm lhe Apple Eqs; G5/G$ w PfGiDOS' 16» and < to all AppEe computers: Human Interface Guidelines: The Appk D&teop fol&focemA Apple ProPCft K Each npeniting system is descrihed In its own m. ah the CS 05 Reference. Sumerics Manual If you develop programs for any Apple computer, you should know Apple flteS PtifDQS 16 Reference, or the /W'jrA S fei AnW Rfi/emn r Vfirautf GS/OS uses ahour rhust- ui.imuK the lull power of the Apple to and is not compatfbfe with earlier models of the Apple I] The GS/QS ttefetimci describes the features of Gfi/OS and also includes inform.ni:-ii The Human Interface GuldeUtm manual oescribes Apple's standards for the desktop interface of any program that runs on an AppEe computer If you are writing a commercial agjxntt the System Loader which works closely with GS/OS to Load programs irtto iii'..ni-:n von j re writing a ptogram that cfoes .my file in&Mpulailon or that writes to or application for the Apple llfix yini should be lully familiar wich the contents of this [[ reads from a disk, you must have lhe &&VS Reference. It b j rare applications programmer manual. who will m.ii need thte book ..u some time, lor system pro^rammurs. ii is essential. The Apple Numerics Mwmal is the reference for the Standard Apple Niuneru Invironment CSAME*). a full irnplementauon of the IBS Standard fir Binary Fboting-ftrfnl Arithmetic GS/05 maintains a complete set of ProDOS 16 caffia and implements them [usi .is ProDOS CTEEE Std 754-19851. Hie functions of the Apple llGS SANE too] set match thost of the Iti does, Tnerefore, ii is unlikely that you will need to refer to the Apple IkiS ProDOS 16 M.n iiinwh SANE package and of the fifJ02 assemhly-language SANI software. your ttefmm t If application requires accural r ui -..l-nsi .in: lime lie. you'll probably wjinr in n?* lhe SAM ProPQS 8, previously called PwDOS, is (he si.huLikI operating system lor most Apple 11 n -u lines in the Apple DCS, The Apple IIw Toolbox fefemtettils how to use the SANE (.omputer* with H-bh CPUs. ProDOS also runs on the Apple IkrS, but it cannot access roulines in i-out programs. The Appie Nnmma Mitiiiuii ts die asmprehensive reference for certain advanced Apple Gcs features You need the ProDOS 8 'technical Reference Manual the 5AIME numerics routines. only If you in m tfng ptogranM that can nan on S-hit Apple [3 Computers. 246 Apple lies Hardware Reference Appendix A Road map 10 the Apple TEGS Technical Manuals 245 J Figure B- 1 i f £, EiirI tab keyl m u n I AppcndLx B International Keyboards h 1 I- :«li * 5 ;h ; lo 1 - tfrH? dear . * M i J J i'V TT~ ]T nt |o It c r k 1° |p |fi | :• 1 5 + Apple make* dlffeteiu versions dF the Apple TIGS for diflertni u:iunuies. .i--i:" | .1 kl 'Id j |rt J | K 1 1 J, ' | :\'\i.r;' -i 5 5 Tilt different renstona haw different keyboards and display characiers v-- * k Iclv ff • I" rk 1" ? 1 fta I 1 J Mr | I | 1 ikiL reflect ilie diJl'ercni typing conventions nF the different countries. The Al)B keyboard on the Apple lies is available in thtr following .-:> Lti'Li | ;-| IM ..,..,. versions; I S English IK English Canadian Figure R-2 Ik. English ktyhoard Fieneh • German ] i. .. i h n -. i i i it s s r I? [- ii ij 1 u 1 Spanish «s|? lb b < j U 1? 1^ |$ }o II- Itfufet ^iej- H , * raD ||o Jff e | ft |r r u 1 [1 o | p I f 2 5 + Swedish Tlir keyboards on die localised versions of the Apple Ugs ate a]l nntar [a I^l^T^TY^T^I^,JL.ll„ : i 5 6 methankaUy the sume; ikit is, ifie shapes and arrangement of the keys m \z U [e kJflJLl* 1" 1* ? «r ^ a * III 1 cpl l ; are the same—only the legends are different. The character decodinj^s *** bM jf i 1 1L 1 i 1 f$rate For the different versions are nil sioTtd in the keyboard decoder ROM In addition to [lit inti.TJiJiion.il character sets listed above, Lhe keyboard decoder ftOM contains characters For Hani-li jud (be Dvorak keyboard layout, FJRLine.s li-l ihroiitfli M-rt shim the legends mi die different keyboards. Figure 8'3 Canadian keyboard <3 1 I.e. / ' !; |s 1 5 * 1 7 n .? J 1- i L ;•- dear _ • Gab |o >v 1 F J *r T | V [ JJ | / 1 \ P t { i r v ? ff J r rcnfti |a U U U WU U U U I" V l*A*i < J « - srttt | ? I* |c |v [e \h |.u |, | $ ^ i J 3 -hi lr. ' I I *.!!£• i* 248 Apple llgs Has h -i i e Reference i Figure B*4 Ir'rench keyboard r * Figure B-T Spanish keyboard I «C|] \2 \3 \4 [j |ff |/ jff )g |j Li L 33 - / ' I ^ 7 J J> * — |q |mf |e Iff [r |r |u |j |q ]p [T ° r K K K K K K. K K. K l* I 4 5 6 - CEj3E EEEII f_ f jg... . \x it Iv la in I 2 J i \x |c |v \b \n \u \ ! \$ 7H_3D[ Jf c L? , — Figure B 5 liLfiiun keyboard • figure B-8 Swalish k'yboflnd < < |% If nrnr * u i% |j kI; I:' U || I Is h Is | 1 5 1? la li U \b 1 J JftfV >r = J M |f If ; 1 7 Iff U lo li : .:. s- 1 1< >• I _ -* | la | 1* If U I l fl H It \? lu | J \0 P V : I_J!_J i — h [w \e |ff |r \y ^? P D ! f y L i caTlraJ M |_S__|_D- | r 1 s |h |j \k pji [a M , -' i_ j « - mnPH, | .1 Is ]o U Jg H J [« |i \o ' 1- j_ J i J - ]y [* |tTv la U |n [; r [r 1 2 3 ? x [c [v \& 1*. w I * i 1^ 3 V Jsptor » < \ IU V U«i| dJ r i- Figure B-6 h;ili;m keyboard - r 2 p Is 1^ I& 1* \'- 1- 1* f h I* v 1 r rfl'fc'V- sc , - 1- U 1, ffl \t \y \u \ j (a p 1 s 7 I 9 + wm A s J. 1, IfiTfTT * IU l w lu v J 5 5 _ ? : / r ft :. C v PJ H 2 3 W | i * *] *] _bjj !~ |p C \ppi n.lix I-; liiHTiutional Kfyhoareta 249 250 Applt- Dgs HnTiKv Lire Referent* i 1 " The character generator RDM Appendix C The Character Generator The BOM contains the dcK patterns making U p the chafteteis in the m-mlmim ;mtl &kufajnn dfepim. This appendix describes the hardware dijnicter generator for ike Lf-S* characters tikotumn and rtO>mEumrt text displays.. For information about mx fruits in Super Hi-Re* graphics display refer to the QuickDraw™ II Figure C-J shafts LhiL- characters jor the 1 IS vensdonsof the compute* ii h -I set m 4^l- fl& Tlxiftar kifi>Twm\ volume I, Figure c-i I '.\ characters JAfiCDEFGHlJffLMKOPQPSTUVWXYZ [ \ ] ^abcdefghijklmnopqrstuvwxyii I J Sp*ckif choractwt tUs o - * + ,-./oi2345na9 < = > International characters Fen other countries, locaJizctl tendons of the Apple Hi is substitute appropriate character lur some nf Nil- speck] character used in the k\i dfsptays. Table CM shows those JldULtt-rV 251 252 1 ApfiJk Ih >s Hardware Refercncr 1 Tablet-] [nkTiuLmruk li.ii.n uiv ! MI^i.:,!h' Equivalent t hurj[ it- j> • S \ ftgiisli # @ I I ' K. KnglLsh £ & I i [ I t French E a " g j £ I J. I II I v| # & £ A « A - Spanish i :: " fi g lt.iJi;in £ 5 " g e Ci a -6 e I (.-LTllUll A a © tt a Swedish # 3 A £ 5 i - MtiuseText characters rhe flumcier KOM includes several graphs rfanidjers used Ln displaying ihe desktop User taterface En texl mode, PjgureC*2 shews those dttracrets. Figure C- 2 fcfctiseText characters lAI/tOD lSi/Kt IEH/*Ca iK/fCS Mi/ICJ PT/Kft IRS/lCft IIHJ/IGT •p 3 3J5B5B] H Li:i£IiiiJ:i: ^!=! '"''"' •,.,-i IK ,:::•:::,. V ... JCfl S9/ICA Mfli/4Gi KH/KJC «6/»CI) SCT/Ki ::::::«::: »::::::: t r !3k i Hf/UM 2L&/Sl>7 1 ;;;;;;;;::.-. HS P ' 1 :::! 1;;;;;;;;;;; l:::::::::::::l I:::::::: L>Hi/Mtf J 7 1 -- * Pi I w\ 'zw/i\m 22Mnc ±i\ sdd mil 3 ii 1 s Append ix C The Character Gejletittu 253 1 Bits and bytes Appendix D Conversion Tables This section discusses the relationships between hii values and their pasftfcro wflhta a byte, Here alt some rules erf ciiumb regarding the 65C81& A nil is a binary digiu ft can btj dthej .1 or a 3 A bit carj be used to represent any two-way choice- Some choices that a hi* can This append!* briefly Jiwu*ie.fi hiss and bytes and what the) era represent in the Apple lies are Ifeted in Table [%]. represent, and peripheral ideniilicaikm numbers, h .iinn contains Bits on also Ik: cnmhLnuJ in groups of a.ny size 10 represeni mi rubers. Most rf the conversion Lubtes for hexadecimal to decimal and negative decimal, commonly used sizes are multiples of four bits. and a nLimjier of H-hh aides. Four bfts constitute a nibMe (sometimes spelled nyhf>h'\. Ttycse tablo arc intended for convenient refenjnee, I his appendix h m One nihhk' 1 an reprint any of 16 values Eat h of thes alues is assigned a number nnt intended as a tutorial for the material* discussed. The brief section from through 9 or a letter from A through F. intfiMJliL'tLiirls jre fur : -i i*.- 1 1 1 .1 1 1 -i : unlv Eight bits (two nibbles > make a hyte. One byte can represent iny erf !f> times 16 or 2^6 valuer Th.u v aluc can k' -|-eeiLcd to exactly iwo hexadecimal digits Bits within .i byte ate numbered from bit fi on the riuhi to bil 7 on (lie left, The bit number is the same as me power of 2 mal ii represents, in a manner completely analogous to the digits in a decimal numbei Each muiion location in the Appk- 1 J*- *^ ^num^ Doe s Hi byte 1 :-'l Jala Hnw byte value* are Interpreted depends io w hether ihe hvijrj valuta 1 value D J.3ZG 208 13 SerJaJ transfer Parity SPACE M-\HK c 49.152 3>072 193 i_ Serial transfer End Slop i-ii'- 1 :i «5.056 2,816 n. 11 Serial transfer Communtealiofi staler BREAK Carrier \ ,'.'•' Lf:l 10 Program Status register hit \ Neg. result? \,i Ye? 9 36,86-i ZJ04 l-l ^ Pribram Stilus register hu \ Overflow' No Yes * 32,768 i m m r Program Slants register hii B hHK command? No Yea 7 >.."j \jn li- 7 Program SCaftJS TL'^htLT hit (J Decimal rootle? No Yes 6 24,576 ljh:. ft i. Program StJlii5 agister nil [ [HQ interrupts EnahJed Dbabled 5 20.480 1,280 80 5 Program Status register hit Z friinvttik? No Yes i 16,384 1,024 64 4 Pro-am Status register his c Carry required? Nii Yes J 12,288 ^r* is 3 2 M^ 512 J -- ; NoTTTCtiirrL':! jnvhiHuiiuslv iermed rt'iTV I ,,„, 256 16 1 Tn convert a hexadecimal number eh a decimal number, find the decimal numbers corresponding so- she positkuta of each hexadecimal dipit. Write them down and add Hexadecimal and decimal numbers them up. Fur example: S3C - ? SFD47 = ? Use IjMcD-2 to find Lhu bdnai) equivalent of a known bf^dccimal or decimal number 330 - 49 SFQ0Q = 61440 SOC = L2 5 DQQ = Table D-2 Binary, hcSac.leciTn.il, and decimal ecjunak-nis $ flfl = ; S3C - SO $ 7 STD47 - 64B39 oooo H ' ITO S8 B To convert a dedmal number to hesadedmat subtrad from she decimal number the i m: i i h i -I 1 100! S9 9 largesi dedmal entry in the table thai is less than TOe down The hesadecimaJ digit is. i:-i| i V J 1010 SA i>. I noting iL-r llun decimal 52,767, Applesoft BASEC allows you to use the negative- pristfrfrderintt] number, then uie Table D-3 dectai equivalent cif thu nuiiiter. J ahLu ])-i ss set up to make it easy for you to convert a hexadecimal number dsrecrly lu a ne^nive-deL imal Eiumher. Peripheral identification numbers Table D-4 Hexadecimal to negalive-dedma] conversion Many Apple products no« use peripheral Identification numbeja t called PIN numbers as > DlfcJL iSfl*M SSDfllD shonhand to designate ^nui ..k \uv . Iuumimnk < The Apple n series Untoersat Utilities ft -1 disk presents a menu from which to sded die i taracteristics of, lay, a printer w modem From the selections made. Li generates a PIN few die user. Other products haxe a ready* F -4,096 -256 -16 -2 niadi.- TIN thai the user on sinifiv type in. U -45,1?^ -^12 -32 -3 c -I2.2HK -7*a -48 A Figure D-L shows the format uf a PJN number. Table f>5 is a definition ol die PIN nianbei B -16,384 -1.024 -W -5 digits. Then communication mode is selected, the seventh digit is ignored \ 2Q .... l.>l -80 -r> _- 9 24576 -1,556 -96 ,s ->:rj -132 -112 -rt figure D-l Formal of PIN number " -2,048 -12S -'^ 6 -2.30-1 -1 =i t -10 Mode X X X J X X S 5 -2,560 -tfti -11 1 -J. sin -\7i shown here, itre identical to the one hied here, only with the hijdt hil I mmuiiicatton mode* - = Even parky (total on - even 1- yrt Unless otherwise noied, every ASCII character value above s ? F ' \1" decimal i 3 = Odd parity (Ki4.il m - i uli 1 generaie.s the same character as that value with die high bit oil'. Here is bow to interpret Data Mis i - MAKK parity (parity bii = I) these tables: Stop bits I = t> dan biLs, 1 stop bit 5 - SPACE p.irirx (parity bdl -03 2-6 data bit*;, 2 stop bit The "Binary" column ha.s he "-bit code for each ASCII character, I 3 7 data bits, I stop bit Echo/ The "ASCII character" column gives the AS0I character name, I - 1 data bits, - *Lop bits No echo I - Do not echo output on screen The 'Interpretation" column spelts our the meaning of special fymbob and 5-8 data bib., 1 saop hit 2 - Echo .output on screen abbreviji ions vUinv n^osin 6 = 8 data bits, 2 stop hits The "What lo type" coJumn indicates what keystrokes generate die ASQ] character Line teed (where ei & not obvious). Bits per No line feed [ » Dg not generate LF after iH second t - 1 tO bits per second 2 = Generate LF after CR The columns marked "Primary" and VJlenfiilie" Indicate, what displayed character 2 = 300 bils per second resuhs from each code when using die primary or alternate display character set, 5 - 1200 bits pei second Carriage respectively. Boldface ih used lor inverse characters italic Is used for flashing j - 240Q bite per second relums 1 - Do not generate CR" characters, 5 - 4800 hits per second - Generate Ck after -id characters Note (hat the values £40 thwujih S^F (and $££) through $DP>ifl the .ihernalc character fi - %0fl hits per .second 3 = Generate CK after "J char* - set are displayed as MouseTeit characters (Figure C-2) if die firmware set to do so, >> i is 7 - 19200 bits per second t = Generate CR after W characters or if the firmware is bypassed . 5 * Generate CR after 132 dtttacters p If jfl*] iclect ccjmmunu jii. .ii mode I*ilti lk- wvenlli dijiil miw he ! • flfote The pnmary and aiternaie displayed character sets En Tables D-6 through D-9 are ; the result of firmware mapping. -See "Text Displays," m. Chapter t. for more derails cm For example, 2^2 J1H means: character wrs. 2 * Communication made I = \'.\ parity 5*8 data bits, 1 stop, bit 1 = Do not echo output to display 2 = 300 baud (hits per second) 1 No line Feed after carriage return 1 - Do ru>i generate carriage returns ippendix. L> Conversion Tables 261 262 Apple tics Hardware Reference Tabic D'ti ConiM chajacters, Kij^Jn l>ii iypc IVinurt Ahc-rnatc 0000000 " $00 ML HLiiik>nulh Comtol'i S 1 ..IMIVHV, ^ S20 -1 Space Space b;ir ooooooi L $01 SOU Head« Stert mI CuntrokA A \ 0100001 33 52] 1 ! ! mi. in .hi m 1 S02 STX sun of iuM Oniciiil-M B B 0100010 .-i 122 * i. S03 i:ix End mi'Tcvi CoriErul-C N = :|J 5 ' OH 35 ^:^ DOCK) 100 i S04 EOT tr.nil Ol ! : i-ii: CcmlrnkD l< D sjli.iuion ^ 524 s !' OOODlO'l i S05 I'W Enquiry \. i.r.rml V r 0100101 y %is % 0OQD11O ' - m ACK ALkmiw]t-d^- C i.nrn.L-F G I 1 0100110 58 S26 s ..liuilllL SQf? BEL Bdl ( nnlml-ti ' UliKJlll ^ S27 • Kpostrophe 0GO1000 > 508 US Backspace Contrd-H nr Left-Ajinw-H H i- 0101000 S^H 10 ' ( ( OQC10O1 9 S.-l [i iTi/i iniaS Tab Control-I or l.ih [ 1 i i ; 1 0101001 11 S29 " ) ) ...| :|! 10 £0/1 ii' Line Feed Control-r i ir 'Jown-Annu-J J 1 0101010 to S2A - 009101 [i SOB \r Yciik.il t.ih Omirul-Kui 1 "p-Arrow K K oioion 13 S2B + uoo - sue: I- I'lTIII Fcfd Control -1. 3. t 0101100 it S2C , Comma oooiiot 13 SOD CI Carriage Return i.:- mtrijl fctor Return M U 0103101 45 $2D ~ Hyphen 0001110 h SOE s:-. Shift Out Conrrol-M \ N 0101110 II S2E Period v.ri In t'nnrrul-0 '! " ODOlfll is WMF si 0101! 11 r *2P / / 00 to™ l>- 510 DLE Data link Escape Conlrol-F I 1 v 0110000 IS 530 11 D .i:ii>;u..l i" 511 DO |vu-... Control 1 Ctmirol-Q Q Q 011000] !'' 531 1 1 L OOlOOlO l>- $12 oa Drvkt Cotntral 2 . . 'iin -1 l-l K H 0110010 50 S32 1 : 0010011 SB DC? '- iTllPli 3 Comrol-S s S - 19 1 • '. 0110011 ll S33 3 3 Doioioi j" £] I In I 1'.-. .:". ..riml \ Corttfol-T 1 T 01 10100 52 S3^ 1 ^ * £1 Sl> V\K Neg Acknowledge Control -I' or Right-AfttJ« r L I 0110101 53 S35 s 5 s Q01011Q Jj $16 SYN SpnchfoHizatiDQ Controt-V V V m1| MM : , S56 (1 fi w W ~ ' 0010H1 Z3 517 ETB EitdafTaaBlk. GOntiol-W "lli-M 55 7 on 24 513 ax Cancel Control -X \ X 0111000 111 $3S 8 s H "ilL l-Ji>j 25 519 m End nr Medium Qmtml-Y V Y 0111001 r'~ 539 j '> '1 0011010 26 S1A SUB Substitute C'fjfiirol'Z I I Ml 1 1 11 1 II z ;- 53A ooiiou i" MB ESC Escape Cnntrol-I or Escape i 1 onion 50 53B '. oomoo 28 Mi FS I'iIl- St'ji.n ii -i ControM \ 0111100 60 S3C < DO! 1101 29 HP GS • |i;ir.Lluf Comrul-l I 1 0111101 :.| S3D - A A 0011 no 30 511 RS Record Separator Control-* 01 ] 1110 S3E > -ill IN 31 Ml rs I'jiil ScpafaJXff Control-. - - 0I1IIIL M S3F :• Appendix D CoEwrsitm TLirifL^ J^3 264 Apple II- iS I r . in k. ue Refereuct i Table D-6 Uppm^se characters, high bin off Table D-9 UiTiVi'fL-ast* L-hauiriLTs, high hi >>\ J ASCII Unary fl*c Hex character Inurpr-fUiliin *'lur m rypt HTini.ir. Attcriuit DK Hi!*. Lhiracicr Ijiitrp rctitinn vhm iniype Minify AlternaU' :" :.i $40 B * in | UOOOOO S60 Grave accent 1000001 65 u\ A 1 3 1100003 y S61 .i f " 9 10000JO 66 542 9 rt * 1IDD0IQ 9A $62 h b - 1000011 67 $43 c . s 1100011 S6j c c 100010G .> 144 D D i/ I>:i|ij.i 1"! S64 d 5 d 1000101 !,; m E .' s 1 1001 01 101 S6> e % e looono 70 m h F a = liqouo 102 $66 i c f looon i 71 C a [ 100111 303 5^7 •^ K M.I..MU 72 M h | I! !l* h ' 1001001 " £49 1 1 1101001 105 |69 i ) 1 34III11.II 74 S4A 1 ,'" 4 1101010 m KA t i m I 1001011 75 S1B K « f iiinon i'- k - K '.ii/ -, MC — 1101 100 108 (6C m i 1 I 1 , ] "" 100110] M Lt ^ nonoi 109 $© ri! - m irminn "> Ml \ '. itonio 110 S6E n Tl 1001113 " $4P '1 > MiiLlLJ ill £6F ii toioooo 80 tso !' ' +: 1110000 112 S"i P P 10] 0001 .-i $51 Q *> 3110001 v 113 S7] 'I 1 M 1UUK.IHI 82 "J R n +: 1110010 114 $72 T j r 10J0011 B3 >53 s s — 11 1001 US S73 S .5 *i II B4 &54 1 i L 11HUIIU Hi-. ri ( 1 t M|i| i| 85 $55 ' i * 11 10 HI I 117 s- il 5 LI 10 10 no S-, -,. \ i a mono LIS S-n i is V " ]()Ki]ll ttT S" tt Q i 1 ] MIL] L 119 $77 ^^ W IOU0OO ss s^s X A c miooc 120 PS \ 8 > !:] in- ! m S5 l> V r 3 1313001 1 - >-' ' 9 V 1011010 90 J5A 7 / 1 1111010 [U S7A 1 101X011 91 ^u 1 Opening bracket lillOll 123 S7B 1 Opening brace I loiiioo J S5C \ Back sfcsfc 1111100 124 S7C 1 Vertical line 101 1101 ^ ist) \ Closing bracket t i 1111101 125 S7D 1 Closing brsiur mm hi 94 I5E A Cjret A 3 Ml: (26 S7E - Qv^dine ftHdc) lonni tfF 1'iIlIitIiMi- illllll 127 $7F '1 Ddele ruhnut I)F1. Afcte If itoe Jujiii hi: Lss ir:. ita MimwTrtl character |i icplsred wWfo thti Kflufealffli fnirn ilk- prinuiy ctnm tci -i Appendix D CcmvErslao Tables 365 26tj Apple ] li. i-. Harilwart Rt-I eienci Tabk E-l" (jnguagfe-cand bank select switches Fund Inn Appendix E Frequently Used Tables fl SCOW) Read thi* lijtution lo read RAM. wnte-prmett RAM anduw$DO0ObankZ l HOMIN RK SC0K1 lead this locickm twice 10 re^J ROV wfiiv- eruble RAM. and use SDOQO hank 2. This appendix contains frequently used table* 1'ntnn throughout the e $0083 Read ihii location in read ROM, afttte protect manual "Tlieujigina] table number Ls given in I feoffloEe to the (able imUrtJ we SIXiOO Iwik 2. LCBANK2 RR sooaa Bead this [ociition twice to ivad RAM. write- enable RAM, and use SDGOQ bank 2. R SCtMHfi Bead this location to read ham. wtfte-pitsfed \{AS\. mJ use SDOtiU lunk I KK m DB9 Read tliis. nation twite m read ROM, write- |i enable RAM, and use SDQOO hank I. a SCOHA Read this lftc-.Lti.nn tn read ROM, wrLLe-pnjLei.1 RAM, *nduK$DQ0O bank], RR Read this swiirib twke to read RAM, wriie-enabte RAM. in J use IO000 back ] HDLCBNK2 R7 scon Read this location md (est bit 1 for switch status; SD Kmk2U)ortaank HOX RQLCRAM ir soota Read this beating and lest hit 7 fur Hwiu li status RAM (I) of ROM(0) SETSTDZP $ SC&QB Write [his- tocatkra tn use main bank, paged :ind pagel. iETALTZP « SC0O9 TC'rite diiv Irorion to use auxiliary hank, paged and pn^e I. RDALTZP R7 SC0I6 Read this location and ka si bi( 7 tbr switch stams: auxiliary (l.i or main (0) bank. Tjl.le.-M XT 269 Apple JIGS Hardware Reference Tabic E r Au\:.ii.irv-memorv select switches "Table E-y Standard Apple [I video display specifications LLnaCiuil ; Display modes 40-cutumn Bext; map; P%ure i- Name huntnUm. Mi-. \hi \m\L- BO'tolumn text: map; Figure !-" Lo-Res color graphics- map: Figure i-". RDCARDIUM fcad aualttat) memory $0003 19155 WfUsr Hi-Res color gfap-hics, map: Figures -R. l-vvl\-- Read mm in memof) $Cu02 49154 Write ~ Double Hi-Res color graphics; map: r%ire \-'-> RDRAMRD Read switch stall s $0313 ©171 Rtad and test hit Ll-JLLXilijR-. I'-IIUIIl' Text capacity 1 1 lines by NO columns i character positions). Character set 2H AM II . hyfiii'tifs. i See Appendix G For a list oF dLsplay w"RCARDRAM Write memory iiiviii.iiv $CGu5 49157 Write 1 WRMAINKiiM Write main memory MM, 19156 Write characters J " RDfiAMw'RT Read switch status SO) 14 49172 Read and cor bjt Display forma Ls Normal, inverse, flashing, MouseText (Tahfe4-10), i Kumlury. 0-m.iin) Lo-Res color graphics Wi colors l53: 4ft horizontal by 48 vertical] snxii i.i|. V.. - .:isfil;«\ page $£001 49153 Write map: Figure 4-7. CLRSOCOL Use RAM switches iSC0O2-x13,14) 5CO0O 49152 Write Hi- Res color graphics 6 colors Table i i-l t): 140 horizontal by 192 vertical "* RD8&COL Read switCti status JOQ18 HI". Read and test bit (restricted), Black-and vtluic- 2SQ horfeonttl l>y U=tf'i-colimiii access on 192 vertical: map; Figured i)=EuH:ulumn access off) Double Hi-Res ccdor graphics l& colors (Table 4-16): 140 horizontal by 192 vertical (no TXTPAGE2 Test S*a^e 1 cm (auxiliary memory) JO055 19237 Read or write restrictions!. Black-and-U'hite: 560 horizontal by TXTPAGE1 Itea Page ! -"ii : mi. mi raenwrj i JCQ54 i9236 Riutl ui wriie 192 vertical; map: Figure i '.' RDPAGE2 Read swhch status M.--U f-9180 Read and rest bit 7 Tuhle i U-PageZ, 0-Page It HERES Access Hi-Res pages 49239 Read or wnle Tabic E4" Video display locations LOBES Use RAM switches {$€002-5,15,14) $0056 #238 Read or write RDIIIUKs Read switch status SC0ID 491ft Read and test bit 7 l. Pfc*pUj 1 « -y.ir- intxir Mr. P*f Mr. DK 5ETA1T2P VAilur\ stack Jnd direct paj^e IO009 l->|:i| Write si rsmz? Mainstadi audited p^ge $€006 l-lh... Writi 40-column text. 3 SlIiiM 102^ $07FF 2U4^ " KDM 171' Read switch status M nfi 191 i Read and test bit Lo-Res graphics J $0600 204fi SOBFP 3071 ' l-.iimlur\, n-mjin> 90-columrt rext 3 1024 SOTF DM? TiiMcM 21 ti:si i 204R SOBFF 3071 Hi- Res graphics J (2DO0 8192 (4000 li^Hi 1?FFF Z4575 Double High Res I: 12m 8192 S3FFF I63«5 graphics 24 S4CKW JSFFF 24n'n Tihle i n t unites gfapbfci m t'uj, ppwwd by firmware, lor IfBtaialun* ™ linw to h-witph pjjps, i-.hr kirhi M-.tnm i)i >|.|.i.. Mode in ll 1 ".: I" 1:1'! 1 H I'lLipUl 1 Appendk E Frequently L'sed Tables 269 ZTO Apple IJGS Hardware Reference i Table £-5* Dispky soft swathes Table E-fi" ted window memory locations Ninniul VjLul-> Maximum toIum fejkaf r.ocjitJuii 1 1. 1. " • 1 i Mnh'.LD! i Iihj(i:mi ^knlunifi IHXDboui HKohumi KVcofeuim CJJWIJCOL VT scogo (49152) -• UiniJiiU DisaNe flLk'oiuniJi 5ETB0GOI TC SCflO! paraiDcitr Dec H« Dec Hci Dec Hex Dec Hex Dec Hw Dec Hex 19153) Enable WkxilLimn si\ mi; $00 111 S2ts go ISO 5 :' S2S M vi; uppercase Top edge 34 $22 hi: 500 I'll soo mi soo J3 si- 23 S17 chancer id. setmtchai $CQGF (49167) Normal, inverse character set; no flashing. Bottom edge 35 J23 "1 SOI 24 SIS 24 SIS 24 sis 24 $18 RD80GOL R7 5C01N (49376) «-'! B SE1B0COL swiKfe * Tilt*! *^9 - *" I --column stone enabled RI>VBL IMR R7 SCO J 9 C49177) Read vertical bknMogCVBQ: I = nor \TJL • Table E-7™ D spilt} chaiact lt $eu ROTES! R7 SCO] A ' i917fl feaj enabled. ma.- msffr switch i - « mode j'ri ii ,jn i hLiraLiLT «-i TlJitiuk lurvilr m-. values lltartL[LT irpc H-irjLtL'r [V|H- fuHuai RDMIX R- SCO IB (49179) Read MIXCLfl/MlXSET switch: 1 - i< iin.ii ( mtari mode cnabled N'il-S|f Uppercase letters Inverse Uppercase letters inverse RJ>PAGE2 \r SCO !-J|VM 1 Read IXTPAGEI TXTPAGE2 switch I = r**i Page 2 S2U-S3F Speeiat cIunlLlt^ Specie I cbaractc0 Inverse selected RDHffiES S40-S5F ase letters Fl»bin| \1(MLM-Tt!Xl Tnverse 5C0JD C49181) Rwd KJHES swte q ! i Bttcs mode enabled I ALTCHARSET R7 SCOiE (4918$ Read CLRAITCKAR SFTALTlHAR hi.mIl It S60-S7F Special chamctets Flashing Lowercase letters Inverse 1 alternate character iti in use I 'ppercase letters Normal Uppercase letters Normal RftflOVID !.- SCO IF (4918$ ReaJ OJfltJVID/SETBOVro switch SAO^BF Special chaiactens NonnaJ 1 1 1 diameter* Norntftl p ft '-l uluiiin SCO-SDK Uppercase Jetteis Norma] Uppercase luttLTS Normal I hardware in use. RDDHFRES R7 $QD7F 1927?) Bead SFTAN3/CLRAN3 switch SRi-SFF > Lowercase letters Norma] Lowercase letters I - Double Hi-Res graphics mode selected TKTCLR K Tuhk-irio \\ &OD5Q (49232) Select standard Apple tl graphics mode or, if MKSETocl, mixed mode B Vi mm C49233) Select Pod mode only, MtXCLR K W (49234) Clear mixed made. MIXSET $C053 t49~35) Select mixed mode TXTPAGEI R V (49236J SfKl ttrsi p^gc 1. TXTPAGE2 R \\ ICD55 (49237) Select test Page 2, or, if SFJBGCGL on, Test Page i in auxiliary memory. LORES R/W >C II--!, (49238) Select LoRes graphic -nafe. HIRI - 5C057 (49239) Select Hi-Ro graphics mode, or, if KETANJ is on, suJl-,1 Double Hi- Res graphics mode. 5ETAH3 R/W SC05E H9246) En a Me Double HrRes gKaphks mofle CIRA.N3 R/W 3C05F (49247) Disable Double Hi-Res graphics mode. -..:-- ; write anyihbift in fee btjlM n. if ni^jns rtsd Lhe locaton. ft-'lFmeuw crjd .V~.lv.ri rKid the iutaUnn 4ind rJ*en «« ril-j, .mi ITi Apple IICS Hardware Reference Appendis E Fi ei.| uentl y 1 feed Tables "71 tabic E-§" Lo-Res graphics colors Table E 10' Double Hi-Re* gi iphl Repealed color pattern «Mi mbl jiv: rat* HlI Dec Hex Color DM HH CoN Black SOD MM V,l $00 0000 " 100 Black s toe lk-i^n SOS U1 S>2 144 0001 SOI Deep red 9 SC9 Grange Brawn Mi Sea Ml . i hi. in. :ii.-. fl'jvrUlilc ujhtuhLc Frcqu«K|' J^pcquptncj" VlWtihlr TittxiaJrlr "-..!.<:.. Low II^Jl UlluirM' Dala PttfOttV CorlfoL she OscJllalor Low H^h VoJlMK i-.i . ruiiiltr fiunlnil *iifr mater i LWiHivr rLjjiMvr -. uMi r r*nl*Ser rcglsltr ftftlittf KfUtCf minitar ftftlSl-CJ ttgteicr ftftiyltf Kftiicr tttfsttt rt niMir r^RJKlrr V..II 500 S20 $40 $60 SSII SAO SCO S1A SIA *3A $5A S7A S9A $BA SDA SOI \l. S21 Ml Sfrl $S| SA1 SCI $1B SIB $3B $5B $7B S9B 5HH SDB m -i:j S22 S42 $62 $82 $A2 scz $1C SIC $3C *5C - S9C 5T5C SDC m m m $43 S63 583 SA3 $C3 sm SID *3D SM) $70 S9D SBD SDD $04 SHI $2* $44 SIM $g4 SA4 SC4 SlEt SIE $3E vr $7E S9E SBE IDE *.= ill* $25 m si,; $85 SAt $C5 SIT; S1F S3F StF S7F S9F >H.|- SDF $06 506 $2fi Ml" StiG SA6 SCfi W sr $47 S6T $37 IA7 t Tliew osdJIalna :ue Jthcned for flScm u^ 1 l=st L n| th*.^.' osnUaiws hy Hh U-H^f cum resulr in j svsk-ni lthsIi. 1 m . v|* $2S $4£ sea SM SAB $CS $09 , ..... $29 $49 Sfi9 m SAP KS m SOB SOA S2A £4A SfiA $@A SM 1CA Table E-14' Dtsk-pOTl sofi switches SOB $2B $4B snli tsa SAB SCH SOC soc S2C mC S6C sue tAC see AddllM IkFcri|rtla SOD soc S2D $4D S6D -si:. (AE SCD SOE SO] S2E $41 SfiF S8E SAE SCE JCOEO Sicppcr mmew phj.se U low v.j SflF |2F t4f $6F SSF SAP SCF SCOEl Stepper mojoi plias L - n high V" MM SJO $50 $70 $90 sw -I ' SC0E2 Stepper mote* pfriae 1 low 511 SI] Bl Sil S71 $91 SHI >in m (12 S32 $52 $72 $B2 $I>2 SC0E3 Stepper mmorphxse I hi^h S13 $13 S33 $53 (73 S^j $B3 SD3 SC0E4 S:fppi-i i in Hi it plum- 2 km SOB son SJH S4B 5GB $SB SAB M B SCOE ) 1 Sifppcr motor phiisc: J lii^ti S.M toe S2C *C $GC SKC SAC sec SC0B6 Siepper moloi ph.iM- 5 low SOD iOC S2D MD $6D ssn $AD SCD SC0E7 Steppet motor plusc 3 high SOE SOE S2J S^E S6E SHE SAE SCE SOF m S2F $4F S(>F S8F JAP SCF SCOEfi $O0E9 Spindle mfrtor enahleii Spindle jihhut disabkd $10 $3 S30 150 $70 $90 $ao $00 $11 $71 SCOEA l)nvL-':i^k'Li til S33 $51 S91 SB1 M)| S32 --- SCOEH DrEve setecl S1.2 $12 *52 592 >hi SD2 I $13 113 $33 553 573 S93 SB3 SD3 $O0EG Qfisetenbitlpw Mi M S34 m $74 $94 $B4 $04 SCOED Q& scfeel hii hii>h S15 $15 (35 $55 *7t $95 $B5 $D5 SCOEE Q7 sdect bii low $16 $16 $36 156 $76 SM SB6 -]: SCOEF Q7 setect bit high $17 S17 $37 157 $77 S97 SB7 5D7 TaWc7-3 (18 $18 S3H sss $78 son $BS S|>K $19 SI9 $39 S59 $79 $99 SB9 SIW (Continued) Apperuli v. E\ ft i-.. |Uf k \\ i I \« I ' |';i I Hfs 275 2f76 Apple UGS Hardware Heference » Table E IF Tin.- \W M Stmt Table E-1B 1 Secooclarj 1 memofj locations ',' UpCfjlLlll tf SpLlSlUt JlMHLlf sah *wHdi D. liiiiii.iu II 1 Read Data register 1! I \ Head Status regJstei sCi^n SPKR 4920(1 To^lc speaker (read only* .. 1 v Ri-nd HiinUMi.ike ri'^isk-r CLRANC .._., Gear annunciator L). ] ! 1 Write Mode rt^i.-rn SETANtJ J 1 si.: jiiniin; i.nor a 1 1 [ Write Data Teller CI NAM JiJ ' I- ii ii idiWOf 1, SETAN1 49243 SC05B Sti .innuruuh-i 1 * ThWl'-i UKAV! EC05C | k-.ir .innun%.iiiEur 1. SETAN2 •^\-> SCifiD Sei jmiuntijiur 2. CLRAM3 19246 SC05E I.k ii .ilinilllLiytuJ J. Table El 6' SCC Command and SOC thin register addrtws SETAN3 49247 SCt^F v- .iiiiiiiih i.iHjr 3. II' i;i-i. - BLTN3 19248 SCCKjO Read *wiic3i 3 (Pffld ™Jy). BLTNrj 49249 SCOGl Head switch ti (itad otify). hi IM 492M V I..J Read swtoch (read onl] SCC Gjmnund SiJ-^j 3C03S I 1 sex data x: SUTN2 4925 SC063 Read switch 2fread .nK-i tfB SC03A PADDLQ -J- J : Rl-j-J analog-lnpiil TiNl---J-: PADDU SC065 19253 Read analog inc-m L. PADDU SC066 19254 Read .in.ik^-inpLH 2. .,..,, PADOU Read .iii.iU;-iiip-ni 3 T Table E-17 Annunciator moniorv h:i .iiiijiis PTR1G SC07D \n.i ig-bput rcsei h II 111: liil Hi if AildrTC* Tnhk- MS \umhCT Ptaf Stite Hex Dec i 'table £-l!J ft.Tiph.tT.Ll -card RAM memory locations D Mi on SCfl^fl 49Z40 On $co^ h92h1 Skic nuAbcf 1 1- Off SGAA (9242 p 1^1 On m. &5a 1924.^5 ^ nddir** I g 3 4 ^ 6 J L3 Off SC05C 49244 On JG05D 19245 S047S (0479 $047A JQ47B S047< W470 S047I - 'Tl 3 L-2 Off SC'r:i|l. W6FD S06PF SOffFF M--. „--|. 10778 $077A : SCTTt IG77D S077E S077F SQ7FB S07F9 S07FA S'-'TH S07FC S07FD S07FE S07FF TjhJt H-^ Appendix E Frequently Used Tables 277 ?78 Apple DGS Hanlwan: KeJerLrce Tablt E-20* lY-nphurd-card I base address Rue Mot oumbcf aditrtss , 2 3 -t 5 6 7 scoao SC090 5C0AQ 5C0BQ SCOC0 SCODt* SCOEO m ifo SC08I SC091 SCOAl JCQB1 S0QC1 SCtlDl v.-.ll SO0F1 M ,S_ sum SC0A2 5QUJ2 (C0C2 "' D02 SC0E2 JC0F2 $0383 SC093 so 13 IC0B3 JC0G3 m. ID3 SCOI 3 SCOB SCQ84 M.i -in SC0A4 &CQB4 MM. r SC0D4 SCOEh SC0F4 JC085 SCW SCM5 $C0B5 SCOCS SG0D5 SOJE5 IC0F5 SC0fl6 SCQ96 SC0A6 SOI Hi JCQCti SOJDlS SC0E6 IC0F6 SCOfl? SCttf? SC0A7 S0QB7 &coc? SO0D7 SCQn7 5C0P scoee SOT& SCQAB JOOBS scoc^s h IDA SC0E8 SCQFS SCO09 JC099 SC0A9 $GDBS 50QC9 &C0D9 SCGE9 SC0F9 SCOSA SC09A 5C0AA $CQBA SCOCA SCODA sc:l>el\ 5C0FA SC08B ICD9B 5C0AB SCQBB m .: ICOOB SCOEB $4 IFS SGtiCC SOOAC SOOBC v.:. 5C0DC JCGEC V .|. $C«D STOP SCflAP st:..ililj SOKE ^i'MI) scoed SCOFD SC'-Hr SCOPE SOME SCO BE SCOCE m i|-||- SCOEJ SCOFF SC08F SC09F SGJAF SCOBF SCOCF SCODJ SOffiF SCOFF TiibfeB-4 Appendix E Frequency ["seel Tables I?) application program i n application; (2 bit* Short for blnmy digit In lhe binarv' system, lhe Apple DCS, a program KLteh a* the AI'W Shell' the smallest Will of iiiH.iiii:m-::ii. . -n^isltng of If • that accesses ProDOS 16 and lite [uo1hu\ or 1. Glossary .!iu dy and that can he called nr exited via the bit map: A set o) bus that represents the Quit call. ProDOS Id applications are file type. p;:i^iiiniis and stales of a corrcspondtrtji set of SB3- items infrapl cs video ntseis are represented APW: S4.e Appk Jlitf Programmers by j bil of bits m video display memory Nee also accumulator. TKf npM. i ti rnputers Apple I alk connector: A piece of equipment— Workshop. graphics. central processor or microprocessor when most consisting of a connection box, a short cable, mnipuuiinris j re performed. AM.Hr Acronym fa American Standard < o&Jbr block: (I) A umii of dsu;i storage ot transfef, and n: 8-pfci mmuturc DIN connector—that InfimmtiiiM tntmihan^e. 12) The standard rvpiailh >12 bvtes. iii Acontiguo enables an Appk lias to be pan of an AppleTalk I AQAt Acronym for Asynchronous alphabetic, numeric, control, and special ;.!ii-!iu :l legion of coMipMier metnoty of anbitrary network Qmmuttkatfam Interface Adapter, a type i ' r characters represented by hexadecimal values SO size, allocated by ihe Metnoty Manager. Also communications [CI used in some Apple AppleTalk local area network: Ipple V lot :il dirouuji SFF. ASaidatatdan to these universal called a ww»fi -n Wi comrjuier.v Convert!! data from parallel in serial area network for Apple If and Macintosh 256 codes. form and vkt vera vi\ handles serial block device cm htock I/O device; A de^ ice \\\ personal computers and lhe LaserWriter* and transmissioM and reception and RS-252-C Mgrials aspect ratio: The ratio d .ir image i wkfch to irs dim tmnsfers data to or from .i computer in [mage* rik-r ' It printer. Like The Macintosh, under the control of its imeni.il registers, wJucri height, for example, a standard video dispky I us multiples of one block (512 bytes) of character the Appk- ItGS has ihe AppleTalk interface built can be set and changed by fiimwaa or software, 1 ratio ol i:3= at a time Disk drives are block devlces. in 1 i i i : 1 1 -,• Serial Gunmu nkalions Controller. assembler: A progtam thai produces ob|ect files boot; Ai'ic'liri wjl) f'.' say stun up. A computer Apple Ik A family of computers., including the ADB: Set- Apple Desktop Bus. 1 programs ilm contain iHachine-bngiag harts by Irntding a program Into niemon,- from an origm 1 1 "ippiell the typlc II Plus, the Appk lie. from source files written in assembly languagji esienul storage medium such as ,i disk Boot * the tpple IIl. and the Apple []gs. Compare address: \ number thai specifies "he taraiiort of standard Appk 11. The opposite of dtsQS&etnbfef' vr ,i M i h i r bi " -.'.v, ri^J 1 \> m i M n n,u up ts .i i t nfren a single byte tid memory. Addresses can be Riven accomplished by first loading a small program, decimal or hexadecimal integers. The auxiliary slot: 'Hie special expansion slot within ;ih Appk LlGS Programmers Workshop APW ( V; which then reads a lar^r program into memory Apple flcis has addresses ringing from D to dir Apple lie usj-d fur the Apple lie 8fK"jiIurtin The development environment far die Appk fjes gram U said ui -[mil itself op by its own 16,777,215 tin decimal) or from tfHDOOtiti to Text Card or Extended StKjoktnui Teat Card, in J computer, ll consists of a set of programs thai bootstrap.^,' SFfTFFF fin hexadecimal) A complete addn 58 also for the RGB monirj i card Tne slot is labeled facilitate the writing, compiling, and debugging ii-i-.li if .l i-att hank number f$00 m SITi AinCCONNECTOR on the uk n r : "! buffer: A holding area in the comp iter's memon of Apple ties appli i iiim followed by a lo-hit address thin . hank where mformattoo can he sioreil by one pi gi n bank: A 64K (65^36-byte) portion of the 1 1 1 I 10 SFPFF), Apple llos toolbox; v . .. , , nm of built-in ctr device and then reaLi a\ j difteont rate by Apple TiGS internal memon An individual hank is - . : '- routine* on the Apple Bgs thus programs can call aMfShen for esanirrfe, ;i print buffefor a l i- I analog RGB; \ type of color video monitor lhai specified by the value of one of the (nCHlb :: buffer. '-nil many commonly needed funcilons. 161 accepts separate analog signals for red. green, niKTopniH.irvvr.r's h^ik k^isu-^ Functions within the kiolhox are grouped into and blue. The magnitude of each signal can vary byte: A unil ol iMtuniulicMi uniM^riltji of a tool sets bank-switched memory: )n Apple It i continuously, milking possible many Shades and st | it ike trf K bitv A byte can take any value compuftem, thai pan of the language-card krvu-vn o an J 255 1 1 A memory in v, hieh two 4K portions < j An mpui - i i ,i i - i lie sanK add ress ran^i' 1 ' '« I " » hSDFFF), ( I the computer user, such as word processing, cliaracter, or logical state protocol For connecting keyboards, mouse database managemenl or graphics Compare binary: A method of numeric representation carriage return (\rh A control codeiAM.'ll 1$ devices, and graphics tables tn the Appk" ]h,i. m-iinrnlliiiLi program, software, system hmml: ll-:!'- J v.- vim Valid digits are and generated by the ReiuitJ key: in APW C, equal to I Chapter n provides details of the ADB, mt|[w:lit. Compare hejcadedmal, decimal riL^\linel'\n). JM 2R2 \pplr ri;,- Hardware ftefefence i igi A status bit in the mlciupjDcessor, the changing of the color information dunng the control registers: Special registers that desktop user interface: The visual appearance used as an additional high-order hit with the re si portion d the display. Displaying text in programs on read and write, simflif i<» soft of a program imd the way in which ii interacts accumulator bits jn addition. subtraction, monochrome makes it more readable. switches. The concrol registers aie specific with the user. In applications that use the rotation, and shift operations .-, itions In the I/O space (SOcoO in bank 5E0: desktop user ir leii.i-, g commands appear as command- (1) in the .Standard C library, a they are accessible from hank SfKi if I/O options in pull-down menus, and material being cathode-ray tube: A display device, such as a parameter that tells & function which of several wafted on appears in redangular areas of the shadowing is on. television picture tube, that ppoduces imaged mi actions to perform, (2) In die APW Shell, a word screen called windows The user selects a phosphor-coated screen. that tells APW which ulility to execute. Control-Reset; A combination keystroke on s : i other material by using the mouse Apple It computers that usually causes an to move a pointer around on rhe Si reetl central processinft unit t Includes ;ill cnlor and timing information that is indicates where the ne\M input Inim die user Is device driven A program dial manages the characters an? represented m the computer its I- needed by a composite video moninn Several expected, Different styles of entsocs arc used transfer of information between the computer hyic values. video .standards an- in use wound he wortd; .'.nh the ' ili i i -.. .in imderbar„a I .n n I .i peripheral device. NTSC M-.k-i. i-, :>. I in northern America and vertical bar, and .\a inverse video block character device or character It) device: A digital: Descriptive of that which uses signals Japan: PAL \ Idea Is used in much of Europe: device thai iran.sfers daia m of ffott! a Dflfflputcr data: Information transferred to Of from or lepieM'fiting characters or numbers, signal- being ffl \\\ :i used in the USSR and many other as a stream of tnxtlviduaj cuaracleis, Keyboards stored in a computer or other mechanical countries. The Apple II us is capable of cil discrete ratbet than i > iucajsJj variable and printers are character devices. communications or storage device, generating both NTSC and PAL video, Compare values, or tin «e pn dut ed by pulses i if one RGB, data Mock: A Ill-byte portion oJ a PraOOS 16 currenl or voltage value character generator: The IC responsible for providing ail text and special characters 1o the Standard file thin consists of whatever kind of controlling program: Digital Oscillator Chip (DOC): An mlc^r Ited \ program thai loads and computer that may be displayed on the video m(. mi Hi ti Tie fill- ili.ll e.MlUin s othei programs, without itself rclinquishi ng in • i -ii I he Apple lids that contains 32 digital monitor oscillators, each i*\ whfch can generate a sound cnniro]. A ccmtnilling program is responsible for decimal: A method of numeric representation CMOS: Acronym for comptemertkirr metttl Qxtik shutting down its subprograms and freeing their using ii base 10 system. Valid dJgas are through from stored Jigital w^vefonii daw in -i memory space when Ihey are finished A shell, for 9 Compare hexadecimal, binary < wavetable. smjeowtuctor, one of several methods of making integrated circuits out of silicon. OH )S example, i* a conttoitmg program DIN: Acronvm for Deutsche Industrie Normal a delete key: A key on ihe upper-righl e devices are characterized by (heir l'*w pcuwer Control Panel; A desk accessory that lets you the Apple lie, Apple lie, and Apple Ikjs European standards organization. consumption CMOS techniques arc derived change certain system parameters, such as keyboards that erases the character Immediately from tXOS techniques. DIN connector: A type of torniector with speaker nnlunie. display colors, and preceding (to the left Of) the cursor. Similar to multiple pine inside a round outer shield. color fringing: The ratnhowlike cftcci l Ji.i I configuration of slots and ports, the Uadntosh Backspace key, appears around text characters when they arc direct memory access. (DttA)r A uteitn^ DJ I isi desk accessories: Small, spedal-purpos displayed in color on most color video montton «!.: i tninsFet 'ran ot out of computet memory to programs that arc ivatlatte f the use regardless i This fringing is unavoidable because the color- or from ,i cm ii pi Her peripheral. A peripheral of which application is running. Tile Control detection circuitry of most composite video device, usuallj .i card m a peripheral I Panel is an example of a desk accessory. coks monitors carmoi respond fast enough to expansion slot, puts the 65Q816 micrnprocessot r. .n ill.- state and takes mm ml of the Glossarj 383 284 A ppl e [V ".s Ma rd ware Reference computer for a short period of time. Data in disk drive: ^ computer peripheral device that e Hag; One of three flag bits in die £5C9lo firmware: Programs stored permanently in read- fnemor) may be directly accessed without thf stores digital data on .1 revolving magnetic processor that programs use to control the only memory iROM); most provide an interface rime^msurning usia;tl handshaking ;snd surface. Disk drives may he floppy di.sk drives processor's operating modes, the selling of the .:-.- ; 1 •...:..: . such programs for example,t protocol, (which use a removable, flexible nivlar disk as the e Hag determines whether the processor is in the OonuoE Panel and the Monitor program 1 are medium) or hard disk drives which use a fixed I' native mode or emulation mode See .il-::- m fla^ twill into the computer at the factory, They an directory A file [hut contafaB a list of the name* t aluminum platter as the medium), Disk drives x flag. be executed at any time bot cannot be modified and locdrilofis of other files stored on a rJLsk. retain the information alter the computer is .:: ^r.iH'n li'im ma ;. :iii mory Compare Directories are either volume directories or 8-M1 Apple II: Another way of saying stindaxd turned off, hul are capable nf altering the data its hatdwate, software, subdtrectotiess A dtreetory ls sometimes called a Apple IJ, that Ls, any Apple 11 with an fl-hil requeued by the computer program. Wttifog, microprocessor (6502 or 65C02), FPL Abb natation for fiaff Ptw&aor Interface. A disk operating system: ^n opcraling system custom integrated circuit thai inccwpofaiej nio>t directory file: A dtoectpt) One of the two flo-cnliimn text card: A peripheral card lli.il whose principal function i> tu manage- files and of the memory orjyjaniiatiijn and .i« principal categories of PrnPOS Hi rHes allows the Apple 11, Apple ir Plus, and Apple lie communication with me 1 i on disk drives decoding functions of the Apple Elf is One 1 if Directory lilcs contain spiiMijlSy fonmalied to display text in 30 columns Cm addWon tn the Di >5 pimE PthHOS iire two families of Apple M this H - 1 vii i ins - 10 slow the system clock M entries lhat give the names and disk locations of standard ft) columnsl'. diafc operating systems, L024 MFli! whenever access to banks JEO ami El M'iv r -in- emubtei Tu opemie in a v.,^ uk-niK.il to a is delected. Disk U driver A type nl disk drive made and direct page; A page ( 256 bytes) of ban* different system. Far example, the 65C&1G v.ild bj Appl-j Computer, ine for use with die frequency: The rale ji nhkli ,1 re|Milivi 1 u-nl Apple EIuS memory, any prt of which can Ik* micTijoroassor in the Apple lies can earn- -m all 1 Ippk ]|, Apple II Plus, and Apple lie. li uses feours. In alternating cuneni (AC I signals, ilie addressed with a. short (l«byte) address because the instojcdons in a program originally written 5 -^-iik h disks. number of cycles per second. Frequency is umuIK its high-address byte is always: 5'"Hi jriii its for an Apple II that ui.>. .1 in"- niiaoprocessijr. expressed in henz 1 cycles per second), kilnheriz. middle-address byte is the value of the 660816 dithering: \ ted |ue Fot alternating the values thus emulating the 6502, or megaheiu. direct register Coresident programs or routines ..1 idjaosm pixels to cteaie Ehc effect ol emulation mode: The fl-bii configuration of the can haic their own direct pages at different intermediate values, Dithering can give the fringing: aI.m known as ccfarfringing. The fo5cait> processor in which u functions like ;i j locations. Tht direct page cotresponds to Mil- effect nl shades of gray nn .1 black-and-white undesirable effect of rainkm-dike colors 65fl2 processor in all respects except cluck &502 prcx:cssor'> /en page The term dfred /wue i display mt more coJora on a color display- ohscunng text on the tideo iiKniitot Occurs speed Ls often use J informally to refer Do any pari nl when H(k. olumn text is displayed in cd«r - DMA: st L direct memory access. ' the tower pcaftkai of the dEflect-page, start event-driven prngram: A program hat wails in I General Logic UnJl; A dte& nt custom spate DOt: See Digital Oscillator Chip. a loop until it detects an event such as a click of :.d circuits used as inlerfaces between ihe mouse butfun The occurrence of the ev enl direct page/stack spacti A portion d DOS: Am my 111 for disk operating sjstetu An different parts (if the computer. causes the pnigram to take a specific Jttirm ut" Apple litis memory reserved for a program's Applet! ili.sk operating system, based on the event. GLU: See General Logk UidL direct page and stack. Initially, lite 65C816 processor's direct reg&tet contains the base Double Hi-Res: A high-resofution graph* s external device: set device. graphics^ Ttie display by a computer on a video Vjipk'fl umijUiier*. mill -U ka^r ,.M-. -^ ' .li^.l.r, us: -- I-b ill Ik- sp;iLij. .vii-.l ih ^|;uk reeNer monitor of data in memory, to visually represent contains die highest address, Jn tiM.'. the stm< k tJSK of KAM. consisting ol .in amy of pomt> ^Ml externa] reference: A reference to a symbol lhai figures, chans. graphs, nr icons. In the grows downward from die iop of the direct wide by 192 higji widi lu colors. i-. defined in another segment. External Apple Itcs, each pixel on die monitor stieen Is page stack .space, and the lower pan of the references must lie to global symbols. dynamic ROMs A frum of read-on!) memory directly cnntR>l!ab!e by hits in the screen See space corttafrts direct-page data a Iso bitmap. lliOMi in which data bs retained in tnemorj while fatal error: An error serious enough that the direct register: \ hardware register in the 1I1*.' computer power Is off, hut Ls lost as s<*>n as computer must lialt execution. i-=i..-4|'. m iLt>stir dial specifies lie M;ir1 oJ 'he I the system is turned on f direct ( Glossary 2B5 286 Apple Ifcs Hardware Rjeferews 1 hand control: A hand-held device with a knob high- level language: A programming tanguagfi integrated circuit (\Q: A miniature electronic IWM^ AMHtcv Mi km for Integrated Wot Machine and pushbutton lhat provides he lislt wtih j I dial is relanvrh easy ftw people 10 understand, A circuit consisting of man) thousands of : .-ni chip used in huih-m disk ports on means, for inp\inin^ stimuli to ihe computer for single statement m a hjgh4evd language typically transistors and other electronic components lw H"- pnicrs. the piJtE'Kfsf nr (.(Miiinilir^ the application corresponds to several instructions of machine processing a chip of semiconductor material, joystick: A f\p L "' " hand control that has a program, Usually used tn conjunction with game language, Compare low-level language, This chtpb thencasi In a plastic en cerarafo movable s;ia rn proyick s-axis and y-axls inputs software. Compare joystick. package with metal leads nr "tegs" used io high order: Referring to the mnM sigrdflcani 10 die computer, connect it tn a circuit board. Categories "I l ! - handshaking] The exchange nt statu* in" "i .1 numerical quantity 3n normal are laheled due to ihdr coosUTiciiotn \-\-- • -.- jump table: A table constructed en mem information tot ween .1 EX" T' I '.r 1 representatjori, the hi&h-arder bii oj .1 binary }f«. tn-!- ..">,.. \:»." -1 iii-.I !>:,}! -f\i}{, .iii-^ome. iliL- System Loader nrotn all jump-tahle segments Communications, EquiprturntJ and a DTE [Data value a 111 ihe leftmost position; likewise, die Almost anv elcctnmic ctrcuil mfl] be encountered during ... load The jump table Terminal Equipment usually a compuler and j liififi-t wder byte of a 1 i\ na \\ v, 1 -i I > -1 Ion v '• -i 1 miniaturized and made into an integrated contains all references Co dynamic segments that pertpbcial device, used to control the transfer of consists nr' the kftmosl 8 bits c ire uu. may be called during execution of the program J.ili between them. The stents information an Hi-Rcs: A high-resoluliim graphics display rjjqcfc be she state <>l .1 signal connecting die DCE arid interrupt: A request made of ihe microproccssor K: Ayjreviatkm for the prefix Mfc-, meaning ..hi die Apple 11 i.iiniA of computers, consisting the ] )TT, or ii can Ik- in (he form of a character i:-, .1 devil e, either huik-in or external. ?o receive I- 'j 1 \ -. ' ihyti " ' essed IK) of memory is ol an array ol ptseis 140 wide by 1^2 high in six transmitted with ihe rest (if the data. See also urgent data or respond to .1 recem . w m. Disk I 'J emorv' locadons. colors or 280 wide hy V)l high in monochrome. XflFF, XOW. drives make interrupt requests n| the kilobit; ll^t hi is. coinmo.nlv used In specifying 1C: Sec integrated circuit. mtcrnproLCSsor. as do ihe real-time clock and hardware: fjollerhveh elecimn;- ihe capacity ofmemor) ECs Not to be confused ihe mousv Hrmware m ihe Apple ItOS, components and associated liinn^ and linage: .\ representation of the contents of with kilobyte anachmnns In computers, the computer iouif memory. A code image consists of maehine- interrupt handier; A program, associated with a (the processor), disk drives* and other peripheral kilobyte; 1024 bytes, usualh used to describe a language Instructions or data thai may he loaded I'.'-im lil.ir r\u -i-i.il -k". i...., ih.ii executes nmgc or m,'c !-. rmpare kilohix. equipment ihe saying goes, "if you ran whenever thai device n-nuls an imenupi signal m 1 -I iiil-iii' ( .1 I null ir unchanged mtomemorj It's hardware, [f you can't, ir 5 soft? ihe cnmpuler The inlemipl hankller perfonns irs kUohcrtK (KHz): A u nh of measurement of Compare software, index registers A register in a computer la-dis during rhu Lnierrupt. then returns control to frequemyi equal to 1000 herU. See also processor thai holds an index for use in indexed the com; f) resume program megahertz. hertz (Hz): The urih of frequencj 1 -I vi addressing Ibe 6502 and &5C81G execution nr r ^illation, defined as the number of cycksper microprocessors used in the Apple 11 fauni-. of language cardi Memon" with addresses between second. Named For the physicist HcinrLch F^i-rt/.. computer* have two Ihdes n gisters, called die X biterrupt vector table: A a hie rnamtained in : I SDOOO and $I FFF ch anj \pple 1 [-family See also kilohertz,, megahertz, Mrfttt' n^jf&Wfarid the Y index ttigtefet metnorv by ProDOS l(> thai contains die computet Ii .nclmLi^ twn RAM banks In the hexadecimal: The base- h> system of numbers, input device: The keyboard is the main input addresses of all currently active (allocated] SDm space, called bank-suilched mmar) The ntenrupt handlers. language card uas ori.eirLillv pciipher.il cad for using the ien dighs 11 ih rough " mdthestft letters device for ihe Apple JElis. Other possible input .1 iI:l- iSK Apple 11 or Apple II Plus dial expanded A through F. Hexadecimal numbers can lie devices are the mouse and ihe graphics tablet, I/O: set input/output. convened easily and directly to hinary form, its memory capacity to 64K and provided space Mm.:-" 11: 1 . dt '.1:,' m iv -. used as ;rts between computers, disk drives, Input/output (t/Oh The transmitting and communiate wtLh peripheral such .lh printers printers and other peripherals in a limited receiving of data to and horn peripheral nr huili- and disk drives See .j^i peripheral card. i geographic are- s 11 :.- wttbin . singli hufldlhg or L.mipus Glossaiy W7 288 Apple II-'- Hatdware Rel long word: A double length word, ha the Mega II: A custom, large-scale Integrated circuit ID flagj One of three flag hiLi in the (nttHo monochrome Displaying video in one cok* and Apple lies, a long ward is 32 has (h bytesj long, -li.ii [ncOToonites mosi of the inniiiu and control ifaai programs use to control the the i:-. i- kground in another, Iretjuently hhick .md • •. in- of llle Standard Apple []; an Apple IE on a processor's operating mode*. In native mode. white, hut nm ntcessjrily. IhL- Apple IIl;s loop: A section of a program thai [s executed chip. It addresses L28K of HAH organized its 64K ill- settmj tif the m f\i\# determines whether the monochrome defauli is white characters on a repeatedly umil a liinh nr condition is met. .such main and auxiliary banks and provides the ,ii.ei.ii imld^r U S hits wide i>r Iti hits wide. See medium hlue .hackflfound. as an Index variable - n i- hing a specified ending i.- idard Apple II video display modes, both :ilso e flag, x flag. value. MOS: Acronym for mtat axitiv SemfamduCtor, -i k-M i tiKoluiim and S"-i "lumn nod graphics > niicr: machine-language Instruction. Compare hlgji- contains additional RAM and ROM memof) In (h| a rtiicnttompuLLT or a dedicated automatic move data, and to draw within graphics level language, Ik \| ipJe llos, this optional expansion cjrj Is |n control system. In the Appk- :h ,s >.\ irupiHei the programs, low-order: Referring to the least significant part Iv used only in (he memory expansion dot microprocessor is the 65CRlo I'n . ons Afiple II move: To change ihe l<*.aiion of ,i group ^ daw if a numerical quantity In normal Menu iry expansion cards for use in the Apple He computers; uriljze the 6502 and d5C02 bytes in memory. The Memory Manager may representation, the low-order U\ of a binary are not to he used m mis computer microprocessors Some mtor^rocessois used m move blocks to consijhd;rte mfnujry spuce. number is In the riglnmoM position; lik^ other enriipuieis ;ire me ftgflOO, (he 8080, the Z80, memory expansion slot: Tht- single slat low-order byte of a binary word or long Word and ihe 8Q86, native mode: The 16-hia operating located on the Apple flos main logic hoard that consist or the rightmost m hits. configuration nt ihe oSClHln processor. an Apple llos memory expansion card modem; Acronym few Modulator-demodulator. main logic board; The main circuit hoard in die Memof) expansion cards designed for other A computer peripheral device rhat allows NMOS: One of se^erul melhods of making computer, which hotels ihe major electronic Apple 13 computer will not work in ihi> slot comput '=r digital Informatkm over mtegmted circuiw out of silicon; a mera Inside components and connectors. ntl nil telephone lines Modems usuatty mii -id.i..:.i di'Mie --;i-l-- "ii ;i |Hype Memory Manager; h program En the Apple Itos conned lo the computer's seital port, Ihji may substrate using n-ivjx- source and drain contacts. megabit; A ur.n oj measurement, 1,048 : I * ii i.l -I i>, that manages memory use The Memory instead plug into a periplier.il expansion -slot, i ir I Ui kilobits, commonly used in spa I M ii :rj> i keeps ir.wk ol huw much memory is NTSO U) Abbreviation lor mkmal Tekv&fan the opacity of memory ICs, Nut. to Ihj a mtu:*ed available, .rod allocates memory blocks to hold monitor. See video monitor StiWtitir. including color, into a single signal. frequency, equal to 1,000,000 hertz See also null: Zero. kilohertz. '.'..- ii;. 2W 29© Appk- 1 Ii I •:. 1 1 I ft .i re Reference 128K Apple U: Any standard Apjik- 1[ wnh both oscillator; Traditionally, an electronic circuit peripheral expansion sloti The seven si- ns at ProDOS: A family oF disk operating systems main and auxiliary (>iK banks: 1 i- HAM 'Nut thai generates a constant or variable frequency ihe rear of lhe main logic board that will uccepi developed for the Apple li family of computers. includes all models of ihe Apple lie and some signal. As used in the Digital Oscillator Chip in most Apple 11 peripheral expansion cards. Each PmDOS stands for Prtfssskmai Disk Operating models of the Apple Ik, including those with iln- the tppJetics the ttedfiatora aft actually slot has %t pins, which carry required pou ei m-.l K \ .'..'.';. and todudea both ProDOS 8 and ProDOS Extended ffiKtotunm Tl-vl Card installed TTie address gejiemtors, pointing to daw bytes in signals to and from the peripheral u-l- Ih Apple I Ei Ms not a 12SK Apple m the strld LI sound memory pJtase: (1K»\ stage in a peril alic pnxvss, A point ProDOS St A disk operating system developed sense, even though is Endudes both C*i i K hanks nt page: IDA portion nl memory 2% bytes long in a cycle. For exunple, the inCfllh for standard Apple II computers, tt runs o^n 6502 RAM and Is capable of rurjotnu, pniy,iums and Ix-pinning al an address that is .in even microprocessor uses a clock cycle con>i>tmg ot series micropfocessors. It also runs on lhe . ».d for a 12BK Apple II. multiple of 256. Memory' blocks whose darting two phases called tiO and ol. \2'i The relationship Apple ][lis when ihe 65CS16 pfocessor is in 6502 opcode: See operation code, addressee are an even multipte oHSu' aresa'kd to between two periodic canals or pjocr- emulation mode . .'."-.• urij m vi (2) (Usually cspMtzed) An Open Apple: A modifier key an some AppJe IE pixel: Shod \\n picture clemcni. The smallest dr.it ProDOS Ilk ,\ desk tTpt-raring system developed .ire.i of rniirn meniorv contatatrig lesi Of graphics keyboards. On die Apple lies keyboard ilv you can draw on the screen. Also, a location m 651 816 native mode operation on the I..- information being displayed on the screen. '.:> len key is a led the Command fc i . i iv . i i I i li is video memon diai corresponds to a point on Apple Ihis lr is iu nationally similar to ProDOS 8 marked with both an Apple icon and a propeller, PAL Acronym fa phase ulivniatitif* Jfrjes. A video the graphics screen when the \ lewing window hut more powerful. ttiu icon used cm some Macintosh keyboards. standard origi nailed in England and used in other in hides ilia t location. In the Macintosh display, programmable read-only memory: A type oF I tropean countries; each pixel can lx' either black or v* hite. so it can operand: U i In asst'inbh language, the pan of an ROM device that is programmed after be represented by a hit- ihus, [he display ts said Instruction thai follows the h^ui ion code Hie parallel: i 1 1 The simultaneous occurrence of to he a bit map. In the Super Hi-Res graphU s ROM devices, which fabrication, uniike ordinary upcTund ts gsc.l is a value or .hi address it to more dun one pfaeaamenaD. \2) The connection are pmjyammed during fabrication. display on the Apple lies, each pis el Is calculate .1 value Or an address. Q) In object lit ;i group of wires tor die purpose of represented by either two. or four bits; the l'Hi)M: See programmable read-only module Foimat, an operation code thai Es conducting hits of data iimuhiineotjsly. rather display is not a bit map. bui rather a pixel map. fnlkrwed hy a single value ihai consttnaes part than one .n a time ivia a serial connection I. wf an expressti.ui. The *. _i I iir_- Foltfjwtng [Jil- pixel mapt A set oJ values thai represents the protocol; An agreed-upon formal hardware or peripheral card: A removable pnntetk-ircuit upi rand >i\s.-y.U- j* ,ieted nn hy an operator positions and stales of the set ol" pixels making software hnirKLsljiikin^ between two electronic hoard ih.n plugs in--.!- one of the seven up an image. Compare Wl map. I devices (usually a computer and a peripheral I/O operating system: A general-purpose program expansion slots, allowing the ptiter lo use a device). that organizes the actions ol die vanous parts of peripheral device or to perform some subsidiary pointer: An atem of inhirmjlion consign!... I Lhe compute! and its peripheral devices, See iifcsq or peripheral function. These cards may he self- ihe memory address of some other iierii. Tor Pulh To remove the top entry from a stack, ihis disk operating system. contained tsudt as a clock card) or an interface example, the 65C816 stack register contains a instruction moves the stack pointer to the entry card (such as a disk interface card? widi a cable pointer to the top of the stack. below it. Synonymous with pup. Com^ire pu^lt. operation code: The pan of j n^dibtejanguage connecting the caid and the peripheral. instruction thai specifies the operation to be pop: See pull, Push? To p^ace a new entry at the top of lhe performed. Often called opcode. peripheral device; An input or output tor stack, ihi.s insirueiion moves the stack pointer power supply; Tile large metal box inside the input, output) device, usual? external to the to the entrv above ii. Compare pull. operator; In object module formal an Apple II".* "Ii.il divides and conditions the computer hut which may reside on a card in a I Operation code thai specifies an arithmetic or household cuncnt. suppling the voltages radio frequency fRF): Broadcast frequency^ pcripheral-e-ipariMiin %lur,i, that performs some r logical operation in an expression to he required b\ the main logic board and suttie over which radio and television operate. secondary function for the computer Printers, ed on one or two variables that precede peripheral devices. Generally defined as the radio specrrum bet ween dj^k drives, miideni>, and video monitors are n, The variables to ted on In .in operator iire 3 WHt and 3000 MHz. examples of peripheral devices. Identified hy operand opcodes thai precede them. .. .v-im, 291 292 Apple Hos Hardware Reference radio-frequency modulator? A device used to Rf modulator: see radio-frequency screen holes: Locations in die test display shadowing: The process whereby any changes raise video >.ijy2i«a Is ro a frequency thai may be modulator- buffer (ten Pag* Ij used for temporary storage made 1«> one pan td the Apple Jh.i iiitmory an? received and displayed by" a television, as a cither by J 1 ) routines running in periphery kard automatically and simultaneously copied rnto RGB: Abbreviation for nd, Rnmi and blue. A .substitute far a standard video monitor when EH >M ot bj Firmware routines addressed as if they another part, w'hen shadowing Is on. Information method of displaying color video by were in card ROM. Tcsi J ajre one is nor available l L occupies meoior} ftTttten to bank IO0 or $01 is automatically transmitting these three cototis as three separate from S(hQG to S07FF; die screen b M > are copied mm equtvaJeni locaiions in bank JEO or RAM: Set random' access memory- Signals, There are two ways erf using. RGB with locations jn that area (bat are neither displayed ^J-! I Lik'. 1 . 1 . ise. .in'. . banges to b;ink SFO orSEI computers; TTL KGR which allows die color nor moddfted bj the display firmware are immcdiateh reflected in bank s - sill RAM dtslc A ponion of memory RAM* out I signals 10 take on only a few discrete values: and appears (a the oprrarinft system to be a di.sk SECAM: A Rem rocj t ming J silicon] ["lksi-rniioiidii,:..:i used In .1 majority analog RGB, which allows thecojoi signals to Ii .1. set|uential nl volume. Files in a RAM disk can \v accessed a hh memory.* a video standard tike on itr'.v uhk's between their upper and Lower coloi solid-srar..- eEectronit components and much faster than die Mine files nn a floppy di4 limits, 1 1 'i 1 v. i-. I-. . iie^e of colors, Tlte Apple UfiS 1 1 irigi ruling in France and used in die l"?$R and integrated circuits or hanl dir-k uses analog RGB; connect only KGB monitors other countries. 68000; Tlie mkiofxocessor used in the random-access device: See block device. using analog KGB to the RGB video connector ai sector: A division of a track on a disk. \\ hen a Vhnirn^sh and Macintosh Plus. The 68000 lias \1- die rear of the computer ( ompate composite disk is formatted, its surface is divided into bit da la and address registers. random access memory (RAM): Volatile video, tracks and sectors meninry Mi Kin. a computer or other electronic 65C816: The miiropri uvssor used in the device Data ire retained as long as powei is ROM: See read-only memory. semiconductor A class ol m.iicnaK whose Apple lli'.>. Theii-sxrttt.n is a CMOS device widi supplied to the tnemot) hip. Once the power is > ROM disk: A feature of some operating systems resistivity lies between thai of conductor and Hi-l>it ^kiiii registers and ^r-bit address register disconnected, die data are last Compare read- uiMil,iU>r\ for example, germanium and silicon ni.ikm.ii a possible to use read-only memory only memory. 65C02; A CMOS Version of Ifae vniQ: the (Ri M) as ,1 dish vol e < Mien used far making Solid state dectronjes i>. based on rhe use :-l microprocessor used in die Apple He and in die read-only memory (ROM); Nonvolatile, appBcalkins permanently resident. Seeafcso RAM semiconductors. 1. 11 1 Limed Applt- lie dlsL permanent memory. ROM ICs m,h be written serial: A single-wire connection For the purpose once, usually in (he development of the 6502: Tile microprocessor used in the Apple II. in HS-232-C; A common standard tor senal daia- of transfer ring hih ;-l .In., one ;u .1 lime, usually computer Data are retained in the men:: -i-. even the Apple II Plus, and in early models nf 1 Ik- con nication interfaces between a computer and a penpheral del tee aft? j power is dssccmnt-i.ied Special ROM ICs Apple He. Thu 6502 Issi WOS device with 8-liiE Compare parallel. allow yiiii to cliange ilie data in cheui under RS-422: A standard for serial eUia- data registers and 16-bit address registers. communication interfaces, different from the Serial Communications Controller (SCC); A Specific conditions such as ultravkuei light 64K Apple D: Any standard Apple 11 that has at 1 rKu.vts [erasable prognuninahk! read-only i-:- 232 standard m Its electrical characterises type ot communications IC used in the least i'hK of RAM, That ineludes he Apple he I niemoryli, or high voltages (EEFHOMs and in Its use of differencial pairs for data Apple ttfjs, The SCC can run synchronous data the Apple lie. and an Apple H or Apple 11 Plus programmable read-only signals. The serial ports on die Apple lies use RS- transmission protocol and thus transmit daia at [electrically erasable with 4KK0FHAM an .mv 1 j j devices modified so as to be compatible (aster rates than the AClA. Compare AC A. I written once with RS-232-C derives. SmartPort: A sei of firmware routines serial port: The two connectors beared ai the suppomng mukiple b3u< k devices connected to rcad/wfite memory; Set random access RR : See read-only memory. batk 1 -I the Apple llGS mam logic board llui the \pp'i- DTCs -Ihk port. memory. provide a means for mmmumaiirig with S€C: See Serial Communications Controller. peripherals (such as printers and local area soft switch; A location in memon/ dial real lime clock (RTC): A custom IC thai, niiu- networks) using a serial interface. schematic diagram: A diagram using special pi duces some specific elTfed whene\ er ie> r sei, retains the curreni rime of day. day, month, figures to represent ICs, logic functions, and conlcnLs are read or writti \ " .. - n I ', ..mi 1 1 1.1 pier pn ivjdei detail* of die RTC Intt i-.mnecttng wires, to describe J circuit. .•n-l lii'K-i " !.n i-in I • i dv.vici> ScbematK diagrams for the Apple He* main logic Rpj See radio frequency. board are located in the Addendum Glossary 293 29^ Apple RGS Hardware Reference softwares A group of Liistrucu'ons Li i the sync signal A signal that esists. fi ir the purpose TTL RGrk A lype of video monitor thai can worth A jtyoup of bits that is treatetl as a urn to perform certain oF synchronism e twi uefflJj accept only a Jimiicd number of digital values I'ur the Apple lies. ;i uoul i* In liLts C 2 hvEesj rocesfidr, tastrutitng ii rated In a video generator and usl-lI In a and display only a conesporadingly limited long. function*, such as performing computatl ms ge n displaying data cm a monitor, reading data lr-:>iii video monitor to syni Ftronize (he video display number of colors Stands tur trantistoMrffwirtor write-only nwrniory: A Inrm oi computei (\$k; tid green, hlm> Compare analog RGB. and writing daia to a disk. The group -I to the separate video information, In the menn'sry Into which infunnauon can be stored Instructions is known collectively as 3 program Apple llus, the sync signal is mixed with the unbuffered: A style of inpui and output ih.n I- 1 n .' 1 ever retrieved 1 .- ii 1 1: mil- application program, video intnrinaiion resuMcg in. the Composite dues not use a buffet for t 0; reading and writing video signal % flagt One of three Flag bits in the 65CS16 special memory; On an Apple tlGS, ill of banks is done 1. 'ne character at a time. processor that progiatna use to conttiol [he S00 and Sot, u.rkii ill display memory In Kinks $B0 synthesizer. A hardware device capable nl V'BL; Mi- 1:1 ••! :,y;\:tii bhmktng an Interrupt pttJccasofs njVi.iiiiH' modes In ii.uoe mode and SE1. So called because it Is the memory pinJucinw sound by 1 r^iiiue n digitally, and then signal generated by the video timing drtuil each ihf setting of the x uag determines whether the directly accessed by standard Apple J I programs converting r 11=' m .mil- g waveform that you time it finishes a vertical scan, GO times a seennd. indes register are S bits wide or 16 bits wide, can bear ng -ii the ^ppteltcss VGC: See Video Graphics Coniroller. See e flag, m flag. r stacks A list in which entries are added (pushed) system disk: a disk iui contains the operating XOFF: A Special character (ASCft value SI I J used and removed (pulled) ai one end oral) (the i**p of -',: 111 ...n. I other system software needed to run video: An electrical signal containing foi controlling ilu- transfi 1 of data between a [he >iiick i, causing them to he removed in last- tons. information that may lie obtained \isually when mtoucomputa and d serial per^ihetal device. In, first-out (UFO) order. The term /he stack displayed nn a video monitor, Infonmatjon system software: The components of a When one piece of equipment receives an XOFF .i.miiII'. refers to thi parti* nl.11 stadt pointed to oT^imxcd or tmnstnttted in video rbem See also computet system thai support application character rum ttie other, stops tran>.rtiiiiirt£ I is l>y the frKSlfrs stack register, MTSC PAL, SECAM, programs by managing system resources such ;i> lii.ir.uiiTs Liniil it receives an XQN. See stack register: h hardware registei in n memory ami I O devices. Video Graphics Controller (VGC)s Ii tc u si bandshalujig, VON. is lhe address r\i lhe top of ]t: tm ihtj Apple ITGS ni;«n logk board text window: Thai portkm of the screen that is - 1 1 1 .1 1 acter 1 -VSOI value S 1 3 ' i rsed I lie processor 1 ^r.J^k responsa^e lur generating all video used in the reserved hi the transfer of data between a Apple DG£ ' standard Apple II: Any computer in die Apple IT the firmware uses the entire display Inr text him. puter and a serial peripheral device. Family except ihf Apple DCS Ih.n Includes the 1 1. ..'. . vet if you ft tab, vi i'j can restrict the test video monitor; A display de\itf thai receives See liandshaking. XOFF. Apple It the Apple II Plus, the Apple lie, and ihf video activity to any rectangular portion of the video signals by direct connection only 3wn> pages The in page (256 bytes) of tneinory I Apple lie, display. wavetahlia a group of data hyte^ n tttemorj in a fttimlard Apple H computer (or in the start up: To ^'i the system running. Seining up tool sec lout set. used as data by ihr EXKI to genenite sound Thtf Apple []<* computer ^ hen oinning a standand ravolvcs loading system softw in From disk and wavetable is built b) using the DOC to digitize \pi>le [1 progtaffll Because the high-order hyte toolbox s^ce 'AppfetfGS To any address in this part of memory ii zero, then loading and Tunning an application. Also .hi analog^nput sigoal and placing (he festiHlng t'4 called boot. tool sett A group offejaied routine* 1 usuaEy in ;i's in sound RAM memon nnlv .1 sngk -.-. • 1 ;-. leii ro spmh a fccro- page address, Compare direct page. firmware J. available to applications and lystem Super Hi-Res: A hi^h- resolution grapliics display software, that perform rtectssar) Functions or mode on the Apple UgS, corfiEting of jn .irrav ut provide programming convenience. The Memory points jrlO wide by 2fi0 hi^h wiih Hi color- -i 641 v.iii.uvi i|i:- System Loader. ami QuickDraw II .'. 1 le by 200 high wfth I ft colors i with .ire [rial Sets. restrictions.) track: " Ine d a series I enirfc circles on a dssfc. When a disk is formatted, a*, sulfa e s divided inio tracks and sectors. Glossary 295 296 Apple IttiS Hardware- l^eFerericc Digital Oscillator i.,hip re n«ff*rr«V» Frcqiiuno" Hifih and Frequency nt'fiphet.il-Lafdl 02 sir .1 ntanlKT 188 199-199 Global fcsel conumnd I3H [Wit S^lntegalttl Wws tanis 17T-178 L-i.M'h;. - «»->/ Maihiiif (bbiyi'luin WX RM Gobrif 40,921 tt dueapjge 32, ^-iH DoutifcHhRes 35 H.47 J DstLii re^i^L-r 114 - " .i-.-r|,|. - " In, 71 87.88 fi accumulator 210 Applesoft BASK 2 color frLnjj;ir^|JE ti2 dHk 150-159 Hi-H» 2041 J5.47 W,64,fi8, V h fin aspi hnimim. AppicTalk 47, 119, W3 Conuiiand Data, jeflisicr 128,129 disk-port cartwcUf 151-152 -i -r^H^: Li>n':muTiu.'aLKJnH fruerfaee Appk' Ik 1-5 ^urnpcHJliiliffy 2-3. 151; 176 ]^k 1 1 23-24 kryboaid 3, 125-125. 24? 29 adapter Apple [to l-d.125 composite video cartdnxi it Hinikluke itgLstcr J5i tv. S4-«5 Daia rt-^istt'i 129 129 H ! ntuvatnt 146 ASCII 79, m.129, 263-367 lentfrJjLTc regj^Ef 152-153 mnnwfamcnc ?i+-C5 keyboaid strobe 125-12fi ADBmou*? IT • asynchronous camnnjittcatlofw Apple Desktop Bus 3, 7 Vtodjett^ihlcr 155^-156 mrnvKhpimL'-HTilfir reaistLT - -. A Ml Interface adapter (AQAl pen 7.149.150-15 . . , ii .i.n>i n-jji-rrr In" i B2^S addressing m idea 3tiH ISO. UKI dlsfccuiwe 7 re\i\\ vnlr D«ta rcyisltr S^JerHl-Rea J" J I il.rjd bn^uajjerajd ]-) J I, .--V/ ,J-,^ Address I'niraur rcgEftn 104. 105 Attention." S\nc sipnal 1 AOB : 1 5l I dbbpoti 150-152 158-m 76,^.'- 106. W jusjIunrrieniDTy 41-1(1,65 pW " Lfi4-I6fi .:, uiik sekct switches 194 16—59 address' fttapping .11 l*ink It pciw'er 203 dispbyhulTm 18-19,20-23 a " Lbtoi cofflftiand (AJDB) ir [40 analog inputs {POLO ihnmidi select swkclm 44 KtilUnb? DoubkHi-Rft^aphfc WMM " hand mnttoLs 7, IW, l&k-lft7 M>13" VS serial ptirt Super HS-ltes, giarpWa S0-91 B Handflhake register IS8 H jnnuntuiur nn-morv taajjotti Control l-"ii iil-I 3 displjy mode sftirdiinj: 1 heaadeckn^jaitiibeis 25B-2S3 main k,£n 187 badqpowtd cobo 62 *t i .nrn .1 reg&f 165 displjv pa^ 71-77 tJOrtrd 5 niuin memory n5 annurttiaLiif uuiputs < ANi>- honk SOD 30, 31; £-45 U I ti-jH - I it-* ':,mM 3,11,12,1^14,15,16,56, [ItflHiuJuLNj) 166 48 Apple Desktop Bus I ". f bank $01 30,31,3135,41, bankSEO JO, 31 15^8 - data bank register 210 dithering W ' itipur huffer M 176 m-v 3t. device handlers 144-145 bcrtler cobra nim-n: I'r-.lDvnlLtHtfChip^DCX:) S, 66.71,76,75^0" scart41ne 58,^92-94 185-185 device GegLsreis HO-144 biMfW.jdgMji CADB9 137-139 107-1 IS emulation mode 31 ^>7, 206, 20ft I/O & 19, 24-25 177-18! r :s !.:: i ii n/qwee 191-193 trroT randiuons 139 hws. Ssfc Apple Desktop Bug A DGafluatef register 109 raemosy bcaiims luhi jn^u j^t finJ 42 General U0c Unit (GLU) I bvics 257 Frequency Ki^i and Fiecpiency I/O «(paas-H m sin % | "" l I 1 n niam fn 127 IS i.-i-. rtgfciKCJ 113 c^ids for slot 3 193 majn lunk 48 Keyboard Data register 128; Os ill.ikir Owiln J rtpsiers t Fait Pttce&c* fniofii ee (FPU h. direct mi'im fj access 1 1 >MAi owp 2H0 129 chancier ijHSHstiot 251-253 111,112 ii.i4.rn 177-I7B Mtreusry Vlarutfi-r 31 h" nuCAJtomiulk-: \T charnciexseia 78-80 Oscillator Data regfcters ill Qotmwe 47 24 - esfKUison ROM spaue kA5-lAS rJL'riphrt:kl-i.Ln:l IM^M Modifier Key reajsief 130 " Osdlhtor Enahk- nrjsisier 106 ASCII '• Flirilk njnuruintl T espan.ston slot sig^uU 1 4-1"^ .Miuise I>jL.i register t30, 131 OsdHator Inicrrupi register J3^. 136, 137 • pcripticnik?rri Ft M space disphh ^? W^ohmmttxtdfcpfcry 61 - LOfJidi 177 134-185 .in", iiu. .n.,.ln.'-.M.- 144-145 Kfl-109 clcd»3,l4& L-'O metnon space 19 - 159 1 pcrip3icrj:l devices ^ 110 1 HAM 2,3,^9,12,13.14,24,231 I h I- I nd-Luife 3-W.S2. 169-110 register addresses " loading IfiQ-lffl S,5ft.3T-.^ 18 i fnn'i' m|UL'hl I <" Volume regkat'r» signals 194-199 1 1 StM .srr-i-'.r 132^133 cciMKiooEtetecitQa(ADA) H" 297 298 Apple lies Hardware MereiKe i refresh in oscillator 115. ir-1 1H Serial Communications CormnlleT diS|"sLiv 03 vkIl-u monftor 7 rvSrrU'Ll pdRt* 32-#5 Control roister* 111,112 SCO crap 10-16* i display modo, 61 •-np.^ih- i-.\ Talk command 1ADB1 !^J.%. ROW JA&I2 l&Hft&$ Dan registers ML Command register 161—163 157 !h display pajja 71-77 10162.63 Eiaabte lejrjstef IQfi Jauiwn.Mri 1 1 > I t63 leKieuJuft 62, fll DoutfeHWtes m i-ohagc 202 shadcwiiw 1\1K-2-m M-. 70 wrafthfc UX103.lli.llH. II'- 71 ft 75, 76,77,7^80 ••'"' L'Xfxiruiun sloe 29. fl. srMl, shadow register i' : --- _ pocket 155 ^i*Jnrnfil.6.UH4nH. 2. Waveullk Planter rr^mk'r> 1 1 173 175 pakoc92,94-*7,9&,95 BOB 70 Hi. extended BAM 51-52 froi6 2.;\s ii 12 p m. [ort cobra 62. B peripheral canfe fcHfl-188 lext Hiijp.- I "I Wavet»bleaategisters 111 Hi extended HAM mappine, 205-^8 : i ^i addressing IHK-ltf> video buffer 9\ ru Page 2 71 II;-. extender) ROM 52 |i:.h;.s.-.i.l.lvw, IH'M'JI emulnton mode 2Q7-20&, teal lest wind™- 7ii- — vukiihufk-rs EC^nft 2ltk-21^2l-4-:h MiTin.ip,\\]LLn;i.[}fr M- 17 BAM memory kiCatiOfts ltT nariremode 208-209,210-211 memciry Jncatkms T fldeodeplays ni 62 nittie? 121,12* 126 i:~ periphLT.il expan&m tt 6 fit toottxa 244 Apple II specificjctons 64 kindest repfcr 210,211-212. 21 mil n ipn x-c-vir 1 .V \ 8. IS3, lflfi peripheral kleraificutinn number* &502 JJ7-30B locations "2 transactions 13^134-135 todem h" Slot register 181-183 mbied'mode 64 I--" 1 3.1 _VJ 2-ke\Mock(iui ]2 =- Y Mode lister 155-156 pcnplieraJ inierface adapiers 4..I, ^,. 17J-1E Video Graphics CoflnuUer a, 56-61, iiKiiiuryaqunsion. 29,49,51 T Index K^sset 210. 2 1-2 12, 21 1 MaefllerKeyieglsn £30 EPIAi) ISO U »j modifier keys 126 pteefe 8W&9W.W SmartPfin 151 LinlDisk 151 inittuipL*. ^ Li--l Z McaIim Danrware 3, 32. (7, 194 pi i\ut i . inritck ir 203 toftswiidxa L3F 3843, 15 7^-74 Inlerfupt-C lest neutMcr 60-61 McMuchrome/Oolor register 82-83 i54-155i 1ft, 191-38 Interrupt rejiaef 59-60 primer 159, Lfl3 V :: , :.|i.|ii: Hi:: Tmi-. fij PrrtKft 151,345 .ii3siL!jn,-m«Tn:ip. (3, 45 Mlu.sc Dm register 130, 13], 132 pflTgntm hank render W, 214 cUsfiliiv 72-7-4 wdetj 7 % sound ni'i-iiii l]Tir-L\i Apple II f>2-4H MtuscTexl 64,7^253 program eodrHCf - 1 - .i.lilri'-i.LlLiiljliimIP bidtground roio»5 62, SI i:i'.JlifilL'x« 109 Program Sncus register %\ 1-21.1 tfata rtnisiLT 105; 106. MP bwdercotors hi |H2 "" cflitnccror N n stereo 119-120 v .n.il i , ; n*nil n i;isk'T j llM-tOfi, n;iH"r.-iRKl^ 58,308 205,21" 2X1 ra dlo-rrequenm video nnxfufcuur 1041(17 mepthmfedinal ntwrwers StkJfidGLV I" 1-1"" HAM mtitiurv Stv memory reglsteja lm New-Video raster 16,39-91 read/write Data register ISfMW r*4tey rullwer 12* ^Hind synthesize! S rtaWtnedod! 5. 5B, 92, 160-170 speaker itii 107 ECTSC video li@,7Q£&-® reserved pages 52*# Resel signal 138 RCbmnnimr 62,63 ottrrlow 35 1MU Appte UGS, additional Hun.. ..k,. 0,70 "" .suck ji:lj5c 43 features 4 connector 7, $3 stack poirttet ill keyboajd 147 ROM mvnmrv fcrmerrain stan hii 135 power-on status 22. 23 RAM2i29-3M9,ft54 state register 3M0 Status ir^sttr lil-iy. 1™ ROM 30^2 49 ^J scan line 58.92-93 steie^'stwod 119-120 control bytes 92, 9^ sticky keys i I r opcodes 2i>H. 22b. itf M.iecn Color register SI stopNt 135 operating.speed 215 screen hides 34, 49L IS? switch inputs iSWij thn«i Rh HW3) operating systems 2-t5 Send Kc>« command 137 I6S, 163 <.--.'.;u -Ii'.'. !- i " Jntlo 39? 300 Apple IIG* Hardware Refenenos Tfif APPLE PL'BUSHTNG SYSTEM This Apple manual was wriflen, edited, and composed on a desktop publishing svsiem Using Apple Macintosh* LLnnpurtfis ;kkI Micmsofi* WcJid software. Proof and final pages were created on the Apple LaaerWriier* printers. Lint- w Addendum Schematic Diagrams was created LisLn^ Add* ts1 IJ]ustratnr PutfStJUPT®, the . page-descrjpikm language For the LaserWriter, was developed by Adobe Systems Ins nr |'ii rated. . This Addendum contains schematic diagrams for llie main circuit board MB Apple IkrS Text type and JispJay tvpe arc of the original Apple UtiS and the 1 Apples corporate (bit, a condensed version of Garamomi. Bullets are ETC Zapf Dinars ', Some elements, such as program Listings, an- sft in Apple Courier. > iSfa-TS FPT USA rheQSktei Apple lies. Hardware Reference, second edition PubijcatiQRjmm ,ty[ilL> Computet l/.'i ^ n«en jnd produced by the Develapef Technical Publjcadi m^ group ai Apple Cnmpuier. thi* reference is For software devdi pera and fct«to are developers creating products for il; II- - and i-i..- LMa vppleUGS The Affile lk$ Haniwan* Refffltu g second editton, provides an u\LL-nsi^i dsscriptton of all j jsnt\i^ -I Intt i-i. . -|n -.iin-in and present the Litctf Inforaiatinfl on the niuthint,- "^ hardware— iik ludtQg the interface itquiftmenfls nf inpm devices, vkfe tftopb) disk dilves, and *erul pi mi. ' This ni'oimimjn ise&cniial to lie hardware designers and pmjtf;Litfcnier>s writing drivers for peripheral det k vi I he Appk* lf(.-> thmhuuv ftefienmefa Khe ddpLniiix'e reference ft* these p.irtiLLiLir.\ppk- II ramp4ete The m.jinul describes lhe architecture of both (he Apple [lo and I Mfll Appk !1<> computers « i nen n uy ur^unmLbDn. indiidjne, sUnLiiul \i \ M <2%K in 1 lie Apple IJtks and JMH in the I MH \ppk- II-.- 1 M.iiMiLrd ROM C12SK in the Apple Iks and 2%k in the ] MB Appk- Uc*. and Up to 8 MB ol expansion RAM - die video display des, Including 5upei Hi-ltes .graphics mode the sound cspaNlteiescifthe i timpuhss, indudifig the Ivvhilt sptficsUei lhe Apple Desktop Bus™ for cxmneettng la^boards and oilier inpni devices i inclutlinn clu- new Keyboard mouse and slick) keys support fordbubkd usets) I lie huik-in jnput oujpu( ports ;ind riMl-tniic clock * the seven inpui i lutpu.l expiinsi n sktfs h a rimecrmg peripheral dtt ices, including timing ir |'>.ii.iiiieler>iinddi.i^i iiii- * ibc sbaeett-Mt u-TQJlfi paJcroprrscessot The appendixes contain supptei e ii. ) tables and frecjLiend) used &ofonai3tkin about r i -_ \ppk- lltft computer*. Abn Included is Maddfefndu^a«lainirigsdieniaJdc dunrinu fnr hoiJi versi -i - li.n n pin vr 1 i if I lit I 'mil. 1 1 in I " "'. Appk t jsmjiuu'f. inc. -.1 11 t.iii, 5 2 6 9 5 : I • .r l( ii .i|, i . fH 1 . . .: . H*-'-V 'Hi. T\.\ n =ri, Addifttifl-'Vr'CSk'y fuhlishiilH* Lnlp|uni, |itL 9 'VSDzorszsafls 1 ISBN U-EU1-SE3E1-E