原始程式

UShowSL
原始檔-起始

void  UShowSL(int X,int Y,int len,char *s,int attr)  /*顯示一字串*/
{
   char *p = s;
    X--;  Y--;
    asm mov ah,2;
    asm mov bh,0;
    asm mov dh,byte ptr Y;
    asm mov dl,byte ptr X;
    asm int 10h;

    asm mov cx,1;
    for(X=0; *p && X<len; X++)
    {   _AL=*p++;
        _BX=attr;
        asm mov ah,9;
        asm int 10h;
        asm mov ah,2;
        asm add dl,1;
        asm int 10h;
    }
    X=len-X;
    if(X > 0)
    {   asm mov ax,0x0920;
        asm mov bx,attr;
        asm mov cx,X;
        asm int 10h;
    }
}
原始檔-結束

 

 


UShowTable
#include "w_obj.h"

/*================================================================*/
void  UShowTable(int X1, int Y1, int X2, int Y2, char *p,int attr)
{   int  Y, width;

    width = X2-X1+1;
    for (Y=Y1; Y<=Y2; Y++, p+=width)
        UShowSL(X1,Y,width,p,attr);
}

Byron Wey  Oct.21.1998


回首頁C之城