home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
SGTOOL10.ARC
/
FILLMEM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-19
|
1KB
|
53 lines
/*
SG C Tools 1.0
(C) 1993 Steve Goldsmith
All Rights Reserved
VDC memory fill example. Shows how fast fillmemvdc() is by filling display
memory with letters A - Z. Press [RETURN] to fill next screen.
Compiled with HI-TECH C 3.09 (CP/M-80).
To compile with HI-TECH C and SG C Tools source on same disk use:
C FILLMEM.C VDC.OBJ
*/
#include <hitech.h>
#include <conio.h>
#include <vdc.h>
#define appClrScrCh 32
void fillscreen(void);
extern ushort vdcScrSize;
extern ushort vdcDispMem;
main()
{
savevdc(); /* save vdc regs and set global vars */
clrscrvdc(appClrScrCh); /* clear screen */
clrattrvdc(vdcAltChrSet); /* clear attributes */
setcursorvdc(0,0,vdcCurNone); /* turn cursor off */
outvdc(vdcFgBgColor,vdcDarkBlue); /* set new screen color */
printstrvdc(0,0,vdcAltChrSet,
"VDC memory fill example. Keep pressing [RETURN] until complete.");
while (getch() != 0x0D); /* wait for return press */
fillscreen(); /* fill screen */
restorevdc(); /* restore registers saved by savevdc() */
clrscrvdc(appClrScrCh);
clrattrvdc(vdcAltChrSet+vdcWhite);
}
void fillscreen(void)
{
uchar I;
for (I = 65; I < 91; I++)
{
fillmemvdc(vdcDispMem,vdcScrSize,I);
while (getch() != 0x0D);
}
}