
Page 62
Epson Research and Development
Vancouver Design Center
SED1352
Programming Notes and Examples
X16-BG-007-04
Issue Date: 98/10/08
for (x = 0; x < 300; ++x)
{
FP_OFF(pVideo) = (unsigned int) ((rand() * 0xffffL) / RAND_MAX);
val = rand() % 50;
ShowText(pVideo, "!", rand() % 16);
}
ShowBorders();
//
// Move virtual display from (0, 0) to (MaxX, 0)
//
MaxX = VIRTUAL_X - PanelX;
MaxY = VIRTUAL_Y - PanelY;
for (x = 0; x <= MaxX; ++x)
{
SetStartAddress(x, 0);
Delay(0, 1);
}
for (y = 0; y <= MaxY; ++y)
{
SetStartAddress(MaxX, y);
Delay(0, 1);
}
for (x = MaxX; x > 0; --x)
{
SetStartAddress(x, MaxY);
Delay(0, 1);
}
for (y = MaxY; y > 0; --y)
{
SetStartAddress(0, y);
Delay(0, 1);
}
SetStartAddress(0, 0);
}
//-------------------------------------------------------------------------
//
// FUNCTION: PowerSaving()
//
// DESCRIPTION: Starts power saving mode 2.
//
// INPUTS: None.
// RETURN VALUE: None.
//