100 likes | 291 Views
Macro to get system date. date macro yr, mon, day, wkday mov ah, 2Ah int 21h mov [yr], cx mov [mon], dh mov [day], dl mov [wkday], alendm. Macro to get system time. time macro hrs,mins,scds,hscds mov ah, 2Ch
E N D
1. Macro to display a string display macro string
mov dx, offset string
mov ah, 9
int 21h
endm
2. Macro to get system date date macro yr, mon, day, wkday
mov ah, 2Ah
int 21h
mov [yr], cx
mov [mon], dh
mov [day], dl
mov [wkday], al
endm
3. Macro to get system time time macro hrs,mins,scds,hscds
mov ah, 2Ch
int 21h
mov [hrs], ch
mov [mins], cl
mov [scds], dh
mov [hscds], dl
endm
4. Macro to clear screen scrolup macro
mov ah, 6
mov al, 0
mov ch, 0
mov cl, 0
mov dh, 24
mov dl, 79
mov bh, 7
int 10h
endm
5. Macro to position cursor cursor macro row, col
mov bx, 0
mov ah, 2
mov dh, row
mov dl, col
int 10h
endm
6. Macro to input a char string Getstr macro str
Local next, out1
mov cx, 79
mov di, offset str
Next: Mov ah, 1
Int 21h
Cmp al, 13 Mov [di], al
Je out1 Inc di
Loop next
Out1:
endm
7. Macro practice Write code using system date and system time macros to display system date and time on the screen