#include "lib/types.h"\r
#include "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
+
+ printf("Font type: ");\r
+ gets(&ct);
\r
- printf("Character: ");\r
- scanf("%c", &c);\r
+ printf("Character: ");\r
+ gets(&c);\r
\r
- if(*argv[1]!=1)\r
- switch(*argv[1])\r
+ if(ct!=1)\r
+ switch(ct)\r
{\r
- case 48:\r
+ case 48:
+ printf("type 0\n");\r
t=0;\r
w=14;\r
break;\r
- case 49:\r
+ case 49:
+ printf("type 1\n");\r
t=1;\r
w=8;\r
break;\r
- case 50:\r
+ case 50:
+ printf("type 2\n");\r
t=2;\r
w=8;\r
break;\r
- case 51:\r
+ case 51:
+ printf("type 3\n");\r
t=3;\r
w=16;\r
break;\r
- default:\r
+ default:
+ 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
}\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