How to create a fast lib from QBasic code?

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
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

How to create a fast lib from QBasic code?

Post by Codemss »

I want to make a library for Qbasic, and I want to have some kind of image loader in it. I want to load as much types as images as possible :wink:.

But, the only manner I know to get this in a library is to compile the Qbasic code to an OBJ file, an include that in the library. But I want it to be as fast as possible also.

So, is it possible to make it faster (for example by using another programming language)?

RubyNL
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Assembly language is the way to go if you want to make potentially faster libraries than native QB code. You could also use something like QuickC, but it won't give you quite the same performance and will likely also be larger.
User avatar
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

Post by Codemss »

So, you think I should ask some assembly programmer to translate the BASIC code into ASM? I don't even know if this is possible...

Anyway, what I want is a SUB that you can load like this:

loadimage "C:/blah.png"

And I want it to be fast. I know you can do this with Qbasic(though that is not so fast), but is it also possible using ASM, to speed it up?
User avatar
BadMrBox
Veteran
Posts: 86
Joined: Tue Feb 28, 2006 12:19 pm

Post by BadMrBox »

As I know absolutely no ASM I have to say yes.
Post Reply