home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / cbgi111 / src / lib / d_stclip.asm < prev    next >
Encoding:
Assembly Source File  |  1990-06-15  |  1.5 KB  |  53 lines

  1. ideal            ; Set up in ideal mode
  2. model    tiny        ; This is done in tiny model
  3.  
  4. ;******************* dispatch_setclip ************************************
  5. ;  Interfaces BGI driver code to the calling interface.  Save old DS and 
  6. ;     sets up a new one for the driver to use.  Restores the old DS and
  7. ;     does a far return on exit.  It passes and returns the parameters in
  8. ;     the conventional 'C' fashion.  This makes it much easier to write
  9. ;     the main driver in C and let the compiler optimize to its hearts 
  10. ;     content.
  11. ;
  12. ;        INPUT:    ax    -- x1
  13. ;            bx    -- y1.  (x1, y1) describe one corner of a 
  14. ;                     clipping rectangle.
  15. ;            cx    -- x2
  16. ;            dx    -- y2.  (x2, y2) describe the other corner.
  17. ;
  18. ;        OUTPUT:    none
  19. ;
  20. ;    V 1.00 25/06/89  Robert Adsett.
  21. ;    V 1.01 15/06/90  Robert Adsett.  Eliminate DOSSEG ordering.
  22. ;
  23. ;  (C) Robert Adsett 1989,1990
  24. ;*************************************************************************
  25.  
  26. codeseg            ; Start of the code segment
  27.  
  28. ;*************************************************************************
  29. ;    Declare publics and externals.
  30. ;*************************************************************************
  31.  
  32. extrn    _setclip    : near        ;external function, does actual 
  33.                     ;  work.
  34. public    dispatch_setclip        ;make this routine public so it
  35.                     ;  can be hooked.
  36.  
  37.  
  38. proc dispatch_setclip  near
  39.  
  40.     push    dx            ;y2
  41.     push    cx            ;x2
  42.     push    bx            ;y1
  43.     push    ax            ;x1
  44.     call    _setclip        ;call 'C' driver
  45.     add    sp,8            ;restore stack
  46.     ret                ;return to caller
  47.  
  48. endp
  49.  
  50. ends
  51. end
  52. 
  53.