| www.delorie.com/archives/browse.cgi | search |
| From: | "Campbell, Rolf [SKY:1U32:EXCH]" <cp1v45 AT americasm01 DOT nt DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Why dosn't my asm getpixel() work? |
| Date: | Tue, 22 Jun 1999 09:38:09 -0400 |
| Organization: | Nortel Networks |
| Lines: | 27 |
| Message-ID: | <376F91C1.1C5CB462@americasm01.nt.com> |
| References: | <3766f436 DOT 5083819 AT nntpserver DOT swip DOT net> <3768394B DOT 4C9E319E AT cartsys DOT com> <376981c9 DOT 8709864 AT nntpserver DOT swip DOT net> |
| NNTP-Posting-Host: | bmerhc00.ca.nortel.com |
| Mime-Version: | 1.0 |
| X-Mailer: | Mozilla 4.6 [en] (X11; I; HP-UX B.10.20 9000/712) |
| X-Accept-Language: | en |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Gathers wrote:
> >6. The multiply can be optimized better; this is left as an exercise for
> >the reader.
> >
> mov ax,y
> mov bx,ax
> shl ax,8
> shl bx,6
> add ax,bx
> ax==y*320?
On pre-Pentium machines it is 1 cycle faster to use, on post-486
machines it is 1 cycle slower to use:
mov bh, bl
xor bl, bl
instead of
shl bx, 6
PS: This is not AT&T style assembler, so it won't work with DJGPP.
--
-Rolf Campbell (39)3-6318
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |