Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: QuickBASIC 4.5 .BAS -> .OBJ  (Read 14222 times)

0 Members and 1 Guest are viewing this topic.

Fleexy

    Topic Starter


    Intermediate

  • OW NEXT TIME I SHOULD TURN IT OFF BEFORE SERVICING
  • Thanked: 2
    • Yes
    • Yes
  • Experience: Experienced
  • OS: Windows XP
QuickBASIC 4.5 .BAS -> .OBJ
« on: December 05, 2010, 12:11:46 PM »
I need a way to convert an ASCII .BAS file to a .OBJ independent of the QuickBASIC environment.  I am trying to make a program that can compile QuickBASIC code.  After I get an OBJ, I can get an EXE from there.  Is this possible?  Please explain.  I am trying to compile a program from a command-line without loading QB4.5.

 :) Fleexy

And if there is a way to go immediately to .EXE, then please tell me that as well. :)
I love .NET!

Salmon Trout

  • Guest
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #1 on: December 05, 2010, 12:47:13 PM »
You could download and study FreeBasic, which can compile QB 4.5 compliant code. The forum is full of compiler discussion.


« Last Edit: December 05, 2010, 01:21:49 PM by Salmon Trout »

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #2 on: December 05, 2010, 01:20:57 PM »
Quote
FreeBASIC is a free and open-source BASIC compiler. It is compatible to a large extent with MS-QuickBASIC (QBASIC), but has additional features such as pointers, unsigned data types and inline-assembly.

One of the objectives of the project is operating system independence. The latest version has been released for Linux, Windows, and DOS. Development of a backend for GCC will provide support for AMD64, PCC and other architectures.

FreeBASIC - Open Source Alternative to QuickBASIC

Salmon Trout

  • Guest
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #3 on: December 05, 2010, 01:22:16 PM »
I am sure somebody planning to write a compiler will have heard of Google.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #4 on: December 05, 2010, 05:47:05 PM »
I am sure somebody planning to write a compiler will have heard of Google.
Maybe
Still, others who read this may benefit.
Also, if somebody has a small program in QB code, there is little point in running it through a compiler. The interpreter QBASIC.EXE still works fine at the command line and will run many of the old programs.
The advantage of FreeBasic is that it is open source.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #5 on: December 05, 2010, 07:10:39 PM »
Maybe
Still, others who read this may benefit.
Also, if somebody has a small program in QB code, there is little point in running it through a compiler. The interpreter QBASIC.EXE still works fine at the command line and will run many of the old programs.

Of course, QBASIC is not provided for the last several versions of windows. I believe the last version to include it was Windows ME (it might be in XP, but it's definitely not in Vista)
Quote
The advantage of FreeBasic is that it is open source.

FreeBASIC is probably better because it runs on more then 1 platform. QBASIC/QB/QBX only run on 16-bit MS-DOS compatible systems. Windows x64 systems need not apply. FreeBASIC provides DOS, Linux, Win32, and Mac compatible executables that can compile and run BASIC programs on a variety of platforms, not just Real-Mode DOS.


I need a way to convert an ASCII .BAS file to a .OBJ independent of the QuickBASIC environment.  I am trying to make a program that can compile QuickBASIC code.  After I get an OBJ, I can get an EXE from there.  Is this possible?  Please explain.  I am trying to compile a program from a command-line without loading QB4.5.

 :) Fleexy

And if there is a way to go immediately to .EXE, then please tell me that as well. :)

You can use the BASIC Compiler, BC.EXE. http://support.microsoft.com/kb/43090
I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #6 on: December 05, 2010, 07:56:30 PM »
The main disadvantages of QBASIC were:
1. It was very addictive one you got the hang of it.
2. The label on the F5 key would were out.
The following video was NOT made by BC. But it could have been.
How I became a QBASIC Nerd Video.

Salmon Trout

  • Guest
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #7 on: December 06, 2010, 11:25:33 AM »
The interpreter QBASIC.EXE still works fine at the command line

Not on any 64 bit OS


Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #8 on: December 06, 2010, 03:34:04 PM »
Not on any 64 bit OS
Yes.
QBASIC is a 16 bit program.
But have you tried o any 64 bit OS?
By 'Any' do you mean 'All' or almost all?
Have you tried it on all 64 bit OS?
Did you try it in a DOS compatibility mode?

Some see this as a bad thing in Windows 7 64 bit. If you want to run ole 16 bit programs you have for forfeit running 64 bit programs.
Or do you?
Here is just one of the critics.
http://windows7critics.blogspot.com/2009/01/16-bit-applications-do-not-work.html
He says:
Quote
...VirtualPC to run 16-bit OSes...

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #9 on: December 06, 2010, 04:00:21 PM »
Yes.
QBASIC is a 16 bit program.
But have you tried o any 64 bit OS?

Let's see, WinXP x64, nope. WinXP 74-bit edition, nope.
Windows Vista x64? Nope. Windows 7 x64? Nope.
Linux Mint AMD64? Nope.

I think that pretty much covers it.  ::)
Quote
Did you try it in a DOS compatibility mode?
There hasn't been a "DOS compatibility mode" since windows 98. The compatibility mode options are for 32-bit windows programs.
Quote
Some see this as a bad thing in Windows 7 64 bit. If you want to run ole 16 bit programs you have for forfeit running 64 bit programs.
I don't. I cannot think of a single 16-bit program that still has very much relevance today. QBASIC is not addictive nor "fun" it's annoying and archaic compared to what you can get for free.

