我想知道星期几,有人可以帮我吗?
DAY:
MOV AH,2AH ; To get System Date
INT 21H
MOV AL,DL ; Day is in DL
AAM
MOV BX,AX
CALL DISP
mov ah,4ch
int 21h
DISP PROC
MOV DL,BH ; Since the values are in BX, BH Part
ADD DL,30H ; ASCII Adjustment
MOV AH,02H ; To Print in DOS
INT 21H
MOV DL,BL ; BL Part
ADD DL,30H ; ASCII Adjustment
MOV AH,02H ; To Print in DOS
INT 21H
RET
DISP ENDP
它仅显示日期,但我也需要当前日期。
Google对“ int21H函数”的首次搜索使我获得了:
Function 2Ah - Get system date Action: Returns the system day, month and year plus the day of the week. On entry: AH = 2Ah Returns: CX = year (1980 to 2099) DH = month (1 to 12) DL = day of month(1 to 31) ==> AL = day number in week (0 to 6 = Sunday to Saturday) Notes: The format of the registers returned by this call is the same as that required by Function 2Bh. Although shown above as decimal values for clarity, all values are in hex.
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句