Table of Contents
Note: This IBM PC BIOS API call is for DOS/Win16 personality only. Use Family API for portability.
Note: osFree Macro Library provides macros for most of functions
Int 1AH, AH=00H
Version
IBM 5150 and higher
Brief
GetTime
Family API
Input
- AH = 00h
Return
- CX:DX = number of clock ticks since midnight
- AL = midnight flag, nonzero if midnight passed since time last read
Macro
INCLUDE BIOS.INC @GetTime
Notes
- there are approximately 18.2 clock ticks per second, 1800B0h per 24 hrs (except on Tandy 2000, where the clock runs at 20 ticks per second)
- IBM and many clone BIOSes set the flag for AL rather than incrementing it, leading to loss of a day if two consecutive midnights pass without a request for the time (e.g. if the system is on but idle)
- since the midnight flag is cleared, if an application calls this function after midnight before DOS does, DOS will not receive the midnight flag and will fail to advance the date
- Modern releases of MS-DOS/PC DOS (5.0+???) assume that AL is a day rollover counter rather than a flag, as expected by older releases. DOS 5 - 7.10 (Windows 98 SE) provide an undocumented CONFIG.SYS SWITCHES=/T option to force the old behaviour of the day advancing code, that is using a flag instead of a counter.
- DR DOS 3.31 - DR-DOS 7.03 handle AL as a flag.
Note
Text based on Ralf Brown Interrupt List Release 61
IBM PC BIOS API | |
---|---|
Video I/O | INT 10H: 00H, 01H, 02H, 03H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0CH, 0DH, 0EH, 0FH |
Hardware info | INT 11H, INT 12H |
Serial I/O | INT 14H: 00H, 01H, 02H, 03H |
Tape I/O | INT 15H: 00H, 01H, 02H, 03H |
Keyboard I/O | INT 16H: 00H, 01H, 02H |
Printer I/O | INT 17H: 00H, 01H, 02H |
Disk I/O | INT 13H: 00H, 01H, 02H, 03H, 04H, 05H |
Date and Time | INT 1AH: 00H, 01H |
osFree Macro Library | |
---|---|
Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
Hardware info | @Equipment @MemSize |
Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
Keyboard I/O | @KbdStatus @CharIn @CharPeek |
Printer I/O | @PrnPrint @PrnInit @PrnStatus |
Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
Date and Time | @SetTime @GetTime |
Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
Memory manager | @ModBlok SET_BLOCK |