home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / cbgi111 / src / lib / d_pslice.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_pieslice ***********************************
  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    -- Start Angle.
  13. ;            bx    -- End angle.
  14. ;            cx    -- X radius.
  15. ;            dx    -- Y radius.
  16. ;
  17. ;        OUTPUT:    none
  18. ;
  19. ;    V 1.00 28/06/89  Robert Adsett.
  20. ;    V 1.01 15/06/90  Robert Adsett.  Eliminate DOSSEG ordering.
  21. ;
  22. ;  (C) Robert Adsett 1989,1990
  23. ;*************************************************************************
  24.  
  25. codeseg            ; Start of the code segment
  26.  
  27. ;*************************************************************************
  28. ;    Declare publics and externals.
  29. ;*************************************************************************
  30.  
  31. extrn    _pieslice    : near        ;external function, does actual 
  32.                     ;  work.
  33. public    dispatch_pieslice        ;make this routine public so it
  34.                     ;  can be hooked.
  35.  
  36.  
  37. proc dispatch_pieslice  near
  38.  
  39.     push    dx            ;Y radius
  40.     push    cx            ;X radius
  41.     push    bx            ;End angle
  42.     push    ax            ;Start angle
  43.     call    _pieslice        ;call 'C' driver
  44.     add    sp,8            ;restore stack
  45.     ret                ;return to caller
  46.  
  47. endp
  48.  
  49. ends
  50. end
  51. 
  52.