home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug120.arc / PASCAL.LBR / SCRNDUMP.I < prev    next >
Text File  |  1979-12-31  |  896b  |  48 lines

  1. procedure ScreenDump;
  2.  
  3. {
  4.  This procedure does a screen dump of an 80 * 24 screen
  5.     Can only handle standard graphics only
  6.  
  7. }
  8.  
  9. const
  10.  lessheight    = #27'1' ;
  11.  default       = #27'2' ;
  12.  BIG           = #27'K'#16#2;
  13.  ROMLatch      = 11;
  14.  ScreenRAM     = 0;
  15.  CharROM   = 1;
  16.  
  17. var
  18.  x,y, TopLine : Integer;
  19.  PCG, Line, ch : Byte;
  20.  
  21. begin
  22.  port[28] := 0;
  23.  Writeln(LST,lessheight);
  24.  for X := 0 to 79 do
  25.   begin
  26.    writeln(lst);
  27.    write(lst,' ':5, BIG);
  28.    for y := 23 downto 0 do
  29.     begin
  30.      PCG := mem[ $F000 + y * 80 + x ];
  31.      TopLine := $F000+PCG*16;
  32.      for line := 10 downto 0 do
  33.        begin
  34.             Port[ROMLatch] := CharROM;
  35.             ch := Mem[topline +line];
  36.             write(LST, Chr(ch),chr(ch));
  37.             port[ROMLatch] := ScreenRAM
  38.        end;
  39.    end
  40.   end;
  41.  Writeln(lst, Default);
  42. end.
  43.  
  44.  
  45.  
  46.  
  47.  
  48.