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

  1. ideal            ; Set up in ideal mode
  2. model    tiny        ; This is done in tiny model
  3.  
  4. ;******************* dispatch_savebitmap *********************************
  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:    si    -- x1
  13. ;            di    -- y1.  (x1, y1) describe one corner of a 
  14. ;                     rectangle to save.
  15. ;            cx    -- x2
  16. ;            dx    -- y2.  (x2, y2) describe the other corner.
  17. ;            es    -- segment of data area to save to.
  18. ;            bx    -- offset of data area to save to.
  19. ;
  20. ;        OUTPUT:    none
  21. ;
  22. ;    V 1.00 12/07/89  Robert Adsett.
  23. ;    V 1.01 15/06/90  Robert Adsett.  Eliminate DOSSEG ordering.
  24. ;
  25. ;  (C) Robert Adsett 1989,1990
  26. ;*************************************************************************
  27.  
  28. codeseg            ; Start of the code segment
  29.  
  30. ;*************************************************************************
  31. ;    Declare publics and externals.
  32. ;*************************************************************************
  33.  
  34. extrn    _savebitmap    : near        ;external function, does actual 
  35.                     ;  work.
  36. public    dispatch_savebitmap        ;make this routine public so it
  37.                     ;  can be hooked.
  38.  
  39.  
  40. proc dispatch_savebitmap  near
  41.  
  42.     push    dx            ;y2
  43.     push    cx            ;x2
  44.     push    di            ;y1
  45.     push    si            ;x1
  46.     push    bx            ;offset
  47.     push    es            ;segment
  48.     call    _savebitmap        ;call 'C' driver
  49.     add    sp,12            ;restore stack
  50.     ret                ;return to caller
  51.  
  52. endp
  53.  
  54. ends
  55. end
  56.  
  57.  
  58. 
  59.