Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #395
| From | Martin Wuerthner <spamtrap@mw-software.com> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: DragAnObject_Start flags bit 17 |
| Date | 2011-06-03 15:40 +0200 |
| Organization | MW Software |
| Message-ID | <e49292dd51.martin@bach.planiverse.com> (permalink) |
| References | <32d538dd51.Matthew@sinenomine.freeserve.co.uk> |
In message <32d538dd51.Matthew@sinenomine.freeserve.co.uk>
Matthew Phillips <mnews@sinenomine.freeserve.co.uk> wrote:
> I have inherited some C code which uses DragAnObject. While tracking down an
> incompatibility with RISC OS 4 I noticed that the call to DragAnObject_Start
> had bit 17 of the flags word set, meaning that the C function would be called
> back in SVC mode.
> I wondered whether this was the cause of the incompatibility (it turned out
> not to be) and so removed it. I had been using the StrongHelp OS manual as
> my reference. However, when reading PRM 5 later I noticed that it says
> of bit 17 "1: SVC mode (use for modules; also allows access to statics)".
> My use is for a plain application, not a module.
> I take it this means that if my function (or functions it in turn calls?)
> needs to access any static variables I will need to set this bit.
No, this bit and the reference to statics is only relevant for module
code. Your USR mode application will be able to access its statics in
any case. So, if your program is an ordinary application it should
clear bit 17 and set bit 18, so it really gets called back in USR
mode.
--
Martin
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
DragAnObject_Start flags bit 17 Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-06-02 22:20 +0100 Re: DragAnObject_Start flags bit 17 James Lampard <dontreplytothis@mailinator.com> - 2011-06-03 05:54 -0700 Re: DragAnObject_Start flags bit 17 Martin Wuerthner <spamtrap@mw-software.com> - 2011-06-03 15:40 +0200
csiph-web