Page 1 of 1

3D ASM

Posted: Fri Jun 17, 2005 12:35 pm
by Zamaster
Ok, so im beginning work on a 3D game and decided to create a custom ASM library for it. I figured it wouldnt be too hard until I remembered that I need to have floating point math in it or else it would be impossible. So how do you work with floating point numbers in ASM? Like adding, subtracting, multiplying, dividing, comparing, MOVing, ect...

Posted: Fri Jun 17, 2005 1:16 pm
by matt2jones
I think, but I am in no means sure, that the CPU can't handle floating point numbers. I think they're where you have to actually code in the asm for continuosly shifting and carry the decimal yourself. But I know next to nothing on the subject, and am just trying to remember what I once heard someone tell me.

matt

Posted: Fri Jun 17, 2005 2:12 pm
by Zamaster
Your right in a sense, the CPU cant do all that fun stuff but the FPU can. You can use the FPU in 32 bit ASM code so it only seems logical that you would be able to use it in 16. I just want to know how(if even possible).

Posted: Fri Jun 17, 2005 2:19 pm
by Pete
A little bird told me that FreeBasic can use OpenGL.

Posted: Sat Jun 18, 2005 2:12 pm
by Guest
He he he...

A big black horse told me that. ;)

Posted: Sat Jun 18, 2005 2:17 pm
by Dr_D
Damn it! That was me...

Why does it log me out every time?

I think DrV is working on an Allegro port to FB_DOS... As far as I know that's as close as you'll get to ogl in dos. About the ASM thing... You might want to ask Lillo if it would even be worth it, and how to go about getting at the FPU. I know he hepled Rel out with his pixperfect collision routine for Space Impakto.

Posted: Sat Jun 18, 2005 5:06 pm
by Zamaster
How do I get ahold of Lillo? What's "OpenGL"? Whats FreeBASIC? ACK! To many names! I know the last 2 questions everybody probably knows yet I dont.

Posted: Sun Jun 19, 2005 12:39 am
by Dr_D
Lillo(Angelo Motolla) is the genius behind FB's gfx... He also created DirectQB.

Don't know what FB is? It's actually called FreeBASIC, by V1ctor. It's an open source 32 bit QB compatible compiler. Actually, that's an understatement. If you're a BASIC programer, then this is all your dreams come true. Here's the link for the FreeBASIC compiler forums. You can get ahold of Lillo there too...

http://www.freebasic.net/forum/index.php

Here's the link to the setup I prefer to use...

http://fbide.sourceforge.net/

Also...
OpenGL is an open source graphics library... to hell with DirectX. OpenGL is, and always will be the industry standard. ;)

Re: 3D ASM

Posted: Sun Jun 19, 2005 1:18 am
by Guest
Zamaster wrote:Ok, so im beginning work on a 3D game and decided to create a custom ASM library for it. I figured it wouldnt be too hard until I remembered that I need to have floating point math in it or else it would be impossible. So how do you work with floating point numbers in ASM? Like adding, subtracting, multiplying, dividing, comparing, MOVing, ect...
As far as I can remember, I did not use the FPU except in RelAngle. I used Fixpoint math in my 3d rasterizers. :*)

Posted: Sun Jun 19, 2005 1:50 am
by Dr_D
Why don't you register, ya big dummy? :lol:

Posted: Mon Jun 20, 2005 4:47 pm
by Zamaster
Thanks!