【发布时间】:2015-10-14 21:59:40
【问题描述】:
所以我正在尝试编写一个程序来创建一个文件和我的名字。
但我得到“操作码和操作数的无效组合”
mov handle, ax,我不知道为什么。
我看到here 你可以做到,我为什么不能。
提前感谢您的帮助。
org 100h
mov ah, 3ch ;create a file
mov dx, name ;file name
mov cx, 0
int 21h
mov handle, ax ; save handle
mov ah, 40h ;write to file
mov bx, handle
mov cx, 1000
mov dx, text ; what to write
int 21h
mov ah, 3eh ;close the file
mov bx, handle
int 21h
mov ax, 4C00h ; end
int 21h
section .data
name db "name.txt", 0
text db "Michal",0ah,0dh,"$"
section .bss
handle resb 2
【问题讨论】:
-
如果您将句柄的定义放在您链接到的示例中的顶部会发生什么?