Xref: news2.mv.net comp.os.msdos.djgpp:7338 From: John Luebs Newsgroups: comp.os.msdos.djgpp Subject: Screen Fill routine, mode 13h Date: Thu, 15 Aug 1996 14:42:51 -0400 Organization: EpiCenter Software Lines: 20 Message-ID: <32136FAB.39@sprynet.com> Reply-To: jkluebs AT sprynet DOT com NNTP-Posting-Host: ad08-015.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 Here is a fast way to write a screen in mode 13h The amount of screen to fill can be adjusted by altering ECX long* data; data = (long*)image->buffer; __asm__ __volatile__ ("pushw %%es\n //save ES for proper restoring movl $0xa0000h, %%edi\n //set the dos protected offset movw %0, %%es\n //move the selector movl %1, %%esi\n //set the source offset, DS is already set movl $16000, %%ecx\n //loop 16000 times for 16000 long transfers cld\n //set direction to forward rep\n //repeat movsl\n //transfers from DS:ESI to ES:EDI 16000 times popw %%es\n" //restore ES : : "g" (_dos_ds), "g" (data) : "cx", "di", "si" //clobbered registers );