Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - 0040:0049h (1 byte). the value in this byte specifies the current video http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  0040:0049H (1 byte). The value in this byte specifies the current video
  mode. (See Figure 3-4.) This is the same video-mode number used in the
  ROM BIOS video services. (See Chapter 9 for more on these services and
  page 72 for general information concerning video modes.)

  We've already shown how to use DEBUG to determine the current video mode
  by inspecting the byte at 0040:0049H. BASIC programs can use the following
  instructions to read this byte and determine the video mode:

  DEF SEG = &H40                  ' set BASIC data segment to 40H
  VIDEO.MODE = PEEK(&H49)         ' look at location 0040:0049H

  0040:004AH (a 2-byte word). This word indicates the number of characters
  that can be displayed in each row of text on the screen.

  0040:004CH (a 2-byte word). This word indicates the number of bytes
  required to represent one screenful of video data.

  Number             Description
  --------------------------------------------------------------------------
  00H                40 x 25 16-color text
                     (CGA composite color burst disabled)
  01H                40 x 25 16-color text
  02H                80 x 25 16-color text
                     (CGA composite color burst disabled)
  03H                80 x 25 16-color text
  04H                320 x 200 4-color graphics
  05H                320 x 200 4-color graphics
                     (CGA composite color burst disabled)
  06H                640 x 200 2-color graphics
  07H                80 x 25 monochrome text
  0DH                320 x 200 16-color graphics
  0EH                640 x 200 16-color graphics
  0FH                640 x 350 monochrome graphics
  10H                640 x 350 16-color graphics
  11H                640 x 480 2-color graphics
  12H                640 x 480 16-color graphics
  13H                320 x 200 256-color graphics
  --------------------------------------------------------------------------

  Figure 3-4.  BIOS video mode numbers stored at address 0040:0049H.

  0040:004EH (a 2-byte word). This word contains the starting byte offset
  into video display memory of the current display page. In effect, this
  address indicates which page is in use by giving the offset to that page.

  0040:0050H (eight 2-byte words). These words give the cursor locations for
  eight separate display pages, beginning with page 0. The first byte of
  each word gives the character column and the second byte gives the row.

  0040:0060H (a 2-byte word). These 2 bytes indicate the size of the cursor,
  based on the range of cursor scan lines. The first byte gives the ending
  scan line, the second byte the starting scan line.

  0040:0062H (1 byte). This byte holds the current display page number.

  0040:0063H (a 2-byte word). This word stores the port address of the
  hardware CRT controller chip.

  0040:0065H (1 byte). This byte contains the current setting of the CRT
  mode register on the Monochrome Display Adapter and the Color Graphics
  Adapter.

  0040:0066H (1 byte). This byte contains the current setting of the Color
  Graphics Adapter's CRT color register. This byte ends the first block of
  ROM BIOS video control data.

  0040:0067H (5 bytes). The original IBM PC BIOS used the 5 bytes starting
  at 0040:0067H for cassette tape control. In PS/2 models 50, 60, and 80,
  which don't support a cassette interface, the 4 bytes at 0040:0067H can
  contain the address of a system reset routine that overrides the usual
  BIOS startup code. (See the BIOS technical reference manual for details.)

  0040:006CH (4 bytes stored as one 4-byte number). This area is used as a
  master clock count, which is incremented once for each timer tick. It is
  treated as if it began counting from 0 at midnight. When the count reaches
  the equivalent of 24 hours, the ROM BIOS resets the count to 0 and sets
  the byte at 0040:0070H to 1. DOS or BASIC calculates the current time from
  this value and sets the time by putting the appropriate count in this
  field.

  0040:0070H (1 byte). This byte indicates that a clock rollover has
  occurred. When the clock count passes midnight (and is reset to 0), the
  ROM BIOS sets this byte to 1, which means that the date should be
  incremented.

  --------------------------------------------------------------------------
  NOTE:
    This byte is set to 1 at midnight and is not incremented. There is no
    indication if two midnights pass before the clock is read.
  --------------------------------------------------------------------------

  0040:0071H (1 byte). The ROM BIOS sets bit 7 of this byte to indicate that
  the Ctrl-Break key combination was pressed.

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