run another program within qbasic
run another program within qbasic
i have been working on writing my own qb os.
1 PROBLEM!!!
how do i execute another executable program (.com, .exe) within my qb program?????????
i tried to use CALL ABSOLUTE, but it just crashed qb.....
does any1 have some code so i can load a program aand run it and return to my program? i would appreciate it very much!
btw my os is a tui and i am working on a gui to run on it.
its called '1337 coders os'
i already added file managment commands+more and the abaility to execute special 'batch files'!
1 PROBLEM!!!
how do i execute another executable program (.com, .exe) within my qb program?????????
i tried to use CALL ABSOLUTE, but it just crashed qb.....
does any1 have some code so i can load a program aand run it and return to my program? i would appreciate it very much!
btw my os is a tui and i am working on a gui to run on it.
its called '1337 coders os'
i already added file managment commands+more and the abaility to execute special 'batch files'!
1337
i dont think shell will work for me because i am writing my own STAND ALONE operating system. i will run it from a flash drive or floppy disp probably. if shell requires nvtdm or windows, it will not work for me.
i need code that loads the hex code from a file and executes it useng call absolute or something.
i need code that loads the hex code from a file and executes it useng call absolute or something.
-
- Coder
- Posts: 33
- Joined: Sun Nov 27, 2005 10:35 am
- Location: Pennsylvania, United States
- Contact:
If you are writing your own stand alone operating system, you can't use any Qbasic file system commands. You will have to write a lot in assembly.
For every platform QB is designed for, shell will work. Most QB GUIs are written to run on DOS, which is nice and minimul and handles shell fine.
NTDVM is just a dos emulator for windows.
For every platform QB is designed for, shell will work. Most QB GUIs are written to run on DOS, which is nice and minimul and handles shell fine.
NTDVM is just a dos emulator for windows.
If you are using a program written in qb, you can load it over DOS, and shell will work (but you won't be able to use long file names).
If you are going to write your own kernel, you'll need something like bootprog to load it directly from the boot sector, but you have no dos services (so, no file commands, no memory allocation commands, no strings, no arrays...).
A Qb-compiled program won't work. A program compiled in freebasic can work if you don't use strings, dynamic arrays and the runtime library (actually, it will be like programming in C with no libraries).
On the site http://www.osdev.org there is an example about writing a true OS in freebasic.
As far as I know, nobody ever wrote a real OS in qb, the only thing you can write is a sort of shell that run over dos (a concept like windows 3.1). A good example of that is GIMI by Sebastian Mate.
If you are going to write your own kernel, you'll need something like bootprog to load it directly from the boot sector, but you have no dos services (so, no file commands, no memory allocation commands, no strings, no arrays...).
A Qb-compiled program won't work. A program compiled in freebasic can work if you don't use strings, dynamic arrays and the runtime library (actually, it will be like programming in C with no libraries).
On the site http://www.osdev.org there is an example about writing a true OS in freebasic.
As far as I know, nobody ever wrote a real OS in qb, the only thing you can write is a sort of shell that run over dos (a concept like windows 3.1). A good example of that is GIMI by Sebastian Mate.
asm os
thanx 4 the tips.
im gonna try to make an os in asm now.
254534534 problems....
- I dont know alot of asm
- can I use interrupts if i make my own kernal (no MSDOS)
- i need some routines for text output and input and file managment and alot more (if i cant use int w/o msdos)
any help for a poor asm newb would be GREATLY appreciated.
---------------------------------------- ps
if i can use int w/o msdos then i need a assembler compatable with the program debug.
im gonna try to make an os in asm now.
254534534 problems....
- I dont know alot of asm
- can I use interrupts if i make my own kernal (no MSDOS)
- i need some routines for text output and input and file managment and alot more (if i cant use int w/o msdos)
any help for a poor asm newb would be GREATLY appreciated.
---------------------------------------- ps
if i can use int w/o msdos then i need a assembler compatable with the program debug.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Creating an OS has always been attractive, but not really very useful.
Plus it is more trouble than it's worth. Consider DOS as an OS and move on. You can do too many other projects, because NOBODY is gonna pay for more.
Just reality, but DOS is enough to have fun in. No matter how much M$ wants to ditch it, it works.
Plus it is more trouble than it's worth. Consider DOS as an OS and move on. You can do too many other projects, because NOBODY is gonna pay for more.
Just reality, but DOS is enough to have fun in. No matter how much M$ wants to ditch it, it works.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0