tags:

views:

418

answers:

3

I am using Turbo C 3.0 and Turbo c 2.0 for the programming. Added to this I am using Windows XP. While using Windows 98, the above said programs were really worked fine. But after installing XP, those programs were really slow-down my system. Those were really using high CPU power even when idle(idle refers to "no interaction between program and user").

Can anybody previously solved this issue, Post here.

Also, I want to know what is causing those slow-down!

+1  A: 

I suspect Adrian's comment is the correct answer: old DOS programs did not account for multitasking and so tended to put themselves in tight loops when "idle". Back in the day, it didn't matter as nothing else was running at the same time and the operating system would interrupt the running program to handle hardware, well, interrupts.

I would highly recommend avoiding such tools on modern hardware because the programs the generate are likewise not multitasking friendly. They are also going to be optimized for ancient processors and have limited memory addressing. If you have some old hardware and want to goof around with it, then knock yourself out. But there are plenty of modern compilers that are free (either as Visual C++ Express is to get you hooked, or open source).

Godeke
Or at least running them on a virtual machine...
Aric TenEyck
I guess the question that remains unanswered is the "why". If one is just teaching C++ to themselves, I would just pick up a modern compiler. If there is some code that has to be maintained... well, that is a different bundle of wax. I have some C++ code from 1985 still running and it has seen quite a few compilers in its day.
Godeke
+2  A: 

Those are 16 bit DOS programs, and they probably will not run on XP. They are probably running in the NT Virtual DOS Machine. Use the task manager, or better yet, Process Explorer, to check this. You will probably not see your programs running; look for instances of ntvdm.exe instead.

I have noticed several antivirus programs (Checkpoint, Proventia Desktop) seem have a problem with ntvdm. It is as if they eat up quite a bit of cpu when an ntvdm instance is running.

Also, wasn't Turbo C finicky about its extended memory settings? If you still have your Autoexec.bat and Config.sys files from the Win98 system, you could try changing XP's settings to match. The XP equivalent to these files are autoexec.nt and config.nt; they are in the Windows\System32 directory.

R Ubben
A: 

This can be avoided partially by setting process priority. Start the App eg. Turbo C++ 3.0 Minimize and go to Task Manager Find ntvdm.exe Right Click > Set Priority > Low > Yes

Then it runs with not so annoying speeds.

Tafhim