实验九,一样的程序,却根本不能编译
编译出现这样的错误E:\try>ml new.asmMicrosoft (R) Macro Assembler Version 6.15.8803
Patched for you by promethee in the year 2001 - enjoy
Copyright (C) Microsoft Corp 1981-2000.All rights reserved.
Assembling: new.asm
new.asm(29) : error A2008: syntax error : push
new.asm(51) : error A2008: syntax error : mov
new.asm(53) : error A2006: undefined symbol : s2
new.asm(59) : error A2006: undefined symbol : s3
你有认真看看吗?标号前怎么没回车的?只会复制粘贴?:L
assume cs:code,ds:data,ss:stack
data segment
db 'welcome to masm!'
db 02h,24h,71h
data ends
stack segment
dw 8 dup(0)
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,10h
xor bx,bx
mov ax,0b872h
mov cx,3
s3: push cx
push ax
push bx
mov es,ax
mov si,0
mov di,0
mov cx,10h
s1: mov al,ds:
mov es:,al
inc si
add di,2
loop s1
mov di,1
pop bx
mov al,ds:10h
inc bx
mov cx,10h
s2: mov es:,al
add di,2
loop s2
pop ax
add ax,0ah
pop cx
loop s3
mov ax,4c00h
int 21h
code ends
end start 还有就是loop循环是死循环,怎么没jaxz之类的语句跳出循环的? 楼主重新把代码打一遍,应该能消除这些符号不能识别的问题。 长长见识。。。。。。。。 {:10_261:}{:10_261:}
页:
[1]