	name	genoa

	.386p

INCLUDE	..\common\vgadrvr.inc

_CODE	SEGMENT DWORD PUBLIC 'CODE'

ASSUME	cs:_CODE

	org	0

smo	EQU	offset set_mode
mspo	EQU	offset set_page
cco	EQU	offset CCOPY

head	vga_header	<,11h,6ah,5fh,,5ch,5eh,0,,smo,sml,mspo,mspl,mspo,mspl,cco,ccl>

NUMPAGES	equ	2

setpage	MACRO	srcpage,dstpage	; set the new page
	IFIDNI	<dstpage>,<ah>	; dst == ah
	IFIDNI	<srcpage>,<ah>	; dst == ah && src == ah
	mov	al,ah
	shl	ah,3
	or	ah,al
	ELSE			; dst == ah && src != ah
	shl	ah,3
	or	ah,srcpage
	ENDIF
	ELSE			; dst != ah
	IFIDNI	<srcpage>,<ah>	; dst != ah && src == ah
	IFDIFI	<dstpage>,<al>	; dst != ah && src == ah && dst != al
	mov	al,dstpage
	ENDIF
	shl	al,3
	or	ah,al
	ELSE			; dst != ah && src != ah
	mov	ah,dstpage
	shl	ah,3
	or	ah,srcpage
	ENDIF
	ENDIF

	or	ah,40h		; force bits 7,6
	mov	al,6		; paging register
	push	edx
	mov	edx,03c4h
	out	dx,ax		; set the pages
	pop	edx
		ENDM

set_mode	PROC NEAR
	xor	ah,ah		; function 0 = set mode
	int	10h
	xor	eax,eax
	ret
sml	EQU	$ - offset set_mode
set_mode	ENDP

set_page	PROC NEAR
	push	edx
	mov	ah,al		; page in eax
	shl	ah,3
	or	ah,al
	or	ah,40h		; force bits 7,6
	mov	al,6		; paging register
	mov	dx,03c4h
	out	dx,ax		; set the pages
	pop	edx
	ret
mspl	EQU	$ - offset set_page
set_page	ENDP

include	ccopy2.asm

copyright db	10, 13, 'Genoa SuperVGA 6300/6400 driver '
include version.asm
include date.asm
	db	10, 13
	db	'Copyright (c) 1992 Starnet Communications '
	db	'Corporation. All rights reserved.',10,13,'$'

_CODE	ENDS
	END
