home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-2.ZIP / GFUNC / GETPSP.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-05-30  |  958 b   |  49 lines

  1. ;/*
  2. ;** getpsp.asm
  3. ;** contains: getpsp()
  4. ;*/
  5.  
  6. GETPSPADDRESS        equ    062h        ;Get Program Segment Prefix Address
  7. DOSCALL         equ    021h        ;DOS Software Interrupt
  8.  
  9.         include model.h
  10.         include prologue.h
  11.  
  12.         pseg    pGetPsp
  13.  
  14. ;/*
  15. ;**  GPSPINFO far *
  16. ;** getpsp(void)
  17. ;**
  18. ;** ARGUMENT(s)
  19. ;**  none
  20. ;**
  21. ;** DESCRIPTION
  22. ;**  Calls DOS for the address of the program segment prefix (PSP).  This
  23. ;**  function is only supported in DOS versions later than 3.00.
  24. ;**
  25. ;** RETURNS
  26. ;**  far pointer to a structure named GPSPINFO, defined in gpsp.h.
  27. ;**
  28. ;** AUTHOR
  29. ;**  ""   Mon 14-Nov-1988    15:48:36
  30. ;**   Copyright (C)1988-1990 Greenleaf Software Inc. All Rights Reserved.
  31. ;**
  32. ;** MODIFICATIONS
  33. ;**
  34. ;*/
  35.         cproc    getpsp
  36.         mov    ah,GETPSPADDRESS
  37.         int    DOSCALL
  38.         ifdef    AXBX32
  39.          mov    ax,bx            ;AX gets segment
  40.          xor    bx,bx            ;BX (offset) = 0
  41.         else
  42.          mov    dx,bx            ;DX gets segment
  43.          xor    ax,ax            ;AX (offset) = 0
  44.         endif
  45.         cproce
  46.  
  47.         endps
  48.         end
  49.