home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
d86v
/
cursor.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-01-14
|
2KB
|
59 lines
{ program : CURSOR.PAS }
{ written by: Tom Parson }
{ date : 12/03/85 }
{ cursor_off will turn the cursor off
cursor_on will restore the cursor }
{these routine were derived from an artice in PC Tech Journal
July 85 page 35 "The Disappearing Cursor"
It uses a feature of the Video ROM BIOS. If bit 5 of the cursor start
position is set then the cursor will disappear}
procedure cursor_off;
{turn the cursor off }
var
Regs : Record Case Integer Of (* MS-DOS only *) {!}
1: (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: Integer);
2: (AL,AH,BL,BH,CL,CH,DL,DH: Byte);
End;
begin
with regs do
begin
ah:=1; {Video BIOS function number}
ch:=$20; {set so that cursor will turn off}
end;
intr($10,regs); {call the video bios funtion}
end;
procedure cursor_on;
{turn the cursor on}
var
Regs : Record Case Integer Of (* MS-DOS only *) {!}
1: (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: Integer);
2: (AL,AH,BL,BH,CL,CH,DL,DH: Byte);
End;
begin
with regs do
begin
ah:=1; {Video BIOS function number }
if (MEM[0000:$410] and $30) = $30 {test for type of monitor}
then {monochrome monitor has 14 scan lines per character 0-13}
begin
ch:=12; {scan-line start}
cl:=13; {scan-line end}
end
else {color monitor has 8 scan line per character 0-7}
begin
ch:=6; {scan-line start * Change this to change
* cursor size }
cl:=7; {scan-line end}
end;
end;
intr($10,regs); {call the video bios funtion}
end;