home *** CD-ROM | disk | FTP | other *** search
- comment !
- gfxlib.inc
-
- (C)opyright 1990 Headland Technology, Inc.
-
- This code may be used freely as long as it contains this copyright notice.
-
-
- !
-
-
- ;************************************************************************
- ;
- ; Video Buffer Segments
- ;
-
- GRAPHICS_SEG equ 0A000h
- COLOR_TXT_SEG equ 0B800h
- MONO_TXT_SEG equ 0B000h
-
- ;*************************************************************************
- ;
- ; EGA/VGA Data BIOS Area
- ;
-
- BIOS_MODE equ 0449h ; Current video mode number
- BIOS_COLUMNS equ 044Ah ; Current number of video columns
- BIOS_PAGE_SIZE equ 044Ch ; Current size of video buffer
- BIOS_PAGE_OFF equ 044Eh ; Offset of current video page
- BIOS_CURS_POS equ 0450h ; Col, row position
- BIOS_CURS_MODE equ 0460h ; Current cursor mode setting
- BIOS_CURR_PAGE equ 0462h ; Current page being displayed
- BIOS_6845 equ 0463h ; Base I/O address for 6845/CRTC
- BIOS_CRT_SET equ 0465h ; Simulated value of CGA 3x8
- BIOS_CRT_PAL equ 0466h ; Simulated value of CGA 3x9
- BIOS_ROWS equ 0484h ; Number of character rows - 1
- BIOS_HEIGHT equ 0485h ; Bytes per character
- BIOS_EQUIP_INFO equ 0487h ; Miscellaneous equipment information
- BIOS_SWITCHES equ 0488h ; Switch settings
- BIOS_FLAGS equ 0489h ; More VGA info
- BIOS_DCC equ 048A ; Display combination code
-
-
-
-
- ;************************************************************************
- ;
- ; Miscellaneous registers
- ;
-
- MISC_WRITE equ 3C2h ; Miscellaneous Output write
- MISC_READ equ 3CCh ; Miscellaneous Output read
- STATUS equ 3DAh ; Status register
-
- ;************************************************************************
- ;
- ; Sequencer registers
- ;
-
- SEQUENCER equ 3C4h ; Sequencer index
- RESET equ 0 ; Reset
- CLOCK equ 1 ; Clocking mode
- MAPMASK equ 2 ; Map Mask
- CHARMAP equ 3 ; Character Map Select
- MODE equ 4 ; Memory Mode
-
-
- ;***********************************************************************
- ;
- ; CRT Controller registers
- ;
-
- CRTC equ 3D4h ; CRTC index
- OVFL equ 07h ; Overflow
- PRS equ 08h ; Preset Row scan
- HI_STRT equ 0Ch ; Start Address High
- LO_STRT equ 0Dh ; Start Address Low
- HI_CPOS equ 0Eh ; Cursor Position High
- LO_CPOS equ 0Fh ; Cursor Position Low
- VRE equ 11h ; Vertical Retrace End
- OFFST equ 13h ; Offset
- LCR equ 14h ; Line Compare
-
-
- ;***********************************************************************
- ;
- ; Graphics Controller registers
- ;
-
- GRAPHICS equ 03CEh ; Graphics Controller index
- SET_RES equ 0 ; Set/Reset
- EN_SET equ 1 ; Enable Set/Reset
- CCMP equ 2 ; Color Compare
- ROTATE equ 3 ; Data Rotate
- READMAP equ 4 ; Read Map Select
- GMODE equ 5 ; Graphics Mode
- GMISC equ 6 ; Miscellaneous
- CDONTC equ 7 ; Color Don't Care
- BITMASK equ 8 ; Bit Mask
-
-
- ;***********************************************************************
- ;
- ; Attribute Controller registers
- ;
-
- ATTR equ 3C0h ; Attribute Controller index
- PALETTE equ 0 ; 0-15 Palette registers
- AMODE equ 10h ; Attribute Mode Control
- OVERSCAN equ 11h ; Oversacn Color Register
- PLANE equ 12h ; Color Plane Enable
- PAN equ 13h ; Horizontal Panning
- COLOR_SEL equ 14h ; Color Select
-
-
- ;*************************************************************************
- ;
- ; Video 7 Extension registers
- ;
-
- X_BANK_SELECT equ 0F6h ; Extended Bank Select
- X_PAGE_SELECT equ 0F9h ; Extended Page Select