现代操作系统上的 FAT-16

发布于 2024-07-06 11:28:54 字数 209 浏览 11 评论 0原文

我有一个用 BASIC 编写的项目。 我不确定确切的原因,但除非从 FAT-16 文件系统运行,否则该应用程序将无法运行。

我宁愿尝试在现代操作系统(Vista/XP)中建立一个支持此应用程序的环境,而不是重写它。

有谁知道如何通过某种代码更改(到 BASIC 代码)或 FAT-16“模拟器”(如果存在这样的东西)来让这样的应用程序在 XP/Vista 中运行?

I've got a project that was written in BASIC. I'm not sure of the exact reason, but the app will not function except when being run from a FAT-16 file system.

I'd rather try to set up an environment that will support this app in a modern OS (Vista/XP) instead of rewriting it.

Does anyone know how to get an app like this running in XP/Vista through some kind of code change (to the BASIC code) or FAT-16 "emulator" (if such a thing exists)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

木格 2024-07-13 11:28:54

您可以尝试通过 DOSBOX 运行它:

DOSBox 模拟 Intel x86 PC,
配有声音、图形、鼠标、
操纵杆、调制解调器等,必要的
运行许多旧的 MS-DOS 应用程序
根本无法在现代 PC 上运行
操作系统,例如 Microsoft
Windows XP、Windows Vista、Linux 和
FreeBSD

