X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2FFTEST.C;h=3ec8940a1162a4be87ca3f1a78f2096e2978bff3;hb=bea59c8e6edf42e095621baa5cad30bf3fbe8d36;hp=5f7efa80b24c62e0069d1d8bbf0e5e495cc9a0f8;hpb=077782026074116470d9637507d988ffcc29ef58;p=16.git diff --git a/src/FTEST.C b/src/FTEST.C index 5f7efa80..3ec8940a 100644 --- a/src/FTEST.C +++ b/src/FTEST.C @@ -1,13 +1,36 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ #include +#include #include "lib/types.h" #include "lib/text.h" -main() { +void main(int argc, char *argv[]) +{ int i; int j; - char l[16]; + char l[16]; char c; - word s, o; + word s, o, t, w; word addr = (word) l; textInit(); @@ -20,8 +43,38 @@ main() { printf("Character: "); scanf("%c", &c); - s=romFonts[ROM_FONT_8x16].seg; - o=romFonts[ROM_FONT_8x16].off; + if(*argv[1]!=NULL) + switch(*argv[1]) + { + case 0: + t=0; + w=14; + break; + case 1: + t=1; + w=8; + break; + case 2: + t=2; + w=8; + break; + case 3: + t=3; + w=16; + break; + default: + t=3; + w=16; + } + else + { + t=3; + w=16; + } + + + s=romFonts[t].seg; + o=romFonts[t].off; //load the letter 'A' __asm { @@ -35,7 +88,7 @@ main() { SHL BX, 1 SHL BX, 1 ADD SI, BX ;the address of A - MOV CX, 16 + MOV CX, w L1: MOV AX, ES:SI MOV DS:DI, AX INC SI @@ -45,7 +98,7 @@ main() { } //render the letter in ascii art - for(i=0; i<16; i++) { + for(i=0; i