home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Compilation 6
/
SharewareCD_06.zip
/
pcspace
/
video7h.asm
< prev
next >
Wrap
Assembly Source File
|
1993-10-05
|
2KB
|
98 lines
;Pcspace-screen driver VIDEO7- 256colors (untested)
;
;To create a video7h.drv:
; tasm video7h
; tlink video7h
; exe2bin video7h
; ren video7h.bin video7h.drv
;
; Attention: Maximum length of the drv file: 256 Bytes
prog segment para 'code'
assume cs:prog
assume ds:prog
assume ss:prog
assume es:prog
start proc far
; Initialize entry point for video mode
jmp short init
; Set the entry point 64k bank and set the segment address to es
; The bank number has been set in al.
jmp short bank
;parameter for the driver
db 255 ;number of colors-1
;Table of parameters for initialization
db 67h ;Mode 0: resolution 640*480
db 69h ;Mode 1: resolution 800*600
db -1 ;Mode 2: resolution 1024*768 (no such resolution)
db -1 ;Mode 3: resolution 1280*960 (no such resolution)
db -1 ;Mode 4: resolution 1280*1024 (no such resolution)
db "Video7 256colors" ;Identification text for SETUP
db 0 ;length can be adjustable
;Initialize video mode
;Used registers: ax,bx
;al has been set to the value of the parameter table
;No such resolution (Par.-1) has been captured already.
init: mov bl,al
xor bh,bh
mov ax,6f05h
int 10h
retf
;set video bank
;Used registers: ax,dx,es
bank: mov dx,0a000h ;segmentadr. video memory
mov es,dx
push bx
mov bl,al
mov dx,03c4h
mov al,0f9h
out dx,al
inc dx
mov al,bl
and al,01h
out dx,al
mov dl,0cch
in al,dx
and al,0dfh
mov ah,bl
and ah,02h
shl ah,4
or al,ah
mov dl,0c2h
out dx,al
mov dl,0c4h
mov al,0f6h
out dx,al
inc dx
in al,dx
and al,0f0h
mov ah,bl
shr ah,2
mov bh,bl
and bh,4
or ah,bh
or al,ah
out dx,al
pop bx
retf
start endp
prog ends
end start