Ansi.sys and old Dos programs

Say I need to run an old DOS program like Zork which needs an ansi.sys driver. In the XP command environment I can type "nnansi.com" and then "_zork1.com" and I can combine them in a bat file.

This doesn't seem to work in the TCC environment.

What I can do is type "cmd nnansi.com" which waits for more input, then type "_zork1.com" which runs the DOS program okay, although nothing prints when _zork1.com is typed.

I don't understand what's happening and I haven't been able to combine these two commands into a single command or get them to run in a batch or btm file.

Any suggestions?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,426
85
Albuquerque, NM
prospero.unm.edu
Say I need to run an old DOS program like Zork which needs an ansi.sys driver. In the XP command environment I can type "nnansi.com" and then "_zork1.com" and I can combine them in a bat file.

This doesn't seem to work in the TCC environment.

What I can do is type "cmd nnansi.com" which waits for more input, then type "_zork1.com" which runs the DOS program okay, although nothing prints when _zork1.com is typed.

I don't understand what's happening and I haven't been able to combine these two commands into a single command or get them to run in a batch or btm file.

Any suggestions?

I think the usual way to handle this is to put a DEVICE=%SYSTEMROOT%\SYSTEM32\ANSI.SYS statement in your CONFIG.NT file. You could probably instead put a reference to NNANSI.COM in your AUTOEXEC.NT file. I doubt there's any real advantage to using one over the other.
 
Apr 4, 2010
57
0
I think the usual way to handle this is to put a DEVICE=%SYSTEMROOT%\SYSTEM32\ANSI.SYS statement in your CONFIG.NT file. You could probably instead put a reference to NNANSI.COM in your AUTOEXEC.NT file. I doubt there's any real advantage to using one over the other.

But TCC doesn't listen to the *.nt files, correct? Which is to say that
config.nt and autoexec.nt are only for 16 bit shells, i.e command.com, but not cmd.exe or TCC.exe. Is that right?
 
Say I need to run an old DOS program like Zork which needs an ansi.sys driver. In the XP command environment I can type "nnansi.com" and then "_zork1.com" and I can combine them in a bat file.

This doesn't seem to work in the TCC environment.

What I can do is type "cmd nnansi.com" which waits for more input, then type "_zork1.com" which runs the DOS program okay, although nothing prints when _zork1.com is typed.

I don't understand what's happening and I haven't been able to combine these two commands into a single command or get them to run in a batch or btm file.

Any suggestions?

Use DOSBox (http://www.dosbox.com/). I also have several DOS programs that work only in DOS. As they will never be updated, or until I find a replacement, DOSBox is the best zero-cost solution.

Note that DOSBox does NOT work with TC.

Joe
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,426
85
Albuquerque, NM
prospero.unm.edu
But TCC doesn't listen to the *.nt files, correct? Which is to say that config.nt and autoexec.nt are only for 16 bit shells, i.e command.com, but not cmd.exe or TCC.exe. Is that right?

They are for Windows's DOS subsystem; they will affect any DOS-based program, including Zork and COMMAND.COM but not CMD.EXE or TCC.EXE. Which is what you'd want, I imagine. After all, it's Zork which emitting those ANSI sequences, not TCC or CMD.EXE.

A couple of other approaches, which I haven't tested: Create a .PIF file for _ZORK1.COM, and specify a custom Config or Autoexec file in that (it's the Advanced button on the Program tab); run the .PIF from TCC. Or, create a ZORK.BAT file (not .BTM) which loads NNANSI.COM and then runs _ZORK1.COM; run COMMAND /C ZORK.BAT from TCC.
 
