home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / pascal / 6379 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.6 KB

  1. Path: sparky!uunet!ogicse!emory!wupost!udel!sbcs.sunysb.edu!csws2.ic.sunysb.edu!clane
  2. From: clane@csws2.ic.sunysb.edu (Charles F Lane)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Raw Data
  5. Message-ID: <1992Nov6.163908.19859@sbcs.sunysb.edu>
  6. Date: 6 Nov 92 16:39:08 GMT
  7. Article-I.D.: sbcs.1992Nov6.163908.19859
  8. References: <05TqTB1w165w@tsoft.sf-bay.org>
  9. Sender: usenet@sbcs.sunysb.edu (Usenet poster)
  10. Organization: State University of New York at Stony Brook
  11. Lines: 32
  12. Nntp-Posting-Host: csws2.ic.sunysb.edu
  13.  
  14. In article <05TqTB1w165w@tsoft.sf-bay.org> bbs.playboy@tsoft.sf-bay.org (Tony Yin) writes:
  15. >Hay...I have a problem. Maybe one of you guys can help me out.
  16. >I'm trying to make a "loader" which is just a simple program to
  17. >display a 320x200x256 picture. I have the raw data which is
  18. >64000 big and I want to put it into the code itself so there is
  19. >no need to load from disk. Is there a way to make it a constand
  20. >cuz I haven't yet figured it out.
  21. >
  22. >
  23. >--
  24. >Tony Yin (bbs.playboy@tsoft.sf-bay.org)
  25.  
  26. You can use a pre-initialized array:
  27.  
  28. program ShowImage;
  29.  
  30. const
  31.  ImageData = (2,45,2,63,212,2,0,121, .. 138,0,45);
  32. (**** This array^^^^^^ should have (here goes!) _64000_ byte values  ****)
  33. (**** That's a LOT of typing!                                        ****)
  34.  
  35. begin
  36.  Move(ImageData, mem[$a000:$0000], 64000);
  37. end.
  38.  
  39. Hope it's all correct, I haven't used pre-init arrays and the Move()
  40. procedure in a while.
  41.  
  42. -- 
  43.                           | "So who is this Al Gorithm guy they keep
  44. Charles F. Lane           |  mentioning in my Computer Science classes?"
  45. clane@Libws1.ic.sunysb.edu|
  46.