home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 1998 November (Bonus)
/
GAMESTAR11B.ISO
/
Diverses
/
QPV17E
/
INSTALL.DAT
/
DRVSRC
/
DRVSRC.ZIP
/
S3.ASM
< prev
next >
Wrap
Assembly Source File
|
1995-10-21
|
2KB
|
77 lines
;
; QPV/386 video driver (experimental)
; for graphics cards based on the S3 chipset,
; supports up to 8 Mb of video memory.
;
; The following S3 chips are supported (refer to S3.TXT for details):
; 86c911, -911A, -924, -801, -805, -805i, -805p, -928, -928p,
; -732 ("Trio32"), -764 ("Trio64"), -864 ("Vision864")
; -964 ("Vision964"), -866, -868, -968
;
.286
Code Segment Para 'Code'
Assume cs:Code
Org 100h
Procs dw Bank,Init,Exit,0
WIndex Macro idx, val
mov al,idx
out dx,al
inc dx
mov al,val
out dx,al
dec dx
EndM
RIndex Macro idx
mov al,idx
out dx,al
inc dx
in al,dx
dec dx
EndM
Bank: mov dx,03d4h
push ax
mov ah,al
cmp [byte ptr cs:0],0c0h
jae c864
RIndex 35h
and ah,0fh
and al,0f0h
or ah,al
WIndex 35h,ah
pop ax
cmp [byte ptr cs:0],090h
jae short c928
retf
c928: push ax
mov ah,al
RIndex 51h
and ah,30h
shr ah,2
and al,0f3h
or ah,al
WIndex 51h,ah
pop ax
retf
c864: WIndex 6ah,ah
pop ax
retf
Init: mov dx,03d4h
WIndex 38h,48h
WIndex 39h,0a5h
RIndex 30h
mov [cs:0],al
retf
Exit: retf
Code Ends
End Procs
; End of source.