256色漢字顯示程序,第1張

256色漢字顯示程序,第2張


# include" dos . h"
# include" stdio . h"
# include" conio . h"
void open lib(void);
void CC256(int,int,int,char * Str);
void ErrMsg();
void init SCR();
void rst SCR();
void PutPoint(int x,int y,int Color);
void Quit();
int main(void)
{
char * str ="感謝您使用本書";
open lib();
init SCR();
CC256(70,80,2,Str);
getch();
Quit();
返廻0;
}
void InitScr()
{
union REGS In;
in . x . ax = 0x 13;
int86(0x10,&In,& In);
}
void rst SCR()
{
union REGS In;
in . x . ax = 0x 03;
int86(0x10,&In,& In);
}
void Open lib(void)
{
if((FP = fopen(" C:\ \ UCDOS \ \ CLI b24 s"," Rb")。
}
void CC256(int x,int y,int Wid,char * Str)
{
unsigned Zcode,Bcode
int i,j,k,Rec,Color
長Len
char Buf[72];
while (*Str)
{
if((* Str & 0x 80)&(*(Str 1)& 0x 80))
{[
bcode =(*(Str 1)-0xa 1)& 0x07f;
Rec = Zcode * 94 Bcode;
Len = Rec * 72L;
fseek(fp,Len,SEEK_SET)在字躰中;
fread (Buf,1,72,FP);
for(I = 0;i < 24i )
for(j = 0;j < 3;j )
for(k = 0;k < 8;k )
if(Buf[I * 3 j]> >(7-k)& 1)
{
Color = y j * 8 k-46;
PutPoint(x i,y j*8 k,Color);
}
x = x 24 Wid;
Str = 2;
}
}
return;
}

void put point (int x,int y,int color)
{
char far * p;
p =(char far *)(0x0a 0000000 l);
*(x y * 320 p)= Color;
}
void Quit()
{
rst SCR();
fcloseall();
}
void ErrMsg()
{
printf("打開庫文件錯誤!");
getch();
Quit();
}

位律師廻複

生活常識_百科知識_各類知識大全»256色漢字顯示程序

0條評論

    發表評論

    提供最優質的資源集郃

    立即查看了解詳情