home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pg100 / run.100 < prev    next >
Text File  |  2006-10-19  |  2KB  |  45 lines

  1.         RUN.100 by Paul Globman
  2.            Copyright (c) 1990
  3.  
  4. Machine Language programs, which have a .CO file extension, require that the
  5. program load and run in a specific RAM location, for which the program was
  6. designed when it was written.  When you select a .CO program from the menu and
  7. try to run it, sometimes it will not run, and instead will BEEP and return 
  8. to the menu.
  9.  
  10. This apparent failure will occur when the memory location that the program 
  11. needs to run at, is not properly reserved for the execution of the 
  12. program.  This is done to protect the computer so it doesn't load the .CO 
  13. program into an area of RAM that the computer is using for its own 
  14. "operating system" (ie. stack operations, file buffers, etc.).
  15.  
  16. To overcome this problem, the correct amount of RAM can be reserved before 
  17. any attemp to run it.  Another option is to have a small BASIC program CLEAR 
  18. the appropriate RAM and then RUNM the program you want to run.  This would 
  19. require a "loader" program for each HIMEM .CO program you want to run.
  20.  
  21. The solution to this problem is to have one "loader" program, which will adjust
  22. the reserved RAM, and run any .CO file.  This "loader" program (RUN.BA) is kept
  23. in RAM, and you put the cursor over the .CO file you want to run.  Instead of 
  24. pressing ENTER, you type RUN.BA <enter> (at the Select: prompt on the menu) and
  25. the .CO program under the cursor will run.
  26.  
  27. This is very similar to KILL.BA, which allows you to cursor select a file on 
  28. the menu and type KILL to delete it.
  29.  
  30. Save the following program as RUN.BA. 
  31.  
  32. 0 REM RUN.BA (c) 1990 by Paul Globman
  33. 1 A=64929+2*PEEK(65006):A=PEEK(A)+256*PEEK(A+1):FORX=3TO8:F$=F$+CHR$(PEEK(A+X)):NEXT:R$="RUNM"+CHR$(34)+F$+CHR$(13)
  34. 2 A=65450:POKEA,12:FORX=1TO12:POKEA+2*X,0:POKEA+2*X-1,ASC(MID$(R$,X)):NEXT:ONERRORGOTO3:LOADMF$
  35. 3 CLEAR99,PEEK(64206)+256*PEEK(64207)
  36.  
  37.  
  38. RUN.BA is used to run HIMEM .CO programs only, and is NOT for ALTLCD programs 
  39. since ALTLCD programs do not require a reserved area of HIMEM to run in.
  40.  
  41. A utility like CHANGE.BA can be used to remove the .BA extension from RUN.BA,
  42. so after selecting the .CO file from the menu, you only need to type RUN<cr>.
  43.  
  44.  
  45.