X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Ffonttest.c;h=a7757e47d9cc1343d17e117a707a211392406e93;hb=f3c21c71444277afd8389f577439ab655620ce51;hp=8c5bfcd33461f217b386c76c33a5652202623004;hpb=562a5008d417d162e2f133b2eea7e5bb37a3070c;p=16.git diff --git a/src/fonttest.c b/src/fonttest.c old mode 100644 new mode 100755 index 8c5bfcd3..a7757e47 --- a/src/fonttest.c +++ b/src/fonttest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -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,39 +40,48 @@ 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("Character: "); - scanf("%c", &c); + printf("Font type: "); + gets(&ct); - if(*argv[1]!=1) - switch(*argv[1]) + printf("Character: "); + gets(&c); + + if(ct!=1) + switch(ct) { case 48: + printf("type 0\n"); t=0; w=14; break; case 49: + printf("type 1\n"); t=1; w=8; break; case 50: + printf("type 2\n"); t=2; w=8; break; case 51: + printf("type 3\n"); t=3; w=16; break; default: + printf("type 3\n"); t=3; w=16; break; } else { + printf("type 3\n"); t=3; - w=16; + 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 - MOV CX, 16 + 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