(Line Compare Register - LCR) (18h) - 3


; ;

; VGA ,

;

; 8

out dx,al

;

;

dec dx

;

mov ax,1A00h

int 10h

; AL 1Ah,

; VGA

cmp al,1Ah

je vga

jmp ega

vga:

; AL

mov al,7

out dx,al

inc dx

in al,dx

; D4

mov bx,split_line

mov cl,4

shl bh,cl

and bh,00010000b

and al,11101111b

or al,bh

out dx,al

; D6

dec dx

mov al,9

out dx,al

inc dx

in al,dx

and al,10111111b

out dx,al

jmp quit_split

ega:

mov bx,split_line

mov cl,4

shl bh,cl

and bh,00010000b

cmp dx,3B4h ; ?

je default_1Fh

;

; EGA

mov al,es:[488h]

and al,0Fh

; "OFF OFF ON ON" ?

cmp al,3

je default_1Fh

; "OFF ON ON OFF" ?

cmp al,9

je default_1Fh

; ,

; 11h

or bh,1

jmp set_overflow

;

;

; 1Fh

default_1Fh:

or bh,0Fh

;

set_overflow:

mov al,07h

out dx,al

inc dx

mov al,bh

out dx,al

quit_split:

leave

ret 2

ENDP SPLIT

ENDS SPLIT_TEXT

END