home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / WINER.ZIP / GETSEG.ASM < prev    next >
Assembly Source File  |  1992-05-13  |  370b  |  22 lines

  1. ;GETSEG.ASM, retrieves the current DEF SEG setting
  2.  
  3. ;Copyright (c) 1991 Ethan Winer
  4.  
  5. ;Declare: DECLARE FUNCTION GetSeg%()
  6. ;Usage:   CurrentSeg = GetSeg%
  7.  
  8.  
  9. .Model Medium, Basic
  10. .Data
  11.   Extrn B$Seg:Word
  12.  
  13. .Code
  14.  
  15. GetSeg Proc
  16.  
  17.   Mov  AX,B$Seg   ;load the value from B$Seg
  18.   Ret             ;return with the function output in AX
  19.  
  20. GetSeg Endp
  21. End
  22.