Xref: news2.mv.net comp.os.msdos.djgpp:7588 From: John Luebs Newsgroups: comp.os.msdos.djgpp Subject: Screen Read problems (mode 13h) Date: Sun, 18 Aug 1996 02:13:17 -0400 Organization: EpiCenter Software Lines: 46 Message-ID: <3216B47D.EDA@sprynet.com> Reply-To: jkluebs AT sprynet DOT com NNTP-Posting-Host: dd09-083.compuserve.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I use this function to put a row of pixels into the video buffer offset is an int that contains the starting pixel value work_back is a long* to the data to be put to the screen, and sprite_width is the number of pixels in the transfer. This function works fine! __asm__ __volatile__ ("pushw %%es\n movl $0xa0000h, %%edi\n addl %0, %%edi\n movw %1, %%es\n movl %2, %%esi\n movl %3, %%ecx\n cld\n rep\n movsb\n popw %%es\n" : : "g" (offset), "g" (_dos_ds), "g" (work_back), "g" (sprite_width) : "cx", "di", "si" ); I use this to do the opposite, however I get GPFs. Any Suggestions?? __asm__ __volatile__ ("pushw %%ds\n pushw %%es\n movw %%ds, %%ax\n movl $0xa0000h, %%esi\n addl %0, %%esi\n movw %1, %%ds\n movl %2, %%edi\n movw %%ax, %%es\n movl %3, %%ecx\n cld\n rep\n movsb\n popw %%es\n popw %%ds\n" : : "g" (offset), "g" (_dos_ds), "g" (work_back), "g" (sprite_width) : "ax", "cx", "di", "si" ); Any help appreciated! John Luebs