Intercept interrupts

Hi,
How can i intercept interrupts without losing the registers
passed to it by Pascal in the beginning of the call ?

Ex :
Procedure NewInt13h(AX,BX, ....); Interrupt;
begin
{I want to save old registers here}
{interrupt body}
{I want to recover old registers}
end;

Thanks.

Comments

  • : Hi,
    : How can i intercept interrupts without losing the registers
    : passed to it by Pascal in the beginning of the call ?
    :
    : Ex :
    : Procedure NewInt13h(AX,BX, ....); Interrupt;
    : begin
    : {I want to save old registers here}
    : {interrupt body}
    : {I want to recover old registers}
    : end;
    :
    : Thanks.
    :

  • hmmm, what if you do this:


    Procedure NewInt13h(AX,BX, ....); Interrupt; ASSEMBLER;
    asm
    {I want to save old registers here}
    {interrupt body}
    {I want to recover old registers}
    end;



    im not sure it'll work, but you might wanna try it.

    the other way would be to make a handler in an ASM file and link it with TPC.exe

    you should run debug and see what happens at the beginning of the call.
  • : hmmm, what if you do this:
    :
    :
    : Procedure NewInt13h(AX,BX, ....); Interrupt; ASSEMBLER;
    : asm
    : {I want to save old registers here}
    : {interrupt body}
    : {I want to recover old registers}
    : end;
    :
    :
    :
    : im not sure it'll work, but you might wanna try it.
    :
    : the other way would be to make a handler in an ASM file and link it with TPC.exe
    :
    : you should run debug and see what happens at the beginning of the call.
    :

    I don't know ASM programming !
  • well, how are you going to access the registers?

    if you do: procedure xxx(var1)

    var1 will be the value that has been pushed onto the stack as a parameter

    there might be a way in turbo pascal to do that, but I would have to see how it calls a procedure.

    I'll look at it and post the results

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories