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

  1. Path: sparky!uunet!gatech!bloom-beacon!eru.mt.luth.se!lunic!sunic!kth.se!kjell
  2. From: kjell@elixir.e.kth.se (Kjell Rilbe)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Compiler directive help wanted!
  5. Message-ID: <1992Aug17.071519.12108@kth.se>
  6. Date: 17 Aug 92 07:15:19 GMT
  7. References: <1992Aug17.045945.22109@uxa.ecn.bgu.edu>
  8. Sender: usenet@kth.se (Usenet)
  9. Organization: Dept. of EE, Royal Institute of Technology, Stockholm, Sweden
  10. Lines: 29
  11. Nntp-Posting-Host: elixir.e.kth.se
  12.  
  13. In article <1992Aug17.045945.22109@uxa.ecn.bgu.edu> mudrc@uxa.ecn.bgu.edu (Daniel R. Crowson) writes:
  14. >
  15. >        I've been working on some graphics programs in TP 6.0, but I
  16. >    have some problems (don't we all).  I want to link in some obj code
  17. >    to play music, but when I do this, I can't initialize the graphics.
  18. >    I've narrowed my problem down to one of the compiler directives 
  19. >    needed for the music playing part.
  20. >
  21. >    {$M 4000, 0, 0}
  22. >
  23. >        This frees up memory (I think).  How can I get the program to
  24. >    initialize graphics with the above directive?
  25.  
  26. This directive sets the maximum heap size to 0. That will not allow room for 
  27. the BGI, which is loaded at runtime and placed on the heap. 
  28.  
  29. Try changing the latter 0 to the size of the BGI file or something like that.
  30. Experiment! Test how much you need to fit in the BGI!
  31.  
  32. Then you would probably want to set the first zero to the same size, which is
  33. the minimum heap size. I think DOS won't execute the program at all (program
  34. won't fit in memory...) if DOS hasn't got enough memory to fit in at least
  35. that much heap.
  36.  
  37. Hope this is what's wrong with it.
  38.  
  39. Good luck!
  40.  
  41. /Kjell Rilbe
  42.