🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #493

Re: perspective mapper an

#493
From: Cyberman
Date: Sat, 08 Aug 1992 03:10
62 lines
2280 bytes
     -=> Mike Schwartz spoke of "Re: perspective mapper an" <=-
    To All at 08-06-92  10:50
 MS> Make 'em faint every 5 minutes! :)  How fortunate that goto maps to an
 MS> instruction that is available on every CPU (or variant of the
 MS> instruction): jmp, bra, jr, etc. To ignore goto is like burying your
 MS> head in the sand. 
 > By the way, if the compatibility of various in-line assemblers is a problem,
 > why not keep most of the assembly code separate and link it in?  Then you
 > could use C for the "mundane" things, and the whole program would be fairly
 > portable, at least between Borland and Microsoft platforms.  IMHO, this would
 > be even more "professional".  Obviously, there's more than one way to skin a
 > cat, so please don't think I'm flaming anybody.

The methode of
asm {
    }
I think is ANSI C

#asm
#endasm

is Unix VII

 MS> I personally do not like the style of PC compiler in-line assemblers. 
 MS> I do like having #asm/#endasm in my 'C' compiler though.  Lets you code
 MS> functions in you choice of language and keep your functions organized
 MS> AS you like. 

I don't see how this is.   Ansi C specification is:

asm {
    <ANY valid C reference>
    }

for example
int by_80( int i) {
    asm {
        mov ax,i
        mov cl,4
        shl ax,cl
        mov bx,ax
        shl bx,1
        shl bx,1
        add ax,bx
        }
    }

this simple funtion multipliesby 80 in 8086 asm.  notice I can
use the passed in variable in the function.

This works in C++ as well.  I'm not sure if a real standard has
been made yet [liek thier should] I suspect though borlands
method has it's reasons.  Really thier is no difference.  Except
it doesn't allow comments :(

        Stephen Cyberman@Toz.Buffalo.NY.US
        Scripted at Fri  08-07-1992  10:11:27

... HOLY SMOKE BATMAN , I'M ON FIRE !!!
--- Blue Wave/QWK v2.10
                                                           
Technical Details
Message-ID: <gate.P146oB1w165w@toz.buffalo.ny.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!ub!toz!cyberman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!ub!toz!cyberman
From: cyberman@toz.buffalo.ny.us (Cyberman)
Newsgroups: rec.games.programmer
Subject: Re: perspective mapper an
Message-ID: <gate.P146oB1w165w@toz.buffalo.ny.us>
Date: 8 Aug 92 03:10:48 GMT
Lines: 62
X-Maildoor: WaflineMail 1.00r