delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/09/23:13:48

Date: Fri, 09 Feb 96 22:48:45 EST
From: "William Parsons Newhall, Jr." <NEWHALL AT american DOT edu>
Organization: The American University
Subject: Problem with REP ; MOVSL block copy (BitBlit)
To: Djgpp mailing list <djgpp AT delorie DOT com>

      I am having problems with my SVGA block copy routine.  I have a
virtual frame buffer(with its own selector, VFBSelector) and a selector for
the frame buffer window that I have physically mapped.  If I use the _movedata
procedure everything works fine, but when I try to use the following assembly
language code I get general protection faults:

asm(
"push %%ds \n"
"push %%es \n"
"movl %1, %%es \n"
"movl %2, %%ds \n"
"movl %3, %%ed1 \n"
"movl %4, %%ecx \n"
"movl $0x0000, %%esi \n"
"cld \n"
"rep \n"
"movsl \n"
"pop %%es \n"
"pop %%ds \n"
: "r=" (temp)
: "g" (VFBSelector), "g" (FBSelector), "g" (SrcOffset), "g" (DwordstoCopy)
: "ecx","esi","edi"
);

Any tips are greatly appreciated...

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019