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

  1. Procedure ScreenDump;
  2. {This routine dumps a HIRES2 screen to a parallel printer}
  3.  
  4. const
  5.   ScreenRam = $F000;
  6.  
  7. var
  8.   Column, Row, Bank   : Byte;
  9.   Store, Location   : Integer;
  10.  
  11.  
  12. Procedure Lprint;
  13.  
  14. Begin
  15. InLine($2A/Store/        {       LD      HL,(STORE) }
  16.        $11/$0F/$F0/      {       LD      DE,0F00FH  }
  17.        $29/              {       ADD     HL,HL      }
  18.        $29/              {       ADD     HL,HL      }
  19.        $29/              {       ADD     HL,HL      }
  20.        $29/              {       ADD     HL,HL      }
  21.        $19/              {       ADD     HL,DE      }
  22.        $06/$10/          {       LD      B,16       }
  23.        $5E/              {READ   LD      E,(HL)     }
  24.        $C5/              {       PUSH    BC         }
  25.        $E5/              {       PUSH    HL         }
  26.        $F5/              {       PUSH    AF         }
  27.        $0E/$05/          {       LD      C,5        }
  28.        $CD/$05/$00/      {       CALL    0005       }
  29.        $F1/              {       POP     AF         }
  30.        $0E/$05/          {       LD      C,5        }
  31.        $CD/$05/$00/      {       CALL    0005       }
  32.        $E1/              {       POP     HL         }
  33.        $C1/              {       POP     BC         }
  34.        $2B/              {       DEC     HL         }
  35.        $10/$EC);         {       DJNZ    READ       }
  36. End;
  37.  
  38.  
  39.  
  40. Begin
  41. Write(LST,#27'A'#8);
  42. for Column := 0 to 63 do
  43.   begin
  44.   Write(LST,#27'K'#0#2);
  45.   for Row := 15 downto 0 do
  46.     begin
  47.      Location := ScreenRam + Column + Row * 64;
  48.      Store := Mem[Location];
  49.      Port[28] := 144;
  50.      Bank := Mem[Location];
  51.      Port[28] := Bank + 128;
  52.      Lprint;
  53.      Port[28] := 128;
  54.     end;
  55.     WriteLn(LST);
  56.   end;
  57. Write(LST,#27'A'#9);
  58. End;
  59.