masm 编译错误 什么鬼按照教程写的代码,求大神指点下
missing operator in expression masmassume cs:code ds:data ss:stack
data segment
DW0123H,0456H,0789H,0abcH,0defH,0fedH,0cbaH,0987H
data ends
stack segment
DW0,0,0,0,0,0,0,0
stack ends
code segment
start: mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,16
push ds:
push ds:
pop ds:
pop ds:
mov ax,4c00H
int 21H
code ends
end start
代码跟甲鱼哥教程一样,本来想编译跟踪观察下的,结果编译不了提示什么表达式错误,没搞懂哪里错了,求大神指点下,谢谢! 这一句:
assume cs:code ds:data ss:stack
改成这样:
assume cs:code , ds:data , ss:stack 代码改成这样更简洁:
assume cs:code , ds:data
data segment
DW0123H , 0456H , 0789H , 0abcH , 0defH , 0fedH , 0cbaH , 0987H
data ends
stack segment stack
DW8 dup(0)
stack ends
code segment
start: mov ax,data
mov ds,ax
push ds:
push ds:
pop ds:
pop ds:
mov ax,4c00H
int 21H
code ends
end start 感谢您解决了原来就犯了这个小错误,哎我太马虎了 DW8 dup(0) 还没有学到这一步{:5_92:} 别见怪哈
页:
[1]