[Reduction] #497-498: getdate and gettime

This commit is contained in:
nmlgc 2014-09-08 21:57:20 +02:00
parent 80fc5c6d82
commit 9c94cb9e6e
3 changed files with 39 additions and 108 deletions

37
libs/BorlandC/getdate.asm Normal file
View File

@ -0,0 +1,37 @@
; void __cdecl getdate(struct date *datep)
_getdate proc DIST
@@datep = DPTR_ 2 + dPtrSize
push bp
mov bp, sp
push si
push di
mov ah, 2Ah
int 21h
LES_ bx, [bp+@@datep]
mov es:[bx], cx
mov es:[bx+2], dx
pop di
pop si
pop bp
ret
_getdate endp
; void __cdecl gettime(struct time *timep)
_gettime proc DIST
@@timep = DPTR_ 2 + dPtrSize
push bp
mov bp, sp
push si
push di
mov ah, 2Ch
int 21h
LES_ bx, [bp+@@timep]
mov es:[bx], cx
mov es:[bx+2], dx
pop di
pop si
pop bp
ret
_gettime endp

View File

@ -2610,60 +2610,7 @@ include libs/BorlandC/dosgdriv.asm
include libs/BorlandC/errormsg.asm
include libs/BorlandC/exit.asm
include libs/BorlandC/f_scopy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl getdate(struct date *datep)
_getdate proc far
datep = dword ptr 6
push bp
mov bp, sp
push si
push di
mov ah, 2Ah
int 21h ; DOS - GET CURRENT DATE
; Return: DL = day, DH = month, CX = year
; AL = day of the week (0=Sunday, 1=Monday, etc.)
les bx, [bp+datep]
mov es:[bx], cx
mov es:[bx+2], dx
pop di
pop si
pop bp
retf
_getdate endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl gettime(struct time *timep)
_gettime proc far
timep = dword ptr 6
push bp
mov bp, sp
push si
push di
mov ah, 2Ch
int 21h ; DOS - GET CURRENT TIME
; Return: CH = hours, CL = minutes, DH = seconds
; DL = hundredths of seconds
les bx, [bp+timep]
mov es:[bx], cx
mov es:[bx+2], dx
pop di
pop si
pop bp
retf
_gettime endp
include libs/BorlandC/getdate.asm
include libs/BorlandC/getvect.asm
include libs/BorlandC/H_LDIV.ASM
include libs/BorlandC/H_LLSH.ASM

View File

@ -953,60 +953,7 @@ include libs/BorlandC/dosgdriv.asm
include libs/BorlandC/errormsg.asm
include libs/BorlandC/exit.asm
include libs/BorlandC/f_scopy.asm
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl getdate(struct date *datep)
_getdate proc far
datep = dword ptr 6
push bp
mov bp, sp
push si
push di
mov ah, 2Ah
int 21h ; DOS - GET CURRENT DATE
; Return: DL = day, DH = month, CX = year
; AL = day of the week (0=Sunday, 1=Monday, etc.)
les bx, [bp+datep]
mov es:[bx], cx
mov es:[bx+2], dx
pop di
pop si
pop bp
retf
_getdate endp
; =============== S U B R O U T I N E =======================================
; Attributes: library function bp-based frame
; void __cdecl gettime(struct time *timep)
_gettime proc far
timep = dword ptr 6
push bp
mov bp, sp
push si
push di
mov ah, 2Ch
int 21h ; DOS - GET CURRENT TIME
; Return: CH = hours, CL = minutes, DH = seconds
; DL = hundredths of seconds
les bx, [bp+timep]
mov es:[bx], cx
mov es:[bx+2], dx
pop di
pop si
pop bp
retf
_gettime endp
include libs/BorlandC/getdate.asm
include libs/BorlandC/getvect.asm
include libs/BorlandC/H_LDIV.ASM
include libs/BorlandC/H_LLSH.ASM