X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Ffonttest.c;h=3cb23a094c92dd84293ec5c117dd0ecb24d294d9;hb=a565be31ce92d6168ae6983042da75b0b683e52b;hp=d521db306c6a23a8c7cbb8db18aa21b1f869630e;hpb=1f9cd2c0b1d15439d01f8ea972004bb70516f0f0;p=16.git diff --git a/src/fonttest.c b/src/fonttest.c old mode 100644 new mode 100755 index d521db30..3cb23a09 --- 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-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -21,15 +21,15 @@ */ #include #include -#include "lib/types.h" -#include "lib/16text.h" +#include "src/lib/16_t.h" +#include "src/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 + 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