page ,132
; IOLITE3.ASM (revised by cjv 30 apr 90)
; Works only on a color monitor. Snow code removed.
; Major change is the inclusion of Disk Letters (physical disk)
; in the highlighted block, upper right corner.
; Only color shown is white. (I use a mono VGA monitor.)
;
RETFARPOP MACRO X
DB 0CAh
DW X
ENDM
CODE SEGMENT
ASSUME CS:CODE, DS:CODE, ES:CODE
GREEN EQU 070h
ORG 100h
START: JMP INIT
CATTRIB DB 00 ;COLOR CRT CHAR ATTRIB STORAGE
DISKLTR DB 00 ;Drive letter from int 13
COLOR DB 00 ;DISKIO IND. CHAR ATTRIB STORAGE
CVIDSEG DW 0B800h ;BASE ADDR VID RAM SEG (COLOR)
OLDINT13 DD 00000000 ;ORIGINAL INT 13 VECTOR
CoAuthor DB 'C. J. Vaisvil, 4/30/90'
NEWINT13: CMP DL,02h ;CALL TO DRIVE # >= 1 (B)?
JNB HDISK ;If its a HD, jump to adjust
PUSH AX ;save AX
MOV AH,DL ; swap DL into AH
ADD AH,65 ;add the 1st drive letter to AH
MOV CS:[DISKLTR],AH ;store the value
POP AX ;get back to where we were
MOV CS:[COLOR],GREEN;FLOPPY (A or B)
JMP SHORT COLRSET ;COLOR IS SET
HDISK: PUSH AX ;save AX
MOV AH,DL ;swap DL into AH
ADD AH,-61 ;add the 1st hdrive letter to AH
MOV CS:[DISKLTR],AH ;store the value
POP AX ;get back to where we were
MOV CS:[COLOR],GREEN;FLOPPY (A or B)
JMP SHORT COLRSET ;COLOR IS SET
COLRSET: PUSH AX ;SAVE STUFF WE'LL BE DIDDLING WITH
PUSH DS
MOV DS,CS:[CVIDSEG] ;VID MEM SEG B800h
MOV AH,CS:[COLOR] ;COLOR is always white
CLI
xchg ah,ds:[9Fh] ;XCHG AH with B800:009F (r1,col79atr)
MOV CS:[CATTRIB],AH
PUSH AX ;save AX
MOV AH,CS:[DISKLTR] ;Grab the disk letter
XCHG AH,DS:[09Eh] ;XCHG AH with the ascii @ r1,col79
MOV CS:[DISKLTR],AH ;Save the ASCII that was there
POP AX ;get back to where we were
STI
POP DS
POP AX
PUSHF
CALL DWORD PTR CS:OLDINT13 ;IN DEBUG: CS:,CALL FAR [XXXX]
PUSHF
PUSH AX
PUSH DS
MOV DS,CS:[CVIDSEG]
MOV AH,CS:[CATTRIB]
CLI
mov ds:[9Fh],ah ;MOV AH into B800:009F
PUSH AX ;Save AX
MOV AH,CS:[DISKLTR] ;get what ascii was there
mov ds:[09Eh],AH ;and put it back
POP AX ;Get back to where we were
sti
POP DS
POP AX
POPF
RETFARPOP 2
INIT: PUSH ES
SUB AX,AX
MOV ES,AX
MOV AX,3513h
INT 21h
MOV WORD PTR [OLDINT13],BX
MOV WORD PTR [OLDINT13]+2,ES
LEA DX,[NEWINT13]
MOV AX,2513h
INT 21h
POP ES
MOV DX,OFFSET INIT
INT 27h
CODE ENDS
END START