X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16.c;h=20c468e2372a2750bd37b33a977ce93b26eecd9c;hb=9b04963a6305b545154a2e962e89e7a80de28752;hp=2d018dc12f190f5abff840fd1cb0e020ac850e2f;hpb=8239a15b6eaad9b098720623339f168a54f51ca5;p=16.git diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 2d018dc1..20c468e2 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -903,24 +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 - } -//TODO: OPTIMIZE THIS!!!! + + // 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) */ @@ -1032,7 +1019,7 @@ void modexcls(page_t *page, byte color, byte *Where) _fmemset(Where, color, page->width*(page->height)/4); } -/*void +void modexWaitBorder() { while(inp(INPUT_STATUS_1) & 8) { // spin @@ -1041,7 +1028,7 @@ modexWaitBorder() { while(!(inp(INPUT_STATUS_1) & 8)) { // spin } -}*/ +} void bios_cls() { VGA_ALPHA_PTR ap;