|
Post by rmgillmore on Nov 14, 2019 17:16:58 GMT 1
I'm retired now, but I still dabble in technology from the earliest days of DOS. I have an Intel PL/M-86 compiler that reports to the stderr handle rather than the stdout handle. I have successfully captured the stdout information, but I can't seem to capture the stderr information to a file.
Any ideas, anyone?
Thanks, Mike the ACME Software Deli (and Malt Shoppe)
|
|
|
Post by Jos on Nov 14, 2019 18:51:48 GMT 1
The command line interpreter is very limited since vDos is intended to run programs. No way to redirect stderr. Don’t know if this will do the trick, but you could download and try 4DOS (https://www.4dos.info/4dvers/4dos800.zip).
Jos
|
|
|
Post by rmgillmore on Nov 17, 2019 15:21:54 GMT 1
Using 4Dos did not help. Too bad there is no way to redirect stderr; that would make vDos much more useful for my purposes.
>M
|
|
|
Post by joec4281 on Nov 18, 2019 23:47:36 GMT 1
Using 4Dos did not help. Too bad there is no way to redirect stderr; that would make vDos much more useful for my purposes. >M Here is how I redirect to stderr with 4DOS; C:\utils>dir asdfasfasdf*.* >&> error.txt
Volume in drive C is New Volume Serial number is 2C1E:6E61 0 bytes in 0 files and 0 dirs 1,476,704,837,632 bytes free
C:\utils>type error.txt File not found "C:\utils\asdfasfasdf*.*" Note also that you can detect, from a 4DOS .btm, whether stderr has been redirected; C:\utils>test.btm
Volume in drive C is New Volume Serial number is 2C1E:6E61
C:\UTILS\TEST.BTM [4] File not found "C:\utils\adfad*.*"
0 bytes in 0 files and 0 dirs
1,476,704,837,632 bytes free
C:\utils>test.btm >&> error.txt
Stderr is re-directed
Volume in drive C is New Volume Serial number is 2C1E:6E61
0 bytes in 0 files and 0 dirs
1,476,704,837,632 bytes free
C:\utils>type error.txt
C:\UTILS\TEST.BTM [4] File not found "C:\utils\adfad*.*" Here is the code for test.btm; @setlocal
@echo off
if %_stderr eq 0 echo Stderr is re-directed
dir adfad*.*
endlocal
Joe
|
|
|
Post by rmgillmore on Nov 19, 2019 14:32:56 GMT 1
Using 4Dos did not help. Too bad there is no way to redirect stderr; that would make vDos much more useful for my purposes. >M Here is how I redirect to stderr with 4DOS; C:\utils>dir asdfasfasdf*.* >&> error.txt
Volume in drive C is New Volume Serial number is 2C1E:6E61 0 bytes in 0 files and 0 dirs 1,476,704,837,632 bytes free
C:\utils>type error.txt File not found "C:\utils\asdfasfasdf*.*" Note also that you can detect, from a 4DOS .btm, whether stderr has been redirected; C:\utils>test.btm
Volume in drive C is New Volume Serial number is 2C1E:6E61
C:\UTILS\TEST.BTM [4] File not found "C:\utils\adfad*.*"
0 bytes in 0 files and 0 dirs
1,476,704,837,632 bytes free
C:\utils>test.btm >&> error.txt
Stderr is re-directed
Volume in drive C is New Volume Serial number is 2C1E:6E61
0 bytes in 0 files and 0 dirs
1,476,704,837,632 bytes free
C:\utils>type error.txt
C:\UTILS\TEST.BTM [4] File not found "C:\utils\adfad*.*" Here is the code for test.btm; @setlocal
@echo off
if %_stderr eq 0 echo Stderr is re-directed
dir adfad*.*
endlocal
Joe If I use 4DOS "inside" vDOS, stderr does not seem to be detectable. That's the whole point. I am running make on a 64-bit machine, so 4DOS can not be run directly. If I go to an older 32-bit machine and run 4DOS, it works as you have described. >M
|
|
|
Post by joec4281 on Nov 19, 2019 15:46:10 GMT 1
If I use 4DOS "inside" vDOS, stderr does not seem to be detectable. That's the whole point. I am running make on a 64-bit machine, so 4DOS can not be run directly. If I go to an older 32-bit machine and run 4DOS, it works as you have described. >M Forgive me, but I don't understand. I am running 4DOS inside vDos. As I have demonstrated, stderr works from 4DOS inside vDos and DOSBox. Is make a 16-bit, 32-bit, or 64-bit .EXE? Are you running make from within vDos/4DOS? Yes, 4DOS will run on a 32-bit machine directly, using NTVDM. On a 64-bit machine, 4DOS will only run inside vDos or DOSBox. Joe
|
|
|
Post by rmgillmore on Nov 13, 2020 23:20:49 GMT 1
Okay, please allow me to give you the complete details: My autoexec.txt: @echo off rem rem mount the home directory as C, and setup a path rem
use D: C:\vDos use C: C:\Users\Owner set path=C:\;C:\DOCUME~1\utils;C:\DOCUME~1\utils\PLM86T~1;C:\DOCUME~1\utils\masm4;C:\DOCUME~1\utils\MASM510\BIN set path=%path%;C:\DOCUME~1\work\Plm86
rem rem change to the directory where we need some work done, and get to it rem
cd C:\DOCUME~1\work\Plm86 if exist zDosWork.bat call zDosWork.bat > STDOUT.TXT if exist zDosWork.bat exit 0
My config.txt: FONT = C:\WINDOWS\FONTS\CONSOLA TEXT = 30x90
With Make, I am creating zDosWork.bat, and then executing vDos. I can successfully capture the STDOUT stream, but I can't seem to capture the STDERR stream generated in the vDos window.
>M
|
|
|
Post by Jos on Nov 13, 2020 23:38:06 GMT 1
vDos is primarily intended to run end-user programs. Surely not the choice of a software developer to run tools he/she only uses. Continuing to develop/maintain DOS programs - not run the end result - you would have to use DOSBox or one of its mods.
Jos
|
|