;; CS312 - Assembly Programming ;; AW Smyth ;; Problem 3.2 ;; Today - display today's date INCLUDE PCMAC.INC .MODEL SMALL .STACK 0h .DATA Msg DB "Today's date is $" Day DB ? Month DB ? Year DW ? .CODE Today PROC EXTRN GetDec : NEAR, PutDec : NEAR mov ax, @data mov ds, ax _PutStr Msg _GetDate ; Get the date dh=m dl=d cx=y mov Day, dl mov Month, dh mov Year, cx mov al, Month mov ah, 0 call PutDec ; Display month _PutCh '/' mov al, Day mov ah, 0 call PutDec ; Display day _PutCh '/' mov ax, Year call PutDec ; Display year _PutCh 13, 10 _Exit 0 Today ENDP END Today