Hercules Graphics Adapter

 3B0h  synonym for 3B4h

 3B1h  synonym for 3B5h

 3B2h  synonym for 3B4h

 3B3h  synonym for 3B5h



 3B8h (W)
 bit 1  Hercules graphics mode if set, text mode else
     3  Video enabled if set
     5  Blink enabled if set
     7  Graphics page 1 displayed if set, page 0 else

 3BAh (R)  Status Register
 bit 0  Horizontal sync
     3  Video signal
     7  Vertical sync

 3BAh (W)  Mode Select Register
 bit 3  132-column text for monochrome

 3BBh (W)  Lightpen Strobe Reset
        Writing to this register will clear the lightpen strobe.

 3BFh (W)
 bit 0  Setting of graphics mode bit (3B8h bit 1) enabled if set
     1  Setting of graphics page bit (3B8h bit 7) enabled if set


 ID Hercules Graphics Card:

 old:=rdinx($3B4,$a);
 outp($3B5,6);         {Change Cursor End}
 for x:=1 to 50 do;    {Wait for CRTC to respond}
 val:=inp($3B5);
 outp($3B5,old);
 if val=6 then
 begin
   x:=50000;
   repeat
     dec(x);
     y:=inp($3BA);
   until (y and $80)=0) or (x=0);
   if x=0 then __MDA__
   else
     case y and $70 of
       $50:Hercules Incolor;
       $10:Hercules Graphics Plus
     else Hercules Graphics Card;
     end;
 end;




 Hercules GRAFIX BIOS Interface:
 GRAFIX is a memory resident program, not a part of the Hercules Graphics Card.

----------1040-------------------------------
INT 10 - VIDEO - SET GRAPHICS MODE (Hercules GRAFIX)
       AH = 40h
SeeAlso: AH=41h
----------1041-------------------------------
INT 10 - VIDEO - SET TEXT MODE (Hercules GRAFIX)
       AH = 41h
SeeAlso: AH=40h
----------1042-------------------------------
INT 10 - VIDEO - CLEAR CURRENT PAGE (Hercules GRAFIX)
       AH = 42h
SeeAlso: AH=45h
----------1043-------------------------------
INT 10 - VIDEO - SELECT DRAWING PAGE (Hercules GRAFIX)
       AH = 43h
       AL = page number (0,1)
SeeAlso: AH=44h,AH=45h
----------1044-------------------------------
INT 10 - VIDEO - SELECT DRAWING FUNCTION (Hercules GRAFIX)
       AH = 44h
       AL = drawing function
            00h clear pixels
            01h set pixels
            02h invert pixels
SeeAlso: AH=44h,AH=46h,AH=4Ch,AH=4Dh
----------1045-------------------------------
INT 10 - VIDEO - SELECT PAGE TO DISPLAY (Hercules GRAFIX)
       AH = 45h
       AL = page number (0,1)
SeeAlso: AH=42h,AH=43h
----------1046-------------------------------
INT 10 - VIDEO - DRAW ONE PIXEL (Hercules GRAFIX)
       AH = 46h
       DI = x (0-720)
       BP = y (0-347)
Note: function 44h determines operation and function 43h which page to use
SeeAlso: AH=0Ch,AH=47h,AH=49h,AH=4Ch,AH=4Dh
----------1047-------------------------------
INT 10 - VIDEO - FIND PIXEL VALUE (Hercules GRAFIX)
       AH = 47h
       DI = x (0-720)
       BP = y (0-347)
Return: AL = 00h pixel clear
       AL = 01h pixel set
Note: function 43h specifies which page is used
SeeAlso: AH=0Dh,AH=46h
----------1048-------------------------------
INT 10 - VIDEO - MOVE TO POINT (Hercules GRAFIX)
       AH = 48h
       DI = x (0-720)
       BP = y (0-347)
SeeAlso: AH=49h
----------1049-------------------------------
INT 10 - VIDEO - DRAW TO POINT (Hercules GRAFIX)
       AH = 49h
       DI = x (0-720)
       BP = y (0-347)
Note: function 48h or 49h specify first point, 44h operation and 43h
     page to use
SeeAlso: AH=43h,AH=44h,AH=48h,AH=4Ch,P = y (0-347)
Note: unlike the other BIOS character functions character position is
     specified in pixels rather than rows
       DI = x coordinate of lower left corner
       BP = y coordinate of lower left corner
       BX = height in pixels
       CX = width in pixels
Note: draws a solid rectangle
SeeAlso: AH=4Eh
----------104B-------------------------------
INT 10 - VIDEO - DISPLAY CHARACTER (Hercules GRAFIX)
       AH = 4Bh
       AL = character to display
       DI = x (0-720)
       BP = y (0-347)
Note: unlike the other BIOS character functions character position is
     specified in pixels rather than rows and columns
SeeAlso: AH=09h,AH=0Ah
----------104C-------------------------------
INT 10 - VIDEO - DRAW ARC (Hercules GRAFIX)
       AH = 4Ch
       AL = quadrant (1 = upper right, 2 = upper left, et cetera)
       DI = x coordinate of center
       BP = y coordinate of center
       BX = radius
SeeAlso: AH=49h,AH=4Dh
----------104D-------------------------------
INT 10 - VIDEO - DRAW CIRCLE (Hercules GRAFIX)
       AH = 4Dh
       DI = x of center
       BP = y of center
       BX = radius
SeeAlso: AH=49h,AH=4Ch
----------104E-------------------------------
INT 10 - VIDEO - FILL AREA (Hercules GRAFIX)
       AH = 4Eh
       DI = x coordinate of an interior point
       BP = y coordinate of an interior point
Notes: fills convex polygonal areas
      the first fill makes the figure solid, the second erases it
SeeAlso: AH=4A