Use DOSBox (http://www.dosbox.com/). I also have several DOS programs that work only in DOS. As they will never be updated, or until I find a replacement, DOSBox is the best zero-cost solution.

Note that DOSBox does NOT work with TC.

Joe

Thanks for the lead. I just tried DOSBox as you suggested. Cute program works just like an old DOS programmer would expect.

But I'm determined to make Zork run from a single command in TC just to see if I can do it (I don't have any trouble running Zork using NT CMD -- of course it's not really Zork I wan't to run, but a command interpreter I once wrote to run under DOS). But I'm finding TC hard to catch on to.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,426
85
Albuquerque, NM
prospero.unm.edu
Exactly, that works!

(only I don't quite understand why!?)

Well, since it's COMMAND.COM executing the batch file and not TCC, both commands are executed in the same DOS session.

If you put both commands in a .BTM and TCC executes it, then NNANSI and Zork will wind up running in separate DOS sessions (VDMs). The first VDM is created when you load NNANSI.COM, a DOS program -- and destroyed when NNANSI terminates (almost immediately.) Then a second VDM is created for Zork, but by then the first VDM is gone, taking NNANSI with it. Running DOS programs in a non-DOS operating system is a mess; DOS TSRs were always a mess; put them together and you have mess squared.

CMD.EXE has a Rube Goldbergesque mechanism for handling .BAT files which causes all DOS programs to be executed in the same VDM. TCC doesn't emulate it. Type HELP 4NTBAT for ugly details, if you really want them.
 
Similar threads
Thread starter Title Forum Replies Date
R ansi.sys ?? Support 15
samintz ANSI issues Support 3
FreezerBurnt ANSI Prompt messes up list output. Support 39
samintz ANSI Colors Support 33
nickles ANSI Colors Windows 7 no longer working Support 6
samintz WAD ANSI issue Support 3
AndrewJ TakeCommand v23 + ANSI color sequences leads to black on black text Support 6
K ANSI Not Working Support 8
vefatica ANSI, ANSIWin10 ... ? Support 2
vefatica Win10's ANSI doesn't like 2>NUL Support 10
vefatica How do I see Windows 10's ANSI in action? Support 3
M Please explain TCMD's ANSI x3.64 support Support 4
M ANSI is used to show files instead of OEM in version 17 to 19 ! Support 5
vefatica ANSI Support 11
vefatica WAD ANSI still misbehaves with build 35 Support 36
vefatica ANSI misbehavior????? Support 4
Peter Murschall UNICODE mixed with ANSI Code Support 11
J Piping ANSI control sequences through 'type' Support 4
gschizas Take Command (Environment) doesn't show v2 ANSI colors Support 30
B How to? Convert Unicode to ANSI Support 1
D Can ANSI escape sequences be used in keystroke aliases? Support 8
vefatica WAD ANSI <ESC>[K Support 5
E Shorter prompt / ANSI codes support Support 10
C Copy (sys) error Support 3
Patulus TCHistoryLog: TCC: (Sys) The system cannot find the path specified Support 15
C WAD TCC: (Sys) C:\Program Files\JPSoft\TCMD17\tcc.exe is not a valid Win32 application. Support 6
Q TCC: (Sys) The process cannot access the file because it is being used by another process. Support 0
C old .vs. new system Support 0
gentzel "Check for Updates" appears to be checking for old version Support 2
Charles Dye Old download links on JPSoft.com home page Support 0
Dmitry L. Kobyakov From old version: had the setup's error been corrected? Support 6
C Any reason to keep old versions? Support 8
vefatica WAD IFTP - old problem still there Support 2
SB-Robert Old 4NT Won't Register - Options? Support 8
vefatica All my old TCMDs start slowly Support 9
L How to copy an old xp drive to a large ntfs drive Support 6
M "Reawakening" of an old issue with _complete_ documentation... Support 39
M “Reawakeng" of an old issue with the "copy" command that I'm not sure I've ever reported in the past Support 6
Kachupp old version 4nt v8 Support 0
Kachupp old version 4nt v8 Support 0
L A little startup help from an old CLI guy please. Support 14
A Help | Check for updates "old news" Support 13
BobK New to TCC, Why does it use my old 4NT files? Support 3

Similar threads