Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>csrset() - set bottom and top scan line values</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     csrset() - set bottom and top scan line values
  Usage:    csrset(<top>,<bottom>)
  Params:   integer <top> - top scan line of cursor
            integer <bottom> - bottom scan line of cursor
  Returns:  nothing

 ---------------------------------- Example ---------------------------------

                 mbot = csrbot()
                 mtop = csrtop()
                 csrset(4,7)
                 wait "Enter a key:" to mem1
                 csrset(mtop,mbot)

  Note:     When using an EGA/MDA adaptor, a character is normally
            14 scan lines high by 8 scan lines wide. On a CGA, a
            character is normally 8 scan lines high. When you are
            in normal modes, the cursor is usually set to starting
            scan line 6 and ending scan line 7. On a CGA this
            produces a cursor that appears at the bottom of the
            character. On an EGA, setting the cursor to these
            parameters would appear to set the cursor to somewhere
            in the middle of the character. this is not true however
            because the EGA performs cursor emulation. This cursor
            emulation lets you specify starting and ending scan line
            values as if you had a CGA, thereby insuring that the
            cursor appears equal on both adaptors. So when using
            an EGA, you can use values that correspond to the CGA
            without fear.

            One pitfall to cursor emulation appears when you are
            in 43 line mode on the EGA. Due to a bug in the EGA
            BIOS emulation routines, the correct values are not
            added to the starting and end scan lines to produce
            a satisfactory cursor when using character matrixes
            that are less than 14 scan lines high. Due to this,
            cursor emulation is turned off whenever you switch
            into a mode that changes the height of the character.

            If you are resetting the cursor size while cursor
            emulation is off, you must take into consideration
            that the EGA displays the cursor starting at the
            top scan line you specify to the end scan line minus
            one. If you specify an ending scan line that is greater
            than the height of the character matrix, the cursor
            wraps around to the top (This is also true for any mode).
            However, to get a cursor to appear on the bottom line
            of an 8x8 character size, you must start at scan line
            6, and end on scan line 0. (character height starts
            at 0, not 1). The EGA BIOS will subtract 1 from zero
            and will compute 7 as the ending line (don't ask,
            it works). If you specify 6/7 as your starting and
            ending scan lines, your cursor will appear on line
            6, and end on line 6 due to this subtraction. Please
            keep these points in mind when programming the cursor.


See Also: csrbot() csrtop() csron() csroff()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson