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 / MBUG094.ARC / DUMP6416.I < prev    next >
Text File  |  1979-12-31  |  2KB  |  59 lines

  1. { Single height graphics screen dump procedure
  2.   Written by Daniel Prager 1986
  3.   Modified by R.K.Hallworth for
  4.    Premium Hires 64x16 screen }
  5.  
  6. Procedure Dump6416;
  7. const
  8.   LessHeight  = #27'1';       {Printer code to decrease line height}
  9.   Default     = #27'2';       {Code to restore the default line height}
  10.   BIG         = #27'K'#0#1;   {Code to initialise Bit Image Graphics}
  11.   ROMLatch    = 11;           {Port Latch for screen RAM/Standard set ROM}
  12.   ScreenRAM   = 0;            {Screen RAM setting for Port[ROMLatch]}
  13.   StandardSet = 1;            {Standard set value for Port[ROMLatch]}
  14.   Attribute=144;
  15.  
  16. var
  17.   X, Y, TopLine : Integer;
  18.   PCG, Line, Echo, PCGBank : Byte;
  19.   Ch:Char;
  20.  
  21. Function GetPCGByte(Location:Integer):byte;
  22.  
  23. Var store:byte;
  24.  
  25. begin
  26. inline( $3E/1/           {LD A,1}
  27.         $D3/11/          {OUT(11),A   standard character set}
  28.         $2A/LOCATION/    {LD HL,(LOCATION)}
  29.         $7E/             {LD A,(HL)}
  30.         $32/STORE/       {LD (STORE),A}
  31.         $3E/0/           {LD A,0}
  32.         $D3/11);        {OUT(11),A video ram}
  33.    GetPCGByte:=Store
  34. end;
  35.  
  36.  
  37. begin
  38.   Writeln(LST, LessHeight);
  39.   for X := 0 to 63 do
  40.     begin
  41.       Writeln(LST);
  42.       Write(LST, BIG);
  43.       for Y := 15 downto 0 do
  44.         begin
  45.           PCG := Mem[$F000 + Y * 64 + X];
  46.           TopLine := $F000 + PCG * 16;
  47.           Port[28]:=Attribute;
  48.           PCGbank:=Mem[$F000 + Y * 64 + X];
  49.           Port[28]:=128+PCGbank;
  50.           for Line := 15 downto 0 do
  51.             for Echo := 0 to 0 do
  52.               Write(LST, Chr(GetPCGByte(TopLine + Line)));
  53.           Port[28]:=128;
  54.         end
  55.     end;
  56.   Writeln(LST, Default)
  57. end;
  58.  
  59.