開発環境
cgread.c
#include <stdio.h>
void cgread(char* buf, int code)
{
char far* lp;
int i;
_asm {
push bx
mov bx, 0a800h
mov cx, 0000h
mov dx, code
mov ah, 14h
int 18h
pop bx
}
lp = (char far*)0xa8000002;
for (i = 0; i < 8; i++) {
buf[i] = *(lp++);
}
}
int main()
{
FILE* pfile;
char buf[16] = {0};
char buf2[16] = {0};
int i;
pfile = fopen("font98.chr", "wb");
if (! pfile) {
return 1;
}
for (i = 0; i < 256; i++) {
cgread(buf, i);
fwrite(buf, 1, 16, pfile);
}
for (i = 0; i < 256; i++) {
fwrite(buf2, 1, 16, pfile);
}
fclose(pfile);
}
最終更新:2020年12月09日 09:35