3D ASM

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Zamaster
Veteran
Posts: 174
Joined: Wed Jun 15, 2005 1:51 pm

3D ASM

Post 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...
User avatar
matt2jones
Veteran
Posts: 80
Joined: Sat Feb 19, 2005 8:29 am
Location: elsewhere
Contact:

Post 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
Do not mistake Apathy for feeling Content.

http://www.disjointed.cjb.net - Short Storys
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
User avatar
Zamaster
Veteran
Posts: 174
Joined: Wed Jun 15, 2005 1:51 pm

Post 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).
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Post by Pete »

A little bird told me that FreeBasic can use OpenGL.
Guest

Post by Guest »

He he he...

A big black horse told me that. ;)
Dr_D
Veteran
Posts: 58
Joined: Fri Jun 17, 2005 4:47 pm
Contact:

Post 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.
The Dr. is INsane!!!
User avatar
Zamaster
Veteran
Posts: 174
Joined: Wed Jun 15, 2005 1:51 pm

Post 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.
Dr_D
Veteran
Posts: 58
Joined: Fri Jun 17, 2005 4:47 pm
Contact:

Post 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. ;)
The Dr. is INsane!!!
Guest

Re: 3D ASM

Post 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. :*)
Dr_D
Veteran
Posts: 58
Joined: Fri Jun 17, 2005 4:47 pm
Contact:

Post by Dr_D »

Why don't you register, ya big dummy? :lol:
The Dr. is INsane!!!
User avatar
Zamaster
Veteran
Posts: 174
Joined: Wed Jun 15, 2005 1:51 pm

Post by Zamaster »

Thanks!
C:\DOS
C:\DOS\RUN
RUN\DOS\RUN
Post Reply