# Include <stdio. h>
# Include <malloc. h>
# Include <conio. h>
# Include <math. h>
# Define OK 1
# Define ERROR 0
# Define OVERFLOW-1
Typedef int Status;
Typedef int ElemType;
Typedef int bool;
/* WIN-TC BGI graphical programming template */
# Include "Conio. h"
# Include "graphics. h"
# Include "dos. h"
# Define closegr closegraph
Void initgr (void)/* BGI initialization */
{
Int gd = DETECT, gm = 0;/* and gd = VGA, gm = VGAHI are the same effect */
Registerbgidriver (EGAVGA_driver);/* you do not need to run the. BGI file after registering the BGI driver */
Initgraph (& gd, & gm ,"");
}
Void drawmat (char * mat, int matsize, int x, int y, int color)
/* Sequence: modulo pointer, dot matrix size, starting coordinate (x, y), color */
{Int I, j, k, n;
N = (matsize-1)/8 + 1;
For (j = 0; j <matsize; j ++)
For (I = 0; I <n; I ++)
For (k = 0; k <8; k ++)
If (mat [j * n + I] & (0x80> k)/* the bit where the test is 1 is displayed */
Putpixel (x + I * 8 + k, y + j, color );
}
Char zhan64H [] = {
/* The following figure shows the 64-dot-matrix Chinese Character Library of the 'stack', Which is 512 bytes */
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0 x, 0 x, 0 x, 0 x, 0 x, 0 x, 0x00,
0x00,0x00,0x30,0x00, 0x1C, 0x00,0x00,0x00,
0 x, 0 x, 0 x, 0x00, 0x1C, 0 x, 0x80, 0x00,
0x00,0x00,0x78,0x00, 0x1C, 0x03, 0xC0, 0x00,
0x00,0x00, 0x7C, 0x00, 0x1C, 0x03, 0xC0, 0x00,
0x00,0x01, 0xFF, 0x80, 0x3F, 0xFF, 0xF0, 0x00,
0x00, 0x0F, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0x00,
0x01, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0x00,
0x01, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0xFE, 0x00,
0x03, 0xFF, 0xFF, 0xE7, 0xFF, 0xFF, 0xFC, 0x00,
0x03, 0xFF, 0xFF, 0xC7, 0xFF, 0x00,0x00,0x00,
0x03, 0xFF, 0xFF, 0x80, 0x0F, 0x00,0x00,0x00,
0x03, 0xFF, 0xFC, 0x00, 0x0F, 0x00,0x00,0x00,
0x03, 0xFE, 0x78,0x00, 0x0F, 0x9F, 0xF8, 0x00,
0x01, 0xE0, 0x70, 0x00, 0x3F, 0xFF, 0xFE, 0x00,
0 x, 0 x, 0 x, 0x07, 0xFF, 0xFF, 0xFE, 0x00,
0x00,0x00, 0xFC, 0x0F, 0xFF, 0xFF, 0xFC, 0x00,
0x00,0x01, 0xFE, 0x0F, 0xFF, 0xFF, 0xF8,