home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
dos
/
bix
/
bios.sys
< prev
next >
Wrap
Text File
|
1986-08-04
|
4KB
|
156 lines
(********************************************************************)
(* *)
(* ROM BIOS Access Procedures *)
(* *)
(* Calls BIOS Routines for modification of screen parameters. *)
(* These routines do not perform hardware (memory) i/o *)
(* *)
(* *)
(* written by: John Leonard 1/6/86 *)
(* *)
(* NOT FOR SALE WITHOUT WRITTEN PERMISSION *)
(* *)
(********************************************************************)
type
Bios_Record = record case integer of
1: (ax,bx,cx,dx,bp,bi,di,ds,es,flags : integer );
2: (al,ah,bl,bh,cl,ch,dl,dh : byte);
end;
procedure SetCursorSize( sl,el:integer);
var regs : Bios_Record;
begin
with regs do begin
ah := $01;
ch := sl;
cl := el;
end;
intr($10,regs);
end;
procedure BSetCursorPosition( page,row,column:integer);
var regs : Bios_Record;
begin
regs.ah := $02;
regs.bh := page;
regs.dh := row;
regs.dl := column;
intr($10,regs);
end;
procedure BReadCursorPosition(page : integer;
var row,column,s1,s2:integer);
var regs : Bios_Record;
begin
regs.bh := page;
regs.ah := $03;
intr($10,regs);
with regs do begin
row := dh;
column:=dl;
s1:=ch;
s2:=cl;
end;
end;
procedure BSetActiveDisplayPage( i : integer);
var regs : Bios_Record;
begin
with regs do begin
ah := $05;
al := lo(i);
end;
intr($10,regs);
end;
procedure BScrollWindowUp( lines,filler,y1,x1,y2,x2:integer);
var regs : Bios_Record;
begin
with regs do begin
ah := $06;
al := lines;
bh := filler;
ch := y1;
cl := x1;
dh := y2;
dl := x2;
end;
intr($10,regs);
end;
procedure BScrollWindowDown( lines,filler,y1,x1,y2,x2:integer);
var regs : Bios_Record;
begin
with regs do begin
ah := $07;
al := lines;
bh := filler;
ch := y1;
cl := x1;
dh := y2;
dl := x2;
end;
intr($10,regs);
end;
procedure BWriteCharacterAndAttribute( character,page,attribute,num:integer);
var regs : Bios_Record;
begin
with regs do begin
ah := $09;
al := character;
bh := page;
bl := attribute;
ch := hi(num);
cl := lo(num);
end;
intr($10,regs);
end;
procedure BWriteCharacter( character,page,num:integer);
var regs : Bios_Record;
begin
with regs do begin
ah := $0A;
al := character;
bh := page;
ch := hi(num);
cl := lo(num);
end;
intr($10,regs);
end;
procedure GetVideoMode( var width,mode,page:integer);
var regs : Bios_Record;
begin
regs.ah := $0f;
intr($10,regs);
with regs do begin
page := bh;
width := ah;
mode := al;
end;
end;
procedure SetColorPalette ( i:integer );
var regs : Bios_Record;
begin
if not (i in [0..15]) then exit;
regs.ah := $B;
regs.bh := 0;
regs.bl := i;
intr($10,regs);
end;