Void myprintf (char *,...); int length; void main () {myprintf ("abcdefg % h % dabcde % c",-123, 'M ');} void myprintf (char * chars ,...) {int I = 0; int anum = 0, anumcopy = 0, yu = 0, yulen = 0; int yuss [9]; int * yus = yuss; int length; int position = 0; int ssposi = 0; char a; length = 0; a = chars [0]; while (! = '\ 0') {// get the length of the format control string; length ++; a = chars [length];} while (I <length) {if (* (char *) (0x0c3c0194 + I) = '%') {// recognition of %; if (* (char *) (0x0c3c0194 + I + 1) = 'C') {// identify % c; * (char far *) (0xb8000000 + 160*10 + position) = * (int *) (_ BP + 6 + ssposi); I + = 2; ssposi + = 2;} else if (* (char *) (0x0c3c0194 + I + 1) = 'D') {// identify % d; anum = * (int *) (_ BP + 6 + ssposi); anumcopy = anum; if (anumcopy & 32768) = 32768) {anum = (~ Anum); anum + = 1; while (anum! = 0) {yu = anum % 10; * (yus + yulen) = yu; anum/= 10; yulen ++;} yulen = yulen-1; * (char far *) (0xb8000000 + 160*10 + position) = 0x2d; position + = 2; while (yulen> = 0) {* (char far *) (0xb8000000 + 160*10 + position) = * (yus + yulen) + 0x30; yulen --; position + = 2;} position = position-2; ssposi + = 2;} else {while (anum! = 0) {yu = anum % 10; * (yus + yulen) = yu; anum/= 10; yulen ++ ;}yulen = yulen-1; while (yulen> = 0) {* (char far *) (0xb8000000 + 160*10 + position) = * (yus + yulen) + 0x30; yulen --; position + = 2 ;} position = position-2; ssposi + = 2;} I + = 2;} else {* (char far *) (0xb8000000 + 160*10 + position) = * (char *) (0x0c3c0194 + I); * (char far *) (0xb8000000 + 160*10 + position + 2) = * (char *) (0x0c3c0194 + I + 1); I ++ ;}} else {* (char far *) (0xb8000000 + 160*10 + position) = * (char *) (0x0c3c0194 + I); I ++;} position + = 2 ;}}