VOGONS


First post, by Darkstar

User metadata
Rank Newbie
Rank
Newbie

Hi,

back in my old DOS days I had used heavily-customized ANSI prompts for DOS and I wanted to do the same in DOSbox. Unfortunately, DOSBox has a fixed Prompt which is essentially the good old "$p$g" prompt.

This patch adds support for the environment variable PROMPT, which, if it exists, defines how the prompt looks like. It supports $p,$g, and (most importantly for me) $e (and almost all other Dos/Windows substitutions like $_, $$, $d, $n, $h, etc.)

If the env.var PROMPT does not exist it uses the default prompt of $p$g.

The patch is pretty small and changes only 1 function in one file.

I hope someone finds it as useful as I do 😀

-Darkstar

Note: It doesn't fully work the same way as in DOS, something is still broken with respect to background colors: they don't get saved as default so that you can't currently change the whole screen bg color to something else than black. Only the parts that get touched by text output are drawn with a different bg color, all other parts of the screen stay black

Reply 1 of 7, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Just one question? Why?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 3 of 7, by robertmo

User metadata
Rank l33t++
Rank
l33t++
Darkstar wrote:

I don't remember all DOS substitutions so I instead took the ones that I remembered ($p, $g, $l, $e) and filled it up with those from windows XP.

msdos 6.2 uses: $Q $$ $T $D $P $V $N $G $L $B $H $E $_
So windows xp has them all plus more.

Reply 4 of 7, by pbblair

User metadata
Rank Newbie
Rank
Newbie

PROMPT is an odd omission from the DOSBOX internal command interpreter. I for one wish they'd implement in in the default builds. I remember when I first learned batch "programming" and I made .BAT text adventures that depended on the PROMPT command.

Reply 6 of 7, by Gene Wirchenko

User metadata
Rank Member
Rank
Member
wd wrote:

I'm sure nobody else misses "learning batch programming" in dosbox.

I still do some of it. I wish the language were more expressive, but it is useful for many utility tasks. And it is a game that runs on new systems, too!

pbblair, if you still have any of those games, please E-mail me at genew@ocis.net.

Sincerely,

Gene Wirchenko