unit S2

S2: VBXE handler

author: Konrad Kokoszkiewicz, Tomasz Biela


1: text mode 80x24 in 2 colors per character. This is like GR.0 in 80 columns and color.
2: pixel mode 160x192/256 colors (lowres). This is like GR.15 in 256 colors.
3: pixel mode 320x192/256 colors (stdres). This is like GR.8 in 256 colors.
4: pixel mode 640x192/16 colors (hires)
5: text mode 80x25.
6: text mode 80x30.
7: text mode 80x32.

Constants:

name:value:description:
fsNormal0
fsUnderline64
fsInverse128
fsProportional8
fsCondensed32

Register Variables:

name:address:type:description:
buffer$0400array [0..0] of byte

Interface:

name:description:
ClearDevice

procedure ClearDevice;


Clear whole screen
    SetGraphMode

    procedure SetGraphMode(mode: byte);


    Init S2:
      Position

      procedure Position(x: word; y: byte); assembler;


      Set cursor position on screen.
      Positions the cursor at (X,Y), X in horizontal, Y in vertical direction.
        parameters:
      • x - horizontal positions
      • y - vertical positions
      TextOut

      procedure TextOut(x: word; y: byte; s: PByte); overload;



        TextOut

        procedure TextOut(a: char); overload;



          TextOut

          procedure TextOut(s: PByte); overload;



            ScrollUp

            procedure ScrollUp(line, cnt: byte);



              ScrollDown

              procedure ScrollDown(line, cnt: byte);



                ClearLine

                procedure ClearLine(line, cnt: byte);



                  CloseGraph

                  procedure CloseGraph;



                    LoadBitmap

                    function LoadBitmap(fnam: PString): Boolean;


                    This loads a BMP File (4bit, 8bit)