Hi..
> Can anyone tell me why the following attempt at a real-time delay
> aborts at midnight (under MS-DOS), and not at the changing of the
> hour? Any fixes/explanations will be greatly appreciated.
> I've got a sneaking suspicion that I'm overlooking something quite
> simple. :)
1. is DS pointing to your data? or off into space somewhere?
(I'm not familiar with CHASM and hw it sets the registers...)
2. Since you only test the LSW of the timer tick, each time the LSW rolls
over from FFFF to 0000 you'll get a hang. In fact, any timer tick value
that is
more than (65535-number of ticks to wait) at the start of the loop will
result in a hang. Why? because initial+number of ticks excees the capaciy
of
the LSW only.
Perhaps, an example:
Initial timer tick value : = 65530
number of ticks to count : = 180
final tick value : = 65710
The 'range' if LSW is only 0 to 65535, however, so the target is never
reached. The best solution is to include code to acomidate this rollover.
Craig
--- FMail/386 1.20+
---------------
* Origin: Communications Barrier BBS (03) 9585 1112, 24hrs (3:632/533)
|