VOGONS

Common searches


First post, by JamesSteward

User metadata
Rank Newbie
Rank
Newbie

Hi,

I am a newbie to DOSBox, have google searched for answers to my question but have found nothing, so am trying this forum.

I'm using DOSBox to run some old 16bit apps, specifically G21.EXE and friends, which is GCC for a Analog Devices DSP 21XX family.

However I'm not sure that my question is so application specific.

I want to redirect stderr from the GCC commandline to a file, as the compiler output is very long, and DOSBox doesn't have a scrollbar that I know of. If I simply append 2> build.out to the commandline, the DOSBox Status Window says it is redirecting, but the 2 is passed to G21 instead of being interpretted as a file descriptor 2 (stderr).

Is there a way to do what I want? - Basically to see the very long output from the compiler.

Regards,
James.

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

not possible in dosbox.
It should work if you boot a version of dos inside dosbox.

Can't GCC report to stdout ? that one is redirectable.
Alternatively you might want to write a small launcher that redirects stderror to stdout and then starts gcc.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 3, by JamesSteward

User metadata
Rank Newbie
Rank
Newbie

I don't have a handy DOS version to run. Is there a freely available one somewhere?

GCC only sends warnings and errors to stderr AFAIK, at least I've never seen a --warningstostdout type switch.

I like the small launcher idea, but what's the POLR to writing and compiling MS-DOS apps? AFAIK, MinGW does not support compiling MS-DOS apps.

Reply 3 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well it's quite simple to do.
you have to find the mainpsp of dosbox and modify the filetable so that

01 01 01 00 02 FF FF FF

becomes

 01 01 03 00 02 FF FF FF

then run gcc while redirecting stdout. (the redirection will change the filetable into 01 03 03 00 (this way both stdout and sterr are redirect to the same filedescriptor (namely 3))

At least that is what I think. I don't have gcc for dos around.

Water flows down the stream
How to ask questions the smart way!