How I can write an assembly language program, which will constantly monitor the computer clock (date and time) and for a certain day and during meeting times, display
“MEETING FOR Dr. A” in the middle of the screen .
As an example to check your program, set you computer date to 19th of January
and test the program written for a sample date of 20th of January, 2007. The
meeting times on that day (20th of Jan) are given by;
MEETING FOR Dr. A = 5:14 AM
MEETING FOR Dr. B = 11:50 AM
MEETING FOR Dr. C = 2:52 PM or 14:52
MEETING FOR Dr. D = 5:13 PM or 17:13
MEETING FOR Dr. E = 6:43 PM or 18:43
the program should display “MEETING FOR Dr. A” when your computer
clock becomes 5:14 AM during January 20, 2007.
TILTE "EE 390"
.MODEL SMALL
.STOCK 100
VAR1 DB " MEETING FOR Dr. A "
VAR2 DB " MEETING FOR Dr. B "
VAR3 DB " MEETING FOR Dr. C "
VAR4 DB " MEETING FOR Dr. D "
VAR5 DB " MEETING FOR Dr. E "
.CODE
MOV AX,@DATA
MOV DS,AX
MOV AH, 2AH ;Get date, AL = day of week, CX = year, DL = day
INT 21H
MOV AH, 2CH ;Get time, CH = hour, CL = minutes, DH = seconds,
INT 21H ;DL = hundredths of a second
MOV AH, 2BH ;Set date:
MOV CX, 07D7H ;CX = year
MOV DH, 01H ;DH = month
MOV DL, 14H ;DL = day
CMP CX
INT 21H
MOV AH, 2DH ;Set time:
MOV CH, 05H ;CH = hour
MOV DH, 00H ;DH = seconds
MOV CL, 14H ;CL = minutes
MOV DL, 00H ;DL = hundredths of a second
INT 21H
MOV AH, 2DH ;Set time:
MOV CH, 11H ;CH = hour
MOV DH, 00H ;DH = seconds
MOV CL, 50H ;CL = minutes
MOV DL, 00H ;DL = hundredths of a second
INT 21H
MOV AH, 2DH ;Set time:
MOV CH, 14H ;CH = hour
MOV DH, 00H ;DH = seconds
MOV CL, 52H ;CL = minutes
MOV DL, 00H ;DL = hundredths of a second
INT 21H
MOV AH, 2DH ;Set time:
MOV CH, 17H ;CH = hour
MOV DH, 00H ;DH = seconds
MOV CL, 13H ;CL = minutes
MOV DL, 00H ;DL = hundredths of a second
INT 21H
MOV AH, 2DH ;Set time:
MOV CH, 18H ;CH = hour
MOV DH, 00H ;DH = seconds
MOV CL, 43H ;CL = minutes
MOV DL, 00H ;DL = hundredths of a second
INT 21H
Since we have five meetings a day, the program has to generate the related display output five times during that day.
thanks