Image Map Image Map

Turbo Pascal memory TSR

  1. watlers_world
    watlers_world
    Creating TSR drivers in Turbo Pascal 6 or 7 is very easy.

    I created a TSR to reserve some conventional memory for a windows driver:

    {$S-,N-}
    {$M 1024, 0, 0}
    Program PCIUSB64;

    Uses
    Crt,Dos;

    Var SavedInt99h:Pointer;
    Var segm,offs:word;

    type datahold=record
    a1:word;
    a2:word;
    a3:word;
    a4:word;
    a5:word;
    a6:word;
    a7:word;
    a8:word;
    end;

    var dh:datahold;

    Procedure Int99h(AX, BX, CX, DX, SI, DI, DS, ES, BP:Word); interrupt;
    begin
    ax:=segm;
    bx:=offs;
    cx:=$FADE
    end;


    begin
    GetIntVec($99, SavedInt99h);
    SetIntvec($99, @Int99h);
    Writeln('TSR installed.');
    segm:=seg(dh);
    offs:=ofs(dh);
    Keep(0);
    end.


    Earlier Turbo Pascal versions are not as good with TSR drivers and lack inline assembly.
    Can a simple TP program reserve conventional or extended memory without staying resident?
Results 1 to 1 of 1