Fadshop.net
A website for better software and better life in Internet!
   MY WEB

   Chinese URLs

   Greeting Creator

   Input Tips Everyday

   Source Code
Java Applet Games
Visit webpage in VC
M3U Music List Editor
Input Tips everyday
Combox in HTML
Self-made Screen Saver
Model of Neural Network
Display Chinese Characters
Mouse in Maze, a classic game in math
Serial Port Communication

Source Code: Display Chinese Characters in English Operation System.
 

Visit Display Buffer to display


Last Page

The display speed of this one is 4 times better than the last one!
It access display memory directly to show the pixels. That's why it's faster. But it's very easy to make DOS crashed. Try it, if you like.
#include < io.h>
#include < fcntl.h>
#include < stdio.h>
#include < dos.h>
#define CCLIB "c:\hzk16"

display(unsignedchar *hzmp, int x, int y, int color, int bkcolor)
 { charfar *p; 
 int i, j, k;
 p= (char far *)(0xa0000000+80*y+x/8); 
 for (i= 0; i < 16; i++) 
	for(j = 0; j < 2; j++)
	 { outport(0x3ce, 0x0205);	// kernel here
		k=*(p+80*i+j);
		outportb(0x3ce, 0x08); 
		outportb(0x3cf, hzmp[2*i+j]); 
		*(p+80*i+j)=color; 
		k=*(p+80*i+j);
		outportb(0x3ce, 0x08); 
		outportb(0x3cf, ~hzmp[2*i+j]); 
		*(p+80*i+j)=bkcolor;
		} 
outport(0x3ce, 0x005);	//reset
outport(0x3ce, 0xff08); 
} 

main()
{
 union REGS r;
 int handle, mode;
 int i;
 int qh, wh, col, row;
 long offset;
 unsigned char *hz, hzm[32];
 handle=open(CCLIB, O_RDONLY|O_BINARY);
 r.h.ah=0x0f;int86(0x10, &r, &r);
 mode=r.h.al;
 r.x.ax= 0x0012; 
 int86(0x10, &r, &r);
 for(i=0; i < 20; i++){
	 col=0;row=20*i; 
	 hz=""; 
	 
	while(*hz){ /*find theqh, wh*/
		 qh = *hz-0xa0;
		 wh = *(hz+1)-0xa0;
		 offset = (94l*(qh-1)+(wh-1))*32l;
		 lseek(handle, offset, SEEK_SET); 
		 read(handle, hzm, 32);/*display*/
		 display(hzm, col, row, 4, 3);
		 col += 16;
		 hz += 2; 
	 } 
 } 
 r.h.ah=0x00;
 r.h.al= mode;
 int86(0x10, &r, &r);
 } 
 
Here I made a software for Small CCML. It's faster than the first one too, because I made a small library, where data of 50 Chinese characters is saved. It's faster to visit a small file than the standard 300K bytes CCML.
Classic Method to display Chinese Characters Visit Display Buffer to display Chinese Characters (faster) Setup a little Chinese Characters Matrix Library

   Contact Info
  User Support Sales Question Webmaster

Copyright 1998-2002 Fadshop.net, Inc. All rights reserved.