delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/20/21:47:44

From: Andrea Martino <amartino AT iiic DOT ethz DOT ch>
Newsgroups: comp.os.msdos.djgpp
Subject: Problem with NASM 0.94
Date: Tue, 20 May 1997 14:52:20 +0200
Organization: Swiss Federal Institute of Technology (ETHZ)
Lines: 51
Message-ID: <33819E84.4C80@iiic.ethz.ch>
NNTP-Posting-Host: slab144.ethz.ch
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello,
	I don`t know if this is the right newsgroup, but I don`t know where
find an answer for my question :)

I want to "unroll" a loop, but I have
some problems with the macro-directives. I have to do a loop for
a scan-line in the gouraud

In the NASM, version 0.94 it looks like this...

        mov ecx,[yQ]
        sub ecx,[yP]
        inc ecx			// ecx = number of pixel (max = 320)
.Xloop:
        mov al,dh		// dx = color in 8:8 fixed point
        add dx,bx
        stosb
        dec ecx
        jnz .Xloop

I want to "unroll" this loop, how can I do this? I have read a text but
I haven't understand it. It said that the "unrolled" has to look 
lik this:

        jmp ...

        repeat 320
        mov al,dh
        add dx,bx
        stosb
        endm

I have another two questions:
1. what is the alignement? How does it work? What are the $$ and
the $?

times ($$ - $) & 3      nop	; Align the next instruction/data to
                                ; a double-word boundary, assuming 
                                ; segment is aligned to double-word

2. How can I use the FPU of my PENTIUM with NASM 0.94. Where can I find
a tutorial?

Thanx a lot


				Andrea Martino
				amartino AT iiic DOT ethz DOT ch

P.S.: It`s possible to recive the answer with a carbon copy too (I
cannot read the news every day :))

- Raw text -


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