Thread View: rec.games.programmer
2 messages
2 total messages
Started by Cyberman
Sat, 08 Aug 1992 03:10
Re: perspective mapper an
Author: Cyberman
Date: Sat, 08 Aug 1992 03:10
Date: Sat, 08 Aug 1992 03:10
62 lines
2280 bytes
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
Re: perspective mapper an
Author: sl8nl
Date: Sat, 08 Aug 1992 19:05
Date: Sat, 08 Aug 1992 19:05
14 lines
815 bytes
815 bytes
> 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>
> }
Mike programs on the Amiga...
Josh
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads