Hi friend check this out ;)
have fun
.MODEL SMALL
.STACK 64
.DATA
ASCTOTAL DB '000'
ADER DB '01'
YTODAY DB '00'
MTODAY DB '00'
DTODAY DB '00'
YBIRTH DB '00'
MBIRTH DB '00'
DBIRTH DB '00'
YAGE DB 2 dup(?)
MAGE DB '00'
DAGE DB '00'
FNAME DB 10 DUP (' ')
LNAME DB 10 DUP (' ')
BPLACE DB 10 DUP (' ')
PR_FNAME DB 'FIRST NAME ?','$'
PR_LNAME DB 'LAST NAME ?','$'
PR_BPLACE DB 'BIRTH PLACE ?','$'
PR_YEAR_BIRTH DB 'ENTER YEAR OF BIRTH ?','$'
PR_MONTH_BIRTH DB 'ENTER MONTH OF BIRTH ?','$'
PR_DAY_BIRTH DB 'ENTER DAY OF BIRTH ?','$'
PR_YEAR_TODAY DB 'ENTER YEAR OF DATE ?','$'
PR_MONTH_TODAY DB 'ENTER MONTH OF DATE ?','$'
PR_DAY_TODAY DB 'ENTER DAY OF DATE ?','$'
.386
.CODE
MAIN PROC FAR
MOV AX,@DATA
MOV DS,AX
MOV ES,AX
MOV DX,0000H
MOV CX,0000H
MOV AX,0600H
MOV BH,30
MOV CX,0000
MOV DX,184FH
INT 10H
MOV AH,02H
MOV BH,00H
MOV DX,0100H
INT 10H
MOV AH,09H
LEA DX,PR_FNAME
INT 21H
MOV AH,0AH
LEA DX,FNAME
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0200H
INT 10H
MOV AH,09H
LEA DX,PR_LNAME
INT 21H
MOV AH,0AH
LEA DX,LNAME
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0300H
INT 10H
MOV AH,09H
LEA DX,PR_BPLACE
INT 21H
MOV AH,0AH
LEA DX,BPLACE
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0400H
INT 10H;
MOV AH,09H
LEA DX,PR_YEAR_BIRTH
INT 21H
MOV AH,0AH
LEA DX,YBIRTH
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0500H
INT 10H
MOV AH,09H
LEA DX,PR_MONTH_BIRTH
INT 21H
MOV AH,0AH
LEA DX,MBIRTH
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0600H
INT 10H
MOV AH,09H
LEA DX,PR_DAY_BIRTH
INT 21H
MOV AH,0AH
LEA DX,DBIRTH
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0700H
INT 10H;
MOV AH,09H
LEA DX,PR_YEAR_TODAY
INT 21H
MOV AH,0AH
LEA DX,YTODAY
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0800H
INT 10H
MOV AH,09H
LEA DX,PR_MONTH_TODAY
INT 21H
MOV AH,0AH
LEA DX,MTODAY
INT 21H
MOV AH,02H
MOV BH,00H
MOV DX,0900H
INT 10H
MOV AH,09H
LEA DX,PR_DAY_TODAY
INT 21H
MOV AH,0AH
LEA DX,DTODAY
INT 21H
MOV AX,0000H
CLC
LEA SI,YTODAY+1
LEA DI,YBIRTH+1
LEA BX,YAGE+1
MOV CX,02
L1: MOVZX AX,[SI]
SUB AL,[DI]
AAS
DEC SI
DEC DI
DEC BX
LOOP L1
LEA BX,YAGE+1
MOV CX,02
L2: OR BYTE PTR[BX],30H
DEC BX
LOOP L2
MOV AX,1300H
MOV BX,0031H
LEA BP,YAGE
MOV CX,02
MOV DX,0B01H
INT 10H
CLC
LEA SI,MTODAY+1
LEA DI,MBIRTH+1
LEA BX,MAGE+1
MOV CX,02
L3: MOVZX AX,[SI]
SUB AL,[DI]
AAS
DEC SI
DEC DI
DEC BX
LOOP L3
LEA BX,MAGE+1
MOV CX,02
L4: OR BYTE PTR[BX],30H
DEC BX
LOOP L4
MOV AX,1300H
MOV BX,0031H
LEA BP,MAGE
MOV CX,02
MOV DX,0C01H
INT 10H
CLC
LEA SI,DTODAY+1
LEA DI,DBIRTH+1
LEA BX,DAGE+1
MOV CX,02
L5: MOVZX AX,[SI]
SUB AL,[DI]
AAS
DEC SI
DEC DI
DEC BX
LOOP L5
LEA BX,DAGE+1
MOV CX,02
L6: OR BYTE PTR[BX],30H
DEC BX
LOOP L6
MOV AX,1300H
MOV BX,0031H
LEA BP,DAGE
MOV CX,02
MOV DX,0D01H
INT 10H
MOV AH,08H
INT 21H
MOV AH,00H
MOV AL,02H
INT 10H
MOV AX,4C00H
INT 21H
MAIN ENDP
END MAIN
2006-08-15 02:47:26
·
answer #1
·
answered by Justin cool 2
·
0⤊
0⤋