delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/05/09:04:02

Xref: news2.mv.net comp.os.msdos.djgpp:5685
From: massimin AT clipper DOT ens DOT fr (Pascal Massimino)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Setpixel in AT&T inline asm....
Date: 5 Jul 1996 12:08:43 GMT
Organization: Ecole Normale Superieure, Paris, France
Lines: 28
Distribution: world
Message-ID: <4rj0kb$sf3@nef.ens.fr>
References: <4rh0g5$m9r AT twain DOT mo DOT net>
NNTP-Posting-Host: flute.ens.fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <4rh0g5$m9r AT twain DOT mo DOT net>, vecna AT Walden DOT mo DOT net ([vecna]) writes:
|> I'm trying to write a simple putpixel to
|> a 320x200 virtual screen, which is already allocated and defined as:
|> 
|> char *virscr;
|> 
|> This is my (yes, unoptimized) setpixel routine:
|> 

	I'd change it to something like (not actually tested :):

	movl _y,%eax
	imull $320,%eax
	addl _x,%eax
	movb _c,%cl
	addl _virscr,%eax
	movb %cl,(%eax)

Anyway, better have a look at Brennan's Guide to Inline Assembly:

http://www.rt66.com/~brennan/djgpp/index.html

Warning: Cool stuff there !

------------------------------
Pascal Massimino.			  e-mail: Pascal DOT Massimino AT ens DOT fr
http://www.eleves.ens.fr:8080/home/massimin/index.html.en
Ecole Normale Superieure. 45, rue d'Ulm. 75005 Paris.

- Raw text -


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