当前位置: 技术问答>linux和unix
求助,关于vim编写汇编程序遇到的问题
来源: 互联网 发布时间:2017-01-12
本文导语: 使用vim编写程序后输入nmake提示如下: D:Source>nmake Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved. ml /c /coff Menu.asm Microsoft (R) Macro Assembler Version 6.14.8444 C...
使用vim编写程序后输入nmake提示如下:
D:Source>nmake
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
ml /c /coff Menu.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: Menu.asm
Menu.asm(1) : error A2044: invalid character in file
Menu.asm(2) : error A2085: instruction or register not accepted in current CPU m
ode
D:masm32includewindows.inc(60) : error A2119: language type must be specified
D:masm32includewindows.inc(61) : error A2119: language type must be specified
D:masm32includewindows.inc(62) : error A2119: language type must be specified
D:masm32includewindows.inc(63) : error A2119: language type must be specified
D:masm32includewindows.inc(64) : error A2119: language type must be specified
D:masm32includewindows.inc(65) : error A2119: language type must be specified
D:masm32includewindows.inc(66) : error A2119: language type must be specified
D:masm32includewindows.inc(67) : error A2119: language type must be specified
……
……
……
但是我把在vim下写的程序用写字板打开后,再保存一下就正常编译通过,
求解,我想知道如何解决这个问题,在vim中该如何设置
D:Source>nmake
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
ml /c /coff Menu.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: Menu.asm
Menu.asm(1) : error A2044: invalid character in file
Menu.asm(2) : error A2085: instruction or register not accepted in current CPU m
ode
D:masm32includewindows.inc(60) : error A2119: language type must be specified
D:masm32includewindows.inc(61) : error A2119: language type must be specified
D:masm32includewindows.inc(62) : error A2119: language type must be specified
D:masm32includewindows.inc(63) : error A2119: language type must be specified
D:masm32includewindows.inc(64) : error A2119: language type must be specified
D:masm32includewindows.inc(65) : error A2119: language type must be specified
D:masm32includewindows.inc(66) : error A2119: language type must be specified
D:masm32includewindows.inc(67) : error A2119: language type must be specified
……
……
……
但是我把在vim下写的程序用写字板打开后,再保存一下就正常编译通过,
求解,我想知道如何解决这个问题,在vim中该如何设置
|
估计你弄成unix格式了
弄成dos格式试试
在vim里
:e ++ff=dos (这一句不是必须的)
:setlocal ff=dos
:w
弄成dos格式试试
在vim里
:e ++ff=dos (这一句不是必须的)
:setlocal ff=dos
:w
|
那就可能是文件编码
vim你默认的编码是啥
改成gbk看看
vim你默认的编码是啥
改成gbk看看