home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / pascal / 6416 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.0 KB  |  39 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!mcsun!sunic!ericom!news
  3. From: (Jim)
  4. Subject: Re: Saving screens in Turbo Pascal
  5. Message-ID: <1992Nov9.104336.29924@ericsson.se>
  6. Sender: news@ericsson.se
  7. Nntp-Posting-Host: etlxd10h.ericsson.se
  8. Organization: Ericsson
  9. References: <1ddf63INNfe5@clover.csv.warwick.ac.uk>
  10. Date: Mon, 9 Nov 1992 10:43:36 GMT
  11. Lines: 26
  12.  
  13. Hi Michael.
  14.  
  15. The easiest way I find is to read the CGA memory directly as if it was a buffer pointed
  16. to by a pointer and blockwrite it into an untyped file.  Here is an outline for VGA
  17. (I think CGA is B800:0000??).
  18.  
  19. var vgamem : byte absolute $A000:0000;
  20.     vgaptr : pointer;
  21.     myfile : file;
  22.     numrec : integer;
  23.  
  24.     procedure savescreen;
  25.     begin
  26.      vgaptr:=@vgamem;
  27.      assign(myfile,'NAME.XXX');
  28.      rewrite(myfile,1);
  29.      numrec:=blockwrite(myfile,vgaptr^,64000);   <-You might want to check this syntax
  30.      close(myfile);                                as I've written this from memory.
  31.     end;
  32.  
  33. That's as much as I can remember.  Anyone want to elaborate or debug??
  34.  
  35. Good luck, Jim.
  36.  
  37.  
  38.  
  39.