"now" funtion fail on Delphi 1.0 & 2.0

"now" funtion is made using the funtions date+time, in some especific events it
can be a day change between those funtions, and then you lost one day on your
account !!!

I think it should be solved on a low level basis on the funtion "now" itself.
Well I've got a solution with the programm below.

function udfNow: TDateTime;
label
  RetryDateTime,DateTimeDone;
var
  Year: Word;
  Month,Day: Byte;
  Hour,Min,Sec,HSec: Byte;
begin
  asm

RetryDateTime:

        MOV     AH,2AH
        INT     21H
        MOV     Year,CX
        MOV     Month,DH
        MOV     Day,DL

        MOV     AH,2CH
        INT     21H
        MOV     Hour,CH
        MOV     Min,CL
        MOV     Sec,DH
        MOV     HSec,DL

        OR      CH,CH
        JNZ     DateTimeDone
        OR      CL,CL
        JNZ     DateTimeDone
        OR      DH,DH
        JNZ     DateTimeDone
        OR      DL,DL
        JZ      RetryDateTime

DateTimeDone:

  end;
  Result := EncodeDate( Year,Month,Day )+EncodeTime( Hour,Min,Sec,HSec*10 );
end;