主题:(急)请各位大虾过来帮帮忙
请看下面那个程序
汇编语言实验:循环与分支程序设计
编写一程序,要求根据用户键入的月份数在终端显示该月的英文缩写名。
data segment
three db 3
mess db 'month?',13,10,'$'
monin label byte
max db 3
act db ?
mon db 3 dup (?)
alfmon db '???',13,10,'$'
montab db 'jan','feb','mar','apr','may','jnu'
db 'jul','aug','sep','oct','nov','dec'
data ends
code segment
assume cs:code,ds:data,es:data
main proc far
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
start:
lea dx,mess
mov ah,09
int 21h
lea dx,monin
mov ah,0ah
int 21h
mov dl,13
mov ah,02
int 21h
mov dl,10
mov ah,02
int 21h
cmp act,0
mov ah,30h
cmp act,2
je two
mov al,mon
jmp conv
two: mov al,mon+1
mov ah,mon
conv: xor ax,3030h
cmp ah,0
jz loc
loc: lea si,montab
dec al
mul three
mov cx,03
cld
lea di,alfmon
lea dx,alfmon
jmp start
exit: ret
main endp
code ends
end main
这程序语法没有错误吧?为什么我进行链接的时候它会报:"There was 1 error detected"这个错呢?
还有的就是,我该怎么在DOS环境下运行它?也就是说,我怎么实现它"根据用户键入的月份数在终端显示该月的英文缩写名"这个功能?
汇编语言实验:循环与分支程序设计
编写一程序,要求根据用户键入的月份数在终端显示该月的英文缩写名。
data segment
three db 3
mess db 'month?',13,10,'$'
monin label byte
max db 3
act db ?
mon db 3 dup (?)
alfmon db '???',13,10,'$'
montab db 'jan','feb','mar','apr','may','jnu'
db 'jul','aug','sep','oct','nov','dec'
data ends
code segment
assume cs:code,ds:data,es:data
main proc far
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
start:
lea dx,mess
mov ah,09
int 21h
lea dx,monin
mov ah,0ah
int 21h
mov dl,13
mov ah,02
int 21h
mov dl,10
mov ah,02
int 21h
cmp act,0
mov ah,30h
cmp act,2
je two
mov al,mon
jmp conv
two: mov al,mon+1
mov ah,mon
conv: xor ax,3030h
cmp ah,0
jz loc
loc: lea si,montab
dec al
mul three
mov cx,03
cld
lea di,alfmon
lea dx,alfmon
jmp start
exit: ret
main endp
code ends
end main
这程序语法没有错误吧?为什么我进行链接的时候它会报:"There was 1 error detected"这个错呢?
还有的就是,我该怎么在DOS环境下运行它?也就是说,我怎么实现它"根据用户键入的月份数在终端显示该月的英文缩写名"这个功能?