Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Executeing external programs

Executeing external programs

Executeing external programs

It may seem kinda newbie-ish, but I'm new to Qbasic and I was wondering what the best way is to execute external .exe files. It can't rely on COMMAND.COM, so it can't be the "SHELL()" function.

RE: Executeing external programs

SHELL is the only way for BASIC.
You will need direct system call in machine code if you wan't use it.
Why you don't like command interpreters?

RE: Executeing external programs

No, I'm making a shell for my OS. I thought it it would be easiest to make it in Qbasic.

Are you sure there is no way!?

RE: Executeing external programs

On QBasic? No. Even for QuickBasic you must use system calls. Originally, BASIC is interpreted language and can't run without system evironment.

RE: Executeing external programs

If you have QB 4.5 or 7.1, search the help files for 'RUN'.  I'm uncertain if QBasic 1.1 has this function or not.

Also, if you cannot trust your COMMAND.com, I'd suggest you run an AV program, or upgrade your system.


RE: Executeing external programs

Its not that I can't trust command.com, its just that I don't have it because i'm writing my own OS.

RE: Executeing external programs

Are you already realised all MS-DOS services(memory, file functions) to run QBasic? If you write your own MS-DOS compatible OS why you not improve or add your functions to FreeDOS? And finally, if you write an OS - what the promblem with low-level functions?

RE: Executeing external programs

There is a saying:
Never let someone who says it cannot be done interrupt
the person who is doing it

Though I personally think OS in QBasic impossible.

RE: Executeing external programs

It "could be" possible...
but it would be 10x the work as it would be with C/C++

Qbasic is also naturally slow...

by the time you get done, You will have basically written the whole thing in assembly anyways... and tons of Call interupts and call absolutes...

Sounds like a *fun* task...

Good luck...

Just remember... there is a near endless list of Hex Codes to take into account...

are you trying to make an OS or a GUI / shell?

Oh, btw... you might want to through this question around in the Assembly forum and see what the assembly code is to run a program... then use Debug to generate the Hex Code from the ASM, then use CALL ABSOLUTE to launch your program...

Have Fun, Be Young... Code BASIC
-Josh Stribling


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close