home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / a / assembly / TimeSlice / ReadMe
Encoding:
Text File  |  1992-06-25  |  1.9 KB  |  41 lines

  1. Submitted-by: pc123@phx.cam.ac.uk
  2.  
  3. Please mail queries about this code to the above address, not to your
  4. local comp.sources.acorn moderator! ;-)
  5.  
  6. Pete says:
  7. Here is the code to demonstrate how you can pre-empt a non-desktop program
  8. without running it in a taskwindow or under FrontEnd, as I promised on c-s-a
  9. recently.  The code implements a module which acts a bit like FrontEnd but is a
  10. tinsy bit more efficient in its use of RMA; it should be possible to convert it
  11. for multitasking raytracers or other code you are writing without too much
  12. difficulty.
  13.  
  14. The module writes all output generated by the program into a circular buffer at
  15. a fixed offset in its workspace - a desktop task then uses the OS_Module call
  16. to find out where the workspace is, and reads data out.  The effect is that
  17. text produced by a program is not stored in the RMA, so excessive fragmentation
  18. does not occur.  This also implies that this module is only the "business end"
  19. of a complete FrontEnd replacement, and you have to write a desktop client
  20. program as well, to display output produced by a task in a window.  I am not
  21. posting the client here, because this source is really for illustration only.
  22.  
  23. The module also allows the task it is running to be stopped and restarted under
  24. control of the controlling program.  This is accomplished by writing various
  25. values into another word at a fixed offset in the module's workspace.
  26. Similarly the module may be asked to kill the program it is pre-empting (never
  27. scheduling it again, and closing all its files) or terminate it (call its exit
  28. handler).
  29.  
  30. As I wrote Express Assembler, the module is written in Express format.  You
  31. shouldn't have too much trouble understanding it, as it does not use any fancy
  32. features.
  33.  
  34. It is well known that only Quiche Eaters comment their programs well.  I have
  35. added a few, but...
  36.  
  37. ...if you find you need help following it, send me mail and I will do my best
  38. to help.  Or flame about it on c-s-a instead  :-)  .
  39.  
  40.  
  41.