X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=20c468e2372a2750bd37b33a977ce93b26eecd9c;hb=9b04963a6305b545154a2e962e89e7a80de28752;hp=79a03cf3d9f50704d36a19a6190701c292d760db;hpb=e0ba8e7cee9670b6e90a18a529d2304c30950c1b;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 79a03cf3..20c468e2 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -903,23 +903,11 @@ void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, cons y += 8; continue; } - //load the letter 'A' - __asm { - MOV DI, addr - MOV SI, o - MOV ES, s - 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 - INC DI - DEC CX - JNZ L1 - } + + // load the character into romFontsData.l + // no need for inline assembly! + // NTS: It might even be faster to just let the modexDrawChar point directly at ROM font than to copy per char! --J.C. + _fmemcpy(romFontsData.l,MK_FP(s,o)/*ROM font location*/,w/*char size*/); modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr); x_draw += 8; /* track X for edge of screen */ addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */