Keep (or Terminate Stay Resident) terminates the program and makes it stay in memory.
procedure Keep(ExitCode: Word);
The entire program stays in memory--including data segment, stack segment, and heap--so be sure to specify a maximum size for the heap using theThe ExitCode corresponds to the one passed to the Halt standard procedure.
Use with care! Terminate-and-stay-resident (TSR) programs are complex and no other support for them is provided. See the DOS technical documentation for more information.