1 Figure 1: Memory organization in mode 13h (ASCII version)
\r
3 (C) 1993 Ztiff Zox Softwear
\r
5 a. Imagine that the top of the screen looks like this (pixel values are
\r
6 represented by color digits 0-9 for simplicity - actual colors may
\r
7 range from 0 to 255) - a screen width of 320 pixels is assumed:
\r
9 address: 0 10 310 319
\r
10 ----------------------------------------
\r
11 |0123456789012345 ..... 0123456789|
\r
16 b. In VGA memory, the screen is represented as follows (question marks
\r
17 represent unused bytes):
\r
21 address: 0 10 310 319
\r
22 ----------------------------------------
\r
23 |0???4???8???2??? ..... ??2???6???|
\r
29 address: 0 10 310 319
\r
30 ----------------------------------------
\r
31 |?1???5???9???3?? ..... ???3???7??|
\r
37 address: 0 10 310 319
\r
38 ----------------------------------------
\r
39 |??2???6???0???4? ..... 0???4???8?|
\r
45 address: 0 10 310 319
\r
46 ----------------------------------------
\r
47 |???3???7???1???5 ..... ?1???5???9|
\r
51 I.e. a plane is selected automatically by the two least significant
\r
52 bits of the address of the byte being read from or written two.
\r
53 This renders 3/4 of the video memory unavailable and useless, but
\r
54 all visible pixels are easily accessed, as each address in the video
\r
55 segment provides access to one and ONLY ONE pixel.
\r