From: ANTHONY APPLEYARD To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Mon, 24 Oct 1994 14:53:15 GMT Subject: Redefining text chars in djgpp To redefine PC text characters, there is this interrupt:- ax = 0x1110; bx = 256*R; cx=N; dx=C; bp=address of a char[]; interrupt 10; = reset the N screen chars at C etseq to be as in the char[] that bp points to, R (here 16) bytes per character, each byte is a row of pixels; but the latest version of GO32 (version 1.12) 's event handler has an error here. Thus I wrote this subroutine `mychar' to do it another way, by making up and calling a little .COM file that runs on ordinary mode:- #include #include #include /* define my own replacement for standard screen char c */ void mychar(unsigned char c,char*bytes){int i; char com[]={0xe9,0x10,0x00,0x00,0x70,0xd8,0xc0,0xf0,0xd8,0xd8,0x70,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x10,0x11,0xbb,0x00,0x10,0xb9,0x01,0x00, 0xba,0xa7,0x00,0xbd,0x03,0x01,0xcd,0x10,0xb8,0x00,0x4c,0xcd,0x21}; com[29]=c; for(i=0;i<16;i++) com[3+i]=bytes[i]; int comfile=open("__mychar.com",0x8102); write(comfile,com,41); close(comfile); system("__mychar.com");} /*-----*//* the new characters as bits, 16 rows of 8 bits, from top */ char mysup3[]={0,0x70,0xD8,0x18,0x30,0x18,0xD8,0x70,0,0,0,0,0,0,0,0}; char mysup4[]={0,0x18,0x38,0x58,0xfc,0x18,0x18,0x18,0,0,0,0,0,0,0,0}; char mysup6[]={0,0x70,0xD8,0xC0,0xF0,0xD8,0xD8,0x70,0,0,0,0,0,0,0,0}; /*-----*/ main(){ mychar(166,mysup3); /* sup 3 instead of sup ul `a' */ mychar(252,mysup4); /* sup 4 instead of sup `n' */ mychar(167,mysup6); /* sup 6 instead of sup ul `o' */ printf("wp\375+x\246+y\374+z\247=N\n");}