装配致命错误LNK1190:发现无效的链接地址信息,类型0×0001 [英] assembly fatal error LNK1190: invalid fixup found, type 0x0001

查看:2847
本文介绍了装配致命错误LNK1190:发现无效的链接地址信息,类型0×0001的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要写在Visual Studio 2010的16位8086汇编code
但给我的错误:
code:

I want to write 16 bit 8086 assembly code in visual studio 2010 but gives me error: code:

.MODEL small
.STACK 100h
.data
message BYTE "Hello, world!","$"
.code
mov ah,9
mov dx,OFFSET message ; addr of buffer
int 21h
END

输出给了我这个错误:

output gives me this error:

fm.obj : fatal error LNK1190: invalid fixup found, type 0x0001

我使用的 masm32v11 。我应该怎么办?

推荐答案

在什么地方汇编知道的起始地址是什么?
使用微软(R)分段可执行文件链接器版本5.60.339 1994年12月5日(16位链接)
并加入启动年底启动的code汇编和链接就好了。 MASM32包括在bin目录中的16位链接器。您必须传递不同的命令行参数ML组装16位code虽然正确。

Where does the Assembler know where the starting address is? Using Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994 (16bit linker) and added start and end start the code Assembles and links just fine. MASM32 includes a 16bit linker in the bin directory. You must pass different command line parameters to ML to Assemble 16bit code correctly though.

.MODEL small
.STACK 100h
.data
message BYTE "Hello, world!","$"
.code
start:
mov ah,9
mov dx,OFFSET message ; addr of buffer
int 21h
END start

因此​​,要回顾一下 - 你的code需要一个起始地址和结束,
您可以使用自带的MASM32当前ML组装16位和32位code。要链接的16位code,你必须使用一个16位链接器,链接32位code,你必须使用一个32位链接器。

So to recap - your code needs a starting address and an end, You can use the current ML that comes with MASM32 to Assemble 16 bit and 32 bit code. To link 16 bit code you must use a 16 bit linker, to link 32 bit code, you must use a 32 bit linker.

从我的16位DOS应用程序之一:

From one of my 16 bit DOS apps:

ML.EXE /DMASM /DDOS /Zm /c /nologo /I"f:\masm32\Include" "dosdisplay.asm"
link16.exe /NOLOGO "dosdisplay.obj"

这篇关于装配致命错误LNK1190:发现无效的链接地址信息,类型0×0001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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