大哥哥门,我是汇编超级菜鸟,今天想自己编一个算是程序的程序玩玩,可是怎么也执行不过,请各位大虾帮帮忙。程序的目的是建立一个文件。执行时提示输入文件名,然后我们输入文件名,再提示输入文件内容,我们再输入文件内容。请各位大虾帮我编个这个要求的程序,或者帮我查下下面的程序哪里错了,无限感激。程序标号和变量取名有点乱 chang=10 date segment name1 db 'input name=$' huan1 db chang db ? db chang dup(0) NAME2 DB 'INPUT WENBEN=$' NEIRONG db chang db ? db chang dup(0) WRONG1 db 'creat wrong $' date ends ; sseg segment stack HUAN DB 100H dup(0) sseg ends ; code segment assume cs:code,ds:date,ss:sseg,es:date start: mov ax,date mov ds,ax
lea dx,name1 mov ah,09h int 21h
mov dx,offset huan1 mov ah,0ah int 21h
mov si,offset huan1 add si,2 mov di,offset NEIRONG mov cl,huan1+1 cld movsb repz
mov dx,offset NEIRONG add dx,2 mov cx,0 mov ah,3ch int 21h JC WRONG2
MOV BX,AX
LEA DX,NAME2 mov AH,09h int 21h
mov dx,offset huan1 mov ah,0ah int 21h
mov si,offset huan1 add si,2 mov di,offset NEIRONG mov cl,huan1+1 cld rep movsb
MOV DX,OFFSET NEIRONG+2 MOV CX,OFFSET NEIRONG+1 MOV AH,40H INT 21H JC WRONG2
MOV AX,3EH INT 21H JMP END1
WRONG2: CALL WRONG ; WRONG PROC push dx push ax mov dx,offset WRONG1 mov ah,09h int 21h POP AX POP DX ret WRONG ENDP
END1: mov al,0 mov ah,4ch int 21h
code ends end start