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>getmode() - get the video mode currently in use</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     getmode() - get the video mode currently in use
  Usage:    <integer> = getmode()
  Params:   none

  Returns:  an integer that specifies the current video mode, based on
            the following table:

            Mode - Description
            0    - 40x25 16 color alphanumeric (color disabled)
            1    - 40x25 16 color alphanumeric
            2    - 80x25 16 color alphanumeric (color disabled)
            3    - 80x25 16 color alphanumeric
            4    - 320x200 4 color graphics
            5    - 320x200 4 color graphics (color disabled)
            6    - 640x200 2 color graphics
            7    - 80x25 monochrome alphanumeric (N/A on CGA)
            8    - 160x200 16 color graphics (PCjr only)
            9    - 320x200 16 color graphics (PCjr only)
            10   - 640x200 4 color graphics (PCjr only)
            13   - 320x200 - 16 color graphics (EGA & VGA only)
            14   - 640x200 - 16 color graphics (EGA & VGA only)
            15   - 640x350 - mono graphics (EGA & VGA only)
            16   - 640x350 - 16 color graphics (EGA/VGA with 128kb)
                   640x350 - 4 color graphics (EGA 64kb)
            17   - 640x480 - 2 color graphics (MCGA & VGA only)
            18   - 640x480 - 16 color graphics (VGA only)
            19   - 320x200 - 256 color graphics (MCGA & VGA only)

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

                 setmode(1)     && switch into 40x25 alphanumeric
                 ? getmode()
                 * prints 1

                 setmode(43)    && switch into 43 line EGA
                 ? getmode()
                 * prints 3 - the real mode in use when in 43 line mode

                 tempvar = getmode()
                 setmode(43)
                 ** do something **
                 setmode(tempvar)

  Note:     When using 43 or 50 line mode, getmode returns 3 because that
            is the real video mode being used. To check for 43 or 50 line
            mode you can use the maxrow() function.

See Also: setmode() interrupt() setscreen() setpage()

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