home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1993 May / SIMTEL_0593.ISO / msdos / archivrs / sqz1083e.exe / SETDATE.SQZ / ENVPKG.ASM next >
Encoding:
Assembly Source File  |  1993-02-10  |  1.0 KB  |  51 lines

  1. ;ENVPKG.ASM - Jim Kyle - July 1990
  2.  
  3. .model small,c
  4.  
  5. .data
  6. ; assumes being used from C with _psp global variable
  7.         extrn   _psp:word
  8.  
  9. .code
  10.  
  11. curenvp proc
  12.  
  13.         public  curenvp
  14. ; char far * curenvp( void );
  15.  
  16.         mov     ax,_psp         ; get PSP seg
  17.         mov     es,ax
  18.         mov     dx,es:[002Ch]   ; get env address
  19.         xor     ax,ax           ; offset is zero
  20.         ret
  21.  
  22. curenvp endp
  23.  
  24. mstenvp proc
  25.  
  26.         public  mstenvp
  27. ; char far * mstenvp( void );
  28.  
  29.         mov     ax,352Eh        ; get INT2E vector
  30.         int     21h             ; (master segment)
  31.         mov     dx,es:[002Ch]   ; get env address
  32.         xor     ax,ax           ; offset is zero
  33.         ret
  34.  
  35. mstenvp endp
  36.  
  37. envsiz  proc    oenv:word, senv:word   
  38.  
  39.         public  envsiz
  40. ; short envsiz( char far * vptr);
  41.  
  42.         mov     ax,senv         ; get segment of env
  43.         dec     ax              ; back up to MCB
  44.         mov     es,ax
  45.         mov     ax,es:[0003h]   ; get size in grafs
  46.         ret
  47.  
  48. envsiz  endp
  49.  
  50.         end
  51.