]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/MAPPER/EXIT.ASM
4 title CP
/DOS DosExit mapper
6 dosxxx
segment byte public 'dos'
7 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
9 ;**********************************************************************
13 ;* FUNCTION: Exit a process
17 ;* push word action code
18 ;* push word result code
21 ;* MODULES CALLED: DOS Int 21h, Function 4ch, terminate process
23 ;*********************************************************************
32 Result dw ?
; result code
33 Action dw ?
; action code
38 Enter DosExit
; push registers
40 mov ax,[bp].action
; set resule code area
41 cmp ax,1 ; check for valid action code
42 jg exit
; jump if invalid action code
44 mov ax,[bp].result
; else, set result code
46 mov ah,4
ch ; load opcode
49 xor ax,ax ; set good return code
51 exit: mexit
; pop registers
52 ret size
str - 6 ; return