Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
String 从程序集中的用户输入打开文件名_String_File_Assembly_Input - Fatal编程技术网

String 从程序集中的用户输入打开文件名

String 从程序集中的用户输入打开文件名,string,file,assembly,input,String,File,Assembly,Input,我无法使用用户输入的字符串打开文件。当我给打印输入字符串时,它是可以的。你能帮我吗 vstupz db 100 db 0 subor db 103DUP(?) handler_sub DW ? mov dx,offset vstupz mov ah,0ah int 21h mov al,0 mov ah,3dh mov dx, offset subor int 21h mov handler_sub,AX 当我没有subor db 103DUP(?)但是subor db“

我无法使用用户输入的字符串打开文件。当我给打印输入字符串时,它是可以的。你能帮我吗

vstupz db 100
       db 0
subor  db 103DUP(?)
handler_sub DW ?


mov dx,offset vstupz
mov ah,0ah
int 21h

mov al,0
mov ah,3dh
mov dx, offset subor
int 21h
mov handler_sub,AX
当我没有
subor db 103DUP(?)
但是
subor db“subor.txt”时,
它可以工作


谢谢

int 21h/0ah
为您提供了一个回车终止字符串
int 21h/3dh
需要一个以NUL结尾的字符串。但如何修复它呢???在读取字符串后替换字符串终止符。在内存中扫描给定值和写入内存都是基本操作。您可能应该阅读一本书或教程,以便了解x86汇编的基础知识。