程序代码如下:
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我看不出是什么原因
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我看不出是什么原因
