正在学习汇编课程,却陷入了 DOS!
作为电子工程学位的一部分,我正在学习微处理器编程课程。不幸的是,在实验室中,我们必须使用 MASM 在 DOS 下工作。
现在,我并没有真正发现 DOS 是一个障碍,但我只是家里的计算机上没有它(而且我的计算机都没有软盘驱动器),所以我无法练习编写程序。我在 Windows 下尝试过,但它无法组装(我猜这是因为保护模式)。
关于我应该做什么有什么建议吗?我应该学习在保护模式下编程吗?这对我的课程有帮助吗?本课程重点介绍 8086。
也许虚拟机可以提供帮助?如果是这样,我在哪里可以获得 DOS 和 MASM?
I'm taking a course on Microprocessor Programming as part of my Electronic Engineering degree. Unfortunately, in the labs, we have to work in DOS using MASM.
Now, I don't really find DOS a hindrance, but I just don't have it on a computer at home (and none of the computers that I have have floppy drives), so I am unable to practice writing programs. I have tried under Windows, but it just doesn't assemble (I am guessing this is because of Protected Mode).
Any advice on what should I do? Should I just learn to program in Protected Mode? Will that help me with the course? The course is focused on the 8086.
Perhaps a virtual machine could help? If so, where can I get DOS and MASM for it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
FreeDOS 是另一种选择,在 virtualbox 中运行它
http://www.freedos.org/
顺便说一句,免费DOS 也可以从CD 启动。我认为如果愿意的话,您甚至可以将其安装在拇指驱动器上。
FreeDOS is another option, and running it in virtualbox
http://www.freedos.org/
BTW, Free DOS can also be booted from a CD. I think you can even install it on a thumb drive if so inclined.
我建议使用虚拟机,例如免费的 VirtualBox 或 qemu,一个 x86(+其他)模拟器。我建议使用 MS-DOS 作为来宾操作系统,因为我之前在 VirtualBox 下的 FreeDOS 下尝试一些基本汇编的尝试是不可靠的。
MASM v8 是可以从 Microsoft 下载 - 但我不记得它是否包含 16 位汇编器。另请阅读 Randall Hyde 关于 MASM 的 blurb。 Art of Assembly 网站是学习组装的首选网站。当然,维基百科有汇编器比较。您需要一个与 MASM 兼容并在 DOS 下运行(即 16 位)的操作系统。
添加注释:Windows XP 之前的旧版 MS-Windows 包括 MS-DOS,包括 Windows 95 和 98。如果您有或可以在 CD 上找到旧副本,否则人们可能会如果他们有 CD,请免费提供 CD - 询问朋友、当地计算机商店、家人,您应该能够轻松或轻松地在虚拟机中安装它们。
I would suggest using a virtual machine such as the free VirtualBox, or qemu, an x86 (+ others) emulator. I would suggest using MS-DOS as the guest OS, as my previous attempts at trying some basic assembly under FreeDOS under VirtualBox were unreliable.
MASM v8 is available for download from Microsoft - but I don't remember if that includes a 16-bit assembler or not. Also read Randall Hyde's blurb on MASM. The Art of Assembly website is a go-to spot for learning assembly. Of course Wikipedia has a comparison of assemblers. You'll want one that is MASM compatible and runs under DOS (i.e. 16-bit).
Added Note: Older versions of MS-Windows prior to Windows XP included MS-DOS, including Windows 95 and 98. If you have or can find an old copy on CD, otherwise people will likely give the CD freely if they have one - ask friends, local computer stores, family, and you should be able to install them in a virtual machine with little or no effort.
我会考虑运行 Sun 的 VirtualBox(免费)以在任何平台(Windows、Mac、 Linux,...)
I would look into running Sun's VirtualBox (Free) to run a DOS VM on any platform (Windows, Mac, Linux, ...)
我使用了这个模拟器bochs,如果你只需要基本的dos,那么与免费的dos一起使用是非常好的
I used this emulator bochs while back together with free dos is pretty good if you just need basic dos
虚拟机就可以了。我非常确定,如果您的学术机构提供访问权限,MSDNAA 上可以免费提供 DOS。如果您使用的是 Windows,我建议使用 Microsoft Virtual PC for DOS VM。虽然我个人更喜欢将 VMware 作为 VM 主机,但特别是对于 DOS,Virtual PC 似乎在模拟方面做得更好。
A virtual machine would do. I'm pretty sure DOS is freely available on MSDNAA if your academic institution provides access to it. If you're using Windows, I suggest using the Microsoft Virtual PC for DOS VMs. While I personally prefer VMware as a VM host, for DOS specifically, Virtual PC seems to be doing a better job at emulation.
如果您从“开始”菜单中键入
COMMMAND
而不是CMD
并选择运行,您将进入 DOS。If you type
COMMMAND
instead ofCMD
from the Start menu and select run you will be in DOS.Inline::ASM - 用汇编器编写 Perl 子例程。
概要
Inline::ASM - Write Perl Subroutines in assembler.
SYNOPSIS
VMWare 就可以了。只需找到 DOS 映像(.iso 或软盘)并将其安装在 VMWare 上即可。您可以用它做任何您想做的事情,而不会对您的主机造成任何损害。如果需要,您甚至可以使用 int13 中断;)。
噢,我怀念在我的 i386 上做“常驻”应用程序在 DOS 下挂钩中断子例程的时光:)
祝你好运,享受 asm 的乐趣。
VMWare would do. Just find the DOS image(.iso or floppy) and install it on the VMWare. You can do whatever you want with it without any harm to your host machine. You can even play with int13 interrupt if you want ;).
Oh I miss the time when I did the "resident"applications hooking interrupt subroutines under DOS on my i386 :)
Good Luck and have fun with asm.