在Freedos中运行Turbo C ++ [英] Run Turbo C++ in Freedos

查看:144
本文介绍了在Freedos中运行Turbo C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在FreeDos中运行Turbo C ++ 。我曾经在DosBox中运行它,但是现在我决定在台式机上测试FreeDos。

I want to run Turbo C++ in FreeDos. I used to run it in DosBox but now I decided to test the FreeDos in my desktop PC.

但是每次我尝试运行它时,光标都会闪烁,并且没有任何反应(输入命令,然后按Enter键,提示不返回(C:>),必须按电源按钮重新启动系统。我的问题是:

But every time I try run it the cursor blinks and nothing happens (after I enter the command and press enter) , the prompt does not return( C:> ) and I have to restart my system by pressing the power button. My question is:


  1. 如何实际运行它?它是否需要额外的驱动程序或文件?

  1. How can I actually run it? Does it require extra drivers or files?

如果无法运行,是否还需要其他C ++ IDE?也许是您自己的IDE?

If it cannot be run, Do you any other C++ IDE? Maybe your own IDE?

P.S。我已经使用Rufus的freedos选项安装了FreeDos。

推荐答案

FreeDOS 不是 MS-DOS ,因此不兼容。但是我没有接触过 FreeDOS ,但这是一些提示(来自 MS-DOS ,因此它们应该或多或少地适用于 FreeDOS ,因为

FreeDOS is not MS-DOS so incompatibilities are to be expected. However I did not come into contact with FreeDOS but here are some hints (from MS-DOS so they should more or less apply to FreeDOS as well).


  1. 没有 himem.sys ,您有没有高内存

  1. Without himem.sys you have no high memory

所以您只有640 KB而不是1 MB的存储空间。这不算什么,因为某些程序甚至需要540 KB ...

so you got just 640 KByte instead of 1 MByte for everything. That is not much as some programs requires even 540 KByte...

而没有 Emm386.exe QEMM386 您没有XMS内存

without Emm386.exe or QEMM386 you got no XMS memory

如果我的内存比 DPMI 驱动程序将无法满足Turbo需求。

If my memory serves well than also the DPMI drivers will not work which turbo needs.

没有正确的 autoexec.bat config sys 无效

without proper autoexec.bat and config sys nothing works

您没有路径,设备驱动程序(鼠标, CDROM 等),并进行设置(如声卡)。如果您不知道要放入什么,请从 DOSBOX 复制它们(减去 DOSBOX 安装线)。没有路径通常也意味着没有 command.com ,因此您没有外壳,因此没有命令可以工作

you do not have paths, device drivers (mouse,CDROM,etc.), and sets (like sound card). If you do not know what to put in them copy them from DOSBOX (minus the DOSBOX mount lines). No paths usually also means no command.com so you got no shell so no commands would work

您使用什么文件系统?

对于较旧的DOS,我不会接受 FAT16 。仅将 FAT32 用于更新的 MS-DOS 版本(来自win98)。即使您的驱动程序始终导致问题,也不要使用 NTFS EXT ...

I would not go beond FAT16 for older DOS. Use FAT32 only for newer MS-DOS versions (from win98). Do not use NTFS or EXT even if you got drivers those caused problems all the time...

计算机速度

许多 DOS 程序,这些程序基于Borlands CRT 库。后来随着计算机加速,这引起了很多问题。如果我没记错的话,这是由运行时错误200 引起的。要补救此类程序,您可以做两件事。修补或重新编译其中的CRT库(有一些修复程序)或进入BIOS并关闭 CPU CACHEs (L1,L2 ..)。这将使您的现代计算机变得非常快386。这仍然应该通过CRT初始化。否则,计时将关闭,并且程序将崩溃/挂起等。 DOSBOX 仿真器旨在以原始速度而不是尽可能快的速度运行程序,因此,如果使用

many DOS programs where based on Borlands CRT library. That caused a lot of problems later on as computers speed-up. If I remember correctly there was this runtime error 200 caused by it. To remedy such programs you can do 2 things. Patch or recompile the CRT lib in them (there are some fixes out there) or go to BIOS and turn off CPU CACHEs (L1,L2..). That will turn your modern computer into really fast 386 That should still pass the CRT init. Otherwise the timing is off and programs crash/hangs etc ... The DOSBOX emulator is designed to run programs at the original speeds instead of as fast as possible speed, so no further adjustment should be necessary if using that.

内存

旧的 DOS 不能处理超过64 MB的数据,即使这样,某些程序也有问题。最安全的方法是将可用内存限制为32 MB。我通常使用 RAMDISC 和或 SMARTDRIVE 缓冲区进行此操作,因此 DOS 程序只剩下32 MB的内存。 (您可以使用 mem 命令查看您的状态,如果看到负数越过障碍并需要增加 SMARTDRIVE 的使用,或者 RAMDISK )。

The old DOS can not handle more than 64 MByte and some programs have problems even with that. The safest way is to limit the available memory to 32 MByte. I usually did it using RAMDISC and or SMARTDRIVE buffers so only 32 MByte of memory is left for the DOS programs. (You can use the mem command to see what is your status if you see negative numbers you are crossing barriers and need to increase usage of SMARTDRIVE or RAMDISK).

不要忘记保存 SMARTDRIVE 缓冲时间,直到退出前,以免丢失如果发生重置或崩溃/挂起/冻结,则显示数据...最好使用带有预定义菜单的 Volcov指挥官(或Norton指挥官)进行此类操作。您甚至可以将文件扩展名与查看者编辑器关联,并与 IDE 关联。因此,如果执行 asm cpp ,它将在您喜欢的 IDE 端被编译或打开。等等...

Do not forget to save the SMARTDRIVE buffers time to time and before exit to avoid loss of data if reset or crash/hang/freeze occur... It is a good idea to use Volcov commander (or Norton commander) with predefined menu for such operations. You can even associate file extentions with viewers editors and IDEs with it. So if you execute asm or cpp it got compiled or opened in your prefered IDE end so on...

这里是 autoexec.bat 和 config.sys (取自我古老的 MS-DOS 救援光盘):

Here example of autoexec.bat and config.sys (taken from my ancient MS-DOS rescue disc):

Autoexec.bat

@echo off
PROMPT $P$G
PATH e:\rescue;e:\rescue\dos98;e:\rescue\vcnew;e:\rescue\pack;e:\rescue\views
e:
cd rescue
SET TEMP=e:\rescue\temp
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET SOUND=e:\rescue\SB16
SET MIDI=SYNTH:1 MAP:E MODE:0
e:\rescue\SB16\DIAGNOSE /S
e:\rescue\SB16\AWEUTIL /S
e:\rescue\SB16\MIXERSET /P /Q

goto %config%
:a
:b
:c
:d
:e

lh gmouse
LH vc

Config.sys

;devicehigh=e:\rescue\dos98\interlnk.exe
shell e:\rescue\dos98\command.com e:\rescue\dos98 /P
lastdrive=M
files=50
buffers=8
stacks=0,0
DOS=HIGH,UMB

[menu]
menuitem=a,QEMM
menuitem=b,EMM EMS
menuitem=c,EMM NOEMS
menuitem=d,STANDART
menuitem=e,RAMDISK 32MB
menudefault=d,1

[a]
device=e:\rescue\dos98\qemm386.sys RAM BE:N
[b]
device=e:\rescue\dos98\himem.sys 
devicehigh=e:\rescue\dos98\emm386.exe rammax
[c]
device=e:\rescue\dos98\himem.sys
devicehigh=e:\rescue\dos98\emm386.exe noems
[d]
device=e:\rescue\dos98\himem.sys
[e]
device=e:\rescue\dos98\himem.sys
devicehigh=e:\rescue\dos98\ramdrive.sys 32767 /e

它具有启动菜单,您可以在其中选择所需的配置。只需更改驱动器号和路径。当心:a,:b,... [a],[b],... 不是盘符是菜单项。

It has boot menu where you can select what configuration you want. Just change the drive letters and paths. Beware :a,:b,... and [a],[b],... are not drive letters those are menu entries.

shell 是command.com的位置。 gmouse 是鼠标驱动程序(不是 DOS 的一部分,您需要下载它), vc 是Volcov指挥官的文件管理器(您并不是非常需要它,它也不是 DOS 的一部分,但确实是个好主意。)您可以忽略SB16和sound blaster设置,因为它很高

shell is the command.com location. the gmouse is mouse driver (not part of DOS you need to download it), vc is Volcov commander filemanager (you do not really need it and also it is not part of DOS but having it really is a good idea.) You can ignore the SB16 and sound blaster settings as it is high unlikely you got the same sound card or even fully SB compatible without any emulation/driver present.

e:\rescue\dos98\,您不太可能获得相同的声卡,甚至与SB完全兼容。

e:\rescue\dos98\ is location of my MS-DOS commands so replace it with your location.

cd 命令更改目录,并且 lh 加载到高内存而不是基本内存中以保留基本内存。

The cd command changes directory, and lh loads into high memory instead of base memory to preserve Base memory.

但是,如果我在哪里避免兼容性问题,我将尝试获取 MS-DOS 6.22

How ever if I where you to avoid compatibility problems I would try to obtain MS-DOS 6.22.

可以肯定的是,您遇到了所有使操作系统无法运行的问题。

So my bet is you got any combination of all the issues mentioned rendering your OS inoperable.

这篇关于在Freedos中运行Turbo C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