Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS  DOSCWait  mapper                                    Page     1-1


				;
				page 60,132
				;
				title CP/DOS  DOSCWait  mapper
				
				; ************************************************************************* *
				; *
				; *      MODULE: DosCWait
				; *
				; *      ACTION:    Wait for a child termination
				; *
				; *      CALLING SEQUENCE:
				; *
				; *             push    actioncode      ; execution options
				; *             push    waitoption      ; wait options
				; *             push@   resultcode      ; address to put result code
				; *             push@   processidword   ; address to put process id
				; *             push    processid       ; process id of process to wait for
				; *             call    doscwait
				; *
				; *      RETURN SEQUENCE:
				; *
				; *
				; *
				; *      MODULES CALLED:   None
				; *
				; *
				; *
				; *************************************************************************
				
 0000				buffer  segment word public 'buffer'
				
				        extrn   DosExecPgmCalled:word
				        extrn   DosExecPgmReturnCode:word
				
 0000				buffer  ends
				
 0000				dosxxx  segment byte public 'dos'
				        assume  cs:dosxxx,ds:nothing,es:nothing,ss:nothing
				
				        public  doscwait
				        .sall
				        .list
				;
				str     struc
 0000  0000			old_bp      dw    ?
 0002  00000000			return      dd    ?
 0006  0000			Qprocessid  dw    ?           ; Child process ID
 0008  00000000			Aprocessid  dd    ?           ; process id pointer
 000C  00000000			resultcode  dd    ?           ; result code pointer
 0010  0000			waitoption  dw    ?           ; wait option
 0012  0000			actioncode  dw    ?           ; action code
 0014				str     ends
				
 0000				doscwait proc   far
				        Enter   doscwait                 ; push registers
Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS  DOSCWait  mapper                                    Page     1-2


				
 000C  B8 ---- R		        mov     ax,seg buffer
 000F  8E D8			        mov     ds,ax                    ; set temporary buffer
				        assume  ds:buffer
				
 0011  83 3E 0000 E 00		        cmp     DosExecPgmCalled,0       ; ??????
 0016  74 06			        jz      WeHaveExeced
				
 0018  B8 001F			        mov     ax,31
 001B  EB 13 90			        jmp     ErrorExit                ; error exit
				
 001E				WeHaveExeced:
 001E  A1 0000 E		        mov     ax,DosExecPgmReturnCode
 0021  C5 76 0C			        lds     si,[bp].ResultCode
				        assume  ds:nothing
 0024  89 04			        mov     ds:[si],ax               ; return termination code
				
 0026  8B 46 06			        mov     ax,[bp].Qprocessid       ; return child process id
 0029  C5 76 08			        lds     si,[bp].Aprocessid
 002C  89 04			        mov     ds:[si],ax
				
 002E  33 C0			        xor     ax,ax                    ; set good return code
				
 0030				ErrorExit:
				        Mexit                            ; pop registers
 003C  CA 000E			        ret     size str - 6             ; return
				
 003F				doscwait endp
				
 003F				dosxxx  ends
				
				        end

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14
CP/DOS  DOSCWait  mapper                                    Symbols-1


Macros:

		N a m e			Lines

ENTER  . . . . . . . . . . . . .  	   3
MEXIT  . . . . . . . . . . . . .  	   3
POPAL  . . . . . . . . . . . . .  	   9
PUSHAL . . . . . . . . . . . . .  	   9

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

STR  . . . . . . . . . . . . . .  	0014	0007
  OLD_BP . . . . . . . . . . . .  	0000
  RETURN . . . . . . . . . . . .  	0002
  QPROCESSID . . . . . . . . . .  	0006
  APROCESSID . . . . . . . . . .  	0008
  RESULTCODE . . . . . . . . . .  	000C
  WAITOPTION . . . . . . . . . .  	0010
  ACTIONCODE . . . . . . . . . .  	0012

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

BUFFER . . . . . . . . . . . . .  	0000	WORD	PUBLIC	'BUFFER'
DOSXXX . . . . . . . . . . . . .  	003F	BYTE	PUBLIC	'DOS'

Symbols:            

                N a m e         	Type	 Value	 Attr

doscwait . . . . . . . . . . . .  	F PROC	0000	DOSXXX	Global	Length = 003F
DosExecPgmCalled . . . . . . . .  	V WORD	0000	BUFFER	External
DosExecPgmReturnCode . . . . . .  	V WORD	0000	BUFFER	External

ERROREXIT  . . . . . . . . . . .  	L NEAR	0030	DOSXXX

WEHAVEEXECED . . . . . . . . . .  	L NEAR	001E	DOSXXX

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  cwait		
@VERSION . . . . . . . . . . . .  	TEXT  510		

Microsoft (R) Macro Assembler Version 5.10                  5/16/24 23:40:14

CP/DOS  DOSCWait  mapper                                    Symbols-2






    136 Source  Lines
    160 Total   Lines
     25 Symbols

  47458 + 290394 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
