求助:判断闰年的问题
我刚学汇编不久,对汇编很不熟悉,请高手帮忙分析一下这段程序,我不知道为什么错误了DATAS SEGMENT
MESS DB 13,10,'Please input a year: $'
Y DB 13,10,'YES! $'
N DB 13,10,'NO! $'
CONTINUE DB 13,10,'Continue? (y-yes) $'
w DW 0
buff DB 5,?,5 DUP(?),10,13,'$'
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START: MOV AX,DATAS
MOV DS,AX
To_continue:
LEA DX,MESS
MOV AH,9
INT 21h
LEA DX,buff
MOV AH,0AH
INT 21h
MOV CL, [buff+1]
LEA DI,buff+2
PUSH CX
DEC CX
LEA SI,buff+2
tt1: INC SI
LOOP tt1
POP CX
MOV DH,30h
MOV BL,10
MOV AX,1
LOOP1: PUSH AX
SUB BYTE PTR [SI],DH
MUL BYTE PTR [SI]
ADD w,AX
POP AX
MUL BL
DEC SI
LOOP LOOP1
PUSH BX
PUSH CX
PUSH DX
MOV AX,w
MOV CX,AX
MOV DX,0
MOV BX,4
DIV BX
CMP DX,0
JNZ lab1
MOV AX,CX
MOV BX,100
DIV BX
CMP DX,0
JNZ lab2
MOV AX,CX
MOV BX,400
DIV BX
CMP DX,0
JZ lab2
lab1: CLC
JMP lab3
lab2: STC
lab3: POP DX
POP CX
POP BX
JC a1
LEA DX,N
MOV AH,9
INT 21h
com: LEA dx,CONTINUE
MOV AH,09H
INT 21H
MOV AH,01H
INT 21H
CMP Al,'y'
JE To_continue
JMP exit
a1: LEA DX,Y
MOV AH,9
INT 21h
JMP com
exit: MOV AH,4ch
INT 21h
CODES ENDS
END START