home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 256_01 / getret.a < prev    next >
Text File  |  1988-01-08  |  2KB  |  43 lines

  1. ;---------------------------------------------------------------------
  2. ;    ASM88 FILE:     GETRET.A     Get Return Code from Child Process
  3. ;    ----------
  4. ;    WRITTEN:        25/10/87
  5. ;    -------
  6. ;    PURPOSE:        This is one of a series of files which take
  7. ;    -------         advantage of INT 21H functions under MS-DOS.
  8. ;                    In each case the error situation is marked by
  9. ;                    the carry flag being set.   We use the De Smet
  10. ;                    external variable '_carryf' to see whether the
  11. ;                    carry is set on return from the function.
  12. ;                    If so, the error code can be used to obtain
  13. ;                    information about the specific error.
  14. ;
  15. ;    USAGE:          int GETRET()
  16. ;    -----
  17. ;
  18. ;    DEPENDENCIES:           De Smet C V 2.44+
  19. ;    ------------
  20. ;    Copyright 1987 - Cogar Computer Services Pty. Ltd
  21. ;---------------------------------------------------------------------
  22.  
  23. CSEG
  24. PUBLIC GETRET_
  25.  
  26. GETRET_:
  27.     push    bp    ; normal De Smet C start
  28.     mov    bp,sp    ; point to the stack
  29.     mov    ax,ds    ; and make ES common with DS
  30.     mov    es,ax
  31. ;----------------------------------------------------------------------
  32. ;  The unique programme follows.
  33. ;----------------------------------------------------------------------
  34.     mov    ah,4dh    ; the Function No.
  35.     int    21h
  36. ;----------------------------------------------------------------------
  37. ;  Normal programme termination.
  38. ;----------------------------------------------------------------------
  39. GETRET_QUIT:
  40.     pop    bp    ; restore starting conditions
  41.     ret
  42. ;----------------------------------------------------------------------
  43.