•  Back 
  •  Process functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File5.12.42  Ptermres                                                  TOS

 Name:         »Terminate and stay resident« - Terminate a program but 
               leave it in memory.

 Opcode:       49

 Syntax:       void Ptermres ( int32_t keepcnt, int16_t retcode );

 Description:  The GEMDOS routine Ptermres terminates a program, yet 
               leaves a part of the program's TPA intact and removes 
               the memory left from GEMDOS's memory list. The 
               following apply:

                Parameter  Meaning

                keepcnt    Number of bytes that are to be retained 
                           (applies from the start of the basepage and 
                           includes the length of the TEXT, DATA and 
                           BSS segments of the application plus length 
                           of the stack; minimum is 128 bytes). 
                           Important: The memory retained by this call 
                           may not be freed later since it has been 
                           removed completely from the GEMDOS memory 
                           list.
                retcode    Status that is returned to the calling 
                           program
                            -32 =  Should not be used, as one obtains 
                                   this value for programs terminated 
                                   by Control-C
                             -1 =  Should not be used, as one obtains 
                                   this value from GEMDOS 0.15 onwards 
                                   if a process crashes
                              0 =  No error has arisen
                              1 =  General error
                              2 =  Error in the parameters

               Note: In a network all lockings of the processes will 
               be lifted.

 Return value: The function does not return a result.

 Availability: All GEMDOS versions.

 Group:        Process functions

 See also:     Binding   Pexec   Pterm   Pterm0