home *** CD-ROM | disk | FTP | other *** search
- {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
- The purchaser of these procedures and functions may include them in COMPILED
- programs freely, but may not sell or give away the source text.
-
- NOTE: in order to use the following procedures and functions, your
- program must also include MONITOR.LIB, and it must simply
- call the procedure CheckColor. If you don't do this, the
- routines in this file will work erratically, if at all }
-
- var
- LocationCode : integer;
- {============================================================================}
- function ReadScreen(col,row:byte):char;
-
- {Returns the character on the screen at co-ordinate (col,row) }
-
- begin
- LocationCode := (col-1)*2 + (row-1)*160;
- ReadScreen := chr(Mem[ScreenSeg:LocationCode]);
- end;
- {============================================================================}
- procedure WriteScreen(col, row: byte; thisChar:char; attribute : byte);
-
- {Writes the character "thisChar" directly to the screen at co-ordinates
- (col,row), with the attribute indicated}
-
- begin
- LocationCode := (col-1)*2 + (row-1)*160;
- Mem[ScreenSeg:locationCode] := ord(ThisChar);
- LocationCode := (col-1)*2+1 + (row-1)*160;
- Mem[ScreenSeg:locationCode] := attribute;
- end;
- {============================================================================}
- procedure ScreenAttribute(col, row, attribute: byte);
-
- {Changes the attribute on the screen at (col,row) w/o changing the character}
-
- begin
- LocationCode := (col-1)*2+1 + (row-1)*160;
- Mem[ScreenSeg:locationCode] := attribute;
- end;
- {============================================================================}
- function GetAttribute(col,row:byte):byte;
-
- {Returns the screen attribute at (col,row)}
-
- begin
- LocationCode := (col-1)*2+1 + (row-1)*160;
- GetAttribute := Mem[ScreenSeg:LocationCode];
- end;