home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bgi256-3.zip / SDATA.INC < prev    next >
Text File  |  1992-12-27  |  19KB  |  538 lines

  1. ;SDATA.INC - Copyright 1991,1992 Knight Software
  2. ;
  3. ; History: 
  4. ;   17 May 1991 - first release
  5. ;   14 Jul 1991 - Corrected Line draw default from MoveByte to ForeByte
  6. ;   19 Aug 1992 - Added mode error flag
  7. ;   22 Nov 1992 - Addapted for protected mode operation
  8. ;
  9. ;----------------------------------------------------------------------
  10. ;
  11. ; Data variables and constants for BGI driver
  12. ;
  13. ; NOTE: The data in this file resides in the data selector
  14. ;       when operating in protected mode. The data segment is 
  15. ;       shared with the code segment in real mode.
  16. ;
  17. ;----------------------------------------------------------------------
  18.  
  19. ;register structure used for processing real mode interrupts 
  20. ;from protected mode operation
  21. SimIntStruc struc
  22.   RealDI    DD 0
  23.   RealSI    DD 0
  24.   RealBP    DD 0
  25.   RealXX    DD 0
  26.   RealBX    DD 0
  27.   RealDX    DD 0
  28.   RealCX    DD 0
  29.   RealAX    DD 0
  30.   RealFlags    DW 0
  31.   RealES    DW 0
  32.   RealDS    DW 0
  33.   RealFS    DW 0
  34.   RealGS    DW 0
  35.   RealIP    DW 0
  36.   RealCS    DW 0
  37.   RealSP    DW 0
  38.   RealSS    DW 0
  39. SimIntStruc ends
  40.  
  41. SimInt:    SimIntStruc <>
  42.  
  43.  
  44. ;======================================================================
  45. ;The following are declared constants. They are set at compile time.
  46. ;======================================================================
  47. grOk        =   0    ;Normal Operation, No errors
  48. grNoInitGraph    =  -1
  49. grNotDetected    =  -2
  50. grFileNotFound    =  -3
  51. grInvalidDriver    =  -4
  52. grNoLoadMem    =  -5
  53. grNoScanMem    =  -6
  54. grNoFloodMem    =  -7
  55. grFontNotFound    =  -8
  56. grNoFontMem    =  -9
  57. grInvalidMode    = -10
  58. grError        = -11    ;Generic Driver Error
  59. grIOerror    = -12
  60. grInvalidFont    = -13
  61. grInvalidFontNum   = -14
  62. grInvalidDeviceNum = -15
  63.  
  64.  
  65. ;======================================================================
  66. ;The Status Block is used to detect and control the operation
  67. ;of the driver. The Status Block is set by the INSTALL procedure
  68. ;by copying the appropriate mode table into the common access table.
  69. ;======================================================================
  70.  
  71. StatBlockSize    EQU    26    ;Stat block size in bytes
  72. status struc
  73.   stat        DB    0    ; 0 = no errors
  74.   devtyp     DB    0    ; device type 0=screen 1=printer 2=plotter
  75.   xres        DW    639 ;799 ;639    ; full resolution
  76.   yres        DW    479 ;599 ;479
  77.   xefres     DW    639 ;799 ;639    ; effective resolution
  78.   yefres     DW    479 ;599 ;479
  79.   xinch        DW    9000    ; device size in inches*1000
  80.   yinch        DW    7000
  81.   aspec        DW    10000    ; aspect ratio
  82.   chsizx     DB    8
  83.   chsizy    DB    8    ; standard char size x,y (points)
  84.   ctblf     DB    255    ;foreground colors
  85.   ctblb        DB    255    ;background colors
  86.   BytesPerScanLine DW    640 ;# bytes in a scan line
  87.   TotalScanLines   DW    480 ;# scan lines on display
  88.   MaxColor       DW    256 ;max colors available
  89.   PixelBits       DB    8   ;Number of bits per pixel
  90. status ends
  91.  
  92. StatBlock:    status <>
  93.  
  94. ;----------------------------------------------------------------------
  95. ;Table of Pointers to the available mode status blocks 
  96.  
  97.     EVEN        ;make sure this starts on word boundry
  98.  
  99. StatusPtrTable:
  100.     DW    Mode0Statblock ;320x200
  101.     DW    Mode1Statblock ;640x400
  102.     DW    Mode2Statblock ;640x480
  103.     DW    Mode3Statblock ;800x600
  104.     DW    Mode4Statblock ;1024x768
  105.     DW    Mode5Statblock ;2048x1024
  106.     DW    Mode0Statblock ;320x200 ;dummy fill table to 8 pos
  107.     DW    Mode0Statblock ;320x200
  108.  
  109. Mode0StatBlock:    ; 320 x 200 x 256
  110.     DB    0    ; stat      0 = no errors
  111.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  112.     DW    319    ; xres      full resolution
  113.     DW    199    ; yres    
  114.     DW    319    ; xefres  effective resolution
  115.     DW    199    ; yefres 
  116.     DW    9000    ; xinch      device size in inches*1000
  117.     DW    7000    ; yinch    
  118.     DW    8333    ; aspec      aspect ratio
  119.     DB    8    ; chsizx     
  120.     DB    8    ; chsizy  standard char size x,y (points)
  121.     DB    255    ; ctblf   foreground colors
  122.     DB    255    ; ctblb      background colors
  123.     DW    320     ; BytesPerScanLine  # bytes in a scan line
  124.     DW    200     ; TotalScanLines    # scan lines on display
  125.     DW    256     ; MaxColor        max colors available
  126.     DB    8    ; PixelBits         Number of bits per pixel
  127.  
  128. Mode1StatBlock:    ; 640 x 400 x 256
  129.     DB    0    ; stat      0 = no errors
  130.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  131.     DW    639    ; xres      full resolution
  132.     DW    399    ; yres    
  133.     DW    639    ; xefres  effective resolution
  134.     DW    399    ; yefres 
  135.     DW    9000    ; xinch      device size in inches*1000
  136.     DW    7000    ; yinch    
  137.     DW    8333    ; aspec      aspect ratio
  138.     DB    8    ; chsizx 
  139.     DB    8    ; chsizy  standard char size x,y (points)
  140.     DB    255    ; ctblf   foreground colors
  141.     DB    255    ; ctblb      background colors
  142.     DW    640     ; BytesPerScanLine  # bytes in a scan line
  143.     DW    400     ; TotalScanLines    # scan lines on display
  144.     DW    256     ; MaxColor        max colors available
  145.     DB    8    ; PixelBits         Number of bits per pixel
  146.  
  147. Mode2StatBlock:    ; 640 x 480 x 256
  148.     DB    0    ; stat      0 = no errors
  149.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  150.     DW    639    ; xres      full resolution
  151.     DW    479    ; yres    
  152.     DW    639    ; xefres  effective resolution
  153.     DW    479    ; yefres 
  154.     DW    9000    ; xinch      device size in inches*1000
  155.     DW    7000    ; yinch    
  156.     DW    10000    ; aspec      aspect ratio
  157.     DB    8    ; chsizx 
  158.     DB    8    ; chsizy  standard char size x,y (points)
  159.     DB    255    ; ctblf   foreground colors
  160.     DB    255    ; ctblb      background colors
  161.     DW    640     ; BytesPerScanLine  # bytes in a scan line
  162.     DW    480     ; TotalScanLines    # scan lines on display
  163.     DW    256     ; MaxColor        max colors available
  164.     DB    8    ; PixelBits         Number of bits per pixel
  165.  
  166. Mode3StatBlock:    ; 800 x 600 x 256
  167.     DB    0    ; stat      0 = no errors
  168.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  169.     DW    799    ; xres      full resolution
  170.     DW    599    ; yres    
  171.     DW    799    ; xefres  effective resolution
  172.     DW    599    ; yefres 
  173.     DW    9000    ; xinch      device size in inches*1000
  174.     DW    7000    ; yinch    
  175.     DW    10000    ; aspec      aspect ratio
  176.     DB    8    ; chsizx 
  177.     DB    8    ; chsizy  standard char size x,y (points)
  178.     DB    255    ; ctblf   foreground colors
  179.     DB    255    ; ctblb      background colors
  180.     DW    800     ; BytesPerScanLine  # bytes in a scan line
  181.     DW    600     ; TotalScanLines    # scan lines on display
  182.     DW    256     ; MaxColor        max colors available
  183.     DB    8    ; PixelBits         Number of bits per pixel
  184.  
  185. Mode4StatBlock:    ; 1024 x 768 x 256
  186.     DB    0    ; stat      0 = no errors
  187.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  188.     DW    1023    ; xres      full resolution
  189.     DW    767    ; yres    
  190.     DW    1023    ; xefres  effective resolution
  191.     DW    767    ; yefres 
  192.     DW    9000    ; xinch      device size in inches*1000
  193.     DW    7000    ; yinch    
  194.     DW    10000    ; aspec      aspect ratio
  195.     DB    8    ; chsizx 
  196.     DB    8    ; chsizy  standard char size x,y (points)
  197.     DB    255    ; ctblf   foreground colors
  198.     DB    255    ; ctblb      background colors
  199.     DW    1024     ; BytesPerScanLine  # bytes in a scan line
  200.     DW    768     ; TotalScanLines    # scan lines on display
  201.     DW    256     ; MaxColor        max colors available
  202.     DB    8    ; PixelBits         Number of bits per pixel
  203.  
  204. Mode5StatBlock:    ; 2048 x 1024 x 256
  205.     DB    0    ; stat      0 = no errors
  206.     DB    0    ; devtyp  device: 0=screen 1=printer 2=plotter
  207.     DW    2047    ; xres      full resolution
  208.     DW    1023    ; yres    
  209.     DW    2047    ; xefres  effective resolution
  210.     DW    1023    ; yefres 
  211.     DW    9000    ; xinch      device size in inches*1000
  212.     DW    7000    ; yinch    
  213.     DW    10000    ; aspec      aspect ratio
  214.     DB    8    ; chsizx 
  215.     DB    8    ; chsizy  standard char size x,y (points)
  216.     DB    255    ; ctblf   foreground colors
  217.     DB    255    ; ctblb      background colors
  218.     DW    2048     ; BytesPerScanLine  # bytes in a scan line
  219.     DW    1024     ; TotalScanLines    # scan lines on display
  220.     DW    256     ; MaxColor        max colors available
  221.     DB    8    ; PixelBits         Number of bits per pixel
  222.  
  223. ;----------------------------------------------------------------------
  224. ;Mode names - One entry for each selectable mode
  225. ModeNameSize    EQU 15    ;Each name entry in the table is 15 bytes long
  226. ModeName    DB 10
  227.         DB '320 x 200 ',0,0,0,0    ;0
  228.         DB 10
  229.         DB '640 x 400 ',0,0,0,0    ;1
  230.         DB 10
  231.         DB '640 x 480 ',0,0,0,0    ;2
  232.         DB 10
  233.         DB '800 x 600 ',0,0,0,0    ;3
  234.         DB 11
  235.         DB '1024 x 768 ',0,0,0    ;4
  236.         DB 12
  237.         DB '2048 x 1024 ',0,0    ;5
  238. ModeNameError    DB 8
  239.         DB 'Unknown ',0
  240. ModeNameBad    DB 6
  241.         DB 'Error ',0
  242.  
  243. ModeNameMax    EQU 40        ;40 character mode name string max
  244. ModeNameBuffer    DB ModeNameMax DUP(0)
  245.  
  246. DefaultMode    EQU 0        ;start in mode 0 unless otherwise set
  247.  
  248. VidMode     DW 0        ;Video mode we will be using
  249.  
  250. CardNamePtr    DW DummyCard    ;pointer to card name
  251.  
  252.  
  253. ;======================================================================
  254. ;The pattern tables control how fills and line draws are performed.
  255. ;======================================================================
  256.  
  257.     EVEN        ;make sure this starts on word boundry
  258.  
  259. ;fill pattern data table
  260. FillTable:
  261.     DB 000h,000h,000h,000h,000h,000h,000h,000h  ;0  No Fill
  262.     DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh  ;1  Solid Fill
  263.     DB 0FFh,0FFh,000h,000h,0FFh,0FFh,000h,000h  ;2  Line Fill
  264.     DB 001h,002h,004h,008h,010h,020h,040h,080h  ;3  Lt Slash Fill
  265.     DB 0E0h,0C1h,083h,007h,00Eh,01Ch,038h,070h  ;4  Slash Fill
  266.     DB 0F0h,078h,03Ch,01Eh,00Fh,087h,0C3h,0E1h  ;5  Backslash Fill
  267.     DB 0A5h,0D2h,069h,0B4h,05Ah,02Dh,096h,04Bh  ;6  Lt Bkslash Fill
  268.     DB 0FFh,088h,088h,088h,0FFh,088h,088h,088h  ;7  Hatch Fill
  269.     DB 081h,042h,024h,018h,018h,024h,042h,081h  ;8  XHatch Fill
  270.     DB 0CCh,033h,0CCh,033h,0CCh,033h,0CCh,033h  ;9  Interleave Fill
  271.     DB 080h,000h,008h,000h,080h,000h,008h,000h  ;10 Wide Dot Fill
  272.     DB 088h,000h,022h,000h,088h,000h,022h,000h  ;11 Close Dot Fill
  273.  
  274. ;Line pattern used for drawing lines - SetLineStyle
  275. LinePatternTable:
  276.     DW    1111111111111111B ;AL = 0 : Solid Line Style
  277.     DW    1100110011001100B ;AL = 1 : Dotted Line            
  278.     DW    1111110001111000B ;AL = 2 : Center Line            
  279.     DW    1111100011111000B ;AL = 3 : Dashed line            
  280.                        ;AL > 3 : User-defined line style
  281.  
  282. ;======================================================================
  283. ;The EGA palette is just here for compatibility.
  284. ;======================================================================
  285. ;This defines the EGA palette that is loaded at init time
  286. EgaPalette    DB    16    ;palette size
  287.         DB    0    ;palette zero (background)
  288.         DB    1
  289.         DB    2
  290.         DB    3
  291.         DB    4
  292.         DB    5
  293.         DB    6
  294.         DB    7
  295.         DB    8
  296.         DB    9
  297.         DB    10
  298.         DB    11
  299.         DB    12
  300.         DB    13
  301.         DB    14
  302.         DB    15    ;palette 15
  303.         DB    0    ;overscan register
  304.  
  305.  
  306. ;======================================================================
  307. ;The following are fixed variables. They are set once by INSTALL.
  308. ;======================================================================
  309.  
  310.     EVEN        ;make sure this starts on word boundry
  311.  
  312. VideoSegment    DW    0A000H    ;Video Segment location
  313. NumberModes    DW    6    ;Number modes available
  314. WinGran        DW    1    ;Window granularity multiplier
  315. DisplayType    DW    1    ;Display type in use
  316. ScanLineLength    DW    320    ;scan line length in bytes
  317.  
  318. ModeSelect    DB    0    ;Selected display mode number
  319. InitColor    DB    0    ;initial background color
  320. CharSizeX    DB    8    ;Character size
  321. CharSizeY    DB    8
  322. ModeErrorFlag    DB    0    ;set NZ when unsupported mode selected
  323.  
  324. ;======================================================================
  325. ;The following are reference variables. They are set by various procs.
  326. ;======================================================================
  327. ;color definition variables
  328. DrawForeColor    DB    255    ;line drawing foreground color
  329. DrawBackColor    DB    0    ;line drawing background color
  330. FillForeColor    DB    255    ;fill foreground color
  331. FillBackColor    DB    0    ;fill background color
  332. BitMapBackColor    DB    0    ;bitmap background color 
  333. TextBackColor    DB    0    ;Text background color
  334.                 ;(text foreground uses drawcolor)
  335. PixelBackColor    DB    0    ;pixel drawing background color
  336.                 ;(pixel foreground uses passed color)
  337. ;Note: forecolor is whatever is specified at the time the object
  338. ;is being drawn (setcolor or setfill commands). Drawcolor is set 
  339. ;via setcolor command, fillcolor is set via setfill command.
  340. ;backcolor is set via the specific setwritemode command.
  341.  
  342.  
  343.     EVEN        ;make sure this starts on word boundry
  344.  
  345. ;positioning variables
  346. CPX        DW    0    ;master cursor position x
  347. CPY        DW    0    ;master cursor position y
  348. ClipX1        DW    0
  349. ClipY1        DW    0    ;clip boundries
  350. ClipX2        DW    639
  351. ClipY2        DW    479
  352.  
  353. ;line drawing variables
  354. PlotStyle    DW    1    ;0=dotperx, 1=x+y, 2=overlap 
  355. LinePattern    DW    1111111111111111B
  356. LineWidth    DB    1
  357.  
  358. ;Fill pattern working array
  359. ;do fill from this array - default = Solid Fill
  360. FillPattern:
  361.     DB 0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh,0FFh  ;(1)  Solid Fill
  362.  
  363. ;Text variables
  364. FontNumber    DB    0    ;Font number selected
  365. FontDir        DB    0    ;Direction to draw font
  366. FontSizeX    DB    8    ;Full size of font
  367. FontSizeY    DB    8    ; (CharSize*FontMult)
  368. FontMultX    DB    1    ;Character size multiplier
  369. FontMultY    DB    1    ;
  370.  
  371.  
  372. ;**********************************************************************
  373. ;The following procedure pointers are used to control program flow
  374. ;**********************************************************************
  375.  
  376. ;======================================================================
  377. ;The draw mode table is a table of near pointers (set at compile time)
  378. ;to the appropriate pixel routine to place the pixel on the screen 
  379. ;(32 entries) Currently the only valid seletions are 0-23. 
  380. ;Selections 24-31 are invalid, but will map to the first eight to keep 
  381. ;the code happy just in case we overflow the table. 
  382. ;======================================================================
  383.  
  384.     EVEN        ;make sure this starts on word boundry
  385.  
  386. DrawModeTable:
  387.     DW    MoveByte    ;#0 Overwrite mode
  388.     DW    XorByte        ;#1 XOR write mode
  389.     DW    OrByte        ;#2 OR write mode
  390.     DW    AndByte        ;#3 AND write mode
  391.     DW    NotByte        ;#4 Complement write mode
  392.     DW    NxorByte    ;#5 NXOR write mode
  393.     DW    NorByte        ;#6 NOR write mode
  394.     DW    NandByte    ;#7 NAND write mode
  395.     DW    ForeByte    ;#8 Foreground Only write mode
  396.     DW    ForeXorByte    ;#9 Foreground XOR write mode
  397.     DW    ForeOrByte    ;#10 Foreground OR write mode
  398.     DW    ForeAndByte    ;#11 Foreground AND write mode
  399.     DW    ForeNotByte    ;#12 Foreground NOT write mode
  400.     DW    ForeNxorByte    ;#13 Foreground NXOR write mode
  401.     DW    ForeNorByte    ;#14 Foreground NOR write mode
  402.     DW    ForeAndByte    ;#15 Foreground AND write mode
  403.     DW    BackByte    ;#16 Background Only write mode
  404.     DW    BackXorByte    ;#17 Background XOR write mode
  405.     DW    BackOrByte    ;#18 Background OR write mode
  406.     DW    BackAndByte    ;#19 Background AND write mode
  407.     DW    BackNotByte    ;#20 Background NOT write mode
  408.     DW    BackNxorByte    ;#21 Background NXOR write mode
  409.     DW    BackNorByte    ;#22 Background NOR write mode
  410.     DW    BackNandByte    ;#23 Background NAND write mode
  411.     ;the following are undefined, but we must have something here
  412.     ;to keep the code happy. These may change in the future
  413.     DW    MoveByte    ;#24 Overwrite mode
  414.     DW    XorByte        ;#25 XOR write mode
  415.     DW    OrByte        ;#26 OR write mode
  416.     DW    AndByte        ;#27 AND write mode
  417.     DW    NotByte        ;#28 Complement write mode
  418.     DW    NxorByte    ;#29 NXOR write mode
  419.     DW    NorByte        ;#30 NOR write mode
  420.     DW    NandByte    ;#31 NAND write mode
  421.  
  422. ;----------------------------------------------------------------------
  423. ;The initDisplayProc pointer points to the routine to init the display
  424. ;to the selected mode. This allows multiple display inits.
  425. InitDisplayProc    DW    VGA320x200Init    ;(default init select)
  426.  
  427. ;----------------------------------------------------------------------
  428. ;This points to the code that controls bank switching for the given
  429. ;pixel address in PixelX/PixelY. It is set by the Install proc.
  430. BankSelectProc DW    VGABankSelect    ;(default bank sel proc)
  431.  
  432. ;----------------------------------------------------------------------
  433. ;the following four near pointers contain the drawing mode pointer
  434. ;for the specified function of the pointer. 
  435. ;These procs can be changed through the SetWriteMode function
  436. FillPixelProc    DW    MoveByte    ;proc ptr for bar procs
  437. DrawPixelProc    DW    MoveByte    ;proc ptr for pixel procs
  438. LinePixelProc    DW    ForeByte    ;proc ptr for line procs
  439. TextPixelProc    DW    ForeByte    ;proc ptr for text procs
  440. BitMapPixelProc    DW    MoveByte    ;proc ptr for bit map procs
  441.  
  442. ;----------------------------------------------------------------------
  443. ;This proc pointer is set via the PutImage procedure call
  444. BitMapProc    DW    WriteBitMap    ;proc ptr for main proc code
  445.  
  446. ;----------------------------------------------------------------------
  447. ;These variables store the selected write mode in use for procs
  448. FillPixelWriteMode    DB    0
  449. DrawPixelWriteMode    DB    0
  450. LinePixelWriteMode    DB    8
  451. TextPixelWriteMode    DB    8
  452. BitMapPixelWriteMode    DB    0
  453.  
  454. ;----------------------------------------------------------------------
  455. ;This variable selects the type of flood fill to use. default = zero
  456. ;                       ;bit     description
  457. FloodFillType    DB 0    ; 0: 0=border fill,  1=seed fill
  458.             ; 1: 0 (not used)
  459.             ; 2: 0=normal stack, 1=compressed stack
  460.             ; 3: 0=auto search,  1=slow search
  461.             ; 4: 0=draw on scan, 1=draw after scan (slow)
  462.             ; 5: 0=no tracer,    1=tracer if bit4=1
  463.             ; 6: 0 (not used)
  464.             ; 7: 0=fast fill,    1=slow fill (computed)
  465. ;note: bit seven is computed at start of floodfill operation based on
  466. ;the search mode selected (bit 1) and the fillstyle (move/xor/etc)
  467.  
  468. SeedFill    EQU 01H    ;fill everything not seed else all but border
  469. ComplexFill    EQU 04H    ;force complex fill method (else auto select)
  470. StackCompress    EQU 08H    ;use compressed XY stack during fill
  471. DelayedDraw    EQU 10H    ;draw after scanning is done (on slowfill only)
  472. TracerOn    EQU 20H ;show tracer during fill scan
  473. SlowFill    EQU 80H    ;use slow stack piggy complex fill method
  474.             ; (slow fill required for complex fills)
  475.  
  476. ;**********************************************************************
  477. ;Misc temp variables. These are only used internally.
  478. ;**********************************************************************
  479.  
  480.     EVEN        ;make sure this starts on word boundry
  481.  
  482. ;word variables go first followed by the byte variables 
  483. CurBank        DW    0    ;current selected bank
  484.  
  485. PixelAddress    DW    0    ;pixel vars
  486. PixelSegment    DW    0
  487. PixelSegmentLength DW    0
  488. PixelX        DW    0
  489. PixelY        DW    0
  490. PixelX1        DW    0
  491. PixelY1        DW    0
  492. PixelX2        DW    0
  493. PixelY2        DW    0
  494.  
  495. PlotStepX    DW    0    ;line plot vars
  496. PlotStepY    DW    0
  497. PlotDeltaX    DW    0
  498. PlotDeltaY    DW    0
  499. PlotSlope    DW    0
  500.  
  501. RightX        DW    0    ;flood fill vars
  502. LeftX        DW    0
  503. ScanLeftX    DW    0
  504. ScanRightX    DW    0
  505. FillFlipX1    DW    0
  506. FillFlipX2    DW    0
  507. FillFlipY    DW    0
  508. OldFlipColors    DW    0
  509. PrevStackIndex    DW    0
  510. XYStackIndex    DW    0
  511. XYStackAdj    DW    0
  512. XYStackPeak    DW    0
  513. XYStackFree    DW    0
  514.  
  515. TempChar    DW    0,0,0,0,0,0,0,0  ;temp bitmap text vars
  516. RetValue    DW    0    ;used to ret value in GetMaxMode calls
  517.  
  518. ;---------------------------------------
  519. ;misc byte oriented variables
  520. SeedColor    DB    0
  521. BorderColor    DB    0
  522. ModeXflag    DB    0
  523. LinePixelCount    DB    0
  524. FloodFillFlags    DB    0
  525.         DB    0    ;dummy spare to make even byte count
  526.  
  527. ;---------------------------------------
  528. ;other stuff goes here
  529.  
  530. FILEHANDLE    DW    0
  531. FLOODNAME    DB    'FLOOD.DAT',0
  532.  
  533.     EVEN        ;make sure this starts on word boundry
  534. TempWork    DB 512  DUP(0)    ;general temp working scratch buffer
  535.  
  536. ;======================================================================
  537.  
  538.