Xref: news2.mv.net comp.os.msdos.djgpp:2328 From: jpdelprat AT teaser DOT fr (Jeepy) Newsgroups: comp.os.msdos.djgpp Subject: Please help me !!! Date: Mon, 01 Apr 1996 20:41:40 GMT Organization: Guest of France-Teaser Lines: 72 Message-ID: <4jpiap$s34@teaser.fr> NNTP-Posting-Host: clt-e26233c2.teaser.fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Here are a function which is supposed to fill a part of text screen. Only the first line of my zone seems to be filled. Could you help me, please !!! void ClearPartOfScreen(int x1,int y1,int x2,int y2,char attribute,char character) { long height,width,start_offset; if ((x1>SCREEN_WIDTH) || (y1>SCREEN_HEIGHT) || (x2<1) || (y2<1)) return; if (x2>SCREEN_WIDTH) x2=80; if (x2<1) x2=1; if (y2>SCREEN_HEIGHT) y2=SCREEN_HEIGHT; if (y2<1) y2=1; width=x2-x1+1; height=y2-y1+1; start_offset=(((y1-1)*80)+(x1-1))<<1; // HideMouse(); asm (" pushw %%es movw %0,%%es movl $0xB8000,%%edi addl %1,%%edi movb %3,%%ah movb %2,%%al movl $80,%%ebx subl %4,%%ebx shll $1,%%ebx movl %5,%%edx movl $20,%%edx 0: movl %4,%%ecx rep;stosw addl %%ebx,%%edi decl %%edx jnz 0 popw %%es " : :"g" (_dos_ds), // 0 "g" (start_offset), // 1 "g" (attribute), // 2 "g" (character), // 3 "g" (width), // 4 "g" (height) // 5 :"%ax","%ebx","%ecx","%edx","%edi"); // ShowMouse(); }