DOS prompt from external programm (Developers)
Hello GizMo79,
> I have created my own text editor from which I can program and compile
> programs, I have inserted a function to start a DOS prompt leaving the
> editor in the background, I get this with the system function
> ("c:\command.com"); but this uses a lot of memory because I have 2
> "command.com" active in addition to the editor, is it possible to jump to
> the command.com already loaded in memory without loading another one?
Maybe, instead of saying something like system(getenv("COMSPEC")), you can use one of the spawn...(...) functions --- spawnve, spawnl, etc. --- which will likely come with whichever DOS compiler you are using.
Saying system(getenv("COMSPEC")) will most likely spawn a new copy of (e.g.) c:\command.com to run the command "c:\command.com". That is, it will spawn _two_ new copies of command.com, which is of course needlessly wasteful.
If you just want to run command.com without giving it any command, you can just use spawn...(...) directly with the value of COMSPEC. This will create just one new copy of command.com in memory.
Thank you!
---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"
Complete thread:
- DOS prompt from external programm - GizMo79, 29.09.2020, 22:21 (Developers)
- DOS prompt from external programm - tom, 30.09.2020, 17:16
- DOS prompt from external programm - tom, 30.09.2020, 17:23
- DOS prompt from external programm - tkchia, 30.09.2020, 18:19
- DOS prompt from external programm - Rugxulo, 01.10.2020, 00:44
- DOS prompt from external programm - tkchia, 01.10.2020, 18:20
- DOS prompt from external programm - GizMo79, 04.10.2020, 12:10
- DOS prompt from external programm - Rugxulo, 09.10.2020, 07:15
- DOS prompt from external programm - GizMo79, 04.10.2020, 12:16
- DOS prompt from external programm - Rugxulo, 09.10.2020, 07:16
- DOS prompt from external programm - Rugxulo, 01.10.2020, 00:44
- DOS prompt from external programmg - DosWorld, 10.10.2020, 13:17
- DOS prompt from external programm - tom, 30.09.2020, 17:16