www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/07/01:03:52

From: "Matthew Conte" <spam AT somebody DOT else>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: AT&T assembler
Date: Sun, 7 Jun 1998 00:56:54 -0400
Organization: ICGNetcom
Lines: 21
Message-ID: <6ld6hl$bk0@dfw-ixnews4.ix.netcom.com>
References: <bWLoegW7sFse-pn2-iuli5Rxd4EUT AT portF03 DOT Generation DOT NET>
NNTP-Posting-Host: frm-ma2-15.ix.netcom.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> Could someone please convert the following into proper DJGPP asm
>code?

Can't help you with the ASM, but here's a C function that does the same:

#include <pc.h>

static void WaitVBlank(void)
{
   while (inp(0x3DA)&0x08);
   while (!(inp(0x3DA)&0x08));
}

the inp()'s are inline assembler macros, and optimize down to one opcode
apiece, so this function is pretty efficient.  You might want to compile
with the -S option, and check the assembler output to see the differences.

Later,
Matt.


- Raw text -


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