home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / ref / mlcode.doc < prev    next >
Text File  |  2006-10-19  |  3KB  |  55 lines

  1. There is a lot of mystery surrounding CO programs because of the way they
  2. are loaded into the Model 100, what you should know first is that who ever
  3. designed its software evidently did so with Text files and Basic programs
  4. in mind were as Machine language programs were an after thought.  You see
  5. file management is done automatically for Text files and Basic programs,
  6. their file type, starting address and name are recorded directly into the
  7. file directory in machine memory (63930-64138) when they are created.  As
  8. old files are deleted and new ones created the remaining files are moved
  9. up and down in RAM and as their locations change their starting addresses
  10. are automatically updated in the file directory.
  11.  
  12. Machine language or "CO" programs on the other hand often times cannot be
  13. moved because of address specific routines within the program so they are
  14. given a fixed address and here's were things get sticky for this is not
  15. compatible with the operations of the file manager.  To accommodate CO
  16. programs a modification had to be made, instead of going directly to the
  17. program from the address found in the file directory the machine goes to
  18. a pseudo file which contains a 6 byte table with the address information
  19. for the the location of the programs code.  In this way the file manager
  20. can move the pseudo file but not the real CO program.
  21.  
  22. When you create a Text file or Basic program in the Model 100 you do so
  23. through the built-in programs TEXT and BASIC which use the file manager
  24. but when you create a CO program you must first load it from a Text file
  25. (the file may be in decimal, hexadecimal or ASCII characters) to its end
  26. location in RAM.  This is done using a "loader" which converts the file
  27. from what ever form it's in to single bytes, it may even be tailored for
  28. that specific program saving you any further work.  If the loader wasn't
  29. tailored for that program or the file was loaded from tape you must enter
  30. the programs name and address information so that the file directory can
  31. CALL the program, this is done in two steps:
  32.  
  33. First go to BASIC and set the HIMEM pointer to the very first address of
  34. the CO programs code, this is done with the CLEAR command and keeps the
  35. machine from using that area as the RAM fills up.
  36.  
  37. Second you have to enter the programs name and address information with
  38. the SAVEM routine, this puts the 6 byte address table in the pseudo file
  39. which is automatically recorded in the file directory as the CO program.
  40. The SAVEM routine incorporates many of the functions of the file manager
  41. but you control it manually.
  42.  
  43. If the CO program is loaded from a Tandy Disk Drive the SAVEM operation
  44. is automatically done for you but you still have to set HIMEM.
  45.  
  46. If you do not know the addresses for either the first or the second step
  47. just type RUNM "program name" (the "CO" extension is not needed) and you
  48. will get the "Top","End","Exe" addresses followed by a "OM Error".
  49.  
  50. If you should accidentally KILL a CO program from the Menu and find that
  51. you have to get back into it you can still run the program by CALLing its
  52. Execution address, if it is the lowest CO program or the only one in RAM
  53. and its Top address and Execution address are the same (they usually are)
  54. you can CALL HIMEM.
  55.