Tuesday, 8 November 2011

Program to check leap year or not

MOV CX,7D4h ;LOAD YEAR TO CX

MOV AX,CX
MOV BX,04h
DIV BX
CMP DX,0000h
JNE L1

MOV AX,CX
MOV BX,64h
DIV BX
CMP DX,0000h
JNE L0

MOV AX,CX
MOV BX,0190h
DIV BX
CMP DX,0000h
JNE L1

L0:MOV [2000H],01h
HLT

L1:MOV [2000H],00H
HLT

No comments:

Post a Comment