Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 1998 21:02:10 +1030
From:      Mike Smith <mike@smith.net.au>
To:        Amancio Hasty <hasty@rah.star-gate.com>
Cc:        Mike Smith <mike@smith.net.au>, multimedia@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: http://www.descent2.com/ddn/sources/descent1/index.html 
Message-ID:  <199801281032.VAA00659@word.smith.net.au>
In-Reply-To: Your message of "Wed, 28 Jan 1998 02:28:46 -0800." <199801281028.CAA01011@rah.star-gate.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 
> > > It does *not* compile on FreeBSD and some of the modules use MASM.
> > 
> > "some"?!  This will need someone with a *working* MASM-to-gas 
> > translator, or a penchant for x86 assembler and vector math.
> 
> The important thing to remember is that the source code is availabe for
> anyone with the determination to work on it .
> 
> How many lines of assembler code?
> find . -name \*.asm -exec wc {} \; | awk -f ~hasty/awk.scr -

You left this number out:

word:~/work/descent>find . -name "*.asm" | xargs cat | wc -l
   32637

> How many lines of C code?
> find . -name \*.c -exec wc {} \; | awk -f ~hasty/awk.scr -
> 178714

> Not bad , usually after you go thru the first few large assembler routines
> you can pick up the rest pretty easy.

Like I said, you want an automated translator.  MASM's idea of a 
"macro" is pretty generous too, eg.

;scales a vector, adds it to another, and stores in a 3rd
;takes edi=dest, ebx=src1, esi=src2, ecx=scale. returns edi=vector
vm_vec_scale_add:       pushm   eax,edx

        for     ofs,<x,y,z>
         mov    eax,[esi].ofs
         fixmul ecx
         add    eax,[ebx].ofs
         mov    [edi].ofs,eax
        endm

        popm    eax,edx
        ret

Making this work neatly with gas would be, er, fun.  And I invite you 
to understand the code in the div0 directory.  8)

> To put it another way , Descent I will make one hell of a splash screen 8)

Sure.  Just need a few keen punters with some time on their hands. 

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\ 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801281032.VAA00659>