Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executeing external programs

Status
Not open for further replies.

St8ic

Programmer
Mar 30, 2003
4
0
0
CA
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.
 
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?
 
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!?
 
On QBasic? No. Even for QuickBasic you must use system calls. Originally, BASIC is interpreted language and can't run without system evironment.
 
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.

HTH.
--MiggyD
 
Its not that I can't trust command.com, its just that I don't have it because i'm writing my own OS.
 
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? :)
 
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.
 
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
cubee101.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top