Text preview for : BitBLT_Jan76.pdf part of xerox BitBLT Jan76 xerox alto memos_1976 BitBLT_Jan76.pdf



Back to : BitBLT_Jan76.pdf | Home

Inter-Office Memorandum


To Alto Users Date Jan uary 28,
1976


From Dan Ingalls & Diana Merry Location Palo Alto


Subject Bit Boundary Block Transfer Organization LRG
(Bit BLT)



XEROX
THE "Bit BLT" package is a group of subroutines that implements various operations on display
windows. Among their several uses are displaying characters, scrolling, and "painting" with brushes.
The operations which can be performed using Bit BLT are not necessarily confined to uses with the
Alto display, but the description below focuses on simple cases with the display in mind. More
complicated possibilities are left to the reader to invent as necessity and curiousity dictate. The
binary files required are available as BitBLTB.Br, BitBLTA.Br, BitBLT.Mb in BitBLT.Dm
The sources, BitBLTB.Bcpl, BitBLTA.Asm, BitBLT.M u are available on .


Dcfinitions

A bit map is a region of memory that describes a collection of scan-lines which have a base core
address (bea) and bit map width (bmw). the later being a word value. Our discussion will assume
that scan-lines run horizontally from left to right (bits are addressed from x = 0 to x = bmw*16-1).
Scan-lines appear consecutively in a bit map. Thus the point (0,0) is at the upper left of the
display bit map -- y ;: 0 is the first scan-line, the next y = 1, etc. The core address of the first
word of scan-line 0 is bea. The number of scan-lines is not relevant, for the purposes of Bit BLT.
(Note that these conventions are similar to those for the Alto display bit map; if ben and bmw are
both even. the bit map may be displayed using standard Alto facilities.)

A block is a rectangle within a bit map. It.has four corners which need not fall on word
boundaries. Any given block is described by a block descriptor whose contents are:

Bit map's base core address (bca)
Bit map's width in words (bmw)
Block's Lcftx ("x offset'~)
Block's Topy ("y offset")
Block's \Vidth
Block's Hcight

Thus the block is defined by:
Leftx S. x S. Leftx + Width-1
Topy S. y S. Topy + Height - 1.

It is left to the caller to insure that ranges of x and y indeed fall within the bit map.
2


The Bcpt routine contains a structure declaration for managing this descriptor:

structure BITRECfANGLE :
[
bca
bmw
Leftx