home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 4 / Amoszine 4 (Disk 1 of 3).adf / ARTS / Clinic.asc < prev    next >
Encoding:
Text File  |  1992-02-26  |  3.5 KB  |  71 lines

  1. @1
  2.                             C O D E   C l i n i c
  3. @3                      Hosted by the code king, Lee Bamber
  4.                       -----------------------------------
  5.                         (Don't you just hate this guy?)
  6. @1
  7. CC> Righty, last month was rather challenging, so what's wrong this issue?
  8. @2
  9. PP> The thing is, I want to run another program from a program using the
  10.     RUN 'filename' command.  I have a main program which has the run command
  11.     in, to run the other program, however when this program is executed I
  12.     get a OUT OF MEMORY error statement.  So how can I get it so when I run
  13.     my main program and that then gets to the RUN 'filename' command the
  14.     program that is called to RUN, how can I get that program to replace my
  15.     main program thus saving memory!!  PLEASE HELP ME !!!!!!!!!!!!!!!!!!!!!!
  16. @3
  17. AA> Er, in a sentence.  You want to execute a second program at some point
  18.     in the first program, using the RUN command.  The problem is when you
  19.     get to the RUN command, it says 'OUT OF MEMORY'.
  20.  
  21.     I don't have much to go on, do I.  According to form, you shouldn't have
  22.     a problem.  This method of 'chaining' is very common practice in Amos
  23.     and any errors would occur due to something other than the RUN command
  24.     itself.  If your dealing with uncompiled source, your programs should
  25.     both be .AMOS files.  It is important to remember all the banks and
  26.     screen data are retained for the new program.
  27.  
  28.     When you RUN the second program, the first program is automatically
  29.     erased to make space for the second.  Admittedly, a small amount of
  30.     extra memory will be required for the transfer of code, but not enough
  31.     to prompt an OUT OF MEMORY error.
  32.     
  33.     Without knowing what computer you have, how much memory you have and
  34.     what version of Amos you own, the task of solving your problem is not
  35.     easy.  But that's half the fun, from my side of things.  
  36.  
  37.     Have tried an example program to see what happens in regard to your
  38.     problem, and found the program that is RUN sets the text buffer to its
  39.     own size.  Subsequently, each RUN command creates just enough space
  40.     and saves memory.  This too, is automatic.
  41.  
  42.     I can't simulate an OUT OF MEMORY error on my system, and I therefore
  43.     cannot recommend a solution.  What I can do is ask you to check your
  44.     programs for high memory use, for this is the typical problem for the
  45.     OUT OF MEMORY error.  Just in case you are doing something fundamentally
  46.     wrong, I've supplied a simple program which runs a second program.  If
  47.     you supply me with more information, I might be able to assist, where
  48.     as it stands, your problem is, for the moment, a code clinic mystery.
  49. @1
  50. CC> Well, I'm done here.  Any other problems can be sent to my address below
  51.     and I'll answer them in these pages.  Further, anyone who gets their
  52.     problem directed to me via one of the AZ editors, will also suffer the
  53.     agony of my correspondence.
  54.  
  55.     To increase the chances of a detailed and satisfactory solution, please
  56.     state MACHINE TYPE  eg. A500, A1200, etc
  57.           PERIPHERALS   eg. PRORAM, PC1208, (any extra ram), etc
  58.           AMOS VERSION  eg. Amos Classic, Amos Pro, Easy Amos, etc
  59.  
  60.     ADDRESS:   Lee Bamber,
  61.                Dept. AZCC.
  62.                'Rockville',
  63.                Warrington Road,
  64.                Lower Ince,
  65.                Wigan,
  66.                Lancashire,
  67.                WN3 4QG.
  68.  
  69.      As per usual, any correspondence will be replied to and I'll even put
  70.      in one of my prized Info Sheets!  Now how's that for nicey-ness-ness?
  71.