home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilst / wt_070 / Documents / Examples / 1st_Look / 030_Servic (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1995-04-02  |  2.2 KB  |  59 lines

  1.     Name: 030_Servic
  2.  Subject: The Service message handler.
  3.   Author: GUS
  4. "module_title$   ="1stL_Servic"
  5. module_version$ ="0.01"
  6. 'module_filename$=
  7. module_title$,10)
  8. +module_path$    ="WTExamples:1st_Look."
  9. 2module_help$    ="Examining Service hadler..."
  10.  code% 5*1024
  11.  p%=4 
  12. O%=code%
  13. [opt p%
  14. F\__________________________________________________________ header
  15. .module_start%
  16. ?  dcd  (module_end%-module_start%) <<8 
  17.  module_header_end%
  18.   =    "WTmd"
  19.   dcd  module_help%
  20. 9  dcd  0                       ; no WTService handler
  21. >  dcd  Service_handler%        ; offset to Service handler
  22. .module_header_end%
  23. D\__________________________________________________________ help
  24. .module_help%
  25. help(module_title$,module_version$,module_help$)
  26. "O\__________________________________________________________ Service handler
  27. $M; The manager sends all Service Calls to WT modules with Service handler.
  28. &N; There is not much to say about the message that Service handler recieves
  29. '9; all send by RISC OS and they are described in PRMs.
  30. (1; I don't thing you can smash these messages.
  31. .Service_handler%
  32.   stmfd   13!,{0,14}
  33. ,G  swi     &20107         ; lets have a 'beep' for each Service Call
  34.   ldmfd   13!,{0,15}^
  35. .6                         ; to kill the module use:
  36. /2                         ; *WTKill 1stL_Servic
  37. 0;                         ; (you will need that soon...)
  38. 2J\__________________________________________________________ module end
  39. .module_end%
  40. 4I\____________________________________________________________________
  41.  Install a WT module from memory
  42. "WT_Install",code%
  43. "OS_File",10,module_path$+module_filename$,&b6f,,code%,O%
  44. ?I_____________________________________________________________________
  45. help(ttl$,version$,hlp$)
  46. hlp$<>"" hlp$=
  47. 13+hlp$
  48.  ttl$<8 ttl$+=
  49. [optp%:=ttl$:=9:=version$
  50. E:=" ("+
  51. $,5,11)+") by GUS, for 1st_Look on WT modules"
  52. ph(hlp$):=0:align:]:=0
  53. ph(ps$):
  54. "WT_CallDLRD",p%,"PH_Compress",P%,O%,ps$ 
  55. ,,P%,O%:=0
  56. id(s$):
  57. "WT_Tokenise",,s$ 
  58. ,t%:=t%
  59.