[fpc-pascal]Modifying cpu registers while in turbo pascal interrupt routine ?

Harald Houppermans houppermans at home.nl
Fri Mar 19 05:14:53 CET 2004


----- Original Message ----- 
From: "Nikolai Zhubr" <s001 at hotbox.ru>
To: <fpc-pascal at lists.freepascal.org>
Sent: Friday, March 19, 2004 12:07 AM
Subject: Re: [fpc-pascal]Modifying cpu registers while in turbo pascal
interrupt routine ?


> Hi,
> Thursday, 18 March, 2004, 18:26:04, Harald Houppermans wrote:
> [...]
> >> forget it, it's a bug
> >> it doesn't save all registers (so your program will crash if it uses
> > longint)
>
> > Yes I read this somewhere else... It doesn't store the high word of the
32
> > bit registers like eax, ebx, etc.
> TP7 only uses 16-bit regs, for longints too, hence no need to
> save/restore higher words.

Huh ? A longint is 32 bit in tp7 if I am not mistaking ?

Say how does it work then... TP7 using two 16 bit registers for longints...

Why can't one use longints inside interrupt routines ? wacky.


>
> >> and it doesn't provide a stack (so your programm will crash even it it
> > doesn't
> >> use longint).
> Of course interrupt handler will have some stack, though it is
> usually rather small (like all things in 16-bit world ;)
> Built-in stack checking won't work properly though indeed.

What is stack checking ?






More information about the fpc-pascal mailing list