Subject: Re: Memory maps for Apple ][, ][+ and IIe? Path: lobby!newstf02.news.aol.com!portc01.blue.aol.com!news-peer.gip.net!news.gsl.net!gip.net!newsfeed.cwix.com!205.197.251.110!dca1-hub1.news.digex.net!intermedia!cyclone.swbell.net!typhoon01.swbell.net.POSTED!not-for-mail Message-ID: <372F88F9.287FAE2D@swbell.net> From: Rubywand Reply-To: rubywand@swbell.net X-Mailer: Mozilla 4.51 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.sys.apple2 References: <01be95d5$00af1740$5c9508d1@TheBlueWizard> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 125 Date: Tue, 04 May 1999 18:55:37 -0500 NNTP-Posting-Host: 207.193.11.177 X-Complaints-To: abuse@swbell.net X-Trace: typhoon01.swbell.net 925861696 207.193.11.177 (Tue, 04 May 1999 16:48:16 PDT) NNTP-Posting-Date: Tue, 04 May 1999 16:48:16 PDT Organization: SBC Internet Services The Blue Wizard writes ... > > I would like to know the general memory layout for Apple ][, ][+, and IIe, > including the I/O registers and standard names of various ROM call > entries and zero page RAM names, plus a few $03xx names. .... Below is a quickie memory map for a typical 64k Apple II which is, also, the Main Bank of a 128k Apple II. $0000 --------------- ZERO Page area-- used for holding many system parameters, a few system routines and variables, DOS & ProDOS parms, ... . Also, this area has a number of 'open' addresses the user can employ. $0100 --------------- STACK page-- place where JSR return addresses, etc. gets PUSHed. $0200 --------------- Commands buffer area-- e.g. place where typed-in stuff usually gets put first $0300 --------------- Mainly Open area-- a nice place to load in short machine language routines (like sound routines, etc.) Roughly the upper 48 bytes are used for holding Reset, IRQ, ... vectors and some DOS or ProDOS vectors. $0400 --------------- Text "Page" 1 (or LoRes "Page" 1)-- Place where most TEXT you see on a 40-col display is located (40 chars x 24 lines). If in Graphics mode, you see a 16-color LoRes display (40 x 48). If in Graphics mode with Full Graphics set, you see just LoRes. If in Graphics mode with Mixed set, you get 40 lines of Lores with 4 lines of TEXT at the bottom. (On a 128k Apple II, this area can be used as half of the 80-col. Text "Page" 1 or half of the Double-LoRes "Page" 1.) $0800 --------------- BASIC program area-- place where a BASIC program resides. This space can be used for non-BASIC programs and routines, too (like stuff you BRUN or large machine language routines you BLOAD to use along with a BASIC program. The space actually available for a BASIC program or ML routines or whatever depends upon what other parts of the $0800-$BFFF space are used for graphics, DOS or ProDOS, and DOS or ProDOS buffers. $0800-$0BFF can be used as Text "Page" 2 (or LoRes "Page" 2). This is rarely done; but, if it is, then a BASIC program must start after $0BFF. (On a 128k Apple II, this can be used as half of the 80-col. Text "Page" 2 or half of the Double-LoRes "Page" 2.) $2000-$3FFF can be used as HiRes "Page" 1-- i.e. the place Hires pics load in to be displayed. This is a fairly common use. As long as a BASIC program, etc. is small enough, it can load in at $0800 (actually $0801 for BASIC) as long as the space is not being used as a second Text or Lores "Page". A large BASIC program would usually load in after the HiRes area, at $4001. (On a 128k Apple II, this can be used as half of the Double-HiRes "Page" 1.) $4000-$5FFF can be used as HiRes "Page" 2-- i.e. another place Hires pics load in to be displayed. This is a good place to load in/display Hires pics for moderate size BASIC programs. Such Programs will, then have $0801-$3FFF available (assuming no Text or LoRes "Page" 2 is active and HiRes "Page" 1 is not used for graphics. Sometimes, both HiRes "Pages" are used in order to do speedier animations or for some other reason. If this is done, you must start your BASIC program before the Hires areas or after. (On a 128k Apple II, this can be used as half of the Double-HiRes "Page" 2.) $9000 --- (Approximately)---- DOS or ProDOS plus buffers use up most of this space. $BFFF --------------- End of 'Program Space' $C000 --------------- Area usually employed for I/O, Soft-Switches, memory address space for use by Slot cards, etc. $D000 --------------- Usually employed for BASIC in-ROM or for one of two 4kB "Language Card" banks of RAM. $E000 --------------- Usually employed for BASIC in-ROM (continued) and the Monitor in-ROM or for one 8kB "Language Card" bank. In-ROM BASIC runs from $D000-$F7FF The In-ROM Monitor runs from $F800-$FFFF $FFFF --------------- End of 64kB "Main Bank" memory For I/O locations and Softswitch info see ... http://home.swbell.net/rubywand/Csa2APPLICS.html#005 . You can find a Beagle-style "PEEKS & POKES" chart which includes subroutine CALLs from Edhel Iaur on the Ground archive at ... ftp://ground.ecn.uiowa.edu/apple2/MiscInfo/Applesoft/ . Rubywand