title MS-DOS Function Calls - 2 (DOS2-4.ASM) ;Problem statement: ;Write a program that uses DOS function 2Ah to ;get and display the system date. Use the ;following display format: yyyy-m-d. INCLUDE Irvine16.inc .data month db ? day db ? year dw ? .code main proc mov ax,@data mov ds,ax mov ah,2Ah ; MS-DOS Get Date function int 21h ; get the date now mov year,cx mov month,dh mov day,dl mov ax,year call Writedec mov ah,2 ; display a hyphen mov dl,"-" int 21h mov al,month ; display the month mov ah,0 call Writedec mov ah,2 ; display a hyphen mov dl,"-" int 21h mov al,day ; display the day mov ah,0 call Writedec call Crlf exit main endp end main