home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
decus
/
RB140
/
grlibfor.arj
/
GOPT.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-12-11
|
3KB
|
102 lines
PAGE ,132
;GOPT.ASM
;UPDATE HISTORY
;==============
; 15 nov 1984 Con
vert to CI86 V2.2
include asmc.h
SEGEND CODE
SE
GDEF DATA
EXTRN swisg_:BYTE, sw100a_:BYTE, gintvect_:WORD
SE
GEND DATA
SEGDEF CODE
PUBLIC gropt_
;********************************************************************
;
*
; p r o c e d u r e gropt_() *
; *
; purpose: tes
t if Graphics Option is present. *
; entry: none. *
; ex
it: ax = 0 option present. *
; dax = -1 option not present.
*
; register usage: ax *
; the following globals are set:
- *
; swisg_ 1 = graphics option present *
; 0 = no *
; sw100a_ 1 = this is Rainbow model 100a *
; 0 = no, 100b
*
; gintvect_ = appropriate hardware interrupt vector *
;********************************************************************
PROCDEF gropt_
mov byte ptr swisg_,0 ;flag graphics bo
ard not present
in al,8 ;input from port 8
test al,04h
;test bit 2 to see if option present
jz opt1 ;if option is
present, continue
mov ax,-1 ;else, set AX for option not prese
nt
jmp optx ;& exit
;===============
;option present
;===============
opt
1: mov byte ptr swisg_,1 ;flag graphics board present
;
;Find o
ut what the interupt vector is for the graphics option & set gintvect_.
; For a Model 100-A, the graphics interrupt vector is 22 Hexadecimal.
; For a Model 100-B, the interrupt vector is relocated up to A2H.
;
If EE00:0F44h and 04<>0, we have the relocated vectors of a Model 100-B
; and need to OR the msb of our vector.
;
push es ;sav
e valid es
mov ax,0ee00h ;test if vectors are relocated
mov es,ax
mov ax,88h ;100-A int. vector base addr
mov
byte ptr sw100a_,0 ; & set provisional flag
test es:byte ptr 0
f44h,4 ;relocated vectors?
jz g0 ;jump if yes
mov ax,
288h ;100-B int. vector base addr
mov byte ptr sw100a_,1 ; &
reset 100b flag
g0: mov word ptr gintvect_,ax
pop es
xor ax,ax ;set AX for option present
optx: ret
PRO
CEND gropt_
include epilogue.h
END