home *** CD-ROM | disk | FTP | other *** search
- subttl Interrupt 14H dispatcher
- page +
-
- ;
- ; VFOS_IBM VFOSSIL driver by Bob Hartman.
- ; Copyright 1988 by Spark Software. ALL RIGHTS RESERVED.
- ;
-
- vfos_entry proc far
- push cx
- push dx
- push si
- push di
- push ds
- push es
-
- push cs
- pop ds
-
- cmp al,0
- jne not_0
-
- ; do subfunction 0
- mov si,offset vfos_info
- mov cx,8
- repz movsb
- mov ah,3
- mov bh,0
- int 10h
- xor ah,ah
- mov al,ch
- mov curs_info.curs_start,ax
- mov al,cl
- mov curs_info.curs_end,ax
- mov ax,1954h
- jmp SHORT done_14
-
- not_0:
- cmp al,1
- jne not_1
- cmp cx,FUNCNT*4
- jbe cx_ok
- mov cx,FUNCNT*4
- cx_ok:
- mov si,offset FUNCTBL
- repz movsb
-
- mov ax, 0500h ; select page 0 (*JZ*)
- int 10h
- mov ax,adapter_base
- mov es,ax
- mov ah,0feh ; fetch video buffer segment
- int 10h
- mov ax,es
- mov adapter_base,ax
-
- ; set up correct video parameters (*JZ*)
- mov ax,40h ; BIOS data segment
- mov es,ax
- mov ax,es:[4Ah] ; get number of screen columns
- mov mode_info.mode_cols,ax
- xor ah,ah
- mov al,es:[84h] ; get number of screen rows
- cmp al,24 ; more than 25?
- jle norow ; no, don't change anything
- inc al
- mov mode_info.mode_rows,ax
- norow:
-
- mov ax,1954h
- mov bh,FUNCNT
- jmp SHORT done_14
-
- not_1:
- cmp al,2
- jne not_2
- mov ax,1954h
- jmp SHORT done_14
-
- not_2:
- cmp al,3
- jne not_3
-
- ; remove ourselves from the FOSSIL chain
- push cs
- pop es
- mov ah,7fh ; deinstall application code
- mov al,81h ; VFOSSIL code
- mov dx,offset vfos_entry ; offset of entry point (es ok)
- int 14h ; initialize it
-
- ; free PSP so we go away
- mov ah,49h
- int 21h
- mov ax,1954h
- jmp SHORT done_14
-
- not_3:
- mov ax,0ffffh
- jmp SHORT done_14
-
- done_14:
- pop es
- pop ds
- pop di
- pop si
- pop dx
- pop cx
-
- ret
- vfos_entry endp
-