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
/
SGTOOL12.ARC
/
EXAMPLES.ARC
/
CHSET.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-09
|
747b
|
34 lines
/*
SG C Tools 1.2
(C) 1993 Steve Goldsmith
All Rights Reserved
Shows the false valuse returned by VDC register 28 when trying to determine
where the character set is at.
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 CHSET.C -LC128
*/
#include <hitech.h>
#include <vdc.h>
main()
{
uchar I;
savevdc();
printf("\nReading VDC register 28 bits 5-7 is suppose to return the location\n");
printf("of the character set, but returns false values instead:\n\n");
printf("Sent / Returned\n\n");
for(I=0; I <= 7; I++)
{
outvdc(28,(invdc(28) & 0x10) | (I << 5));
printf("%02x %02x\n",I << 5,invdc(28) & 0xE0);
}
restorevdc();
}