/* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
*\r
* This file is part of Project 16.\r
*\r
*/\r
#include <stdio.h>\r
#include <conio.h>\r
-#include "lib/types.h"\r
-#include "lib/16text.h"\r
+#include "src/lib/16_t.h"\r
+#include "src/lib/16text.h"\r
\r
-void main(int argc, char *argv[])\r
+void main(int argc, char near *argv[])\r
{\r
int i;\r
int j;\r
char l[16];\r
- char c;\r
+ char c,ct;\r
word s, o, t, w;\r
word addr = (word) l;\r
textInit();\r
printf("%d: %x:%x\n", i, romFonts[i].seg, romFonts[i].off);\r
}\r
\r
- printf("*argv[1]=%d\n", *argv[1]);\r
+// printf("*argv[1]=%d\n", *argv[1]);\r
\r
- printf("Character: ");\r
- scanf("%c", &c);\r
+ printf("Font type: ");\r
+ gets(&ct);\r
\r
- if(*argv[1]!=1)\r
- switch(*argv[1])\r
+ printf("Character: ");\r
+ gets(&c);\r
+\r
+ if(ct!=1)\r
+ switch(ct)\r
{\r
case 48:\r
+ printf("type 0\n");\r
t=0;\r
w=14;\r
break;\r
case 49:\r
+ printf("type 1\n");\r
t=1;\r
w=8;\r
break;\r
case 50:\r
+ printf("type 2\n");\r
t=2;\r
w=8;\r
break;\r
case 51:\r
+ printf("type 3\n");\r
t=3;\r
w=16;\r
break;\r
default:\r
+ printf("type 3\n");\r
t=3;\r
w=16;\r
break;\r
}\r
else\r
{\r
+ printf("type 3\n");\r
t=3;\r
- w=16; \r
+ w=16;\r
}\r
\r
\r
MOV DI, addr\r
MOV SI, o\r
MOV ES, s\r
- SUB BH, BH\r
- MOV BL, c ; the letter\r
- SHL BX, 1\r
- SHL BX, 1\r
- SHL BX, 1\r
- SHL BX, 1\r
- ADD SI, BX ;the address of A\r
- MOV CX, 16\r
+ SUB AH, AH\r
+ MOV AL, c ; the letter\r
+ MOV CX, w\r
+ MUL CX\r
+ ADD SI, AX ;the address of charcter\r
L1: MOV AX, ES:SI\r
MOV DS:DI, AX\r
INC SI\r