INTERRUPT for Clock Tick Counter Returns Negative Value (59725)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q59725 SUMMARY
Interrupt 1Ah, with Function 0, returns the current value of the
clock tick counter in registers CX and DX. When the low-order portion
of the clock tick counter (returned in DX) exceeds 32,767, it becomes
negative when stored as an integer in Basic, because 32,767 is the
maximum value for a 2-byte signed integer. Listed below is an example
to convert the negative value to the equivalent unsigned long integer
value.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB59725 |
---|
|