home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / nettos11.zip / MISC / SETPRINT.ASM < prev    next >
Assembly Source File  |  1993-06-15  |  1KB  |  55 lines

  1. ; File......: SETPRINT.ASM
  2. ; Author....: Ted Means
  3. ; CIS ID....:
  4. ; Date......: $Date$
  5. ; Revision..: $Revision$
  6. ; Log file..: $Logfile$
  7. ; This is an original work by Ted Means and is placed in the
  8. ; public domain.
  9. ;
  10. ; Modification history:
  11. ; ---------------------
  12. ;
  13. ; $Log$
  14. ;
  15.  
  16.  
  17. ; _fnsetprc( nHandle ) -> nil
  18. ;
  19. ; Sets the file handle pointed to by the SET PRINTER TO command
  20. ; Uses an internal that shifts around from Clipper version to 
  21. ; Clipper version.   This one works for Clipper 5.2
  22.  
  23.  
  24. IDEAL
  25.  
  26. Public   _fnsetprc
  27.  
  28. Extrn    __ParNI:Far
  29. Extrn    SetPRC:Far
  30.  
  31. Segment  _Nanfor   Word      Public    "CODE"
  32.          Assume    CS:_NanFor
  33.  
  34. Proc     _fnsetprc          Far
  35.  
  36.          Mov       AX,1
  37.          Push      AX
  38.          Call      __ParNI
  39.          Add       SP,2
  40.  
  41.          Mov       DX,Seg SetPRC             ; Load segment of known symbol
  42.          Mov       BX,Offset SetPRC          ; Load offset of known symbol
  43.          Mov       ES,DX                     ; Load segment register
  44.          Add       BX,8Ch                    ; Calc offset into code segment
  45.          Mov       BX,[Word Ptr ES:BX]       ; Get address
  46.          Mov       [Word Ptr BX],AX
  47.          Mov       [Word Ptr BX - 6],AX
  48.          Ret
  49.  
  50. Endp     _fnsetprc
  51. Ends     _NanFor
  52. End
  53.  
  54.