home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1995-04-02 | 2.2 KB | 59 lines |
- Name: 030_Servic
- Subject: The Service message handler.
- Author: GUS
- "module_title$ ="1stL_Servic"
- module_version$ ="0.01"
- 'module_filename$=
- module_title$,10)
- +module_path$ ="WTExamples:1st_Look."
- 2module_help$ ="Examining Service hadler..."
- code% 5*1024
- p%=4
- O%=code%
- [opt p%
- F\__________________________________________________________ header
- .module_start%
- ? dcd (module_end%-module_start%) <<8
- module_header_end%
- = "WTmd"
- dcd module_help%
- 9 dcd 0 ; no WTService handler
- > dcd Service_handler% ; offset to Service handler
- .module_header_end%
- D\__________________________________________________________ help
- .module_help%
- help(module_title$,module_version$,module_help$)
- "O\__________________________________________________________ Service handler
- $M; The manager sends all Service Calls to WT modules with Service handler.
- &N; There is not much to say about the message that Service handler recieves
- '9; all send by RISC OS and they are described in PRMs.
- (1; I don't thing you can smash these messages.
- .Service_handler%
- stmfd 13!,{0,14}
- ,G swi &20107 ; lets have a 'beep' for each Service Call
- ldmfd 13!,{0,15}^
- .6 ; to kill the module use:
- /2 ; *WTKill 1stL_Servic
- 0; ; (you will need that soon...)
- 2J\__________________________________________________________ module end
- .module_end%
- 4I\____________________________________________________________________
- Install a WT module from memory
- "WT_Install",code%
- "OS_File",10,module_path$+module_filename$,&b6f,,code%,O%
- ?I_____________________________________________________________________
- help(ttl$,version$,hlp$)
- hlp$<>"" hlp$=
- 13+hlp$
- ttl$<8 ttl$+=
- [optp%:=ttl$:=9:=version$
- E:=" ("+
- $,5,11)+") by GUS, for 1st_Look on WT modules"
- ph(hlp$):=0:align:]:=0
- ph(ps$):
- "WT_CallDLRD",p%,"PH_Compress",P%,O%,ps$
- ,,P%,O%:=0
- id(s$):
- "WT_Tokenise",,s$
- ,t%:=t%
-