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

  1. ; =======================================================================
  2. ; FILE: C0CBGI.ASM
  3. ;
  4. ; Based on Borlands original DEBVECT.ASM.
  5. ; Copyright (c) 1989,1990  R. Adsett 
  6. ;
  7. ; PURPOSE: Device Driver Overlay (DDO) for the COCBGI.OBJ driver startup.
  8. ;          This file defines the vector table at the beginning of the
  9. ;          driver.
  10. ;
  11. ; Current Date: 15/06/90
  12. ;
  13. ; Updates: 22/04/90 -- General release version.
  14. ;       15/06/90 -- Change from ideal mode back to normal MASM syntax.
  15. ;            Avoid the use of the simplified model and segment
  16. ;            directives since the segment order has to be 
  17. ;            changed from the default DOSSEG ordering.  This
  18. ;            change is needed since DOSSEG segment ordering 
  19. ;            puts the uninitialized data segment last in the
  20. ;            resulting code (there is no stack segment).  This
  21. ;            segment is not actually included in the binary 
  22. ;            image built of the driver and so no space is
  23. ;            reserved for it.  By manually defining the 
  24. ;            segments it is possible to force the uninitialised
  25. ;            data segment to be placed ahead of the initialised
  26. ;            data segment.  This forces space be reserved for 
  27. ;            uninitialised data in the binary image of the 
  28. ;            driver.
  29. ;               Also some cosmetic changes.    
  30. ;
  31. ; =======================================================================
  32.  
  33. .SEQ        ;Place segments in object file in the order in which they
  34.         ;are encountered.
  35.  
  36. ;       Segment and Group declarations
  37.  
  38. _TEXT   SEGMENT BYTE PUBLIC 'CODE'    ;Code,
  39. _TEXT   ENDS
  40. _BSS    SEGMENT WORD PUBLIC 'BSS'    ;followed by unitialised data,
  41. _BSS    ENDS
  42. _DATA   SEGMENT PARA PUBLIC 'DATA'    ;followed finally by initialised
  43. _DATA   ENDS                ;data.
  44.  
  45. DGROUP  GROUP   _TEXT, _BSS, _DATA    ;Tiny model.  All segments in the
  46.                     ;same 64 K.
  47.  
  48.         ASSUME  CS:_TEXT, DS:DGROUP
  49.  
  50. include device.inc            ; File defines vector table format
  51.  
  52. _TEXT   SEGMENT
  53.  
  54. ;; The following table defines all of the available vectors as
  55. ;;   residing in the assembly shells in the library 'cbgi.lib'.
  56.  
  57. extrn    dispatch_install    : near,    dispatch_init        : near
  58. extrn    dispatch_clear        : near,    dispatch_post        : near
  59. extrn    dispatch_move        : near,    dispatch_draw        : near
  60. extrn    dispatch_vect        : near
  61. extrn    dispatch_patbar        : near
  62. extrn    dispatch_palette    : near,    dispatch_allpalette    : near
  63. extrn    dispatch_color        : near,    dispatch_fillstyle    : near
  64. extrn    dispatch_linestyle    : near,    dispatch_textstyle    : near
  65. extrn    dispatch_text        : near,    dispatch_textsiz    : near
  66. extrn    dispatch_floodfill    : near,    dispatch_getpixel    : near
  67. extrn    dispatch_putpixel    : near,    dispatch_bitmaputil    : near
  68. extrn    dispatch_savebitmap    : near,    dispatch_restorebitmap    : near
  69. extrn    dispatch_setclip    : near,    dispatch_color_query    : near
  70.  
  71.  
  72. ;;
  73. ;;  These are vectors that would normally be available, but are emulated
  74. ;;    for this driver.
  75. ;;
  76.  
  77. ;extrn    dispatch_bar        : near
  78. ;extrn    dispatch_arc        : near
  79. ;extrn    dispatch_filled_ellipse    : near
  80. ;extrn    dispatch_pieslice    : near
  81.  
  82.         BGI     C0CBGI           ; Defining Standard Driver Startup
  83.  
  84. DDOVEC  DW      dispatch_install ; Driver initialization and installation
  85.         DW      dispatch_init    ; Initialize device for output
  86.         DW      dispatch_clear   ; Clear graphics device and ready it for new
  87.                                  ; output.
  88.         DW      dispatch_post    ; End Graphics Mode.
  89.         DW      dispatch_move    ; Set Current Drawing Pointer to value.
  90.         DW      dispatch_draw    ; Draw a line from the Current Pointer to
  91.                                  ; the given coordinate.
  92.         DW      dispatch_vect    ; Draw a line between the given coordinate
  93.                                  ; pairs.
  94.         DW      EMULATE          ; Emulated polygon
  95.         DW      EMULATE         ; Draw a filled rectangle with the CP as the
  96.                                  ; Lower Left corner, and the given coordinate
  97.                                  ; as the upper right.
  98.         DW      dispatch_patbar  ; Draw a patterned rectangle with the given
  99.                                  ; coorinate pair. The pattern is provided by
  100.                                  ; the set fill pattern entry.
  101.         DW      EMULATE         ; Draw an elliptical arc from the given start
  102.                                  ; angle to the given end angle, using the CP
  103.                                  ; as the Center Point, and the given X and Y
  104.                                  ; Radii. Angles are 0-360 degrees.
  105.         DW      EMULATE         ; Draw an elliptical sector from the given start
  106.                                  ; angle to the given end angle, using the CP
  107.                                  ; as the Center Point, and the given X and Y
  108.                                  ; Radii. Angles are 0-360 degrees.
  109.         DW      EMULATE      ; Draw an ellipse using the CP as the Center
  110.                                  ; Point, and the given X and Y radii.
  111.         DW      dispatch_palette ; Set a palette entry to a given color.
  112.         DW      dispatch_allpalette ; Load the palette with a table of colors.
  113.         DW      dispatch_color   ; Set the palette indexs for the current
  114.                                  ; drawing color and the current fill color.
  115.         DW      dispatch_fillstyle  ; Set current fill pattern. The fill pattern is
  116.                                  ; set to the pattern specified. If the pattern
  117.                                  ; number is -1 then the pattern is define in
  118.                                  ; a user supplied array.
  119.         DW      dispatch_linestyle  ; Set current line style. The line style is
  120.                                  ; set to the style specified. If the style
  121.                                  ; number is -1 then the style is define in
  122.                                  ; a user supplied pattern.
  123.         DW      dispatch_textstyle  ; Set the text attributes for font rendering
  124.         DW      dispatch_text    ; Draw a string in the current font with the
  125.                                  ; justification point at the CP.
  126.         DW      dispatch_textsiz ; Calculate the dimensions (in pixels) of an
  127.                                  ; input text string.
  128.         DW      RESERVED         ; RESERVED
  129.  
  130.         DW      dispatch_floodfill  ; Do a floodfill in the current color using
  131.                                  ; the given (X,Y) address as the seed.
  132.         DW      dispatch_getpixel   ; Read a pixel from the given coord.
  133.         DW      dispatch_putpixel   ; Write a pixel to the given coord.
  134.         DW      dispatch_bitmaputil ; Return a pointer to a table of misc driver
  135.                                  ; utilities. The following describes the table.
  136.         DW      dispatch_savebitmap ; Save a portion of the screen to CPU memory.
  137.         DW      dispatch_restorebitmap ; Restore a portion of the screen from CPU memory.
  138.         DW      dispatch_setclip ; Set the clipping window to the rectangle
  139.                                  ; defined by the two (X,Y) pairs
  140.         DW      dispatch_color_query ; Return the parameters of the device color
  141.                                  ; table (Size, Default Palette, etc)
  142.         DW     35 DUP (NONE)     ; Reserved Entry Points
  143.  
  144. _TEXT   ENDS
  145.  
  146. end
  147.  
  148.