Article View: comp.sys.acorn.tech
Article #244Re: Real Icon Dragging.
From: Michael Hardy
Date: Thu, 08 Oct 1992 09:17
Date: Thu, 08 Oct 1992 09:17
42 lines
2314 bytes
2314 bytes
In article <1992Oct7.182116.15067@cs.nott.ac.uk> smb@cs.nott.ac.uk (Simon Burrows) writes: >In article <1992Oct7.134701.24557@aisb.ed.ac.uk> ainsjc@aisb.ed.ac.uk (Steffan) writes: >>In article <1992Oct7.161818.11278@waikato.ac.nz> bwc@waikato.ac.nz (Ug!) writes: >>>Hi! Could someone tell me what the FX call is to write the CMOS-RAM bit >>>to turn the icon-dragging on? (Assuming it still works in RiscOS 3.1) > >The easiest way (although it is cheating somewhat) is to type >*FX 162,28,3. This enables solid icon drags with shadows. Without wishing to sound too critical, this is not a good way to do it, since you are also altering the state of seven other bits which control other aspects of FileSwitch and the Wimp. A better way is to read the byte, set bit 1, and then write it back. This is the program that I use: REM Toggle state of DragASprite bit in CMOS REM Read byte SYS "OS_Byte",161,&1C TO ,,byte% REM EOR byte with mask for bit 1 byte% = byte% EOR 1<<1 REM Write byte back again SYS "OS_Byte",162,&1C,byte% END You *must* use the OS_Byte calls, otherwise the checksum byte will become incorrect. This byte is calculated on a power-on reset, and then maintained by the OS_Byte calls (in other words, they don't recalculate it, but merely update it in a manner that is appropriate to the changes made). The other thing to note is that you *must* do a power-on reset when upgrading from RISC OS 2 to RISC OS 3, not just to initialise the checksum, but more importantly because the CMOS usage differs between the versions. - Michael J Hardy Technical Publications Email: mhardy@acorn.co.uk Acorn Computers Ltd Telephone: +44 223 254352 Cambridge TechnoPark Fax: +44 223 254270 645 Newmarket Road Telex: 817875 ACORN G Cambridge CB5 8PB England Disclaimer: All opinions are my own, not Acorn's
Technical Details
Message-ID:
<19260@acorn.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!mhardyReferences:
<1992Oct7.182116.15067@cs.nott.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!mhardy From: mhardy@acorn.co.uk (Michael Hardy) Newsgroups: comp.sys.acorn.tech Subject: Re: Real Icon Dragging. Message-ID: <19260@acorn.co.uk> Date: 8 Oct 92 09:17:36 GMT References: <1992Oct7.182116.15067@cs.nott.ac.uk> Sender: mhardy@acorn.co.uk Organization: Acorn Computers Ltd, Cambridge, England Lines: 42