Giter Club home page Giter Club logo

timesave's Introduction

TimeSave

TimeSave lets you save and restore the current date and time under DOS. It's designed for PCs that don't have a working real-time clock (like pre-ATs without an extension card) or an unreliable one.

The name is also a pun because it saves you time setting a sensible system time on boot.

Usage

TimeSave consists of two programs:

  • TIMESAVE.COM: saves the current date and time in a file called TIMESAVE.DAT in the root of the current drive
  • TIMEREST.COM: sets the current date and time based on that file

It's a good idea to start TIMEREST.COM in your AUTOEXEC.BAT before anything that needs current timestamps. TIMESAVE.COM can be started at any time, like at the end of a batch file after you've exited Windows.

As of v20240519, an alternative file name can be passed as a sole program argument. Files created in this way are not marked hidden, unlike TIMESAVE.DAT in its default location.

Structure of TIMESAVE.DAT

The save file consists of 6 little-endian words, resulting in a total of 12 bytes.

Offset Value Remarks
0 Signature Always 0x5354 (TS)
2 Checksum all words including the checksum total to zero
4 Year full four-digit year, not 1980-based
6 Month and day as passed in DX register of DOS date functions
8 Hour and minute as passed in CX register of DOS time functions
10 Seconds and centiseconds as passed in DX register of DOS time functions

Building

TimeSave is written using Borland Turbo Assembler 2.0. A suitable makefile is supplied. Type make to build the programs, or make -DDEBUG to assemble and link with debug information suitable for Turbo Debugger.

It can be assembled using contemporary versions of Turbo Assembler, but debug information is not retained in COM programs during linking.

Screenshot

scrshot

timesave's People

Contributors

dosamp avatar

Stargazers

Christian R. avatar Nik. avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.