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

  1. ideal            ; Set up in ideal mode
  2. model    tiny        ; This is done in tiny model
  3.  
  4. ;******************* dispatch_fillstyle **********************************
  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:    al    -- Fill number.
  13. ;            bx    -- Pattern offset.
  14. ;            es    -- Pattern segment.
  15. ;
  16. ;        OUTPUT:    none
  17. ;
  18. ;    V 1.00 26/06/89  Robert Adsett.
  19. ;    V 1.01 15/06/90  Robert Adsett.  Eliminate DOSSEG ordering.
  20. ;
  21. ;  (C) Robert Adsett 1989,1990
  22. ;*************************************************************************
  23.  
  24. codeseg            ; Start of the code segment
  25.  
  26. ;*************************************************************************
  27. ;    Declare publics and externals.
  28. ;*************************************************************************
  29.  
  30. extrn    _fillstyle    : near        ;external function, does actual 
  31.                     ;  work.
  32. public    dispatch_fillstyle        ;make this routine public so it
  33.                     ;  can be hooked.
  34.  
  35.  
  36. proc dispatch_fillstyle  near
  37.  
  38.     push    es            ;Pattern segment.
  39.     push    bx            ;Pattern offset.
  40.     xor    ah,ah
  41.     push    ax            ;Fill pattern number.
  42.     call    _fillstyle        ;call 'C' driver
  43.     add    sp,6            ;restore stack
  44.     ret                ;return to caller
  45.  
  46. endp
  47.  
  48. ends
  49. end
  50.  
  51. 
  52.