如何使用VS2013或MASM32运行MS-DOS .asm文件? [英] How to run a MS-DOS .asm file using VS2013 or MASM32?

查看:359
本文介绍了如何使用VS2013或MASM32运行MS-DOS .asm文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的test.asm代码.基本上没有任何内容,因为它只是想让它首先构建并运行而没有错误.

Here is my test.asm code. Basically 'nothing' inside because just want to get it to build and run without errors first.

.model small
.stack 64
.data
.code

main proc
  mov ax,@data
  mov ds,ax

  mov ax,4c00h
  int 21h
main endp
end main

我曾尝试使用Visual Studio 2013包括lib,添加链接器以及来自网站的所有那些指南,但没有运气.对于MASM32和Visual Studio 2013,总是会收到此错误消息错误A2006:未定义的符号:DGROUP".

I have tried using visual studio 2013 include the lib, add the linkers and all those guides from websites but no luck. Always getting this error message "error A2006: undefined symbol : DGROUP" for both MASM32 and visual studio 2013.

请逐步指导我进行构建和运行..另外,我尝试使用dosbox,这是我可以做到的. 继续接受非法命令.我究竟做错了什么? :(

Please guide me step by step on the build and run.. Also, i tried using dosbox and this is as far i can go.. Keep having the illegal command. What am I doing wrong? :(

推荐答案

释义:我如何用土豆给自行车轮胎充气?

To paraphrase: how do I inflate a bicycle tire with a potato?

您的程序集是16位的,并且您的目标是MS-DOS(int21调用是免费的). VS2013和MASM32都不能够生成DOS可执行文件.尝试使用其他汇编器. e. NASM.或者,阅读现代组装.

Your assembly is 16-bit, and you're targeting MS-DOS (the int21 call is a giveaway). Neither VS2013 nor MASM32 is capable of generating DOS executables. Try a different assembler, i. e. NASM. Alternatively, read up on modern assembly.

这篇关于如何使用VS2013或MASM32运行MS-DOS .asm文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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