He says:
[/quote]
...VirtualPC to run 16-bit OSes...
[/quote]


Quote
The interpreter QBASIC.EXE still works fine at the command line
When did virtual PC become a command line?

And seriously? I find it hard to believe that anybody would want to actually seriously want to use QuickBasic, and even less for QBASIC. FreeBASIC is, A:) free and B:) runs on win32, Linux, as well as DOS and compiles to executables for each of those platforms. to recommend a piece of abandonware instead is bone-headed.

I find the blog post you linked to rather interesting:

Quote
To-do list for Microsoft For 64-bit Windows 7:

Integrate virtualization/emulation of 16-bit software. Just double-clicking the 16-bit application should start it. Keep it simple.

Keep the 16-bit legacy software (edit.com, edlin.exe, etc.)

Both of these are stupid. How about instead of microsoft bending over backwards and maintaining backwards compatibility like they've been doing for the last 25 years (and people have complained about exactly this for at least 10) people actually go out and get updated flipping software!

if you want to use Edlin, you're a masochistic idiot, and you may as well just run QDOS. If you want to use EDIT you may as well just run a DOS system, Obviously you have no need for the built in damned Text editor that COMES with windows... of course not, you'd much rather prefer the EDIT utility, which has absolutely no advantage over Notepad. I have no problem with old software- I use EDIT all the time on the DOS systems I own- what I have a problem with is people who insist on running the latest hardware and still think that Microsoft should go out of their way to make sure they can still use Word for DOS on their x64 machine running Windows 7 or run word for windows 2.0. It's utter nonsense. If you want to run "Word for DOS" run DOS. if you want to run Word for Windows 2.0, you run windows 3.1. If you're too cheap to buy the later version of the software that does work, why the *censored* should microsoft bother to make sure your needs are met? there is no "contract" implicit or explicit that says that Microsoft, or any software vendor, is going to change the way they engineer their later Operating systems because you paid them 40 dollars for a piece of software in 1992.



I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #10 on: December 06, 2010, 04:54:51 PM »
Let's see, WinXP x64, nope. WinXP 74-bit edition, nope.
Windows Vista x64? Nope. Windows 7 x64? Nope.
Linux Mint AMD64? Nope.
...

should Microsoft bother to make sure your needs are met? there is no "contract" implicit or explicit that says that Microsoft, or any software vendor, is going to change the way they engineer their later Operating systems because you paid them 40 dollars for a piece of software in 1992.
Thanks for your research.

Actually, it was $80 and it turned out to b e pirate version of Office XP.  I am still mad at MS for releasing pirate software. But it still runs good and at least it was not 16 bit.

As for QBASIC, it still runs on my Windows 2000, which is a 32 bit. By the time I get a 64 bit system,  MS will be out of  business. They will be bought by Wallchart. Or maybe McDonald's.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #11 on: December 06, 2010, 05:10:41 PM »
As for QBASIC, it still runs on my Windows 2000, which is a 32 bit. By the time I get a 64 bit system,  MS will be out of  business. They will be bought by Wallchart. Or maybe McDonald's.

Actually, you raise something interesting I've noticed over the years in various Video publications regarding computers.

All sorts of "experts" and company analysts, and even people from other companies, predict various negative things happening to microsoft. For example, A Sun Microsystem employee and premier architect of the JavaStation (in 1998) predicted that MS would be "made obsolete" since net-only computers (like the Javastation, Acorn Network computer, etc) were the future. The thing is, while they were all hedging their bets on what was "going"  to happen (they had no doubt that it was going to happen, for some reason). watching the video, it's impossible not to smile when they say that MS has no business sense since they aren't jumping into the net-station thing like Sun and Apple and so forth.

What I found most interesting, is that of all the people they interviewed in that video, the only person who quite literally said "well, you can't predict the future, so you have to work with the present" was in fact Bill Gates. The Sun representative was adamant that the Javastation was going to change the world; Bill made a point that while you have to keep innovating in order to prevent from being buried (like, say, Digital Research, MITS, and so forth) you cannot prematurely jump at new innovations because you can never predict how they will turn out.

It doesn't take a genius to see how clever that analysis was, the only person who seemed able to "predict" the future was the one person who said it was impossible. everybody else was trapped up in the hype of Java and "network computing" and had already left the present day; they "knew" what the future was but never considered that there would have to be a transition from what we had then to that future. Needless to say their vision of the future never came to fruition, and even sounds ridiculous today.

Actually, it was $80 and it turned out to b e pirate version of Office XP.  I am still mad at MS for releasing pirate software. But it still runs good and at least it was not 16 bit.

From the context it should have been clear I was talking about Word for DOS and Word For Windows 2.0. Both 16-bit programs. Not Office XP. MS doesn't release pirate software. That's a rather stupid thing to say.
I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #12 on: December 06, 2010, 05:58:53 PM »
Quote
MS doesn't release pirate software. That's a rather stupid thing to say.
Pirates of Silicon Valley-Microsoft steals from Apple
http://www.youtube.com/watch?v=im589uTchKs

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: QuickBASIC 4.5 .BAS -> .OBJ
« Reply #13 on: December 06, 2010, 06:59:53 PM »
Pirates of Silicon Valley-Microsoft steals from Apple
http://www.youtube.com/watch?v=im589uTchKs

I've seen that movie.

Such nonsense.
I was trying to dereference Null Pointers before it was cool.