From 10911173df112d15c553cab1358cdd3debe551a1 Mon Sep 17 00:00:00 2001 From: Tomas Hajny Date: Sun, 22 Nov 2020 16:19:34 +0000 Subject: [PATCH] * Correction of omissions in GetLocalTime git-svn-id: trunk@47529 - --- rtl/emx/sysutils.pp | 21 ++++++++++++--------- rtl/go32v2/sysutils.pp | 1 + rtl/msdos/sysutils.pp | 1 + rtl/watcom/sysutils.pp | 1 + 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/rtl/emx/sysutils.pp b/rtl/emx/sysutils.pp index b36afeda81..17b0289bbe 100644 --- a/rtl/emx/sysutils.pp +++ b/rtl/emx/sysutils.pp @@ -1097,30 +1097,33 @@ asm mov ah, 2Ah call syscall {$IFDEF REGCALL} - pop eax + pop edi {$ELSE REGCALL} mov edi, SystemTime {$ENDIF REGCALL} - mov ax, cx - stosw - xor eax, eax - mov al, 10 - mul dl + xchg ax, cx shl eax, 16 mov al, dh stosd + mov al, dl + shl eax, 16 + mov al, cl + stosd push edi mov ah, 2Ch call syscall pop edi xor eax, eax - mov al, cl - shl eax, 16 mov al, ch + shl eax, 16 + mov al, cl stosd - mov al, dl + xor eax, eax + mov al, 10 + mul dl shl eax, 16 mov al, dh + rol eax, 16 stosd pop edi end {['eax', 'ecx', 'edx', 'edi']}; diff --git a/rtl/go32v2/sysutils.pp b/rtl/go32v2/sysutils.pp index 60cfe61d03..87d32740fc 100644 --- a/rtl/go32v2/sysutils.pp +++ b/rtl/go32v2/sysutils.pp @@ -659,6 +659,7 @@ begin SystemTime.Year := Regs.Cx; SystemTime.Month := Regs.Dh; SystemTime.Day := Regs.Dl; + SystemTime.DayOfWeek := Regs.Al; end ; diff --git a/rtl/msdos/sysutils.pp b/rtl/msdos/sysutils.pp index cfa837a35e..e61f8ba946 100644 --- a/rtl/msdos/sysutils.pp +++ b/rtl/msdos/sysutils.pp @@ -644,6 +644,7 @@ begin SystemTime.Year := Regs.Cx; SystemTime.Month := Regs.Dh; SystemTime.Day := Regs.Dl; + SystemTime.DayOfWeek := Regs.Al; end ; diff --git a/rtl/watcom/sysutils.pp b/rtl/watcom/sysutils.pp index 921b3e700f..dbcd473ccf 100644 --- a/rtl/watcom/sysutils.pp +++ b/rtl/watcom/sysutils.pp @@ -650,6 +650,7 @@ begin SystemTime.Year := Regs.Cx; SystemTime.Month := Regs.Dh; SystemTime.Day := Regs.Dl; + SystemTime.DayOfWeek := Regs.Al; end ;