Ceci est une version archivée de
Pterm() à 2006-02-16 01:24:49.
VOID Pterm( retcode )
WORD retcode;
Pterm() terminates an application returning the specified error code.
Opcode
76 (0x4C)
Availability
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 GEMDOS versions from 0.15.) |
TERM_CTRLC |
-32 |
Process terminated by Control-C |
Binding
move.w retcode,-(sp)
move.w #$4C,-(sp)
trap #1
addq.l #4,sp
Return Value
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