
为什么我用masm5.0编译汇编源程序时总是出现 unable to open input file ?
不能生成objassumecs:codesg,ds:datasg,ss:stacksgdatasgsegmentdb"ibm"db"dec"db"dos"db"vax"d...
不能生成obj
assume cs:codesg,ds:datasg,ss:stacksg
datasg segment
db "ibm "
db "dec "
db "dos "
db "vax "
datasg ends
stacksg segment
dw 0,0,0,0,0,0,0,0
stacksg ends
codesg segment
start:mov ax,stacksg
mov ss,ax
mov sp,16
mov ax,datasg
mov ds,ax
mov bx,0
mov cx,4
s0: push cx
mov si,0
mov cx,3
s: mov al,[bx+si]
and al,11011111b
mov [bx+si],al
inc si
loop s
add bx,16
pop cx
loop s0
mov ax,4c00H
int 21H
codesg ends
end start 展开
assume cs:codesg,ds:datasg,ss:stacksg
datasg segment
db "ibm "
db "dec "
db "dos "
db "vax "
datasg ends
stacksg segment
dw 0,0,0,0,0,0,0,0
stacksg ends
codesg segment
start:mov ax,stacksg
mov ss,ax
mov sp,16
mov ax,datasg
mov ds,ax
mov bx,0
mov cx,4
s0: push cx
mov si,0
mov cx,3
s: mov al,[bx+si]
and al,11011111b
mov [bx+si],al
inc si
loop s
add bx,16
pop cx
loop s0
mov ax,4c00H
int 21H
codesg ends
end start 展开
3个回答
展开全部
我也遇到过这种情况,因为是初学对masm不熟悉,你肯定是没有用cd命令。使用如下:
假设你的masm程序在e盘(不论哪个文件夹),进入控制台(这个肯定会哈),先键入“e:”,回车;再用cd把masm所在的文件夹路径输入,例如“cd E:\hb”,接下来就可以正常工作了。masm、link、debug神马的都正常运行喽!
假设你的masm程序在e盘(不论哪个文件夹),进入控制台(这个肯定会哈),先键入“e:”,回车;再用cd把masm所在的文件夹路径输入,例如“cd E:\hb”,接下来就可以正常工作了。masm、link、debug神马的都正常运行喽!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询