home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / graf / fract3.zip / HGCFRA.ASM < prev    next >
Assembly Source File  |  1989-12-18  |  19KB  |  570 lines

  1.     TITLE    Hercules Graphics Routines for FRACTINT
  2.  
  3. ;             required for compatibility if Turbo ASM
  4. IFDEF ??version
  5.     MASM51
  6.     QUIRKS
  7. ENDIF
  8.  
  9.     .MODEL  medium,c
  10.  
  11.     .8086
  12. .data
  13.  
  14. HGCBase        equ    0B000h        ;segment for HGC regen buffer page 0
  15.  
  16. herc_index    equ    03B4h
  17. herc_cntrl    equ    03B8h
  18. herc_status    equ    03BAh
  19. herc_config    equ    03BFh
  20.  
  21.  
  22. ; Hercules control/configuration register settings
  23.  
  24. scrn_on    equ    08h
  25. grph    equ    02h
  26. text    equ    20h
  27. enable  equ     03h
  28.  
  29. .code
  30.  
  31. ;
  32. ;
  33. ; inithgc -  Initialize the HGC in graphics mode.
  34. ;           Code mostly from the Hercules Graphics Card Owner's Manual.
  35. ;
  36. inithgc    PROC USES DI SI
  37.  
  38.     mov    al,enable        ; enable mode changes
  39.     mov    dx,herc_config        ; same as HGC FULL command
  40.     out    dx,al
  41.  
  42.     mov    al,grph            ; set graphic mode
  43.     lea    si,gtable        ; address of graphic parameters
  44.     mov    bx,0
  45.     mov    cx,4000h
  46.     call    setmd            ; call set mode common processing
  47.  
  48.     ret
  49.  
  50. inithgc    ENDP
  51.  
  52. ;
  53. ; termhgc -  Restore the Hercules Graphics Card to text mode.
  54. ;           Code mostly from the Hercules Graphics Card Owner's Manual.
  55. ;
  56. termhgc    PROC USES DI SI
  57.  
  58.     mov    al,text            ; set text mode
  59.     lea    si,ttable        ; get address of text parameters
  60.     mov    bx,720h
  61.     mov    cx,2000
  62.     call    setmd
  63.  
  64.     ret
  65.  
  66. termhgc    ENDP
  67.  
  68. ;
  69. ; setmd - sets mode to graphic or text depending on al
  70. ;         si = address of parameter table
  71. ;         cx = number of words to be cleared
  72. ;         bx = blank value
  73. ;
  74. ;         from Hercules Graphics Card Owner's Manual
  75. ;
  76. setmd    PROC NEAR
  77. ;
  78.     push    bp
  79.     mov    bp,sp
  80.     push    ax
  81.     push    bx
  82.     push    cx
  83.  
  84. ;    change mode, but without screen on   
  85.     mov    dx,herc_cntrl        ; get address of control register
  86.     out    dx,al                   ; al has the mode byte
  87.  
  88. ;    initialize the 6845
  89.     mov    ax,ds
  90.     mov    es,ax            ; also point es:si to parameter table
  91.  
  92.     mov    dx,herc_index           ; get index register address
  93.     mov    cx,12                   ; 12 parameters to be output
  94.     xor    ah,ah                   ; starting from register 0
  95.  
  96. parms:    mov    al,ah            ; first output register number
  97.     out    dx,al
  98.  
  99.     inc    dx            ; get data register address
  100.     lodsb                           ; get next byte from param. table
  101.     out    dx,al                   ; output parameter data
  102.  
  103.     inc    ah                      ; increment register number
  104.     dec    dx                      ; restore index register address
  105.     loop    parms                   ; go do another one
  106.  
  107. ;    now go clear the buffer
  108.     pop    cx            ; get number of words to clear
  109.     mov    ax,HGCBase              ; get address off video buffer
  110.     cld                 ; set auto increment
  111.     mov    es,ax                   ; set segment for string move
  112.     xor    di,di                   ; start at offset 0
  113.     pop    ax                      ; get blank value
  114.     rep    stosw            ; repeat store string
  115.  
  116. ;   turn screen on with page 0 active
  117.     mov    dx,herc_cntrl        ; get control register address
  118.     pop    ax            ; get the mode byte
  119.     add    al,scrn_on        ; set the screen-on bit
  120.     out    dx,al
  121.  
  122.     mov    sp,bp
  123.     pop    bp
  124.     ret
  125.  
  126. setmd    ENDP
  127. ;
  128. ; writehgc (x, y, c)  - write a dot at x, y in color c
  129. ;  x = x coordinate
  130. ;  y = y coordinate
  131. ;  c = color
  132. ;
  133. writehgc    PROC USES DI SI, x, y, c
  134.  
  135.     cmp    y,348            ; Clip for hardware boundaries
  136.     jge    WtDot030
  137.     cmp    x,720
  138.     jge    WtDot030
  139.  
  140.     lea    bx,HGCRegen        ;set up offset of regen scan line table
  141.     mov    ax,HGCBase        ;segment for regen buffer
  142.     mov    es,ax
  143.  
  144. ; calculate byte address of dot in regen buffer
  145.     mov    si,y        ;get y coordinate
  146.     shl    si,1        ;mult by 2 to get offset in Scan Line Table
  147.     mov    si,[bx][si]    ;get address of start of scan line from table
  148.     mov    ax,x        ;get x coordinate
  149.     mov    cl,3
  150.     shr    ax,cl        ;divide by 8 to get byte offset
  151.     add    si,ax        ;es:si has address of byte with the bit
  152. ; build the bit mask for the specific dot in the byte
  153.     mov    cx,x        ;get x coordinate
  154.     and    cx,0007h    ;get bit number within the byte
  155.     mov    al,80h        ;prepare bit mask
  156.     shr    al,cl        ;al has bit mask
  157. ; either turn on the bit or turn it off, depending on the color
  158.     cmp    word ptr c,0    ;turn off bit?
  159.     je    WtDot020    ;yes -- branch
  160. ; turn on the bit
  161.     or    byte ptr es:[si],al
  162.     jmp    short WtDot030
  163. WtDot020:
  164. ; turn off the bit
  165.     xor    al,0FFh
  166.     and    byte ptr es:[si],al
  167. WtDot030:
  168.     ret
  169.  
  170. writehgc    ENDP
  171. ;
  172. ; readhgc (x,y) - read a dot at x,y
  173. ;  x = x coordinate
  174. ;  y = y coordinate
  175. ;
  176. ;  dot value is to be returned in AX
  177. ;
  178. readhgc    PROC USES DI SI, x,y
  179.  
  180.     lea    bx,HGCRegen        ;set up offset of regen scan line table
  181.     mov    ax,HGCBase        ;segment for regen buffer
  182.     mov    es,ax
  183.  
  184. ; calculate byte address of dot in regen buffer
  185.     mov    si,y        ;get y coordinate
  186.     shl    si,1        ;mult by 2 to get offset in Scan Line Table
  187.     mov    si,[bx][si]    ;get address of start of scan line from table
  188.     mov    ax,x        ;get x coordinate
  189.     mov    cl,3
  190.     shr    ax,cl        ;divide by 8 to get byte offset
  191.     add    si,ax        ;es:si has address of byte with the bit
  192.  
  193. ; build the bit mask for the specific dot in the byte
  194.     mov    cx,x        ;get x coordinate
  195.     and    cx,0007h    ;get bit number within the byte
  196.     mov    al,80h        ;prepare bit mask
  197.     shr    al,cl        ;al has bit mask
  198.  
  199. ; pick up the bit from the regen buffer
  200.     test    byte ptr es:[si],al
  201.     jz    readhgc020    ;branch if bit is zero
  202.     mov    ax,1        ;else return foreground bit value
  203.     jmp    short readhgc030
  204. readhgc020:
  205.     xor    ax,ax        ;bit is zero
  206. readhgc030:
  207.     ret
  208.  
  209. readhgc    ENDP
  210. ;
  211. ;   linehgc (x1,y1, x2,y2, c)  - x1,y1 to x2,y2 in color c
  212. ;   x1 = x1 coordinate
  213. ;   y1 = y1 coordinate
  214. ;   x2 = x2 coordinate
  215. ;   y2 = y2 coordinate
  216. ;   c  = color
  217. ;
  218.  
  219. linehgc    PROC USES DI SI, x1,y1,x2,y2,c
  220.  
  221.     lea    bx,HGCRegen        ;set up offset of regen scan line table
  222.     mov    ax,HGCBase        ;regen buffer segment
  223.     mov    es,ax
  224.  
  225. ; calculate scan line address in regen buffer for y1
  226.     mov    ax,y1        ;get y1 coordinate
  227.     shl    ax,1        ;mult by 2 to get offset of entry in table
  228.     add    bx,ax        ;add to table beginning offset
  229. ; set increment for x and y
  230.     mov    ds:XStep[di],1    ;default to forward
  231.     mov    ds:YStep[di],1
  232.     xor    dx,dx        ;direction = 0
  233.     mov    ax,x2        ;get x2
  234.     sub    ax,x1        ;get delta x (x2 - x1)
  235.     jns    DrLine020    ;branch if result is positive
  236.     neg    ax        ;else take absolute value
  237.     mov    ds:XStep[di],-1    ;and remember to step backwards
  238.     jmp    short DrLine030
  239. DrLine020:
  240.     jnz    DrLine030    ;jump if delta x is not zero
  241.     mov    dx,-1        ;set direction = -1 if delta x = 0
  242. DrLine030:
  243.     mov    ds:DeltaX[di],ax
  244.     mov    ax,y2        ;get y2
  245.     sub    ax,y1        ;get delta y (y2 - y1)
  246.     jns    DrLine040    ;branch if result is positive
  247.     neg    ax        ;else take absolute value
  248.     mov    ds:YStep[di],-1    ;and remember to step backwards
  249. DrLine040:
  250.     mov    ds:DeltaY[di],ax
  251.     mov    ax,x1        ;get x1
  252.     mov    cx,y1        ;get y1
  253. ;;;
  254. ;;;  ax = x
  255. ;;;  bx = y (encoded as address in the Scan Line Table)
  256. ;;;  cx = y
  257. ;;;  dx = direction
  258. ;;;
  259.     cmp    word ptr c,0 ;set to background color?
  260.     je    DrLine080
  261. DrLine050:
  262. ; loop drawing the points of the line
  263.     cmp    ax,x2        ;x = x2?
  264.     jne    DrLine060    ;no: continue with loop
  265.     cmp    cx,y2        ;y = y2?
  266.     je    DrLineRet    ;yes: finished!!!
  267. DrLine060:
  268. ; draw a point at (x,y)
  269.     push    cx        ;save regs used
  270.     push    ax
  271.     mov    cl,3
  272.     shr    ax,cl        ;adjust ax for byte offset
  273.     mov    si,ds:[bx]    ;get scan line address
  274.     add    si,ax        ;get byte address in regen buffer
  275.     pop    cx        ;restore x value
  276.     push    cx
  277.     and    cx,0007h    ;build bit mask
  278.     mov    ah,80h
  279.     shr    ah,cl
  280.     xor    es:[si],ah    ;turn on the bit
  281.     pop    ax        ;restore regs used
  282.     pop    cx
  283. ; adjust for the next point
  284.     cmp    dx,0        ;direction less than zero?
  285.     jge    DrLine070    ;no: jump
  286.     add    cx,ds:YStep[di]
  287.     add    bx,ds:YStep[di]
  288.     add    bx,ds:YStep[di]
  289.     add    dx,ds:DeltaX[di]
  290.     jmp    DrLine050
  291. DrLine070:
  292.     add    ax,ds:XStep[di]
  293.     sub    dx,ds:DeltaY[di]
  294.     jmp    DrLine050
  295.  
  296. DrLineRet:
  297.     ret
  298.  
  299. DrLine080:
  300. ; loop setting points of the line to the background color
  301.     cmp    ax,x2        ;x = x2?
  302.     jne    DrLine090    ;no: continue with loop
  303.     cmp    cx,y2        ;y = y2?
  304.     je    DrLineRet    ;yes: finished!!!
  305. DrLine090:
  306. ; draw a point at (x,y)
  307.     push    cx        ;save regs used
  308.     push    ax
  309.     mov    cl,3
  310.     shr    ax,cl        ;adjust ax for byte offset
  311.     mov    si,ds:[bx]    ;get scan line address
  312.     add    si,ax        ;get byte address in regen buffer
  313.     pop    cx        ;restore x value
  314.     push    cx
  315.     and    cx,0007h    ;build bit mask
  316.     mov    ah,80h
  317.     shr    ah,cl
  318.     xor    ah,0FFh
  319.     and    es:[si],ah    ;turn off the bit
  320.     pop    ax        ;restore regs used
  321.     pop    cx
  322. ; adjust for the next point
  323.     cmp    dx,0        ;direction less than zero?
  324.     jge    DrLine100    ;no: jump
  325.     add    cx,ds:YStep[di]
  326.     add    bx,ds:YStep[di]
  327.     add    bx,ds:YStep[di]
  328.     add    dx,ds:DeltaX[di]
  329.     jmp    DrLine080
  330. DrLine100:
  331.     add    ax,ds:XStep[di]
  332.     sub    dx,ds:DeltaY[di]
  333.     jmp    DrLine080
  334.  
  335. linehgc    ENDP
  336. ;
  337. ;   charhgc (x,y,c)  - draw char  c at x,y
  338. ;    x = x coordinate
  339. ;    y = y coordinate
  340. ;    c = character to draw
  341. ;
  342. charhgc    PROC USES DI SI, x,y,c
  343.  
  344.     lea    bx,HGCRegen        ;set up offset of regen scan line table
  345.     mov    ax,HGCBase        ;regen buffer segment
  346.     mov    es,ax
  347.  
  348. ; determine offset to character in character table
  349.     mov    si,c        ;get character
  350.     and    si,007Fh    ;strip invalid bits
  351.     mov    cl,3        ;mult by 8 to get offset into table
  352.     shl    si,cl        ;ds:si is addr of character in table
  353.     lea    di,Crt_Char    ;add in table base offset
  354.     add    si,di
  355.  
  356. ; adjust x coordinate for byte offset into regen buffer
  357.     mov    dx,x        ;get x coordinate
  358.     add    dx,7        ;adjust to next byte boundary if reqd
  359.     mov    cl,3
  360.     shr    dx,cl        ;adjust for byte displacement into buffer
  361. ; get address in Regen Scan Line Table based on y coordinate
  362.     mov    ax,y        ;get y coordinate
  363.     shl    ax,1        ;mult by 2 for offset into scan line table
  364.     add    bx,ax        ;add to offset of table to get entry address
  365. ; loop 8 times to draw the character
  366.     mov    cx,8
  367. charhgc020:
  368.     lodsb            ;al = byte from DS:SI; incr SI
  369.     mov    di,[bx]        ;get offset into regen buffer
  370.     add    di,dx        ;adjust for x coordinate
  371.     mov    es:[di],al    ;store 8 pixels of char into regen buffer
  372.     inc    bx        ;incr for next scan line
  373.     inc    bx
  374.     loop    charhgc020
  375.     ret
  376.  
  377. charhgc    ENDP
  378.  
  379. .data
  380.  
  381. gtable    db    35h,2dh,2eh,07h
  382.     db    5bh,02h,57h,57h
  383.     db    02h,03h,00h,00h
  384.  
  385. ttable    db    61h,50h,52h,0fh
  386.     db    19h,06h,19h,19h
  387.     db    02h,0dh,0bh,0ch
  388.  
  389. XStep    dw    0
  390. YStep    dw    0
  391. DeltaX    dw    0
  392. DeltaY    dw    0
  393.  
  394. Crt_Char    db    000h,000h,000h,000h,000h,000h,000h,000h    ; #0
  395.         db    07Eh,081h,0A5h,081h,0BDh,099h,081h,07Eh    ; #1
  396.         db    07Eh,0FFh,0DBh,0FFh,0C3h,0E7h,0FFh,07Eh    ; #2
  397.         db    06Ch,0FEh,0FEh,0FEh,07Ch,038h,010h,000h    ; #3
  398.         db    010h,038h,07Ch,0FEh,07Ch,038h,010h,000h    ; #4
  399.         db    038h,07Ch,038h,0FEh,0FEh,07Ch,038h,07Ch    ; #5
  400.         db    010h,010h,038h,07Ch,0FEh,07Ch,038h,07Ch    ; #6
  401.         db    000h,000h,018h,03Ch,03Ch,018h,000h,000h    ; #7
  402.         db    0FFh,0FFh,0E7h,0C3h,0C3h,0E7h,0FFh,0FFh    ; #8
  403.         db    000h,03Ch,066h,042h,042h,066h,03Ch,000h    ; #9
  404.         db    0FFh,0C3h,099h,0BDh,0BDh,099h,0C3h,0FFh    ; #10
  405.         db    00Fh,007h,00Fh,07Dh,0CCh,0CCh,0CCh,078h    ; #11
  406.         db    03Ch,066h,066h,066h,03Ch,018h,07Eh,018h    ; #12
  407.         db    03Fh,033h,03Fh,030h,030h,070h,0F0h,0E0h    ; #13
  408.         db    07Fh,063h,07Fh,063h,063h,067h,0E6h,0C0h    ; #14
  409.         db    099h,05Ah,03Ch,0E7h,0E7h,03Ch,05Ah,099h    ; #15
  410.         db    080h,0E0h,0F8h,0FEh,0F8h,0E0h,080h,000h    ; #16
  411.         db    002h,00Eh,03Eh,0FEh,03Eh,00Eh,002h,000h    ; #17
  412.         db    018h,03Ch,07Eh,018h,018h,07Eh,03Ch,018h    ; #18
  413.         db    066h,066h,066h,066h,066h,000h,066h,000h    ; #19
  414.         db    07Fh,0dbh,0dbh,07Bh,01Bh,01Bh,01Bh,000h    ; #20
  415.         db    03Eh,063h,038h,06Ch,06Ch,038h,0CCh,078h    ; #21
  416.         db    000h,000h,000h,000h,07Eh,07Eh,07Eh,000h    ; #22
  417.         db    018h,03Ch,07Eh,018h,07Eh,03Ch,018h,0FFh    ; #23
  418.         db    018h,03Ch,07Eh,018h,018h,018h,018h,000h    ; #24
  419.         db    018h,018h,018h,018h,07Eh,03Ch,018h,000h    ; #25
  420.         db    000h,018h,00Ch,0FEh,00Ch,018h,000h,000h    ; #26
  421.         db    000h,030h,060h,0FEh,060h,030h,000h,000h    ; #27
  422.         db    000h,000h,0C0h,0C0h,0C0h,0FEh,000h,000h    ; #28
  423.         db    000h,024h,066h,0FFh,066h,024h,000h,000h    ; #29
  424.         db    000h,018h,03Ch,07Eh,0FFh,0FFh,000h,000h    ; #30
  425.         db    000h,0FFh,0FFh,07Eh,03Ch,018h,000h,000h    ; #31
  426.         db    000h,000h,000h,000h,000h,000h,000h,000h    ; #32 ' '
  427.         db    030h,078h,078h,030h,030h,000h,030h,000h    ; #33 '!'
  428.         db    06Ch,06Ch,06Ch,000h,000h,000h,000h,000h    ; #34 '"'
  429.         db    06Ch,06Ch,0FEh,06Ch,0FEh,06Ch,06Ch,000h    ; #35 '#'
  430.         db    030h,07Ch,0C0h,078h,00Ch,0F8h,030h,000h    ; #36 '$'
  431.         db    000h,0C6h,0CCh,018h,030h,066h,0C6h,000h    ; #37 '%'
  432.         db    038h,06Ch,038h,076h,0DCh,0CCh,076h,000h    ; #38 '&'
  433.         db    060h,060h,0C0h,000h,000h,000h,000h,000h    ; #39 '''
  434.         db    018h,030h,060h,060h,060h,030h,018h,000h    ; #40 '('
  435.         db    060h,030h,018h,018h,018h,030h,060h,000h    ; #41 ')'
  436.         db    000h,066h,03Ch,0FFh,03Ch,066h,000h,000h    ; #42 '*'
  437.         db    000h,030h,030h,0FCh,030h,030h,000h,000h    ; #43 '+'
  438.         db    000h,000h,000h,000h,000h,030h,030h,060h    ; #44 ','
  439.         db    000h,000h,000h,0FCh,000h,000h,000h,000h    ; #45 '-'
  440.         db    000h,000h,000h,000h,000h,030h,030h,000h    ; #46 '.'
  441.         db    006h,00Ch,018h,030h,060h,0C0h,080h,000h    ; #47 '/'
  442.         db    07Ch,0C6h,0CEh,0DEh,0F6h,0E6h,07Ch,000h    ; #48 '0'
  443.         db    030h,070h,030h,030h,030h,030h,0FCh,000h    ; #49 '1'
  444.         db    078h,0CCh,00Ch,038h,060h,0CCh,0FCh,000h    ; #50 '2'
  445.         db    078h,0CCh,00Ch,038h,00Ch,0CCh,078h,000h    ; #51 '3'
  446.         db    01Ch,03Ch,06Ch,0CCh,0FEh,00Ch,01Eh,000h    ; #52 '4'
  447.         db    0FCh,0C0h,0F8h,00Ch,00Ch,0CCh,078h,000h    ; #53 '5'
  448.         db    038h,060h,0C0h,0F8h,0CCh,0CCh,078h,000h    ; #54 '6'
  449.         db    0FCh,0CCh,00Ch,018h,030h,030h,030h,000h    ; #55 '7'
  450.         db    078h,0CCh,0CCh,078h,0CCh,0CCh,078h,000h    ; #56 '8'
  451.         db    078h,0CCh,0CCh,07Ch,00Ch,018h,070h,000h    ; #57 '9'
  452.         db    000h,030h,030h,000h,000h,030h,030h,000h    ; #58 ':'
  453.         db    000h,030h,030h,000h,000h,030h,030h,060h    ; #59 ';'
  454.         db    018h,030h,060h,0C0h,060h,030h,018h,000h    ; #60 '<'
  455.         db    000h,000h,0FCh,000h,000h,0FCh,000h,000h    ; #61 '='
  456.         db    060h,030h,018h,00Ch,018h,030h,060h,000h    ; #62 '>'
  457.         db    078h,0CCh,00Ch,018h,030h,000h,030h,000h    ; #63 '?'
  458.         db    07Ch,0C6h,0DEh,0DEh,0DEh,0C0h,078h,000h    ; #64 '@'
  459.         db    030h,078h,0CCh,0CCh,0FCh,0CCh,0CCh,000h    ; #65 'A'
  460.         db    0FCh,066h,066h,07Ch,066h,066h,0FCh,000h    ; #66 'B'
  461.         db    03Ch,066h,0C0h,0C0h,0C0h,066h,03Ch,000h    ; #67 'C'
  462.         db    0F8h,06Ch,066h,066h,066h,06Ch,0F8h,000h    ; #68 'D'
  463.         db    0FEh,062h,068h,078h,068h,062h,0FEh,000h    ; #69 'E'
  464.         db    0FEh,062h,068h,078h,068h,060h,0F0h,000h    ; #70 'F'
  465.         db    03Ch,066h,0C0h,0C0h,0CEh,066h,03Eh,000h    ; #71 'G'
  466.         db    0CCh,0CCh,0CCh,0FCh,0CCh,0CCh,0CCh,000h    ; #72 'H'
  467.         db    078h,030h,030h,030h,030h,030h,078h,000h    ; #73 'I'
  468.         db    01Eh,00Ch,00Ch,00Ch,0CCh,0CCh,078h,000h    ; #74 'J'
  469.         db    0E6h,066h,06Ch,078h,06Ch,066h,0E6h,000h    ; #75 'K'
  470.         db    0F0h,060h,060h,060h,062h,066h,0FEh,000h    ; #76 'L'
  471.         db    0C6h,0EEh,0FEh,0FEh,0D6h,0C6h,0C6h,000h    ; #77 'M'
  472.         db    0C6h,0E6h,0F6h,0DEh,0CEh,0C6h,0C6h,000h    ; #78 'N'
  473.         db    038h,06Ch,0C6h,0C6h,0C6h,06Ch,038h,000h    ; #79 'O'
  474.         db    0FCh,066h,066h,07Ch,060h,060h,0F0h,000h    ; #80 'P'
  475.         db    078h,0CCh,0CCh,0CCh,0DCh,078h,01Ch,000h    ; #81 'Q'
  476.         db    0FCh,066h,066h,07Ch,06Ch,066h,0E6h,000h    ; #82 'R'
  477.         db    078h,0CCh,0E0h,070h,01Ch,0CCh,078h,000h    ; #83 'S'
  478.         db    0FCh,0B4h,030h,030h,030h,030h,078h,000h    ; #84 'T'
  479.         db    0CCh,0CCh,0CCh,0CCh,0CCh,0CCh,0FCh,000h    ; #85 'U'
  480.         db    0CCh,0CCh,0CCh,0CCh,0CCh,078h,030h,000h    ; #86 'V'
  481.         db    0C6h,0C6h,0C6h,0D6h,0FEh,0EEh,0C6h,000h    ; #87 'W'
  482.         db    0C6h,0C6h,06Ch,038h,038h,06Ch,0C6h,000h    ; #88 'X'
  483.         db    0CCh,0CCh,0CCh,078h,030h,030h,078h,000h    ; #89 'Y'
  484.         db    0FEh,0C6h,08Ch,018h,032h,066h,0FEh,000h    ; #90 'Z'
  485.         db    078h,060h,060h,060h,060h,060h,078h,000h    ; #91 '['
  486.         db    0C0h,060h,030h,018h,00Ch,006h,002h,000h    ; #92 '\'
  487.         db    078h,018h,018h,018h,018h,018h,078h,000h    ; #93 ']'
  488.         db    010h,038h,06Ch,0C6h,000h,000h,000h,000h    ; #94 '^'
  489.         db    000h,000h,000h,000h,000h,000h,000h,0FFh    ; #95 '_'
  490.         db    030h,030h,018h,000h,000h,000h,000h,000h    ; #96 '`'
  491.         db    000h,000h,078h,00Ch,07Ch,0CCh,076h,000h    ; #97 'a'
  492.         db    0E0h,060h,060h,07Ch,066h,066h,0DCh,000h    ; #98 'b'
  493.         db    000h,000h,078h,0CCh,0C0h,0CCh,078h,000h    ; #99 'c'
  494.         db    01Ch,00Ch,00Ch,07Ch,0CCh,0CCh,076h,000h    ; #100 'd'
  495.         db    000h,000h,078h,0CCh,0FCh,0C0h,078h,000h    ; #101 'e'
  496.         db    038h,06Ch,060h,0F0h,060h,060h,0F0h,000h    ; #102 'f'
  497.         db    000h,000h,076h,0CCh,0CCh,07Ch,00Ch,0F8h    ; #103 'g'
  498.         db    0E0h,060h,06Ch,076h,066h,066h,0E6h,000h    ; #104 'h'
  499.         db    030h,000h,070h,030h,030h,030h,078h,000h    ; #105 'i'
  500.         db    00Ch,000h,00Ch,00Ch,00Ch,0CCh,0CCh,078h    ; #106 'j'
  501.         db    0E0h,060h,066h,06Ch,078h,06Ch,0E6h,000h    ; #107 'k'
  502.         db    070h,030h,030h,030h,030h,030h,078h,000h    ; #108 'l'
  503.         db    000h,000h,0CCh,0FEh,0FEh,0D6h,0C6h,000h    ; #109 'm'
  504.         db    000h,000h,0F8h,0CCh,0CCh,0CCh,0CCh,000h    ; #110 'n'
  505.         db    000h,000h,078h,0CCh,0CCh,0CCh,078h,000h    ; #111 'o'
  506.         db    000h,000h,0DCh,066h,066h,07Ch,060h,0F0h    ; #112 'p'
  507.         db    000h,000h,076h,0CCh,0CCh,07Ch,00Ch,01Eh    ; #113 'q'
  508.         db    000h,000h,0DCh,076h,066h,060h,0F0h,000h    ; #114 'r'
  509.         db    000h,000h,07Ch,0C0h,078h,00Ch,0F8h,000h    ; #115 's'
  510.         db    010h,030h,07Ch,030h,030h,034h,018h,000h    ; #116 't'
  511.         db    000h,000h,0CCh,0CCh,0CCh,0CCh,076h,000h    ; #117 'u'
  512.         db    000h,000h,0CCh,0CCh,0CCh,078h,030h,000h    ; #118 'v'
  513.         db    000h,000h,0C6h,0D6h,0FEh,0FEh,06Ch,000h    ; #119 'w'
  514.         db    000h,000h,0C6h,06Ch,038h,06Ch,0C6h,000h    ; #120 'x'
  515.         db    000h,000h,0CCh,0CCh,0CCh,07Ch,00Ch,0F8h    ; #121 'y'
  516.         db    000h,000h,0FCh,098h,030h,064h,0FCh,000h    ; #122 'z'
  517.         db    01Ch,030h,030h,0E0h,030h,030h,01Ch,000h    ; #123 '{'
  518.         db    018h,018h,018h,000h,018h,018h,018h,000h    ; #124 '|'
  519.         db    0E0h,030h,030h,01Ch,030h,030h,0E0h,000h    ; #125 '}'
  520.         db    076h,0DCh,000h,000h,000h,000h,000h,000h    ; #126 '~'
  521.         db    000h,010h,038h,06Ch,0C6h,0C6h,0FEh,000h    ; #127
  522.  
  523.         ;offsets into HGC regen buffer for each scan line
  524. HGCRegen    dw    0,8192,16384,24576,90,8282,16474,24666
  525.         dw    180,8372,16564,24756,270,8462,16654,24846
  526.         dw    360,8552,16744,24936,450,8642,16834,25026
  527.         dw    540,8732,16924,25116,630,8822,17014,25206
  528.         dw    720,8912,17104,25296,810,9002,17194,25386
  529.         dw    900,9092,17284,25476,990,9182,17374,25566
  530.         dw    1080,9272,17464,25656,1170,9362,17554,25746
  531.         dw    1260,9452,17644,25836,1350,9542,17734,25926
  532.         dw    1440,9632,17824,26016,1530,9722,17914,26106
  533.         dw    1620,9812,18004,26196,1710,9902,18094,26286
  534.         dw    1800,9992,18184,26376,1890,10082,18274,26466
  535.         dw    1980,10172,18364,26556,2070,10262,18454,26646
  536.         dw    2160,10352,18544,26736,2250,10442,18634,26826
  537.         dw    2340,10532,18724,26916,2430,10622,18814,27006
  538.         dw    2520,10712,18904,27096,2610,10802,18994,27186
  539.         dw    2700,10892,19084,27276,2790,10982,19174,27366
  540.         dw    2880,11072,19264,27456,2970,11162,19354,27546
  541.         dw    3060,11252,19444,27636,3150,11342,19534,27726
  542.         dw    3240,11432,19624,27816,3330,11522,19714,27906
  543.         dw    3420,11612,19804,27996,3510,11702,19894,28086
  544.         dw    3600,11792,19984,28176,3690,11882,20074,28266
  545.         dw    3780,11972,20164,28356,3870,12062,20254,28446
  546.         dw    3960,12152,20344,28536,4050,12242,20434,28626
  547.         dw    4140,12332,20524,28716,4230,12422,20614,28806
  548.         dw    4320,12512,20704,28896,4410,12602,20794,28986
  549.         dw    4500,12692,20884,29076,4590,12782,20974,29166
  550.         dw    4680,12872,21064,29256,4770,12962,21154,29346
  551.         dw    4860,13052,21244,29436,4950,13142,21334,29526
  552.         dw    5040,13232,21424,29616,5130,13322,21514,29706
  553.         dw    5220,13412,21604,29796,5310,13502,21694,29886
  554.         dw    5400,13592,21784,29976,5490,13682,21874,30066
  555.         dw    5580,13772,21964,30156,5670,13862,22054,30246
  556.         dw    5760,13952,22144,30336,5850,14042,22234,30426
  557.         dw    5940,14132,22324,30516,6030,14222,22414,30606
  558.         dw    6120,14312,22504,30696,6210,14402,22594,30786
  559.         dw    6300,14492,22684,30876,6390,14582,22774,30966
  560.         dw    6480,14672,22864,31056,6570,14762,22954,31146
  561.         dw    6660,14852,23044,31236,6750,14942,23134,31326
  562.         dw    6840,15032,23224,31416,6930,15122,23314,31506
  563.         dw    7020,15212,23404,31596,7110,15302,23494,31686
  564.         dw    7200,15392,23584,31776,7290,15482,23674,31866
  565.         dw    7380,15572,23764,31956,7470,15662,23854,32046    
  566.         dw    7560,15752,23944,32136,7650,15842,24034,32226
  567.         dw    7740,15932,24124,32316
  568.  
  569.     END
  570.