home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / tools / bgi_tool / debvect.asm < prev    next >
Assembly Source File  |  1989-06-19  |  13KB  |  246 lines

  1. ; =======================================================================
  2. ; FILE: DebVect.ASM
  3. ;
  4. ; COPYRIGHT (c) 1988, 1989 BY BORLAND INTERNATIONAL, Inc.
  5. ;
  6. ; PURPOSE: Device Driver Overlay (DDO) for the DEBUG.BGI driver
  7. ;          This file defines the vector table at the beginning of the
  8. ;          driver. The segment definitions allow this module to be
  9. ;          linked with a Turbo C module.
  10. ;
  11. ; Current Date: 09/15/88
  12. ;
  13. ; Updates:      None.
  14. ;
  15. ; =======================================================================
  16.  
  17.         INCLUDE DEVICE.INC              ; File defines vector table format
  18.  
  19. _TEXT   SEGMENT PARA PUBLIC 'CODE'
  20. _TEXT   ENDS
  21.  
  22. _DATA   segment word public 'DATA'
  23. _DATA   ENDS
  24.  
  25. _BSS    segment word public 'BSS'
  26. _BSS    ENDS
  27.  
  28. _TEXT   SEGMENT PARA PUBLIC 'CODE'
  29.  
  30. DGROUP  group   _DATA, _TEXT, _BSS
  31.         ASSUME  DS:DGROUP, CS:DGROUP
  32.  
  33. ;       The following table defines all of the available vectors as
  34. ;       residing in the Turbo C module.
  35.  
  36.         EXTRN   _install       : NEAR,   _init           : NEAR
  37.         EXTRN   _clear         : NEAR,   _post           : NEAR
  38.         EXTRN   _move          : NEAR,   _draw           : NEAR
  39.         EXTRN   _vect          : NEAR,   _bar            : NEAR
  40.         EXTRN   _patbar        : NEAR,   _arc            : NEAR
  41.         EXTRN   _pieslice      : NEAR,   _filled_ellipse : NEAR
  42.         EXTRN   _palette       : NEAR,   _allpalette     : NEAR
  43.         EXTRN   _color         : NEAR,   _fillstyle      : NEAR
  44.         EXTRN   _linestyle     : NEAR,   _textstyle      : NEAR
  45.         EXTRN   _text          : NEAR,   _textsiz        : NEAR
  46.         EXTRN   _floodfill     : NEAR,   _getpixel       : NEAR
  47.         EXTRN   _setpixel      : NEAR,   _bitmaputil     : NEAR
  48.         EXTRN   _savebitmap    : NEAR,   _restorebitmap  : NEAR
  49.         EXTRN   _setclip       : NEAR,   _color_query    : NEAR
  50.  
  51.  
  52.         BGI     DEBUG           ; Defining a Debugging Driver
  53.  
  54. DDOVEC  DW      _install        ; Driver initialization and installation
  55.                                 ; Input:    AX=Command #   CX = Parameter
  56.                                 ; Output:   Varies according to command
  57.  
  58.         DW      _init           ; Initialize device for output
  59.                                 ; Input:    ES:BX points to information table
  60.                                 ; Output:   None
  61.  
  62.         DW      _clear          ; Clear graphics device and ready it for new
  63.                                 ; output. (Clear Screen, Load Paper, ... )
  64.                                 ; Input:    None
  65.                                 ; Output:   None
  66.  
  67.         DW      _post           ; Post - Make picture visible. Enable screen,
  68.                                 ; print paper, eject current sheet, ...
  69.                                 ; Input:    None
  70.                                 ; Output:   None
  71.  
  72.         DW      _move           ; Set Current Drawing Pointer to value.
  73.                                 ; Input:    AX = X coord,  BX = Y Coord
  74.                                 ; Output:   None
  75.  
  76.         DW      _draw           ; Draw a line from the Current Pointer to
  77.                                 ; the given coordinate.
  78.                                 ; Input:    AX = X coord,  BX = Y Coord
  79.                                 ; Output:   None
  80.  
  81.         DW      _vect           ; Draw a line between the given coordinate
  82.                                 ; pairs.
  83.                                 ; Input:    AX = X Start,  BX = Y Start
  84.                                 ;           CX = X End,    DX = Y End
  85.                                 ; Output:   None
  86.  
  87.         DW      EMULATE         ; Emulated polygon
  88.  
  89.         DW      _bar            ; Draw a filled rectangle with the CP as the
  90.                                 ; Lower Left corner, and the given coordinate
  91.                                 ; as the upper right.
  92.                                 ; Input:    AX = X Corner  BX = Y Corner
  93.                                 ;           CX = Depth for #D bars
  94.                                 ;           DX = Draw Top Flag (DX<>0 Draw Top)
  95.                                 ; Output:   None
  96.  
  97.         DW      _patbar         ; Draw a patterned rectangle with the given
  98.                                 ; coorinate pair. The pattern is provided by
  99.                                 ; the set fill pattern entry.
  100.                                 ; Input:    AX = X Corner  BX = Y Corner
  101.                                 ;           CX = X Corner  DX = Y Corner
  102.                                 ; Output:   None
  103.  
  104.         DW      _arc            ; Draw an elliptical arc from the given start
  105.                                 ; angle to the given end angle, using the CP
  106.                                 ; as the Center Point, and the given X and Y
  107.                                 ; Radii. Angles are 0-360 degrees.
  108.                                 ; Input:    AX = Start Angle  BX = End Angle
  109.                                 ;           CX = X radius of arc
  110.                                 ;           DX = Y radius of arc
  111.                                 ; Output:   None
  112.  
  113.         DW      _pieslice       ; Draw an elliptical sector from the given start
  114.                                 ; angle to the given end angle, using the CP
  115.                                 ; as the Center Point, and the given X and Y
  116.                                 ; Radii. Angles are 0-360 degrees.
  117.                                 ; Input:    AX = Start Angle  BX = End Angle
  118.                                 ;           CX = X radius of arc
  119.                                 ;           DX = Y radius of arc
  120.                                 ; Output:   None
  121.  
  122.         DW      _filled_ellipse ; Draw an ellipse using the CP as the Center
  123.                                 ; Point, and the given X and Y radii.
  124.                                 ; Input:    AX = X Radius of ellipse
  125.                                 ;           BX = Y Radius of ellipse
  126.                                 ; Output:   None
  127.  
  128.         DW      _palette        ; Set a palette entry to a given color.
  129.                                 ; Input:    AX = Index and Command Code
  130.                                 ;           BX, CX, DX as needed
  131.                                 ; Output:   None
  132.  
  133.         DW      _allpalette     ; Load the palette with a table of colors.
  134.                                 ; Input:    ES:BX = Palette Table to load
  135.                                 ; Output:   None
  136.  
  137.         DW      _color          ; Set the palette indexs for the current
  138.                                 ; drawing color and the current fill color.
  139.                                 ; Input:    AL = Drawing Color
  140.                                 ;           AH = Fill color
  141.                                 ; Output:   None
  142.  
  143.         DW      _fillstyle      ; Set current fill pattern. The fill pattern is
  144.                                 ; set to the pattern specified. If the pattern
  145.                                 ; number is -1 then the pattern is define in
  146.                                 ; a user supplied array.
  147.                                 ; Input:    AL = Pattern # (-1 for user def)
  148.                                 ;           ES:BX = User pattern data if needed
  149.                                 ; Output:   None
  150.  
  151.         DW      _linestyle      ; Set current line style. The line style is
  152.                                 ; set to the style specified. If the style
  153.                                 ; number is -1 then the style is define in
  154.                                 ; a user supplied pattern.
  155.                                 ; Input:    AL = Style # (-1 for user def)
  156.                                 ;           BX = User Line Pattern
  157.                                 ;           CX = Line Width (1 or 3)
  158.                                 ; Output:   None
  159.  
  160.         DW      _textstyle      ; Set the text attributes for font rendering
  161.                                 ; Input:    AL = Font Number
  162.                                 ;           AH = Font Path and Direction
  163.                                 ;           BX = Desired X Character Size
  164.                                 ;           CX = Desired Y Character Size
  165.                                 ; Output:   BX = Actual X Character Size
  166.                                 ;           CX = Actual Y Character Size
  167.  
  168.         DW      _text           ; Draw a string in the current font with the
  169.                                 ; justification point at the CP.
  170.                                 ; Input:    ES:BX = Pointer to string
  171.                                 ;           CX    = String Length
  172.  
  173.         DW      _textsiz        ; Calculate the dimensions (in pixels) of an
  174.                                 ; input text string.
  175.                                 ; Input:    ES:BX = Pointer to string
  176.                                 ;           CX    = String Length
  177.                                 ; Output:   BX    = Width of string
  178.                                 ;           CX    = Height of string
  179.  
  180.         DW      RESERVED        ; RESERVED
  181.  
  182.         DW      _floodfill      ; Do a floodfill in the current color using
  183.                                 ; the given (X,Y) address as the seed.
  184.                                 ; Input:    AX = X Coord  BX = Y Coord
  185.                                 ; Output:   None.
  186.  
  187.         DW      _getpixel       ; Read a pixel from the given coord.
  188.                                 ; Input:    AX = X Coord  BX = Y Coord
  189.                                 ; Output:   DL = Pixel value read
  190.  
  191.         DW      _setpixel       ; Write a pixel to the given coord.
  192.                                 ; Input:    AX = X Coord  BX = Y Coord
  193.                                 ;           DL = Pixel value read
  194.                                 ; Output:   None.
  195.  
  196.  
  197.         DW      _bitmaputil     ; Return a pointer to a table of misc driver
  198.                                 ; utilities. The following describes the table.
  199.                                 ; Input:    None.
  200.                                 ; Output:   ES:BS = Base of table
  201.                                 ;
  202.                                 ;       DW GOTOGRAPHIC
  203.                                 ;       DW EXITGRAPHIC
  204.                                 ;       DW PUTPIX
  205.                                 ;       DW GETPIX
  206.                                 ;       DW (BITS PER PIXEL)
  207.                                 ;       DW SETPAGE
  208.                                 ;       DW SETVISUAL
  209.                                 ;       DW SETWRITEMODE
  210.  
  211.         DW      _savebitmap     ; Save a portion of the screen to CPU memory.
  212.                                 ; Input:    ES:BX = Pointer to CPU buffer
  213.                                 ;           SI    = Start X coord of save block
  214.                                 ;           DI    = Start Y coord of save block
  215.                                 ;           CX    = End X coord of save block
  216.                                 ;           DX    = End Y coord of save block
  217.                                 ; Output:   (In Save Block)
  218.  
  219.         DW      _restorebitmap  ; Restore a portion of the screen from CPU memory.
  220.                                 ; Input:    ES:BX = Pointer to CPU buffer
  221.                                 ;           SI    = Start X coord of save block
  222.                                 ;           DI    = Start Y coord of save block
  223.                                 ;           CX    = End X coord of save block
  224.                                 ;           DX    = End Y coord of save block
  225.                                 ;           AL    = Write mode for block writing
  226.                                 ; Output:   None.
  227.  
  228.         DW      _setclip        ; Set the clipping window to the rectangle
  229.                                 ; defined by the two (X,Y) pairs
  230.                                 ; Input:    AX = Upper Left X coord
  231.                                 ;           BX = Upper Left Y coord
  232.                                 ;           CX = Lower Right X coord
  233.                                 ;           DX = Lower Right Y coord
  234.                                 ; Output:   None.
  235.  
  236.         DW      _color_query    ; Return the parameters of the device color
  237.                                 ; table (Size, Default Palette, etc)
  238.                                 ; Input:    AL = Command for query
  239.                                 ; Output:   As required per command.
  240.  
  241.         DW     35 DUP (NONE)    ; Reserved Entry Points
  242.  
  243. _TEXT   ENDS                    ; Close the code segment
  244.  
  245.         END
  246.