CHIME
> Network time sync for DOS.
NetISA suite app. Asks the network for the current time, sets the DOS clock. v1.0 uses HTTPS HEAD and parses the response Date: header. SNTP and NTS over UDP land in v1.1/v1.2 once NetISA exposes UDP. Foundation phase done; not compiled yet.
Status
2026-04-24. Source tree complete in chime/, 18 files. Not compiled. Open Watcom V2 install is the next step.
What is in the tree:
src/chime.c,chime.h: main flow.src/cmdline.c,config.c:/AUTO,/DRYRUN,/SAFE,/STUBNET,/SERVER=,/PATH=,/PORT=,/MODE=,/TZ=;CHIME.CFGreader/writer.src/netisa_api.c: subset of theINT 63hAPI CHIME uses, plus a stub backend for/STUBNET.src/timesrc.c: HTTPDate:parser (RFC 7231 IMF-fixdate), worldtime JSON parser, unix_ts conversion, query orchestrator.src/dos_clock.c: INT 21h AH=2Bh/2Dh date+time set, CMOS RTC write-through via ports 0x70/0x71.src/ui_status.c: terminal output,[Y/n]prompt.test/testtime.c: parser roundtrip, stub query.Makefile,README.md.
Why HTTP, not SNTP
NTP/SNTP run over UDP. The NetISA TSR INT 63h API as of v1.0 carries TLS sessions and plaintext TCP. No UDP yet. So CHIME v1.0 talks HTTPS HEAD to time-anchor URLs (time.cloudflare.com, time.google.com, worldtimeapi.org) and parses the Date: response header. One-second precision. v1.1 adds SNTP over UDP when NetISA exposes the UDP group. v1.2 adds NTS-KE / NTS over UDP.
Setting the clock
Three layers. CMOS RTC at I/O ports 0x70/0x71 (persists). BIOS tick at 0040:006C, 18.2 Hz (resets on reboot). DOS internal date/time via INT 21h AH=2Ah/2Ch get and AH=2Bh/2Dh set.
On modern DOS (MS-DOS 5+, FreeDOS) the INT 21h set propagates to CMOS. On older DOS (3.3, OEM 4.x) it does not, and the next reboot loses the change. CHIME does a direct CMOS write after the INT 21h call as a backstop: stop RTC updates by setting bit 7 of register 0x0B, BCD-encode and write seconds (reg 0), minutes (2), hour (4), day (7), month (8), year-mod-100 (9), century (32), then resume.
Timezone is fixed-offset (/TZ=-08:00). DST is not handled.
Usage
Roadmap
- v1.0: HTTPS HEAD + JSON GET + plain HTTP fallback. Confirmation prompt UI. INT 21h + CMOS write-through.
- v1.1: SNTP over UDP when NetISA exposes the UDP group. Sub-second precision, becomes default.
- v1.2: NTS over UDP per RFC 8915.
- v1.3:
CHIME.TSRresident with periodic resync, INT 21h hooks for transparent correction. - v1.4: Optional COM-port time source for serial GPS receivers (1PPS + NMEA).
- v1.5: Multi-server median consensus, drift trend reporting.