程序代码如下:
DATAS SEGMENT
stro db "input character'f'or's'!",'$'
str1 db 'input character:$'
str2 db 'the first subroutine!$'
str3 db 'the second subroutine!$'
DATAS ENDS
code SEGMENT
ASSUME cs:code,ds:DATAS
START:
main proc far
MOV AX,DATAS
MOV DS,AX
mov dx,offset str1
mov ah,09h
int 21h
mov ah,01h
int 21h
cmp al,'f'
je subf
cmp al,'s'
je subs
call enter
lea dx,stro
mov ah,09h
int 21h
jmp retn subf:call first
jmp retn
subs:call second
retn:ret
main endp
enter proc
mov dl,0dh
mov ah,02h
int 21h
mov dl,0ah
mov ah,02h
int 21h
ret
enter endp
first proc
call enter
lea dx,str2
mov ah,09h
int 21h
ret
first endp
second proc
call enter
lea dx,str2
mov ah,09h
int 21h
ret
second endp
code ends
END START
编译后如下syntax error:retn
syntex error:retn
syntax error:ret我看不出是什么原因作者: chrise 时间: 2010-4-9 22:53 标题: 再加一下
enter proc
mov dl,0dh
mov ah,02h
int 21h
mov dl,0ah
mov ah,02h
int 21h
ret
enter endp
这个程序段是什么作用,望指教一下作者: 070 时间: 2010-4-9 23:31 印象中retn好象是保留字,不能作为 标识符啊。。。把所有retn替换成其他名称就好了。