CS320 Assignment 4

Date assigned: 3/31/04
Date due: 4/12/04
Points: 50

You are to write an assembly language program that prints a calendar for the given month of the year that the internal date corresponds to using the DOS internal clock. A sample screen layout follows assuming that the date of the internal clock was January 1, 2002.

             2002

           JANUARY

     S  M  T  W  T  F  S
     -------------------
           1  2  3  4  5
     6  7  8  9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30 31
 
Note1: Save this program in the CS320 Drop Box by the due date as yourlastname4.asm with an executable of yourlastname4.exe.

Note2: You will need to use the interrupt 21h which uses the DOS service routines. Therefore, the following code will give you the following: CX=year (1980-2099), DH=month (1-12), DL=day(1-31).

mov ah,02ah
int 021h
Note3: You can set in your program the day that January 1, 1980 starts on. Everything else must be computed from there.

Note4: Leap years are years that are divisible by 4 but not 100 except years divisible by 400 are also leap years.

Note5: Get started early, this is not an over night assignment.

Note6: Use procedures to improve the readability of your code. The main program is to be mainly procedure calls.

Note7: Center the calendar on the screen.

Note8: Procedure header documentation is to consist of:

;======================================================================
; PROCEDURE:    Largest
;
; PURPOSE:      To find and return the largest value in an array
;
; INPUTS:       nums - array passed to the procedure
;
; OUTPUTS:      AX - largest value is returned in AX
;======================================================================

Douglas J. Ryan / ryandj@pacificu.edu