home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
utilitys
/
pudd.arc
/
TOOLS4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-08-11
|
9KB
|
139 lines
{*************************************************************************}
procedure fillbar(x1,y1,x2,y2:integer);
{........................................a rectangle is drawn with the }
{ lower left corner being at x1,y1 and the upper right corner at x2,y2. }
{ The area is drawn and filled as is determined by filltypes procedure. }
begin
inline ($21/$00/$FF/ {ld hl,0ff00h put addr of addr in hl }
$5E/ {ld E,(HL) get half of the address }
$23/ {inc HL point to second half }
$56/ {ld D,(HL) get other half }
$EB/ { ex DE,HL switch }
$ED/$5B/x1/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$ED/$5B/y1/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put it in array }
$23/ {inc HL }
$72/ {ld (HL),D both parts }
$23/ {inc HL full word }
$ED/$5B/x2/ {ld DE,(nn) get the mode }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$ED/$5B/y2/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put it in array }
$23/ {inc HL }
$72/ {ld (HL),D both parts }
$23/ {inc HL full word }
$0E/$09/ {ld C,8h get the function }
$EF ); {rst 28h }
end;
{*************************************************************************}
{*************************************************************************}
procedure filltypes(style,index,color:integer);
{ ......................................... all three variables affecting }
{ fillbar are set here: }
{ STYLE INDEX RESULT }
{ 0 0 thru 7 A hollow bar is created }
{ 1 0 thru 7 A solid bar is created }
{ 2 0 thru 7 Any one of 8 different intensities }
{ is selected with 0 being lowest intensity }
{ and 7 being highest intensity. }
{ 3 0 vertical lines fill bar }
{ 3 1 horizontal lines fill bar }
{ 3 2 diagonal lines fill bar }
{ 3 3 left diagonal lines fill bar }
{ 3 4 vert & horz lines fill bar }
{ 3 5 vert & right diagonal lines fill bar }
{ 3 6 vert & left diagonal lines fill bar }
{ 3 7 crossed diagonal lines fill bar }
{ }
{ .... all of the above is drawn in black (color=0) or white (color=1) }
begin
inline ($21/$00/$FF/ {ld hl,0ff00h put addr of addr in hl }
$5E/ {ld E,(HL) get half of the address }
$23/ {inc HL point to second half }
$56/ {ld D,(HL) get other half }
$EB/ { ex DE,HL switch }
$ED/$5B/style/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$0E/$0F/ {ld C,8h get the function }
$EF/ {rst 28h }
$21/$00/$FF/ {ld hl,0ff00h put addr of addr in hl }
$5E/ {ld E,(HL) get half of the address }
$23/ {inc HL point to second half }
$56/ {ld D,(HL) get other half }
$EB/ { ex DE,HL switch }
$ED/$5B/index/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$0E/$10/ {ld C,8h get the function }
$EF/ {rst 28h }
$21/$00/$FF/ {ld hl,0ff00h put addr of addr in hl }
$5E/ {ld E,(HL) get half of the address }
$23/ {inc HL point to second half }
$56/ {ld D,(HL) get other half }
$EB/ { ex DE,HL switch }
$ED/$5B/color/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$0E/$11/ {ld C,8h get the function }
$EF ); {rst 28h }
end;
{*************************************************************************}
{*************************************************************************}
procedure fillhorz(y,x1,x2:integer);
{........................................a single line is filled in the }
{ current style, etc. The line is y and is filled from x1 to x2. }
var ylocal,x1local,x2local :integer;
begin
ylocal := y;
x1local := x1;
x2local := x2;
inline ($21/$00/$FF/ {ld hl,0ff00h put addr of addr in hl }
$5E/ {ld E,(HL) get half of the address }
$23/ {inc HL point to second half }
$56/ {ld D,(HL) get other half }
$EB/ { ex DE,HL switch }
$ED/$5B/ylocal/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$ED/$5B/x1local/ {ld DE,(nn) get the integer }
$73/ {ld (HL),E put it in array }
$23/ {inc HL }
$72/ {ld (HL),D both parts }
$23/ {inc HL full word }
$ED/$5B/x2local/ {ld DE,(nn) get the mode }
$73/ {ld (HL),E put in array }
$23/ {inc HL }
$72/ {ld (HL),D and the high byte }
$23/ {inc HL (it's done in words) }
$0E/$07/ {ld C,8h get the function }
$EF ); {rst 28h }
end;
{*************************************************************************}