Code Segment Assume CS:Code,DS:CodeEnterCRLF Proc Near mov dl,0dh mov ah,2 int 21h mov dl,0ah int 21h retEnterCRLF EndPPrompt_Mon DB 'month?:$'MONTAB DB 'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC'Input_Num DB 3,0,3 dup(?)Start: push cs pop dsGet_Number: LEA DX,Prompt_Mon MOV AH,9 INT 21H call EnterCRLF lea dx,Input_Num push dx pop si inc si mov ah,0ah int 21h lodsb test al,0fh jz Exit_Proc cmp al,1 ja Two_Chr lodsb and al,0fh xor ah,ah jmp Seach_MonTwo_Chr: lodsw and ax,0f0fh xchg ah,bh xor ah,ah mov bl,10 mul bl add al,bh cmp al,1 jb Get_Number cmp al,12 ja Get_NumberSeach_Mon: dec al mov bl,3 mul bl lea si,MONTAB add si,ax call EnterCRLF mov cx,3Output_Mon: lodsb xchg dl,al mov ah,2 int 21h loop Output_Mon call EnterCRLF JMP Get_Number Exit_Proc: mov ah,4ch ;结束程序 int 21hCode ENDS END Start ;编译到此结束