Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Function 57H (decimal 87) gets or sets a file's date and time. Normally a
  file's directory entry contains the date and time the file was created or
  last changed. This function lets you inspect or explicitly update the
  recorded date and time. AL selects the operation: AL = 00H gets the date
  and time, and AL = 01H sets the date and time.

  The file is selected by placing the file handle in BX, which makes this
  function applicable only to files that were opened using the handle-based
  DOS functions covered in this chapter. Thus, setting a file's time stamp
  with this function will take effect only if the file is successfully
  closed.

  The date and time are placed in registers CX and DX in the same format
  used in the disk directory entries, though in a slightly different order.
  In this function, the time is placed in CX and the date in DX.

  Use the following formulas to build or break down the date and time:

    CX = HOUR * 2048 + MINUTE * 32 + SECOND / 2
    DX = (YEAR - 1980) * 512 + MONTH * 32 + DAY

  If this function fails, it returns an error code in AX: 01H (invalid
  function number--based on the subfunction selected in AL, not the main
  function number) or 06H (invalid handle).

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson