Re: SWI calls

[email protected] (Nicholas Clark) Mon, 13 Aug 2001 19:01:09 +0100
Newsgroups perl.riscos
Message-ID <[email protected]>
On Sun, Aug 12, 2001 at 07:05:35PM +0100, Tanner Family wrote:
> Playing round with window SWI calls, how does one use the swi module to do
> something like Wimp_GetWindowInfo, where R1 contains a pointer to a block
> (OK so far), but where the bottom bit (bit 0) of R1 is set if you don't
> want to return all the icons?
> 
> I haven't been able to do this and am currently relying on passing a very
> large buffer to the SWI. Unfortunately, this sort of behaviour appears
> elsewhere in the OS :-(

I think that a construction like this 1 liner
perl -le '$a="x"x256; print unpack "I", pack "P", $a'

will give the address of the block.
(ie I see 793480 as the output)

You can add 1 to that and pass the number to SWI call. (not tested that bit)

Hope that helps,

Nicholas Clark