[fpc-pascal] DOS Timer Interrupt, serial Interrupt

Rainer Stratmann RainerStratmann at t-online.de
Wed Aug 9 19:13:25 CEST 2006


Hello Alexey,

yes, it should be get_cs, I wonder why it not crashes with ds.
Now it counts, but slowly, when running out of win98.
When running in 'pure' DOS mode (when ending windows) it has also no effect.
The timer interrupt normally counts 18.2 times per second.
???

Best regards
Rainer

Am Mittwoch, 9. August 2006 18:36 schrieb Alexey Pavluchenko:
> Hello Rainer,
>
> Wednesday, August 09, 2006, 7:07:13 PM, you wrote:
>
> RS> Hello Alexey,
>
> RS> the program is changed now, but is has the same effect.
> RS> May be it has to do with the special role of the timer interrupt.
>
> There is nothing really special about it. Int 1Ch is not even a
> hardware interrupt.
>
> RS> Best regards
> RS> Rainer
>
> RS> program time;
>
> RS> uses crt,dos,go32;
>
> RS> var timervar:longint;
>
> RS> procedure hardtime; interrupt;
> RS> begin
> RS>  inc(timervar);
> RS> end;
>
> RS> var
> RS>  htimeivecbak : tseginfo;  // old Interrupt Vector
> RS>  htimeivec    : tseginfo;  // new Interrupt Vector
> RS> const int_vectime = $1c;
>
> RS> procedure starttim;
> RS> begin
> RS>  get_pm_interrupt(int_vectime,htimeivecbak);
> RS>  htimeivec.offset:=@hardtime;
> RS>  htimeivec.segment:=get_ds;
>
> This one should be get_cs, not get_ds. The procedure code must be
> executed from the code segment, not from the data segment. While
> physically the segments do overlap, selector values and access rights
> are different.



More information about the fpc-pascal mailing list