X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Ffonttest.c;h=58dbce85f6262aeec1ec9f74cf0737fde3f573a5;hb=403a2afcb791925d56ed1d3cab8e02287e22464a;hp=d521db306c6a23a8c7cbb8db18aa21b1f869630e;hpb=1f9cd2c0b1d15439d01f8ea972004bb70516f0f0;p=16.git diff --git a/src/fonttest.c b/src/fonttest.c index d521db30..58dbce85 100644 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -24,12 +24,12 @@ #include "lib/types.h" #include "lib/16text.h" -void main(int argc, char *argv[]) +void main(int argc, char near *argv[]) { int i; int j; char l[16]; - char c; + char c,ct; word s, o, t, w; word addr = (word) l; textInit(); @@ -40,37 +40,46 @@ void main(int argc, char *argv[]) printf("%d: %x:%x\n", i, romFonts[i].seg, romFonts[i].off); } - printf("*argv[1]=%d\n", *argv[1]); +// printf("*argv[1]=%d\n", *argv[1]); + + printf("Font type: "); + gets(&ct); - printf("Character: "); - scanf("%c", &c); + printf("Character: "); + gets(&c); - if(*argv[1]!=1) - switch(*argv[1]) + if(ct!=1) + switch(ct) { - case 48: + case 48: + printf("type 0\n"); t=0; w=14; break; - case 49: + case 49: + printf("type 1\n"); t=1; w=8; break; - case 50: + case 50: + printf("type 2\n"); t=2; w=8; break; - case 51: + case 51: + printf("type 3\n"); t=3; w=16; break; - default: + default: + printf("type 3\n"); t=3; w=16; break; } else - { + { + printf("type 3\n"); t=3; w=16; } @@ -84,14 +93,11 @@ void main(int argc, char *argv[]) MOV DI, addr MOV SI, o MOV ES, s - SUB BH, BH - MOV BL, c ; the letter - SHL BX, 1 - SHL BX, 1 - SHL BX, 1 - SHL BX, 1 - ADD SI, BX ;the address of A + SUB AH, AH + MOV AL, c ; the letter MOV CX, w + MUL CX + ADD SI, AX ;the address of charcter L1: MOV AX, ES:SI MOV DS:DI, AX INC SI