`
`IBG 1025
`CBM of U.S. Pat. No. 7,685,055
`
`
`
`Copyright
`Copyright © 1982, I983, 1984, 1985 Apple Computer, Inc. All Rights Reserved.
`20525 Mariani Avenue
`Cupertino. CA 95014
`(408) 996-1010
`
`This manual is copyrighted. Under the Copyright laws, this manual may not be copied, in whole
`or in part, without written consent of Apple. Under the law, copying includes translating into
`another language or format.
`
`Macintosh is a trademark licensed to Apple Computer, Inc.
`
`Apple, the Apple logo, the Macintosh logo, Macwrite, MacDraw, and MacPaint are trademarks of
`Apple Computer, Inc.
`
`Lisa is a registered trademark ot‘Apple Computer, Inc.
`
`Simultaneously published in the U.S.A. and Canada.
`
`Limitation on Warranty and Liabilities
`Inside Macintosh is a working document used by Apple’s own programmers and developers
`which describes the hardware and software associated with the Macintosh computer. This is a
`preliminary edition that is incomplete and may contain errors. Apple itself does not rely solely on
`this document, butrather subjects all of its products to extensive testing prior to introduction.
`Further, Apple is continuing to improve its products and the contents of this manual may be
`obsoleted as a result of changes to Apple products. Accordingly, Apple makes no warranty that
`this manual is accurate or complete and notifies all readers that the specifications of its products are
`subject to change without notice.
`
`APPLE MAKES NO WARRANTY OR REPRESENTATION, EITI-[ER EXPRESS OR
`IMPLIED, WITH RESPECT TO THIS MANUAL, ITS ACCURACY, CONTENT,
`MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT.
`'I'I~IIS MANUAL IS SOLD “ AS IS” AND YOU, THE PURCHASER, ARE AS SUMING THE
`ENTIRE RISK AS TO THE USE OF AND RELIANCE ON THIS MANUAL.
`
`IN NO EVENT WILL APPLE BE LIA BLE FOR DIRECT, INDIRECT, SPECIAL,
`INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR
`OMISSION IN THIS MANUAL, even if advised of the possibility of possible damages resulting
`therefrom.
`
`No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition
`to this warranty.
`
`‘ Some states do not allow the exclusion or limitation of implied warranties or liability for incidental
`or consequential damages, so the above limitation may not apply to you. This warranty gives you
`specific legal rights, and you may also have other rights which vary from state to state.
`
`0002
`0002
`
`
`
`12
`
`Quickbraw Programmer's Guide
`
`The hit Ima e
`
`A bit image is a collection of bits in memory which have a rectilinear
`representation.
`Take a collection of words in memory and lay them end
`to end so that bit 15 of the 1owest—numbered word is on the left and
`
`Then take this
`bit ¢ of the highest-numbered word is on the far right.
`array of bits and divide it, on word boundaries,
`into a number of
`equal-size rows. Stack these rows vertically so that the first row is
`on the top and the last row is on the bottom.
`The result is a matrix
`like the one shown in Figure 5 - rows and columns of bits, with each
`row containing the same number of bytes. The number of bytes in each
`row of the bit image is called the £3g_width of
`that image.
`
`IIIIIIB IIJIII II II III IIIIII II IIIIII ‘III!’ IIIIIIII IIIICIII
`
`on
`
`‘I
`
`Figure 5.
`
`A Bit Image
`
`A bit image can be stored in any static or dynamic variable, and can be
`of any length that
`is a multiple of
`the row width.
`
`The upper
`The Macintosh screen itself is one large visible bit image.
`21,888 bytes of memory are displayed as a matrix of 175,194 pixels on
`the screen, each bit corresponding to one pixel.
`If a bit's value is
`9, its pixel is white; if the bit's value is 1,
`the pixel is black.
`
`The screen is 352 pixels tall and 512 pgxels wide, and the row width of
`its bit image is 64 bytes.
`Each pixel on the screen is square:
`there
`are 72 pixels per inch in each direction-
`
`( hand)
`
`Since each pixel on the screen represents one bit in a
`hit image, wherever this document says "bit", you can
`substitute "pixel" if the bit image is the Macintosh
`screen. Likewise,
`this document often refers to pixels
`on the screen where the discussion applies equally to
`bits in an off—screen hit
`image.
`
`3X2/33 Espinosa-Rose
`
`/QUICK/QUIKDRAH.2
`
`0003
`0003
`
`
`
`16
`
`Memory Manager Programmer's Guide
`
`iii-'8 (D7383)
`
`variable
`
`address
`
`28
`
`740 E
`
`123
`
`-
`
`
`
`123K: ‘$1 FFFF
`' <"— W°'"7°9} 512K: $?FFFF
`
`@— Saw-'d_g\y 123K: $1FD00
`
`$12K: WFDOO
`
`alternate spreen butter
`
`
`
`
`
`
`
`
`siock
`
`
`
`
`
`
`application heap
`
`‘ <—. (fieeofincl)
`
`1231‘: 01 A700
`(— (S°'”B°’°) 512K: $74-.700
`
`(—- (BLIlF'tI')
`
`(-— A5 = (Curren1A5)
`
`<-~ (A5)
`
`(—- (curstackfioae)
`
`(— (ADI:-Izone)
`
`% (syszone)
`
`$300
`
`
`
`
`
`'
`
`3:32? 13.?"{
`me { -
`
`system global: and
`trap. dispatch table
`
`
`
`Figure 9. Macintosh RAH Organization
`
`At (almost) the very end of memory are the main sound buffer, used by
`the Sound Driver to control the sounds emitted by the built-in speaker
`and the Disk Driver to control disk motor speed, and the main screen
`buffer, which holds the bit image to be displayed on the Macintosh
`screen.
`The area between the main screen and sound buffers 19 used by
`the System Error Handler. Note that the addresses of these buffers are
`dtfferent tor different-sized computers.
`
`There are alternate screen and sound buffers for special applications.
`If you use either or both of these,
`the space available for use by your
`application is reduced accordingly.
`The Segment Loader Provides a
`routine for specifying that an alternate screen or sound buffer will be
`U3€d.o
`
`The memory organization of a Lisa running Macworks is shown in Figure
`16.
`
`10/9184 Cherntcoff-Hacker
`
`/NEH.-HGRM-£314. I. 2
`
`0004
`0004
`
`
`
`MEMORY ORGANIZATION
`
`17
`
`size (bytes)
`
`variable
`
`address‘
`
`W{ (_ (swam) m: ssaono
`
`$12K: V8000
`
`1M: SCEFBB
`512K:
`4EFB6
`
`7-M :1 §.3:‘,“..,‘,’;°’ M ims
`0
`am: «sees
`(__ A5 3 ccunenms)
`
`32
`
`40
`
`16K
`2816
`
`hardware interface M T
`
`appiicetion parameter:
`
`h Quickorew global:
`
`9- (A5)
`(-— (CurS!eckBe:e)
`
`4"‘ E” 3 J7
`
`-43:
`
`.—
`
`-‘J..a.—.ab———.
`a
`eppincetnon heap
`system heap
`syatemglobula
`
`(6- Apmzone)
`(S 2
`a one)
`Y
`
`é——
`
`SCOUO
`$800
`
`- igure 1%. Lisa RAM Organization
`
`MMORY MANAGER DATA STRUCTURES
`
`This section discusses the internal data structures of the Memory
`Manager. You don't need to know this information if you're just using
`the Memory Manager routinely to allocate and release blocks of memory
`from the application heap zone.
`
`Structure of Haag Zones
`
`Each heap zone begins with a 52-byte zone header and ends with a. 12-
`byte zone trailer (see Figure 11).
`The header contains all the
`information the Memory Manager needs about that heap zone;
`the trailer
`is just a minimum-size free block (described in the next section}
`placed at the end of the zone as a marker. All
`the remaining space
`between the header and trailer is available for allocation.
`
`10/9/84 chernicoff-Hacker
`
`lHEH.HGR/HEH.I.2
`
`0005
`0005