DATA SEGMENT PA1 DB 'January',10,13,'$' PA2 DB 'February',10,13,'$' PA3 DB 'March',10,13,'$' PA4 DB 'April',10,13,'$' PA5 DB 'May',10,13,'$' PA6 DB 'June',10,13,'$' PA7 DB 'July',10,13,'$' PA8 DB 'August',10,13,'$' PA9 DB 'September',10,13,'$' PA10 DB 'October',10,13,'$' PA11 DB 'November',10,13,'$' PA12 DB 'December',10,13,'$' PRO DW ?,PA1,PA2,PA3,PA4,PA5,PA6,PA7,PA8,PA9,PA10 dw PA11,PA12 buff db 3 db 0 db 3 dup(0) ctrl db 10,13,'$' DATA ENDS CODE SEGMENT ASSUME CS:CODE, DS:DATA start: MOV AX,DATA MOV DS,AX lea dx,buff mov ah,0ah int 21h cmp buff[1],2 je shiwei sub buff[2],30h mov bl,buff[2] jmp done shiwei: sub buff[2],30h mov cl,10 mov al,buff[2] mul cl sub buff[3],30h add al,buff[3] mov bl,al done: lea dx,ctrl mov ah,09h int 21h mov bh,0 shl bx,1 mov dx,PRO[bx] mov ah,09h int 21h mov ax,4c00h int 21h end start
输入数字显示对应的月份DATA SEGMENTPA1 DB January,10,13,$PA2 DB February,10,13,$ PA3 DB March,10,13,$PA4 DB April,10,13,$PA5 DB May,10,13,$PA6 DB June,10,13,$PA7 DB July,10,13,$