|
<--- Turn the page
   
(contents page)
   
Turn the page --->
Assembler |
|
The EGA has a nice underline feature. If you send the video card a certain code, you can have certain characters underlined. Listing 1 below is the code to set the EGA card. Listing 2 (at right) is some demo code to show you what is being done. Typing UNDER1 at the DOS prompt will "turn it on". Typing UNDER1 N at the DOS prompt will "turn it off". First enter UNDER1 at the DOS prompt. Then enter UNDER2 to see the text. Now enter UNDER1 N and UNDER1 each in turn to see the underline appear and disappear. ;; Listing 1
.model tiny
.code
mov al,[5Dh] ; the 'N' in the FCB
xor bx,bx ; could use [82h]
mov ds,bx
mov ah,[0485h]
cmp al,4Eh
jz NotN
dec ah
NotN: mov dx,[0463h]
mov al,14h
out dx,ax
ret
.end
|
;; Listing 2
.model tiny
.code
mov ax,0600h
mov bh,02h
xor cx,cx
mov dx,1950h
int 10h
mov ah,02
xor bh,bh
xor dx,dx
int 10h
mov ax,0950h
mov bx,0001
mov cx,0028h
int 10h
mov ah,02
mov dx,0028h
int 10h
mov ax,0943h
mov bl,02h
int 10h
ret
.end
Please note that this will only work on an EGA or better card.
¥ |
<--- Turn the page
   
(contents page)
   
Turn the page ---> Page 9