本文介绍了在Windows 7调试指令中工作的循环语句将不能在DOSBox 0.74中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个关于循环汇编语言的活动。我们的任务很简单:显示数字0到9,每个数字之间有空格。我得到的代码在命令提示符下使用'debug'命令在我们学校的WINDOWS 7。我的笔记本电脑是Windows 10,我最近发现,没有'debug'命令在命令提示符下。所以我试着在DOSBox 0.74(最新,也许)写我的代码。每次我在DOSBox中运行它,程序突然挂起,然后崩溃。这是代码

We had an activity about looping in assembly language. Our task is simple: display the numbers 0 to 9 with spaces in-between each number. I got the code to work in the command prompt using the 'debug' command in WINDOWS 7 in our school. My laptop is Windows 10 and I recently found out that there's no 'debug' command in the command prompt. So I tried writing my code in DOSBox 0.74 (latest, maybe). Every time i run it in DOSBox, the programs suddenly hangs up and then crashes. Here's the code

mov cx,0a
mov ah,02
mov dl,30
int 21
mov bl,dl
mov dl,20
int 21
mov dl,bl
inc dl
loop 0107
int 20

有人可以解释一下为什么DOSBox会崩溃吗?

Can someone please explain me why DOSBox crashes?

下面是在Windows 7上运行cmd的工作程序的示例图片:

Here is a sample pic of the working program which runs in cmd on Windows 7:


推荐答案

虽然您的问题不是这个问题的重复它似乎共享某些相似之处。意外的挂起或不寻常的行为。看起来在DOS-DOS中运行的 DEBUG.EXE 版本不能总是正常运行。这可能是因为DOSBox可能不是100%兼容模拟真实的PC /硬件(和DOS)。这可能会导致某些程序和/或操作系统在DOSBox中使用时无法正常工作。

Although your question isn't a duplicate of this other Stackoverflow question it seems to share certain similarities. Namely unexpected hangs or unusual behaviour. It would seem that DEBUG.EXE versions available for MS-DOS do not always function properly when run in DOSBox. This may be because DOSBox may not be 100% compatible emulating a real PC/Hardware(and DOS). This could result in some programs and/or OSes to not work as expected when used in DOSBox.

我修改了我之前的建议各种MS-DOS DEBUG.EXE 程序在DOSBox下运行时可能无法正常工作。 Ross Ridge确认他可以在DOS 6.22的调试器中复制你的问题。

I have amended my previous Stackoverflow answer to suggest a variety of MS-DOS DEBUG.EXE programs may not work properly when run under DOSBox. Ross Ridge confirms he can duplicate your problem with DOS 6.22's debugger when run inside DOSBox.

有一个版本的 DEBUG.COM 由发布,似乎在DOSBox中运行良好。我已从我的网站下载了的FreeDOS版本。或者,您可以从Softpedia下载并提取 DEBUG.COM

There is a version of DEBUG.COM that was released by FreeDOS that seems to play well with DOSBox. I have made the FreeDOS version of DEBUG.COM available for download from my website. Alternatively you can download the ZIP File from Softpedia and extract DEBUG.COM.

这篇关于在Windows 7调试指令中工作的循环语句将不能在DOSBox 0.74中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 17:48