home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG099.ARC
/
POINT.I
< prev
next >
Wrap
Text File
|
1979-12-31
|
640b
|
23 lines
Function Point(X, Y : Integer) : Byte;
{Given points X in [0.511] and Y in [0..255] it will return
255 if either co-ordinate out of range
0 if it is reset
1 if it is set}
var
PCG : Byte;
Begin
If not((X>=0) and (X<512) and (Y>=0) and (Y<256)) then Point := 255
else
begin
PCG := Mem[$F3C0 + X Div 8 - (Y Div 16) * 64];
Port[28] := 135 - (Y Div 32);
if Odd(Mem[PCG * 16 + $F00F - (Y Mod 16)] Shr (7 - X Mod 8)) then
Point := 1
else
Point := 0;
Port[28] := 128
end
End;