home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / documentation / documents / a252drag < prev    next >
Internet Message Format  |  1999-04-27  |  1KB

  1. From: mhardy@acorn.co.uk (Michael Hardy)
  2. Subject: Re: Real Icon Dragging.
  3. Date: 8 Oct 92 09:17:36 GMT
  4. Organization: Acorn Computers Ltd, Cambridge, England
  5.  
  6. >The easiest way (although it is cheating somewhat) is to type
  7. >*FX 162,28,3. This enables solid icon drags with shadows.
  8.  
  9. Without wishing to sound too critical, this is not a good way to do it,
  10. since you are also altering the state of seven other bits which control
  11. other aspects of FileSwitch and the Wimp. A better way is to read the byte,
  12. set bit 1, and then write it back. This is the program that I use:
  13.  
  14.    REM Toggle state of DragASprite bit in CMOS
  15.  
  16.    REM Read byte
  17.    SYS "OS_Byte",161,&1C TO ,,byte%
  18.    REM EOR byte with mask for bit 1
  19.    byte% = byte% EOR 1<<1
  20.    REM Write byte back again
  21.    SYS "OS_Byte",162,&1C,byte%
  22.    END
  23.  
  24. You *must* use the OS_Byte calls, otherwise the checksum byte will become
  25. incorrect. This byte is calculated on a power-on reset, and then maintained
  26. by the OS_Byte calls (in other words, they don't recalculate it, but merely
  27. update it in a manner that is appropriate to the changes made).
  28.  
  29. The other thing to note is that you *must* do a power-on reset when
  30. upgrading from RISC OS 2 to RISC OS 3, not just to initialise the checksum,
  31. but more importantly  because the CMOS usage differs between the versions.
  32.  
  33. - Michael J Hardy
  34.  
  35.