From owner-freebsd-multimedia Wed Jan 28 03:03:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA09770 for freebsd-multimedia-outgoing; Wed, 28 Jan 1998 03:03:02 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from rah.star-gate.com (rah.star-gate.com [209.133.7.178]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA09753; Wed, 28 Jan 1998 03:02:57 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Received: from rah (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.8/8.8.8) with ESMTP id DAA01249; Wed, 28 Jan 1998 03:02:51 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Message-Id: <199801281102.DAA01249@rah.star-gate.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Mike Smith cc: multimedia@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: http://www.descent2.com/ddn/sources/descent1/index.html In-reply-to: Your message of "Wed, 28 Jan 1998 21:02:10 +1030." <199801281032.VAA00659@word.smith.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jan 1998 03:02:51 -0800 From: Amancio Hasty Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > > > > > > 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, > mov eax,[esi].ofs > fixmul ecx > add eax,[ebx].ofs > mov [edi].ofs,eax > endm > > popm eax,edx > ret I bet it is horribly hard to read it with the assembler listing or looking at the code with codeview 8) Look it is doable and a very nice exercise for young programmers specially in the multimedia or gaming arena . Cheers, Amancio