Qbasicnews.com

Full Version: Compiler problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I used to be able to compile my efforts by just dragging a BAS file onto FBC.EXE and this still works ok with the latest DOS version v0.13-dos32. But when I try it with v0.13-win32, although the screen goes balnk for a second, there seems to be no trace of an EXE compiled file or an ASM.

Perhaps someone could explain in simple english, because I have no ide what Open the DOS/Command-Prompt/Console in the readme.txt means. Surely it does not mean the MSDOS Command Prompt, as I like many wish to use FB in a Windows environment.

I think I will have to reinstall the previous version of FB that did not take about 4 minutes to run an install.bat

Gordon
Windows programs can be run from a MSDOS Command Prompt window - yes, that's what we mean.

It's the best way to see error messages (if any).
Thanks

In which case may I suggest creating a BAT file like below say as FBrun.bat, allowing you to see the parameters by just activating it, or entering say FBrun any.BAS with the DOS prompt

Gordon

Code:
CD \FBwin
FBC %1
PAUSE
Gordon:
Try to add a SLEEP before the END (or SYSTEM) of your programs. This way they will wait for a keypress before allowing Windows to close their window.
If you use the editor that comes with the distro, then you can just do a quick compile and run and see your results. No need to mess with the Command prompt at all in the Windows version.

If you are using another editor, then you should be able to configure your editor to compile and run an FB program. I use PSPad in addition to the FB Ide and so far I have not needed to invoke the command prompt in any of my programs.
Sorry to be a bit ‘thick’ ( my age ! ) but where is the editor in the distro, what is the name of the BAS file if it is supplied.

As many will have realised I am still very much an Amateur Programmer, and very grateful for the all the work put into producing FB. Although my site is full of freeware programs, most are just upgrades of old stuff, but I doubt if the work or expertise I have put in over the years is anything compared with the work going into FB

Of course many will wonder why bother to produce another compiler when the tried and tested Quickbasic is now freely available from sites like Nathan’s. Obviously FB is far more comprehensive especially with the ability to play MID/MOD/MP3/WAVs, and a vastly improved graphics. But I have yet to fathom out how to display image files such as BMP. There are free DLLs to display and edit JPGs etc from a Liberty Basic site below, and also for the clever guys at using DLLs a text to speech STM.DLL originally intended for RapidQ from various sites if you search with Google.-----------Gordon


http://alycesrestaurant.com/

Anonymous

you can load a bmp now in fb by doing simply "bload mypicture.bmp"
you can also load it right into a get/put formatted array, like "bload mypic.bmp, picholder(0)"

if you wanna modify the bmp before you just throw it into an array in just one big chunk, you can get the file specs from i think like wotsit.org or something, google "bmp file specification"... its as simple as making a TYPE of the same format as the spec, and just reading the whole structure from the file at once. usually that involves reading the palette info also (for 256) but in higher bitrates or whatever its called, the color info is stored in each pixel. then you apply the palette (if necessary) and read the file for input. reading line by line will be much faster than pixel by pixel. and also, remember bmps are stored vertically inverted...

hope that helps
Thanks - The gfxlib.txt says like below, but no luck, unless the three BMPs I tried are just plain awkward.

Gordon

Code:
DIM image(64004) AS UBYTE
SCREEN 19
BLOAD "2.bmp", VARPTR(image(0))
PUT (0,0), image

sleep
end