1. What are screen holes?
The Apple II video architecture is based around a text display of 40 columns by 24 rows. Woz had already built an ARPANET terminal for a TV, and said in his book iWoz that "Forty columns was the limit of American TVs".
To map those 40 column rows into memory sequentially would for various reasons have increased the chip count - something Woz strove to minimize. He could have mapped 40 columns to 64 bytes and wasted 24 bytes per row, but every byte was precious back then. As a compromise he mapped 3 rows to each 128 byte block, leaving 8 bytes unused in each of the 8 blocks - the screen holes.
This decision wasn't made in isolation. The larger design includes the video scanner which reads this memory (refreshing DRAM in the process) and passes it to the video generation circuit. The logic of the scanner imposes further order on the mapping: each of the three rows in one 128-byte block resides on a different third of the screen. Figure 5.4 from Sather's Understanding the Apple //e:
Sather's books have an excellent discussion on the how the bytes in memory map to the display for each video mode. Here are the address ranges for TEXT/LORES page 1 memory from Figure 5.5.
TOP/ MIDDLE/ BOTTOM/ (SCREEN HOLES)
BASE FIRST 40 SECOND 40 THIRD 40 UNUSED 8
ADDR # RANGE # RANGE # RANGE RANGE
$400 00 $400-427 08 $428-44F 16 $450-477 $478-47F
$480 01 $480-4A7 09 $4A8-4CF 17 $4D0-4F7 $4F8-4FF
$500 02 $500-527 10 $528-54F 18 $550-577 $578-57F
$580 03 $580-5A7 11 $5A8-5CF 19 $5D0-5F7 $5F8-5FF
$600 04 $600-627 12 $628-64F 20 $650-677 $678-67F
$680 05 $680-6A7 13 $6A8-6CF 21 $6D0-6F7 $6F8-6FF
$700 06 $700-727 14 $728-74F 22 $750-777 $778-77F
$780 07 $780-7A7 15 $7A8-7CF 23 $7D0-7F7 $7F8-7FF
TEXT/LORES page 2 follows the same pattern - just add $400 to the addresses. In fact HIRES pages 1 and 2 also follow exactly the same pattern, but repeated 8 times each from $2000 and $4000.
In summary, screen holes are sections of video memory that are not displayed. Technically they exist in all video modes and in both Main and Auxilliary memory, but the term "screen holes" usually refers to those in Main TEXT page 1, which have special significance as discussed next.
2. What are screen holes used for?
Early Apple II's didn't always have 64k of RAM, and so low memory was special because it was always present. The 8 screen holes in TEXT page 1 must have seemed a natural fit for use by cards in the 8 expansion slots. The 1979 version of The Apple II Reference Manual has the following section reserving the screen hole locations for exclusive use by the system and expansion card firmware:
PERIPHERAL SLOT SCRATCHPAD RAM
Each of the eight peripheral slots has reserved for it 8 locations in
ihe Apple's RAM memory. These 64 locations are actually in memory
pages $04 through $07, inside the area reserved for the Text and
Low-Resolution Graphics video display. The contents of these
locations, however, are not displayed on the screen, and their
contents are not changed by normal screen operations The peripheral
cards can use these locations for temporary storage of data while the
cards are in operation. These "scratchpad" locations have the
following addresses:
Table 26: I/O Scratchpad RAM Addresses
Base Slot Number
Addr 1 2 3 4 5 6 7
$0478 $0479 $047A $047B $047C $047D $047E $047F
$04F8 $04F9 $04FA $04FB $04FC $04FD $04FE $04FF
$0578 $0579 $057A $057B $057C $057D $057E $057F
$05F8 $05F9 $05FA $05FB $05FC $05FD $0SFE $05FF
$0678 $0679 $067A $067B $067C $067D $067E $067F
$06F8 $06F9 $06FA $06FB $06FC $06FD $06FE $06FF
$0778 $0779 $077A $077B $077C $077D $077E $077F
$07F8 $07F9 $07FA $07FB $07FC $07FD $07FE $07FF
Slot 0 does not have any scratchpad RAM addresses reserved for it. The
Base Address locations are used by Apple DOS 3.2 and are also shared
by all peripheral cards.
Both the Apple //c and the Apple IIgs firmware for built-in devices uses the screen holes. In addition the Apple //c uses several areas in Auxilliary memory including the Aux TEXT page 1 screen hole at $0478-$047F as documented in Table B-4 of The Apple IIc Technical Reference Manual.