Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FilePexec()Pterm0()Pterm() GEMDOSSyntaxVOID Pterm( retcode )
WORD retcode;
Function Pterm() terminates an application returning the specified
error code.
Opcode 76 (0x4C)
Availability All GEMDOSversions.
Parameters retcode indicates the error status upon termination. Some
recommended return values are:
Name retcode Meaning
TERM_OK 0 Program completion without errors
TERM_ERROR 1 Generic Error
TERM_BADPARAMS 2 Bad parameters
TERM_CRASH -1 Process crashed (returned by GEMDOSversions from 0.15.)
TERM_CTRLC -32 Process terminated by ctrl-c
Binding move.w retcode,-(sp)
move.w #$4C,-(sp)
trap #1
addq.l #4,sp
Return Value Pterm() never returns.
Comments GEMDOS jumps through the etv_term (0x102) vector when this
call is made prior to process termination to allow the
process one last chance to clean up. In addition, all files
opened by the process are closed and all memory blocks
allocated by the process are freed.
See Also Pexec(), Pterm0()