4

I have a vivid memory of a guy I knew back in the day who had a custom prompt with a small character animation.

The way I remember it there was a sequence like |,/,--,\,| in the prompt.

This wasn't implemented as just a prompt "something something" command, but a rather large bat file with IF statements and the like.

Is this possible with the DOS prompt command (or maybe with 4DOS) or is my memory playing tricks on me?

  • 1
    I remember coming across a TSR which could do this (among other features, such as displaying a live clock at the prompt). I don’t recall its name... – Stephen Kitt Apr 7 at 12:08
  • 2
    If that is doable, it probably involves using ANSI.SYS, loading at bootup by CONFIG.SYS. At some point, Microsoft nerfed ANSI.SYS, reducing its functionality. The newer one probably would not have allowed anything fancy like you describe. Also, there were 3rd party replacements for ANSI.SYS, such as ANSI.COM and ANSIPLUS.EXE. I never used them, but they probably had even greater flexibility. See en.wikipedia.org/wiki/ANSI.SYS – RichF Apr 7 at 12:36
  • @RichF Could you add any examples animating the prompt, not just adding certain information, colours or alike, but continuous and visible animation? It'll be quite cool and I don't mind if this requires some outdated version of Microsofts ANSI.SYS – Raffzahn Apr 8 at 14:06
  • 1
    @Raffzahn Sorry, I never wrote an animated prompt. The most I ever did was put time and colors into it. Note that my previous comment starts out, "If that is doable,". Perhaps JdeBP with a recent answer, below, would know. He says it is possible with 4DOS. Personally,it annoys me when stuff moves on the screen. I even have an animation blocker in my browser that disables all those stupid animated GIFs which some folks think are clever. – RichF Apr 8 at 19:58
6

Yes, it is possible. With 4DOS at least.

It involved running a BTM from within the printing of the prompt that in a loop displayed the animation(s) and waited for a keypress, upon which the normal command-line editor would take charge.

I used to have a BTM file that did this. There were several in circulation, from ticking clocks to screen-saving animated worms.

Further reading

  • Thank you. My memory is now vindicated ;) I was actually reading up on the 4DOS %@EXEC[] function yesterday. – Dacobi Apr 9 at 14:17
  • I copied the screen saver example to screen.btm and made a simple test, "prompt %%@EXEC[screen.btm] $g$p". This sort of work, but it seems that the return value of EXEC ends up in the prompt. There's a "0" after ">". Also when typing in a command, when the screen saver is active, the prompt appears where the last cursor pos was. – Dacobi Apr 9 at 15:50
  • Answer comments are not for questions. superuser.com/q/1423451/38062 is how to ask a question, and note that this is not really a retrocomputing topic. Several of these command interpreters still exist for current operating systems. – JdeBP Apr 9 at 19:27
  • The retro part is how to make this work in an OS That's purely single task. – Dacobi Apr 9 at 19:55
5

Is this possible with the DOS prompt command (or maybe with 4DOS) or is my memory playing tricks on me?

No, it isn't. Prompt just sets a string to be interpreted and the result outputed once when the prompt is displayed (*1).

Of course, one can make a string including several characters overwriting each other when displayed, creating an animation, but that will be a finite amount of overwrites and already next to impossible to be noticed on an original PC - even less on any later machine.

Maybe you mix this up with some programs having wait indicators. Cycling thru a sequence of -/|\was quite common.


*1 - Remember DOS is a single tasking, single program, single user OS.

  • 1
    What about a TSR updating the prompt? – Dacobi Apr 7 at 11:50
  • That would be possible, but at the same time a quite risky,as there are no clear indicators if a prompt is still at the place it was once o even present on screen at all. So a TSR may screw up the screen layout of programs executing. Considering the direction your questions go, it may be less work to write your own shell replacing command com and offering hooks all your ideas (or at least the ones that can be made work. – Raffzahn Apr 7 at 12:17
  • I would appear so. I just don't understand how I ended up with this memory.. – Dacobi Apr 7 at 12:47
  • 1
    @Dacobi Stuff blurs over the years and get turned into blight memories of a better past - happens to anyone. Not to mention, that even a litte animation on command line tools was already quite impressive :) – Raffzahn Apr 7 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.