Mail Archives: djgpp/1998/08/11/22:00:39
Endlisnis wrote in message <35D0BF71 DOT 9FB3EE0B AT unb DOT ca>...
>Michel Gallant wrote:
>
>> //global counter
>> int counter = 0;
>
>use:
>volatile int counter = 0;
>
>You need to do this because DJGPP will likely move counter into a
register
>during the loop where you print the value in printf. Setting a
variable to
>'volatile' forces DJGPP to reload 'counter' from memory every time it
is
>used.
>
Thanks for the suggestion, but the problem lies elsewhere. For
starters, this program works fine when it is changed to intercept INT8
(timer tic), and besides that, I tried your recommendation with no
effect. Thanks anyway, though. Suggestions, anyone? I'd appreciate
any help.
Michel Gallant
- Raw text -