Welcome, Guest. Please login or register.
March 29, 2017, 08:07:03 AM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  General  |  General/Misc  |  Topic: freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. « previous next »
Pages: [1] 2 3 ... 27 Print
Author Topic: freeBASIC (a 32-bit QB-syntax compatible compiler) preview..  (Read 111399 times)
v3cz0r
I hold this place together
*****
Posts: 924



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« on: October 27, 2004, 02:18:16 AM »

Ok, i wasn't going to say anything about this project until it was near to be released, but heck.. i just want to share something ;)

freeBASIC is a 32-bit compiler i've being working on in the last 2 months. FB's syntax is the most compatible possible with QB/PDS/VBDOS. Currently it's only for Windows, but the runtime library is portable (C code compiled with GCC) and all tools (assembler, linker, maker, etc) are from GNU, what means it will be piece-of-cake to recompile for Linux (x86 only tho).

Here are some examples (.BAS), generated code (.ASM) and executables (.EXE) that the compiler can currently parse and create: http://freebasic.bad-logic.com/downloads/freeBASIC_preview.rar (WinRAR is needed to extract).

A CPU with MMX support is needed to run the tests because the gfx lib used to update the screen (TinyPTC) was compiled to use MMX (also for Pentium Pro, but i guess VC++6 didn't gen any opcode incompatible with Pentiums MMX, not sure). Compiler can generate code compatible with 386's too, although the runtime library is currently being compiled for 686 CPUs, for max speed on modern boxes.

The tests include some gfx stuff and a linked-list done with pointers (oh yeah, it has pointers ;).

You can see in some examples it got support for unsigned data types too (and of course floating-point), including the BYTE type. There's support for var-len (up to 2GB) and fixed-len strings, user defined types (incl. unions), dynamic arrays (that can be passed to procs as in qb: "mysub myarray()"), etc, etc..

The GFX tests are using the TinyPTC library coz.. well, there's nothing easier around to use.. of course it's not the fasted alternative, using DX would give much better results and a QB-ish full screen ;), but the compiler still needs function pointers to access DX directly (damn COM interfaces).


freeBASIC will be released when it get to compile itself.. yes, that's right, the compiler was written 100% in QB (VBDOS to be exact, code is already 16k lines long). There are many runtime lib routines to implement, such as for files, console (including PRINT), some string functions and math. In some weeks i may release the version 0.01 for testing, we will see ;)


Peace..
Logged

Nexinarus
Wandering Guru
***
Posts: 301



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #1 on: October 27, 2004, 03:00:13 AM »

Nice work man. You seem to have a tight system going already so far. What assembler do you use, masm?

What else is needed to compile itself? And also coding this in basic itself must be one big challenge, congrats on that.
Logged
Sterling Christensen
Na_th_an
*****
Posts: 1328



freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #2 on: October 27, 2004, 03:10:04 AM »

YOU ROCK! The syntax is everything I would want a 32 bit qb to be, ie not too different looking yet more capable than QB (pointer etc).

I didn't know GNU as could do intel syntax like that. For some reason I thought it was AT&T only.

I would be happy to help with the rest of the runtime library if it might speed things up. I'm pretty comfortable with C. I wouldn't mind being given the least fun parts to do, really - anything for this compiler.
Logged
VonGodric
Ancient Guru
****
Posts: 674



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #3 on: October 27, 2004, 06:43:56 AM »

WOW.

You are going to make a history you know(not for the first time :lol: ) in qb world.
Logged

url]http://fbide.sourceforge.net/[/url]
Jofers
Been there, done that
*****
Posts: 1040



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #4 on: October 27, 2004, 08:28:15 AM »

Wow, v1c... the code is really nice.  I can't really give any judgements on speed, it's definately a step up from old man QB.  It sure as hell kicks the crap out of libertybasic, it's simple and the executables are small, too.

Have I ever said "you the man" to you before?  Because I've met the current reigning "the" man, and all he did was take 13 shots of whiskey without passing out, so I think you have some edge as the new "the man".

The only complaint I have is:  It definately, definately needs a better name.  I'll get back to you on that.
Logged
na_th_an
*/-\*
*****
Posts: 8242



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #5 on: October 27, 2004, 08:59:34 AM »

Excellent work, man. This is good news.

But, as Jofers said... find a better name Tongue
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2355



freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #6 on: October 27, 2004, 10:13:20 AM »

Great work, can't wait to see more.

Personally I like the name.
Logged
potato
Ancient QBer
****
Posts: 409



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #7 on: October 27, 2004, 10:34:31 AM »

awsomaaaaaaa :o :o :o
Logged

ammit potato!
Plasma
Na_th_an
*****
Posts: 1769



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #8 on: October 27, 2004, 01:07:58 PM »

Sweet.
Logged
Z!re
*/-\*
*****
Posts: 4599



freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #9 on: October 27, 2004, 01:16:24 PM »

*gasp* Shocked

wow


Can't wait for it to be released Cheesy
Logged
Blitz
I hold this place together
*****
Posts: 853



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #10 on: October 27, 2004, 01:17:57 PM »

Yeah, it's bad ass. Also, unlike other qb compilers made recently. It optimizes expressions and redundant operations. If he fixed the DAG that is. If you finish it v1ctor, C is past for me.

Btw, i had nothing to do with the compiler.
Logged

oship me and i will give you lots of guurrls and beeea
Neo
Na_th_an
*****
Posts: 2150



Re: freeBASIC (a 32-bit QB-syntax compatible compiler) previ
« Reply #11 on: October 27, 2004, 02:39:55 PM »

Oh, v1ctor, this is just plainly awesome! I already wanted something like this to happen Wink I'd leave anything if this is released Tongue It's the powerful combination of C + QB, including a SMART compiler... Wink

Quote from: "v1ctor"
The GFX tests are using the TinyPTC library coz.. well, there's nothing easier around to use.. of course it's not the fasted alternative, using DX would give much better results and a QB-ish full screen Wink, but the compiler still needs function pointers to access DX directly (damn COM interfaces).

Maybe you can convert the FreeQB code to C++ before compiling, and compile it with a DX/OpenGL compatible C++ compiler (like VC++ 6.0). Because then you only need to specify you're using OpenGL32.LIB, GLU32.LIB, and GLAUX.LIB (/windows/system32/), and in the FreeQB code you only need to include OpenGL32.bi, Glu32.bi and Glaux.bi... :-?  It's just a thought Tongue
Logged
na_th_an
*/-\*
*****
Posts: 8242



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #12 on: October 27, 2004, 02:47:29 PM »

That would require the user to have VC++. Better make things standalone.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Neo
Na_th_an
*****
Posts: 2150



freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #13 on: October 27, 2004, 02:53:40 PM »

Maybe it's possible to include VC++ or any other suitable compiler?
Logged
Blitz
I hold this place together
*****
Posts: 853



WWW
freeBASIC (a 32-bit QB-syntax compatible compiler) preview..
« Reply #14 on: October 27, 2004, 04:57:26 PM »

you don't need to use vc or anything else, you can link any win32 lib you like to freebasic programs.
Logged

oship me and i will give you lots of guurrls and beeea
Pages: [1] 2 3 ... 27 Print 
Qbasicnews.com  |  General  |  General/Misc  |  Topic: freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
SMF Theme © Gaia
Valid XHTML 1.0! Valid CSS!