Mail Archives: djgpp/1996/11/10/23:09:00
From: | "John F. Bell" <jfbell2 AT juno DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | AT&T Assembly
|
Date: | Sun, 10 Nov 1996 20:13:09 -0700
|
Organization: | XMission Internet (801 539 0900)
|
Lines: | 36
|
Message-ID: | <328699C5.2E68@juno.com>
|
NNTP-Posting-Host: | slc60.modem.xmission.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Everyone must be sick of these assembly questions, but I can't figure
this one out...
This copies the double buffer to the screen (or at least its supposed
to)
__asm__ __volatile__ ("
movw $16000, %%cx\n
cld\n
rep\n
movsl"
:
:"D" (0xA0000+__djgpp_conventional_base), "S" (double_buffer)
:"ax", "cx", "si", "di", "memory"
);
This fills the double buffer with one color (it should anyway)
__asm__ __volatile__("
movb %%al, %%ah\n
movw %%ax, %%dx\n
shl $16, %%ax\n
movw %%dx, %%ax\n
movw $16000, %%cx\n
rep\n
stosl"
:
:"a" (color), "D" (double_buffer)
:"ax", "cx", "dx", "di", "memory"
);
I could use dosmemput() and memset(), but I would like more speed.
If you aren't too sick of these questions please reply.
John F. Bell
jfbell2 AT juno DOT com
- Raw text -