
Page 36
Epson Research and Development
Vancouver Design Center
SED1352
Programming Notes and Examples
X16-BG-007-04
Issue Date: 98/10/08
5.
Calculate the total number of bytes required for image 1.
6.
Determine the display memory location for image 2.
Place image 2 immediately after image 1 (see Figure 11). Assign the starting address for image 2 as follows:
7.
Program the Screen 2 Display Start Address Register to point to the beginning of image 2.
Image 2 is placed right after image 1, as shown below:
AUX[08h] = 00h
AUX[09h] = 4Bh
8.
Program the Screen 1 Display Line Count Register.
The Display Line Count Register indicates how many lines of the first screen should be shown minus 1. By changing
the line count, image 2 appears to move up or down the display.
•
If the line count is set to the maximum number of visible scan lines - 1, only image 1 is shown.
AUX[0Ah] = LSB of (visible scan lines - 1) = 0EFh
AUX[0Bh] = MSB of (visible scan lines - 1) = 00h
•
If the line count is set to 0, then the first scan line of image 1 is shown followed by the first part of image 2.
AUX[0Ah] = 00h
AUX[0Bh] = 00h
It is not possible to show only image 2 by changing the line count. If only image 2 needs to be shown, reprogram
the Screen 1 Display Start Address Registers to point to the beginning of image 2, and set the line count to the
maximum number of visible scan lines - 1.
bytes per scan line
(
)
number of scan lines for image 1
(
)
×
160
240
×
38400 bytes
9600h bytes
=
=
=
image 2 address
base display memory address
(
)
size of image 1
(
)
+
=
C000:0000h
0000:9600h
+
=
C000:9600h
=
Screen 2 Display Start Address
Screen 1 Display Start Address
size of image 1 in bytes
2 bytes per word
--------------------------------------------------------
+
=
0000h
9600h
2
---------------
+
4B00h
=
=
visible scan lines
1
–
240
1
–
239
00EFh
=
=
=