(来自他们的 Wiki

我已经使用它好几年了。 它很好、稳定并且相当健壮。 它还有几个第三方 GUI,让您的生活更轻松。

You may try running it via a DOSBOX:

DOSBox emulates an Intel x86 PC,
complete with sound, graphics, mouse,
joystick, modem, etc., necessary for
running many old MS-DOS applications that
simply cannot be run on modern PCs and
operating systems, such as Microsoft
Windows XP, Windows Vista, Linux and
FreeBSD

(from their Wiki)

I use it for several years now. It is good, stable and quite robust. It has several third-party GUIs as well, to make your life easier.

獨角戲 2024-07-13 11:28:54

正如已经建议的那样,除了让应用程序在虚拟化环境中保持活动状态之外,要做的第一件事是找出代码似乎需要 FAT-16 的原因。

如果应用程序(或其运行时)特别邪恶,则 FAT-16 要求可能源于它试图绕过操作系统进行直接磁盘 I/O。 如果 BASIC 代码本身正在尝试执行该特定特技,您应该会看到大量 CALLPEEKPOKE 甚至I/O 例程中偶尔出现 INOUT 语句。 确定运行时的用途更加困难:如果它来自 Microsoft、基于 DOS 并且不太古老(例如 GWBASIC 或 QuickBASIC/PDS),或者基于 Windows,则应该没问题。

无论如何,如果应用程序或运行时尝试直接磁盘 I/O,您就会失败:如果不进行大量类似重写的代码更改,几乎不可能在现代操作系统上运行。

如果应用程序使用正常的 BASIC 设施进行输入和输出(例如,OPEN“file”FOR任何 AS #1),并且运行时也使用正常的操作系统接口,最有可能的原因是它只在 FAT-16 上工作的一个缺点是它会被长文件名彻底混淆。

首先要尝试的是将应用程序放在一个短名称的目录中(例如c:\myapp),然后看看接下来会发生什么。 可能它只是工作:否则,您应该能够通过逐步执行 BASIC 代码来弄清楚发生了什么(仁慈地假设调试器是其运行时环境的一部分)。

如果没有有关您的应用程序运行的确切解释器/编译器的更多信息,就不可能更详细地回答您的问题。 如果到目前为止的答案没有帮助,您可能需要编辑您的问题以包含此信息。

Other than just keeping the app alive in a virtualized environment, as has already been suggested, the first thing to do would be to figure out why the code seems to require FAT-16.

If the app (or its runtime) is particularly evil, the FAT-16 requirement may stem from the fact that it's trying to do direct disk I/O, bypassing the operating system. If the BASIC code itself is trying to pull that particular stunt, you should see lots of CALLs, PEEKs, POKEs or even the occasional IN and OUT statement in I/O routines. Determining what the runtime is up to is more difficult: if it's from Microsoft, DOS-based and not too ancient (e.g. GWBASIC or QuickBASIC/PDS), or Windows-based it should be OK, though.

Anyway, if either the app or the runtime is attempting direct disk I/O, you lose: it will be pretty much impossible to get things to work on a modern OS without extensive, rewrite-like, code changes.

If the app is using the normal BASIC facilities for input and output (e.g. OPEN "file" FOR whatever AS #1), and the runtime is also using the normal OS interfaces, the most likely reason it only works on FAT-16 is that it gets thorougly confused by long filenames.

First thing to try would be to put the app in a directory with a short name (e.g. c:\myapp), and see what happens next. Possibly it just works: otherwise, you should be able to figure out what's going on by stepping through the BASIC code (charitably assuming a debugger is part of its runtime environment).

Without some more information about the exact interpreter/compiler your app runs in, it's impossible to answer your question in more detail. If answers so far haven't been helpful, you may want to edit your question to include this information.

浪菊怪哟 2024-07-13 11:28:54

在 VMWare 虚拟机中运行旧版本的 Windows,该虚拟机本身在现代操作系统中运行。

Run an older version of Windows in a VMWare virtual machine, itself running in a modern OS.

野生奥特曼 2024-07-13 11:28:54

从闪存、zip 驱动器或您拥有的任何可移动介质运行它。
Windows XP 将 1GB USB 闪存驱动器格式化为 FAT 没有任何问题,无需其他工具。
此外,如果应用程序确实邪恶,那么您希望通过驱动器的边界来限制其邪恶性。

Run it from a flash, zip drive or whatever removable media you got.
Windows XP formatted a 1GB usb flash drive as FAT with no problems, no additional tools were nessesary.
Besides, if the application is really evil, you thus, hopefully, constrain its evilness by the boundaries of the drive.

暮色兮凉城 2024-07-13 11:28:54

根据环境:应该仍然可以在现代操作系统上创建 Fat-16 文件系统,您可能只需要额外的工具,例如 Acronis DiskDirector 甚至某些 Linux 的 fdisk 变体。

请记住,FAT-16 的分区大小限制为 2 GB。

但正如之前所说:最好找出原因。 听起来像是某种 WTF 复制保护。

Depending on the Environment: It should still be possible to create Fat-16 Filesystems on modern OS, you may just need additional Tools like Acronis DiskDirector of even some Linux' fdisk Variant.

Just keep in mind that FAT-16 is limited to a partition Size of 2 GB.

But as said before: Best to find out WHY. Sounds like some sort of WTF-Copy-Protection.

过期以后 2024-07-13 11:28:54

我同意@eugensk00的建议,我们有一些稍微古怪的仪器软件,它不会保存到NTFS硬盘,但会保存到小记忆棒(1GB)......

I second @eugensk00's suggestion, we have some slightly wacky instrument software which won't save to a NTFS hard disk but will save to a small memory stick (1GB)...

窝囊感情。 2024-07-13 11:28:54

您也许可以将代码直接导入 VB.NET(尽管几乎肯定需要进行一些修改)。 然后,您可以用 VB.NET 调用替换原始应用程序的文件 IO 调用(这几乎肯定是您的问题),从而摆脱 FAT16 问题。

You might be able to import the code directly into VB.NET (although it would almost certainly require some modifications). You could then replace the original app's file IO calls (which are almost certainly your problem) with VB.NET calls, getting you out of the FAT16 problem.

月光色 2024-07-13 11:28:54

另请注意,一些老式程序在写入文件之前首先检查是否有足够的磁盘空间,如果驱动器太大以至于溢出它正在使用的 16 位计数器,则会导致奇怪的问题。 (如果是这种情况,那么它要么工作,要么不工作,具体取决于溢出的性质)。

Also note that some old-school programs first check to see if there is enough disk space before writing files, resulting in wacky issues if the drive is so big that it overflows the 16-bit counter it is apparently using. (If that's the case, then it'll either work, or not work, depending on the nature of the overflow).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文