Home » Archimedes archive » Acorn Computing » 1994 02 subscription disc.adf » 9402s » PD/IClear/Help » Compare

Compare PD/IClear/Help with PD/IClear/ReadMe

File: Archimedes archive » Acorn Computing » 1994 02 subscription disc.adf » 9402s » PD/IClear/Help
Compared with: Archimedes archive » Acorn User » AU 1997-01 B.adf » Extras » PD/IClear/ReadMe
Similarity: 85% of bytes duplicated

84.9% of the bytes in these files are duplicated between them. Duplicated Different Padding (ignored)

Bytes are marked as duplicated if they lie within a run of at least 16 bytes which also appears somewhere in the other file, in any position. Long runs of padding bytes (zeros, spaces, &FF and &E5) are ignored.

PD/IClear/Help
00000000  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 49  |               I|
00000020  43 6c 65 61 72 20 4d 6f  64 75 6c 65 0a 20 20 20  |Clear Module.   |
00000030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000040  20 20 20 20 20 20 20 20  20 20 20 20 3d 3d 3d 3d  |            ====|
00000050  3d 3d 20 3d 3d 3d 3d 3d  3d 0a 0a 20 20 20 20 20  |== ======..     |
00000060  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000070  20 20 20 20 20 20 20 20  20 20 62 79 20 4d 61 72  |          by Mar|
00000080  74 79 6e 20 46 6f 78 0a  0a 54 68 69 73 20 73 6f  |tyn Fox..This so|
00000090  66 74 77 61 72 65 20 69  73 20 50 75 62 6c 69 63  |ftware is Public|
000000a0  20 44 6f 6d 61 69 6e 2e  20 49 74 20 6d 61 79 20  | Domain. It may |
000000b0  62 65 20 66 72 65 65 6c  79 20 63 6f 70 69 65 64  |be freely copied|
000000c0  20 61 6e 64 20 64 69 73  74 72 69 62 75 74 65 64  | and distributed|
000000d0  2c 0a 69 6e 63 6c 75 64  69 6e 67 20 64 69 73 74  |,.including dist|
000000e0  72 69 62 75 74 69 6f 6e  20 62 79 20 6d 61 67 61  |ribution by maga|
000000f0  7a 69 6e 65 20 64 69 73  63 73 2c 20 50 44 20 6c  |zine discs, PD l|
00000100  69 62 72 61 72 69 65 73  2c 20 62 75 6c 6c 65 74  |ibraries, bullet|
00000110  69 6e 20 62 6f 61 72 64  73 0a 65 74 63 2e 2c 20  |in boards.etc., |
00000120  70 72 6f 76 69 64 65 64  20 74 68 65 20 66 6f 6c  |provided the fol|
00000130  6c 6f 77 69 6e 67 20 63  6f 6e 64 69 74 69 6f 6e  |lowing condition|
00000140  73 20 61 72 65 20 61 64  68 65 72 65 64 20 74 6f  |s are adhered to|
00000150  3a 0a 0a 31 2e 20 4e 6f  20 63 68 61 72 67 65 20  |:..1. No charge |
00000160  69 73 20 6d 61 64 65 20  6f 74 68 65 72 20 74 68  |is made other th|
00000170  61 6e 20 74 6f 20 63 6f  76 65 72 20 74 68 65 20  |an to cover the |
00000180  72 65 61 73 6f 6e 61 62  6c 65 20 63 6f 73 74 20  |reasonable cost |
00000190  6f 66 20 64 75 70 6c 69  63 61 74 69 6f 6e 0a 61  |of duplication.a|
000001a0  6e 64 20 64 69 73 74 72  69 62 75 74 69 6f 6e 2e  |nd distribution.|
000001b0  0a 0a 32 2e 20 4e 6f 20  61 6c 74 65 72 61 74 69  |..2. No alterati|
000001c0  6f 6e 20 69 73 20 6d 61  64 65 20 74 6f 20 65 69  |on is made to ei|
000001d0  74 68 65 72 20 74 68 65  20 73 6f 66 74 77 61 72  |ther the softwar|
000001e0  65 20 6f 72 20 74 68 69  73 20 74 65 78 74 20 66  |e or this text f|
000001f0  69 6c 65 2e 0a 0a 33 2e  20 54 68 69 73 20 74 65  |ile...3. This te|
00000200  78 74 20 66 69 6c 65 20  61 63 63 6f 6d 70 61 6e  |xt file accompan|
00000210  69 65 73 20 61 6c 6c 20  63 6f 70 69 65 73 20 6f  |ies all copies o|
00000220  66 20 74 68 65 20 73 6f  66 74 77 61 72 65 2e 0a  |f the software..|
00000230  0a 50 6c 65 61 73 65 20  6e 6f 74 65 20 74 68 61  |.Please note tha|
00000240  74 20 74 68 69 73 20 6d  6f 64 75 6c 65 20 77 69  |t this module wi|
00000250  6c 6c 20 6f 6e 6c 79 20  77 6f 72 6b 20 77 69 74  |ll only work wit|
00000260  68 20 52 49 53 43 20 4f  53 20 33 20 6f 72 20 6c  |h RISC OS 3 or l|
00000270  61 74 65 72 2e 0a 0a 49  43 6c 65 61 72 20 69 73  |ater...IClear is|
00000280  20 61 20 6d 6f 64 75 6c  65 20 77 68 69 63 68 20  | a module which |
00000290  6d 61 6b 65 73 20 69 74  20 65 61 73 69 65 72 20  |makes it easier |
000002a0  74 6f 20 64 65 6c 65 74  65 20 74 65 78 74 20 66  |to delete text f|
000002b0  72 6f 6d 20 61 20 77 72  69 74 61 62 6c 65 0a 69  |rom a writable.i|
000002c0  63 6f 6e 2e 20 55 6e 64  65 72 20 52 49 53 43 20  |con. Under RISC |
000002d0  4f 53 2c 20 74 6f 20 72  65 70 6c 61 63 65 20 74  |OS, to replace t|
000002e0  68 65 20 74 65 78 74 20  69 6e 20 73 75 63 68 20  |he text in such |
000002f0  61 6e 20 69 63 6f 6e 20  77 69 74 68 20 6e 65 77  |an icon with new|
00000300  20 74 65 78 74 2c 20 79  6f 75 0a 66 69 72 73 74  | text, you.first|
00000310  20 68 61 76 65 20 74 6f  20 65 69 74 68 65 72 20  | have to either |
00000320  64 65 6c 65 74 65 20 61  6c 6c 20 74 68 65 20 63  |delete all the c|
00000330  68 61 72 61 63 74 65 72  73 20 6f 66 20 74 68 65  |haracters of the|
00000340  20 6f 6c 64 20 74 65 78  74 20 6f 72 20 70 72 65  | old text or pre|
00000350  73 73 0a 43 74 72 6c 2d  55 20 74 6f 20 63 6c 65  |ss.Ctrl-U to cle|
00000360  61 72 20 69 74 2e 20 54  68 69 73 20 63 61 6e 20  |ar it. This can |
00000370  62 65 20 61 20 6e 75 69  73 61 6e 63 65 2c 20 65  |be a nuisance, e|
00000380  73 70 65 63 69 61 6c 6c  79 20 69 66 20 79 6f 75  |specially if you|
00000390  20 68 61 76 65 20 6a 75  73 74 0a 73 65 6c 65 63  | have just.selec|
000003a0  74 65 64 20 74 68 65 20  69 63 6f 6e 20 77 69 74  |ted the icon wit|
000003b0  68 20 74 68 65 20 6d 6f  75 73 65 2c 20 61 73 20  |h the mouse, as |
000003c0  79 6f 75 20 66 69 72 73  74 20 68 61 76 65 20 74  |you first have t|
000003d0  6f 20 74 72 61 6e 73 66  65 72 20 74 6f 20 74 68  |o transfer to th|
000003e0  65 0a 6b 65 79 62 6f 61  72 64 2c 20 74 68 65 6e  |e.keyboard, then|
000003f0  20 70 72 65 73 73 20 43  74 72 6c 2d 55 20 62 65  | press Ctrl-U be|
00000400  66 6f 72 65 20 79 6f 75  20 63 61 6e 20 74 79 70  |fore you can typ|
00000410  65 20 69 6e 20 79 6f 75  72 20 6e 65 77 20 74 65  |e in your new te|
00000420  78 74 2e 0a 0a 57 69 74  68 20 49 43 6c 65 61 72  |xt...With IClear|
00000430  20 72 75 6e 6e 69 6e 67  2c 20 73 69 6d 70 6c 79  | running, simply|
00000440  20 64 6f 75 62 6c 65 2d  63 6c 69 63 6b 20 6f 6e  | double-click on|
00000450  20 74 68 65 20 77 72 69  74 61 62 6c 65 20 69 63  | the writable ic|
00000460  6f 6e 2c 20 75 73 69 6e  67 20 65 69 74 68 65 72  |on, using either|
00000470  0a 53 65 6c 65 63 74 20  6f 72 20 41 64 6a 75 73  |.Select or Adjus|
00000480  74 2e 20 54 68 65 20 69  63 6f 6e 20 77 69 6c 6c  |t. The icon will|
00000490  20 62 65 20 69 6e 76 65  72 74 65 64 2c 20 77 68  | be inverted, wh|
000004a0  69 63 68 20 75 73 75 61  6c 6c 79 20 6d 65 61 6e  |ich usually mean|
000004b0  73 20 74 68 61 74 20 69  74 0a 77 69 6c 6c 20 74  |s that it.will t|
000004c0  75 72 6e 20 62 6c 61 63  6b 20 77 69 74 68 20 77  |urn black with w|
000004d0  68 69 74 65 20 74 65 78  74 2e 20 41 73 20 73 6f  |hite text. As so|
000004e0  6f 6e 20 61 73 20 79 6f  75 20 70 72 65 73 73 20  |on as you press |
000004f0  61 20 6b 65 79 2c 20 74  68 65 20 74 65 78 74 20  |a key, the text |
00000500  69 6e 20 74 68 65 0a 69  63 6f 6e 20 77 69 6c 6c  |in the.icon will|
00000510  20 76 61 6e 69 73 68 2c  20 74 6f 20 62 65 20 72  | vanish, to be r|
00000520  65 70 6c 61 63 65 64 20  77 69 74 68 20 74 68 65  |eplaced with the|
00000530  20 63 68 61 72 61 63 74  65 72 20 74 68 61 74 20  | character that |
00000540  79 6f 75 20 74 79 70 65  64 2e 20 49 66 20 79 6f  |you typed. If yo|
00000550  75 0a 63 68 61 6e 67 65  20 79 6f 75 72 20 6d 69  |u.change your mi|
00000560  6e 64 20 61 66 74 65 72  20 69 6e 76 65 72 74 69  |nd after inverti|
00000570  6e 67 20 74 68 65 20 69  63 6f 6e 20 61 6e 64 20  |ng the icon and |
00000580  64 65 63 69 64 65 20 79  6f 75 20 77 61 6e 74 20  |decide you want |
00000590  74 6f 20 6b 65 65 70 20  79 6f 75 72 0a 65 78 69  |to keep your.exi|
000005a0  73 74 69 6e 67 20 74 65  78 74 2c 20 61 20 66 75  |sting text, a fu|
000005b0  72 74 68 65 72 20 63 6c  69 63 6b 20 77 69 74 68  |rther click with|
000005c0  20 61 6e 79 20 6d 6f 75  73 65 20 62 75 74 74 6f  | any mouse butto|
000005d0  6e 20 61 6e 79 77 68 65  72 65 20 6f 6e 20 74 68  |n anywhere on th|
000005e0  65 20 73 63 72 65 65 6e  0a 77 69 6c 6c 20 64 65  |e screen.will de|
000005f0  2d 69 6e 76 65 72 74 20  74 68 65 20 69 63 6f 6e  |-invert the icon|
00000600  20 61 6e 64 20 70 75 74  20 74 68 69 6e 67 73 20  | and put things |
00000610  62 61 63 6b 20 74 6f 20  6e 6f 72 6d 61 6c 2e 0a  |back to normal..|
00000620  0a 54 68 69 73 20 73 6f  66 74 77 61 72 65 20 77  |.This software w|
00000630  69 6c 6c 20 77 6f 72 6b  20 77 69 74 68 20 77 72  |ill work with wr|
00000640  69 74 61 62 6c 65 20 69  63 6f 6e 73 20 28 62 75  |itable icons (bu|
00000650  74 74 6f 6e 20 74 79 70  65 20 31 35 29 20 61 6e  |tton type 15) an|
00000660  64 20 61 6c 73 6f 0a 64  72 61 67 67 61 62 6c 65  |d also.draggable|
00000670  20 77 72 69 74 61 62 6c  65 20 69 63 6f 6e 73 20  | writable icons |
00000680  28 62 75 74 74 6f 6e 20  74 79 70 65 20 31 34 29  |(button type 14)|
00000690  20 62 75 74 20 6e 6f 74  20 77 69 74 68 20 77 72  | but not with wr|
000006a0  69 74 61 62 6c 65 20 6d  65 6e 75 20 69 74 65 6d  |itable menu item|
000006b0  73 2e 0a 0a 20 20 20 20  20 20 20 20 20 20 20 20  |s...            |
000006c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006d0  20 50 72 6f 67 72 61 6d  6d 69 6e 67 20 4e 6f 74  | Programming Not|
000006e0  65 73 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |es.             |
000006f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000700  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 20 3d 3d 3d 3d  |=========== ====|
00000710  3d 0a 0a 54 68 65 20 6d  6f 64 75 6c 65 20 69 6e  |=..The module in|
00000720  74 65 72 63 65 70 74 73  20 74 68 65 20 4d 6f 75  |tercepts the Mou|
00000730  73 65 56 20 61 6e 64 20  49 6e 73 56 20 76 65 63  |seV and InsV vec|
00000740  74 6f 72 73 20 74 6f 20  64 65 74 65 63 74 20 63  |tors to detect c|
00000750  61 6c 6c 73 20 74 6f 0a  4f 53 5f 4d 6f 75 73 65  |alls to.OS_Mouse|
00000760  20 61 6e 64 20 6b 65 79  70 72 65 73 73 65 73 2e  | and keypresses.|
00000770  20 4f 53 5f 4d 6f 75 73  65 20 63 61 6c 6c 73 20  | OS_Mouse calls |
00000780  61 72 65 20 66 69 72 73  74 20 70 61 73 73 65 64  |are first passed|
00000790  20 6f 6e 74 6f 20 74 68  65 20 53 57 49 0a 72 6f  | onto the SWI.ro|
000007a0  75 74 69 6e 65 20 61 6e  64 20 70 72 6f 63 65 73  |utine and proces|
000007b0  73 65 64 20 6f 6e 20 65  78 69 74 2e 0a 0a 42 65  |sed on exit...Be|
000007c0  63 61 75 73 65 20 52 49  53 43 20 4f 53 20 77 69  |cause RISC OS wi|
000007d0  6c 6c 20 6e 6f 74 20 61  75 74 6f 6d 61 74 69 63  |ll not automatic|
000007e0  61 6c 6c 79 20 64 65 74  65 63 74 20 61 20 64 6f  |ally detect a do|
000007f0  75 62 6c 65 2d 63 6c 69  63 6b 20 6f 76 65 72 20  |uble-click over |
00000800  61 20 77 72 69 74 61 62  6c 65 0a 69 63 6f 6e 2c  |a writable.icon,|
00000810  20 74 68 65 20 6d 6f 64  75 6c 65 20 68 61 73 20  | the module has |
00000820  74 6f 20 64 6f 20 74 68  65 20 6a 6f 62 20 69 74  |to do the job it|
00000830  73 65 6c 66 2e 20 54 68  69 73 20 69 6e 76 6f 6c  |self. This invol|
00000840  76 65 73 20 63 68 65 63  6b 69 6e 67 20 74 68 65  |ves checking the|
00000850  20 74 69 6d 65 0a 69 6e  74 65 72 76 61 6c 20 73  | time.interval s|
00000860  69 6e 63 65 20 74 68 65  20 70 72 65 76 69 6f 75  |ince the previou|
00000870  73 20 63 6c 69 63 6b 2c  20 73 65 6c 65 63 74 69  |s click, selecti|
00000880  6e 67 20 74 68 65 20 27  64 6f 75 62 6c 65 2d 61  |ng the 'double-a|
00000890  72 72 6f 77 27 20 70 6f  69 6e 74 65 72 0a 73 70  |rrow' pointer.sp|
000008a0  72 69 74 65 2c 20 63 68  65 63 6b 69 6e 67 20 77  |rite, checking w|
000008b0  68 69 63 68 20 62 75 74  74 6f 6e 20 77 61 73 20  |hich button was |
000008c0  70 72 65 73 73 65 64 20  61 6e 64 20 6d 6f 6e 69  |pressed and moni|
000008d0  74 6f 72 69 6e 67 20 74  68 65 20 6d 6f 75 73 65  |toring the mouse|
000008e0  20 70 6f 73 69 74 69 6f  6e 2e 0a 0a 52 61 74 68  | position...Rath|
000008f0  65 72 20 74 68 61 6e 20  70 75 74 20 74 6f 6f 20  |er than put too |
00000900  6d 75 63 68 20 63 6f 64  65 20 69 6e 74 6f 20 61  |much code into a|
00000910  20 76 65 63 74 6f 72 20  69 6e 74 65 72 63 65 70  | vector intercep|
00000920  74 20 72 6f 75 74 69 6e  65 2c 20 74 68 65 20 73  |t routine, the s|
00000930  6f 66 74 77 61 72 65 0a  6a 75 73 74 20 73 65 74  |oftware.just set|
00000940  73 20 6f 6e 65 20 6f 66  20 74 77 6f 20 63 61 6c  |s one of two cal|
00000950  6c 62 61 63 6b 73 2c 20  64 65 70 65 6e 64 69 6e  |lbacks, dependin|
00000960  67 20 6f 6e 20 74 68 65  20 74 69 6d 65 20 69 6e  |g on the time in|
00000970  74 65 72 76 61 6c 20 73  69 6e 63 65 20 74 68 65  |terval since the|
00000980  0a 70 72 65 76 69 6f 75  73 20 63 6c 69 63 6b 2e  |.previous click.|
00000990  20 54 68 65 20 63 61 6c  6c 62 61 63 6b 20 72 6f  | The callback ro|
000009a0  75 74 69 6e 65 20 69 73  20 63 61 6c 6c 65 64 20  |utine is called |
000009b0  62 79 20 52 49 53 43 20  4f 53 20 61 73 20 73 6f  |by RISC OS as so|
000009c0  6f 6e 20 61 73 20 69 74  20 69 73 0a 6e 6f 74 20  |on as it is.not |
000009d0  62 75 73 79 2e 20 54 68  65 20 66 69 72 73 74 20  |busy. The first |
000009e0  6f 66 20 74 68 65 73 65  20 63 61 6c 6c 62 61 63  |of these callbac|
000009f0  6b 73 20 68 61 6e 64 6c  65 73 20 61 20 73 69 6e  |ks handles a sin|
00000a00  67 6c 65 20 63 6c 69 63  6b 2e 20 49 74 20 66 69  |gle click. It fi|
00000a10  72 73 74 0a 63 68 65 63  6b 73 20 74 6f 20 73 65  |rst.checks to se|
00000a20  65 20 69 66 20 74 68 65  20 6d 6f 64 75 6c 65 20  |e if the module |
00000a30  68 61 73 20 61 20 72 65  63 6f 72 64 20 6f 66 20  |has a record of |
00000a40  61 6e 20 69 6e 76 65 72  74 65 64 20 69 63 6f 6e  |an inverted icon|
00000a50  20 61 6e 64 2c 20 69 66  20 73 6f 2c 0a 74 61 6b  | and, if so,.tak|
00000a60  65 73 20 73 74 65 70 73  20 74 6f 20 63 6c 65 61  |es steps to clea|
00000a70  72 20 69 74 2e 20 49 74  20 74 68 65 6e 20 73 74  |r it. It then st|
00000a80  6f 72 65 73 20 61 20 72  65 63 6f 72 64 20 6f 66  |ores a record of|
00000a90  20 77 68 69 63 68 20 62  75 74 74 6f 6e 20 77 61  | which button wa|
00000aa0  73 20 70 72 65 73 73 65  64 0a 61 6e 64 20 63 68  |s pressed.and ch|
00000ab0  65 63 6b 73 20 74 68 65  20 69 63 6f 6e 20 74 79  |ecks the icon ty|
00000ac0  70 65 2e 20 49 66 20 74  68 65 20 63 6c 69 63 6b  |pe. If the click|
00000ad0  20 77 61 73 20 6f 76 65  72 20 61 20 77 72 69 74  | was over a writ|
00000ae0  61 62 6c 65 20 69 63 6f  6e 2c 20 69 74 20 73 74  |able icon, it st|
00000af0  6f 72 65 73 0a 74 68 65  20 6d 6f 75 73 65 20 70  |ores.the mouse p|
00000b00  6f 73 69 74 69 6f 6e 20  61 6e 64 20 72 65 64 65  |osition and rede|
00000b10  66 69 6e 65 73 20 6d 6f  75 73 65 20 70 6f 69 6e  |fines mouse poin|
00000b20  74 65 72 20 31 20 73 70  72 69 74 65 20 61 73 20  |ter 1 sprite as |
00000b30  70 74 72 5f 64 6f 75 62  6c 65 2e 0a 0a 4e 2e 42  |ptr_double...N.B|
00000b40  2e 20 54 68 65 72 65 20  61 70 70 65 61 72 73 20  |. There appears |
00000b50  74 6f 20 62 65 20 6e 6f  20 77 61 79 20 6f 66 20  |to be no way of |
00000b60  72 65 61 64 69 6e 67 20  77 68 69 63 68 20 73 70  |reading which sp|
00000b70  72 69 74 65 20 69 73 20  75 73 65 64 20 62 79 20  |rite is used by |
00000b80  61 0a 70 61 72 74 69 63  75 6c 61 72 20 70 6f 69  |a.particular poi|
00000b90  6e 74 65 72 20 6e 75 6d  62 65 72 2e 20 54 68 65  |nter number. The|
00000ba0  20 50 52 4d 20 74 68 6f  75 67 68 20 73 61 79 73  | PRM though says|
00000bb0  20 74 68 61 74 20 6f 6e  6c 79 20 52 49 53 43 20  | that only RISC |
00000bc0  4f 53 20 73 68 6f 75 6c  64 20 75 73 65 0a 70 6f  |OS should use.po|
00000bd0  69 6e 74 65 72 20 31 2c  20 73 6f 20 74 68 69 73  |inter 1, so this|
00000be0  20 70 6f 69 6e 74 65 72  20 73 68 6f 75 6c 64 20  | pointer should |
00000bf0  70 72 65 73 75 6d 61 62  6c 79 20 61 6c 77 61 79  |presumably alway|
00000c00  73 20 75 73 65 20 74 68  65 20 70 74 72 5f 64 65  |s use the ptr_de|
00000c10  66 61 75 6c 74 0a 61 72  72 6f 77 20 73 70 72 69  |fault.arrow spri|
00000c20  74 65 2e 20 54 68 65 20  6d 6f 64 75 6c 65 20 61  |te. The module a|
00000c30  73 73 75 6d 65 73 20 74  68 69 73 20 61 6e 64 20  |ssumes this and |
00000c40  61 6c 77 61 79 73 20 72  65 70 6c 61 63 65 73 20  |always replaces |
00000c50  70 74 72 5f 64 6f 75 62  6c 65 20 77 69 74 68 0a  |ptr_double with.|
00000c60  70 74 72 5f 64 65 66 61  75 6c 74 20 61 74 20 74  |ptr_default at t|
00000c70  68 65 20 65 6e 64 20 6f  66 20 74 68 65 20 70 65  |he end of the pe|
00000c80  72 69 6f 64 20 64 75 72  69 6e 67 20 77 68 69 63  |riod during whic|
00000c90  68 20 69 74 20 63 68 65  63 6b 73 20 66 6f 72 20  |h it checks for |
00000ca0  61 20 73 65 63 6f 6e 64  0a 63 6c 69 63 6b 2e 0a  |a second.click..|
00000cb0  0a 54 68 65 20 6d 6f 64  75 6c 65 20 74 68 65 6e  |.The module then|
00000cc0  20 73 65 74 73 20 61 20  63 61 6c 6c 2d 61 66 74  | sets a call-aft|
00000cd0  65 72 2c 20 77 68 69 63  68 20 69 73 20 61 6e 20  |er, which is an |
00000ce0  69 6e 73 74 72 75 63 74  69 6f 6e 20 74 6f 20 52  |instruction to R|
00000cf0  49 53 43 20 4f 53 20 74  6f 0a 63 61 6c 6c 20 61  |ISC OS to.call a|
00000d00  20 72 6f 75 74 69 6e 65  20 61 66 74 65 72 20 61  | routine after a|
00000d10  20 63 65 72 74 61 69 6e  20 6c 65 6e 67 74 68 20  | certain length |
00000d20  6f 66 20 74 69 6d 65 2e  20 49 74 20 61 6c 73 6f  |of time. It also|
00000d30  20 63 61 6c 6c 73 20 4f  53 5f 43 61 6c 6c 45 76  | calls OS_CallEv|
00000d40  65 72 79 20 74 6f 0a 61  72 72 61 6e 67 65 20 66  |ery to.arrange f|
00000d50  6f 72 20 61 20 63 61 6c  6c 20 65 76 65 72 79 20  |or a call every |
00000d60  31 30 20 63 65 6e 74 69  73 65 63 6f 6e 64 73 20  |10 centiseconds |
00000d70  74 6f 20 61 20 72 6f 75  74 69 6e 65 20 77 68 69  |to a routine whi|
00000d80  63 68 20 63 68 65 63 6b  73 20 74 68 65 20 6d 6f  |ch checks the mo|
00000d90  75 73 65 0a 70 6f 73 69  74 69 6f 6e 20 61 6e 64  |use.position and|
00000da0  20 63 61 6e 63 65 6c 73  20 74 68 65 20 64 6f 75  | cancels the dou|
00000db0  62 6c 65 2d 63 6c 69 63  6b 20 6d 6f 6e 69 74 6f  |ble-click monito|
00000dc0  72 69 6e 67 20 69 66 20  74 68 65 20 6d 6f 75 73  |ring if the mous|
00000dd0  65 20 69 73 20 6d 6f 76  65 64 20 6d 6f 72 65 0a  |e is moved more.|
00000de0  74 68 61 6e 20 61 20 63  65 72 74 61 69 6e 20 61  |than a certain a|
00000df0  6d 6f 75 6e 74 2e 0a 0a  4e 2e 42 2e 20 41 6c 74  |mount...N.B. Alt|
00000e00  68 6f 75 67 68 20 74 68  65 20 6e 6f 72 6d 61 6c  |hough the normal|
00000e10  20 64 6f 75 62 6c 65 2d  63 6c 69 63 6b 20 74 69  | double-click ti|
00000e20  6d 65 20 6c 69 6d 69 74  20 61 6e 64 20 70 65 72  |me limit and per|
00000e30  6d 69 74 74 65 64 20 6d  6f 75 73 65 0a 6d 6f 76  |mitted mouse.mov|
00000e40  65 6d 65 6e 74 20 63 61  6e 20 62 65 20 63 6f 6e  |ement can be con|
00000e50  66 69 67 75 72 65 64 2c  20 74 68 65 72 65 20 61  |figured, there a|
00000e60  70 70 65 61 72 73 20 74  6f 20 62 65 20 6e 6f 20  |ppears to be no |
00000e70  77 61 79 20 6f 66 20 72  65 61 64 69 6e 67 20 74  |way of reading t|
00000e80  68 65 69 72 0a 76 61 6c  75 65 73 2c 20 6f 74 68  |heir.values, oth|
00000e90  65 72 20 74 68 61 6e 20  74 68 65 20 75 6e 72 65  |er than the unre|
00000ea0  6c 69 61 62 6c 65 20 6d  65 74 68 6f 64 20 6f 66  |liable method of|
00000eb0  20 63 68 65 63 6b 69 6e  67 20 43 4d 4f 53 20 52  | checking CMOS R|
00000ec0  41 4d 20 6c 6f 63 61 74  69 6f 6e 73 2c 0a 77 68  |AM locations,.wh|
00000ed0  69 63 68 20 63 6f 75 6c  64 20 63 68 61 6e 67 65  |ich could change|
00000ee0  20 62 65 74 77 65 65 6e  20 64 69 66 66 65 72 65  | between differe|
00000ef0  6e 74 20 76 65 72 73 69  6f 6e 73 20 6f 66 20 52  |nt versions of R|
00000f00  49 53 43 20 4f 53 2e 20  54 68 69 73 20 6d 6f 64  |ISC OS. This mod|
00000f10  75 6c 65 20 75 73 65 73  0a 74 68 65 20 64 65 66  |ule uses.the def|
00000f20  61 75 6c 74 20 63 6f 6e  66 69 67 75 72 61 74 69  |ault configurati|
00000f30  6f 6e 20 76 61 6c 75 65  73 20 6f 66 20 31 20 73  |on values of 1 s|
00000f40  65 63 6f 6e 64 20 6d 61  78 69 6d 75 6d 20 62 65  |econd maximum be|
00000f50  74 77 65 65 6e 20 63 6c  69 63 6b 73 20 61 6e 64  |tween clicks and|
00000f60  20 61 0a 6d 61 78 69 6d  75 6d 20 6d 6f 75 73 65  | a.maximum mouse|
00000f70  20 6d 6f 76 65 6d 65 6e  74 20 6f 66 20 31 30 20  | movement of 10 |
00000f80  4f 53 20 75 6e 69 74 73  20 28 69 74 20 63 68 65  |OS units (it che|
00000f90  63 6b 73 20 66 6f 72 20  65 69 74 68 65 72 20 31  |cks for either 1|
00000fa0  30 20 68 6f 72 69 7a 6f  6e 74 61 6c 20 6f 72 0a  |0 horizontal or.|
00000fb0  31 30 20 76 65 72 74 69  63 61 6c 20 75 6e 69 74  |10 vertical unit|
00000fc0  73 20 6f 66 20 6d 6f 76  65 6d 65 6e 74 29 2e 20  |s of movement). |
00000fd0  54 68 65 73 65 20 76 61  6c 75 65 73 20 61 72 65  |These values are|
00000fe0  20 66 69 78 65 64 20 69  6e 20 74 68 69 73 20 76  | fixed in this v|
00000ff0  65 72 73 69 6f 6e 20 6f  66 0a 74 68 65 20 6d 6f  |ersion of.the mo|
00001000  64 75 6c 65 2e 20 49 66  20 74 68 65 72 65 20 69  |dule. If there i|
00001010  73 20 61 20 64 65 6d 61  6e 64 20 66 6f 72 20 74  |s a demand for t|
00001020  68 65 20 61 62 69 6c 69  74 79 20 74 6f 20 61 6c  |he ability to al|
00001030  74 65 72 20 74 68 65 73  65 20 76 61 6c 75 65 73  |ter these values|
00001040  2c 20 49 0a 77 69 6c 6c  20 65 6e 64 65 61 76 6f  |, I.will endeavo|
00001050  75 72 20 74 6f 20 69 6e  63 6c 75 64 65 20 61 20  |ur to include a |
00001060  63 6f 75 70 6c 65 20 6f  66 20 53 57 49 73 20 61  |couple of SWIs a|
00001070  6e 64 2f 6f 72 20 73 74  61 72 20 63 6f 6d 6d 61  |nd/or star comma|
00001080  6e 64 73 20 69 6e 20 61  20 6c 61 74 65 72 0a 76  |nds in a later.v|
00001090  65 72 73 69 6f 6e 2e 0a  0a 49 66 20 65 69 74 68  |ersion...If eith|
000010a0  65 72 20 61 20 73 65 63  6f 6e 64 20 6b 65 79 20  |er a second key |
000010b0  69 73 20 70 72 65 73 73  65 64 20 6f 72 20 74 68  |is pressed or th|
000010c0  65 20 6d 6f 75 73 65 20  69 73 20 6d 6f 76 65 64  |e mouse is moved|
000010d0  20 62 65 66 6f 72 65 20  74 68 65 0a 63 61 6c 6c  | before the.call|
000010e0  2d 61 66 74 65 72 20 68  61 73 20 74 69 6d 65 64  |-after has timed|
000010f0  20 6f 75 74 2c 20 74 68  65 20 63 61 6c 6c 2d 61  | out, the call-a|
00001100  66 74 65 72 20 61 6e 64  20 63 61 6c 6c 2d 65 76  |fter and call-ev|
00001110  65 72 79 20 61 72 65 20  63 61 6e 63 65 6c 6c 65  |ery are cancelle|
00001120  64 20 61 6e 64 20 61 0a  73 65 63 6f 6e 64 20 63  |d and a.second c|
00001130  61 6c 6c 62 61 63 6b 20  69 73 20 75 73 65 64 2e  |allback is used.|
00001140  20 54 68 69 73 20 72 6f  75 74 69 6e 65 20 63 68  | This routine ch|
00001150  65 63 6b 73 20 74 68 61  74 20 74 68 65 20 73 61  |ecks that the sa|
00001160  6d 65 20 6b 65 79 20 68  61 73 20 62 65 65 6e 0a  |me key has been.|
00001170  70 72 65 73 73 65 64 20  61 73 20 70 72 65 76 69  |pressed as previ|
00001180  6f 75 73 6c 79 2c 20 73  65 74 73 20 61 20 66 6c  |ously, sets a fl|
00001190  61 67 20 61 6e 64 20 74  61 6b 65 73 20 73 74 65  |ag and takes ste|
000011a0  70 73 20 74 6f 20 69 6e  76 65 72 74 20 74 68 65  |ps to invert the|
000011b0  20 69 63 6f 6e 2e 0a 0a  41 6c 74 68 6f 75 67 68  | icon...Although|
000011c0  20 61 6e 79 20 69 63 6f  6e 20 63 61 6e 20 62 65  | any icon can be|
000011d0  20 69 6e 76 65 72 74 65  64 20 6f 72 20 64 65 2d  | inverted or de-|
000011e0  69 6e 76 65 72 74 65 64  20 62 79 20 6d 65 61 6e  |inverted by mean|
000011f0  73 20 6f 66 20 61 20 63  61 6c 6c 20 74 6f 0a 57  |s of a call to.W|
00001200  69 6d 70 5f 53 65 74 49  63 6f 6e 53 74 61 74 65  |imp_SetIconState|
00001210  2c 20 74 68 65 20 70 72  6f 63 65 64 75 72 65 20  |, the procedure |
00001220  69 73 20 6e 6f 74 20 74  68 61 74 20 73 69 6d 70  |is not that simp|
00001230  6c 65 2e 20 54 68 69 73  20 53 57 49 20 6d 61 79  |le. This SWI may|
00001240  20 6f 6e 6c 79 20 62 65  0a 63 61 6c 6c 65 64 20  | only be.called |
00001250  77 68 69 6c 65 20 74 68  65 20 61 70 70 6c 69 63  |while the applic|
00001260  61 74 69 6f 6e 20 77 68  69 63 68 20 6f 77 6e 73  |ation which owns|
00001270  20 74 68 65 20 69 63 6f  6e 20 69 73 20 74 68 65  | the icon is the|
00001280  20 63 75 72 72 65 6e 74  6c 79 20 61 63 74 69 76  | currently activ|
00001290  65 0a 74 61 73 6b 2e 20  49 66 20 77 65 20 73 69  |e.task. If we si|
000012a0  6d 70 6c 79 20 63 61 6c  6c 20 69 74 20 77 68 65  |mply call it whe|
000012b0  6e 20 74 68 65 20 6d 6f  75 73 65 20 69 73 20 63  |n the mouse is c|
000012c0  6c 69 63 6b 65 64 2c 20  74 68 69 73 20 6d 61 79  |licked, this may|
000012d0  20 6e 6f 74 20 62 65 20  74 68 65 0a 63 61 73 65  | not be the.case|
000012e0  2c 20 65 73 70 65 63 69  61 6c 6c 79 20 69 66 20  |, especially if |
000012f0  73 65 76 65 72 61 6c 20  6d 75 6c 74 69 2d 74 61  |several multi-ta|
00001300  73 6b 69 6e 67 20 61 70  70 6c 69 63 61 74 69 6f  |sking applicatio|
00001310  6e 73 20 61 72 65 20 72  75 6e 6e 69 6e 67 20 61  |ns are running a|
00001320  74 20 74 68 65 0a 73 61  6d 65 20 74 69 6d 65 2e  |t the.same time.|
00001330  20 57 65 20 68 61 76 65  20 74 6f 20 73 65 6e 64  | We have to send|
00001340  20 61 20 6d 65 73 73 61  67 65 20 74 6f 20 74 68  | a message to th|
00001350  65 20 74 61 73 6b 20 62  75 74 20 77 65 20 63 61  |e task but we ca|
00001360  6e 6e 6f 74 2c 20 6f 66  20 63 6f 75 72 73 65 2c  |nnot, of course,|
00001370  0a 72 65 77 72 69 74 65  20 69 74 73 20 73 6f 66  |.rewrite its sof|
00001380  74 77 61 72 65 2e 0a 0a  54 68 65 20 73 6f 6c 75  |tware...The solu|
00001390  74 69 6f 6e 20 69 73 20  74 6f 20 75 73 65 20 61  |tion is to use a|
000013a0  20 66 69 6c 74 65 72 2e  20 57 65 20 63 6f 75 6c  | filter. We coul|
000013b0  64 20 75 73 65 20 61 20  70 72 65 2d 66 69 6c 74  |d use a pre-filt|
000013c0  65 72 2c 20 77 68 69 63  68 20 69 73 20 63 61 6c  |er, which is cal|
000013d0  6c 65 64 0a 6a 75 73 74  20 62 65 66 6f 72 65 20  |led.just before |
000013e0  57 69 6d 70 5f 50 6f 6c  6c 20 69 73 20 65 78 65  |Wimp_Poll is exe|
000013f0  63 75 74 65 64 2c 20 6f  72 20 61 20 70 6f 73 74  |cuted, or a post|
00001400  2d 66 69 6c 74 65 72 20  77 68 69 63 68 20 69 73  |-filter which is|
00001410  20 63 61 6c 6c 65 64 20  6f 6e 0a 72 65 74 75 72  | called on.retur|
00001420  6e 20 66 72 6f 6d 20 57  69 6d 70 5f 50 6f 6c 6c  |n from Wimp_Poll|
00001430  2e 20 49 6e 20 74 68 69  73 20 63 61 73 65 2c 20  |. In this case, |
00001440  77 65 20 75 73 65 20 74  68 65 20 6c 61 74 74 65  |we use the latte|
00001450  72 2e 20 54 68 65 20 74  65 63 68 6e 69 71 75 65  |r. The technique|
00001460  20 69 73 20 74 6f 0a 73  65 6e 64 20 61 20 75 6e  | is to.send a un|
00001470  69 71 75 65 20 6d 65 73  73 61 67 65 20 74 6f 20  |ique message to |
00001480  74 68 65 20 74 61 73 6b  20 77 68 69 63 68 20 6f  |the task which o|
00001490  75 72 20 66 69 6c 74 65  72 20 77 69 6c 6c 20 69  |ur filter will i|
000014a0  6e 74 65 72 63 65 70 74  20 61 6e 64 0a 72 65 63  |ntercept and.rec|
000014b0  6f 67 6e 69 73 65 2c 20  74 65 6c 6c 69 6e 67 20  |ognise, telling |
000014c0  69 74 20 74 6f 20 69 6e  76 65 72 74 20 6f 72 20  |it to invert or |
000014d0  64 65 2d 69 6e 76 65 72  74 20 74 68 65 20 72 65  |de-invert the re|
000014e0  71 75 69 72 65 64 20 69  63 6f 6e 2e 0a 0a 57 65  |quired icon...We|
000014f0  20 63 6f 75 6c 64 20 73  65 6e 64 20 61 20 6d 65  | could send a me|
00001500  73 73 61 67 65 2c 20 75  73 69 6e 67 20 72 65 61  |ssage, using rea|
00001510  73 6f 6e 20 63 6f 64 65  20 31 37 20 6f 72 20 31  |son code 17 or 1|
00001520  38 2c 20 62 75 74 20 77  65 20 77 6f 75 6c 64 20  |8, but we would |
00001530  68 61 76 65 20 74 6f 0a  66 69 6e 64 20 61 20 6d  |have to.find a m|
00001540  65 73 73 61 67 65 20 61  63 74 69 6f 6e 20 63 6f  |essage action co|
00001550  64 65 20 74 68 61 74 20  69 73 20 6e 6f 74 20 75  |de that is not u|
00001560  73 65 64 20 66 6f 72 20  61 6e 79 74 68 69 6e 67  |sed for anything|
00001570  20 65 6c 73 65 2c 20 77  68 69 63 68 20 77 6f 75  | else, which wou|
00001580  6c 64 0a 70 72 65 73 65  6e 74 20 70 72 6f 62 6c  |ld.present probl|
00001590  65 6d 73 2e 20 49 74 20  69 73 20 61 6c 73 6f 20  |ems. It is also |
000015a0  70 65 72 6d 69 73 73 69  62 6c 65 20 66 6f 72 20  |permissible for |
000015b0  61 20 74 61 73 6b 20 74  6f 20 6d 61 73 6b 20 6f  |a task to mask o|
000015c0  75 74 20 74 68 65 73 65  20 72 65 61 73 6f 6e 0a  |ut these reason.|
000015d0  63 6f 64 65 73 2c 20 77  68 69 63 68 20 77 6f 75  |codes, which wou|
000015e0  6c 64 20 70 72 65 76 65  6e 74 20 6f 75 72 20 6d  |ld prevent our m|
000015f0  65 73 73 61 67 65 20 67  65 74 74 69 6e 67 20 74  |essage getting t|
00001600  68 72 6f 75 67 68 2e 20  53 6f 20 74 68 61 74 20  |hrough. So that |
00001610  74 68 69 73 20 63 61 6e  6e 6f 74 0a 68 61 70 70  |this cannot.happ|
00001620  65 6e 2c 20 74 68 65 20  6d 6f 64 75 6c 65 20 73  |en, the module s|
00001630  65 6e 64 73 20 61 20 6d  65 73 73 61 67 65 20 77  |ends a message w|
00001640  69 74 68 20 72 65 61 73  6f 6e 20 63 6f 64 65 20  |ith reason code |
00001650  32 2c 20 77 68 69 63 68  20 75 73 75 61 6c 6c 79  |2, which usually|
00001660  20 6d 65 61 6e 73 0a 27  6f 70 65 6e 20 77 69 6e  | means.'open win|
00001670  64 6f 77 20 72 65 71 75  65 73 74 27 2e 20 54 68  |dow request'. Th|
00001680  69 73 20 72 65 61 73 6f  6e 20 63 6f 64 65 20 69  |is reason code i|
00001690  73 20 6e 6f 74 20 73 75  70 70 6f 73 65 64 20 74  |s not supposed t|
000016a0  6f 20 62 65 20 6d 61 73  6b 65 64 20 6f 75 74 0a  |o be masked out.|
000016b0  77 68 65 6e 20 63 61 6c  6c 69 6e 67 20 57 69 6d  |when calling Wim|
000016c0  70 5f 50 6f 6c 6c 2e 20  4f 75 72 20 6d 65 73 73  |p_Poll. Our mess|
000016d0  61 67 65 20 73 65 6e 64  73 20 52 31 2b 30 20 61  |age sends R1+0 a|
000016e0  73 20 7a 65 72 6f 20 61  6e 64 20 52 31 2b 34 20  |s zero and R1+4 |
000016f0  61 73 0a 26 37 32 36 43  34 33 34 39 2c 20 77 68  |as.&726C4349, wh|
00001700  69 63 68 20 69 73 20 74  68 65 20 41 53 43 49 49  |ich is the ASCII|
00001710  20 63 6f 64 65 20 66 6f  72 20 27 49 43 6c 72 27  | code for 'IClr'|
00001720  2e 20 54 68 69 73 20 63  6f 72 72 65 73 70 6f 6e  |. This correspon|
00001730  64 73 20 74 6f 20 61 20  72 65 71 75 65 73 74 0a  |ds to a request.|
00001740  74 6f 20 6f 70 65 6e 20  74 68 65 20 77 69 6e 64  |to open the wind|
00001750  6f 77 20 77 68 6f 73 65  20 68 61 6e 64 6c 65 20  |ow whose handle |
00001760  69 73 20 7a 65 72 6f 2c  20 77 69 74 68 20 61 20  |is zero, with a |
00001770  6d 69 6e 69 6d 75 6d 20  78 20 63 6f 6f 72 64 69  |minimum x coordi|
00001780  6e 61 74 65 20 6f 66 0a  26 37 32 36 43 34 33 34  |nate of.&726C434|
00001790  39 20 2d 20 61 20 6d 6f  73 74 20 75 6e 6c 69 6b  |9 - a most unlik|
000017a0  65 6c 79 20 73 74 61 74  65 20 6f 66 20 61 66 66  |ely state of aff|
000017b0  61 69 72 73 20 69 6e 20  61 6e 79 20 6f 74 68 65  |airs in any othe|
000017c0  72 20 73 69 74 75 61 74  69 6f 6e 21 20 54 68 65  |r situation! The|
000017d0  0a 74 68 69 72 64 20 77  6f 72 64 20 69 6e 20 74  |.third word in t|
000017e0  68 65 20 62 6c 6f 63 6b  20 69 73 20 7a 65 72 6f  |he block is zero|
000017f0  20 74 6f 20 63 6c 65 61  72 20 74 68 65 20 69 63  | to clear the ic|
00001800  6f 6e 20 6f 72 20 31 20  74 6f 20 69 6e 76 65 72  |on or 1 to inver|
00001810  74 20 69 74 2e 20 54 68  65 0a 66 69 6c 74 65 72  |t it. The.filter|
00001820  20 69 73 20 73 65 74 20  74 6f 20 68 61 6e 64 6c  | is set to handl|
00001830  65 20 6f 6e 6c 79 20 72  65 61 73 6f 6e 20 63 6f  |e only reason co|
00001840  64 65 20 32 2e 20 49 66  20 69 74 20 72 65 63 65  |de 2. If it rece|
00001850  69 76 65 73 20 74 68 65  20 65 78 61 63 74 20 73  |ives the exact s|
00001860  74 61 74 65 0a 6f 66 20  61 66 66 61 69 72 73 20  |tate.of affairs |
00001870  61 73 20 64 65 73 63 72  69 62 65 64 2c 20 69 74  |as described, it|
00001880  20 65 69 74 68 65 72 20  69 6e 76 65 72 74 73 20  | either inverts |
00001890  6f 72 20 63 6c 65 61 72  73 20 74 68 65 20 69 63  |or clears the ic|
000018a0  6f 6e 20 61 6e 64 20 65  78 69 74 73 0a 77 69 74  |on and exits.wit|
000018b0  68 6f 75 74 20 70 61 73  73 69 6e 67 20 74 68 65  |hout passing the|
000018c0  20 63 61 6c 6c 20 6f 6e  74 6f 20 74 68 65 20 61  | call onto the a|
000018d0  70 70 6c 69 63 61 74 69  6f 6e 2e 0a 0a 49 66 20  |pplication...If |
000018e0  61 20 6b 65 79 20 69 73  20 70 72 65 73 73 65 64  |a key is pressed|
000018f0  20 77 68 69 6c 65 20 74  68 65 20 69 6e 76 65 72  | while the inver|
00001900  74 65 64 20 69 63 6f 6e  20 66 6c 61 67 20 69 73  |ted icon flag is|
00001910  20 73 65 74 2c 20 74 68  65 20 72 6f 75 74 69 6e  | set, the routin|
00001920  65 20 28 61 67 61 69 6e  0a 62 79 20 6d 65 61 6e  |e (again.by mean|
00001930  73 20 6f 66 20 61 20 63  61 6c 6c 62 61 63 6b 29  |s of a callback)|
00001940  20 73 65 6e 64 73 20 61  20 6d 65 73 73 61 67 65  | sends a message|
00001950  20 74 6f 20 63 6c 65 61  72 20 74 68 65 20 69 63  | to clear the ic|
00001960  6f 6e 2c 20 74 68 65 6e  20 73 65 6e 64 73 20 74  |on, then sends t|
00001970  68 65 0a 6b 65 79 70 72  65 73 73 20 63 68 61 72  |he.keypress char|
00001980  61 63 74 65 72 2c 20 70  72 65 63 65 64 65 64 20  |acter, preceded |
00001990  62 79 20 61 20 43 74 72  6c 2d 55 20 74 6f 20 64  |by a Ctrl-U to d|
000019a0  65 6c 65 74 65 20 74 68  65 20 74 65 78 74 2e 0a  |elete the text..|
000019b0  0a 54 68 65 20 6d 6f 64  75 6c 65 20 69 6e 63 6f  |.The module inco|
000019c0  72 70 6f 72 61 74 65 73  20 61 20 73 65 6c 66 2d  |rporates a self-|
000019d0  63 68 65 63 6b 69 6e 67  20 72 6f 75 74 69 6e 65  |checking routine|
000019e0  20 74 6f 20 64 65 74 65  63 74 20 63 6f 72 72 75  | to detect corru|
000019f0  70 74 69 6f 6e 20 62 79  0a 76 69 72 75 73 65 73  |ption by.viruses|
00001a00  2e 0a 0a 50 6c 65 61 73  65 20 73 65 6e 64 20 61  |...Please send a|
00001a10  6c 6c 20 63 6f 6d 6d 65  6e 74 73 20 61 6e 64 20  |ll comments and |
00001a20  73 75 67 67 65 73 74 69  6f 6e 73 20 74 6f 3a 0a  |suggestions to:.|
00001a30  0a 4d 2e 50 2e 20 46 6f  78 2c 0a 33 31 20 50 69  |.M.P. Fox,.31 Pi|
00001a40  65 72 73 6f 6e 20 52 6f  61 64 2c 0a 57 69 6e 64  |erson Road,.Wind|
00001a50  73 6f 72 2c 0a 42 65 72  6b 73 2e 20 53 4c 34 20  |sor,.Berks. SL4 |
00001a60  35 52 45                                          |5RE|
00001a63
PD/IClear/ReadMe
00000000  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 49  |               I|
00000020  43 6c 65 61 72 20 4d 6f  64 75 6c 65 0a 20 20 20  |Clear Module.   |
00000030  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000040  20 20 20 20 20 20 20 20  20 20 20 20 3d 3d 3d 3d  |            ====|
00000050  3d 3d 20 3d 3d 3d 3d 3d  3d 0a 0a 20 20 20 20 20  |== ======..     |
00000060  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000070  20 20 20 20 20 20 20 20  20 20 62 79 20 4d 61 72  |          by Mar|
00000080  74 79 6e 20 46 6f 78 0a  0a 54 68 69 73 20 73 6f  |tyn Fox..This so|
00000090  66 74 77 61 72 65 20 69  73 20 50 75 62 6c 69 63  |ftware is Public|
000000a0  20 44 6f 6d 61 69 6e 2e  20 49 74 20 6d 61 79 20  | Domain. It may |
000000b0  62 65 20 66 72 65 65 6c  79 20 63 6f 70 69 65 64  |be freely copied|
000000c0  20 61 6e 64 20 64 69 73  74 72 69 62 75 74 65 64  | and distributed|
000000d0  2c 0a 69 6e 63 6c 75 64  69 6e 67 20 64 69 73 74  |,.including dist|
000000e0  72 69 62 75 74 69 6f 6e  20 62 79 20 6d 61 67 61  |ribution by maga|
000000f0  7a 69 6e 65 20 64 69 73  63 73 2c 20 50 44 20 6c  |zine discs, PD l|
00000100  69 62 72 61 72 69 65 73  2c 20 62 75 6c 6c 65 74  |ibraries, bullet|
00000110  69 6e 20 62 6f 61 72 64  73 0a 65 74 63 2e 2c 20  |in boards.etc., |
00000120  70 72 6f 76 69 64 65 64  20 74 68 65 20 66 6f 6c  |provided the fol|
00000130  6c 6f 77 69 6e 67 20 63  6f 6e 64 69 74 69 6f 6e  |lowing condition|
00000140  73 20 61 72 65 20 61 64  68 65 72 65 64 20 74 6f  |s are adhered to|
00000150  3a 0a 0a 31 2e 20 4e 6f  20 63 68 61 72 67 65 20  |:..1. No charge |
00000160  69 73 20 6d 61 64 65 20  6f 74 68 65 72 20 74 68  |is made other th|
00000170  61 6e 20 74 6f 20 63 6f  76 65 72 20 74 68 65 20  |an to cover the |
00000180  72 65 61 73 6f 6e 61 62  6c 65 20 63 6f 73 74 20  |reasonable cost |
00000190  6f 66 20 64 75 70 6c 69  63 61 74 69 6f 6e 0a 61  |of duplication.a|
000001a0  6e 64 20 64 69 73 74 72  69 62 75 74 69 6f 6e 2e  |nd distribution.|
000001b0  0a 0a 32 2e 20 4e 6f 20  61 6c 74 65 72 61 74 69  |..2. No alterati|
000001c0  6f 6e 20 69 73 20 6d 61  64 65 20 74 6f 20 65 69  |on is made to ei|
000001d0  74 68 65 72 20 74 68 65  20 73 6f 66 74 77 61 72  |ther the softwar|
000001e0  65 20 6f 72 20 74 68 69  73 20 74 65 78 74 20 66  |e or this text f|
000001f0  69 6c 65 2e 0a 0a 33 2e  20 54 68 69 73 20 74 65  |ile...3. This te|
00000200  78 74 20 66 69 6c 65 20  61 63 63 6f 6d 70 61 6e  |xt file accompan|
00000210  69 65 73 20 61 6c 6c 20  63 6f 70 69 65 73 20 6f  |ies all copies o|
00000220  66 20 74 68 65 20 73 6f  66 74 77 61 72 65 2e 0a  |f the software..|
00000230  0a 50 6c 65 61 73 65 20  6e 6f 74 65 20 74 68 61  |.Please note tha|
00000240  74 20 74 68 69 73 20 6d  6f 64 75 6c 65 20 77 69  |t this module wi|
00000250  6c 6c 20 6f 6e 6c 79 20  77 6f 72 6b 20 77 69 74  |ll only work wit|
00000260  68 20 52 49 53 43 20 4f  53 20 33 20 6f 72 20 6c  |h RISC OS 3 or l|
00000270  61 74 65 72 2e 20 54 68  69 73 0a 63 6f 70 79 20  |ater. This.copy |
00000280  68 61 73 20 62 65 65 6e  20 6d 6f 64 69 66 69 65  |has been modifie|
00000290  64 20 66 6f 72 20 63 6f  6d 70 61 74 69 62 69 6c  |d for compatibil|
000002a0  69 74 79 20 77 69 74 68  20 74 68 65 20 53 74 72  |ity with the Str|
000002b0  6f 6e 67 41 52 4d 20 31  31 30 20 70 72 6f 63 65  |ongARM 110 proce|
000002c0  73 73 6f 72 2e 0a 0a 49  43 6c 65 61 72 20 69 73  |ssor...IClear is|
000002d0  20 61 20 6d 6f 64 75 6c  65 20 77 68 69 63 68 20  | a module which |
000002e0  6d 61 6b 65 73 20 69 74  20 65 61 73 69 65 72 20  |makes it easier |
000002f0  74 6f 20 64 65 6c 65 74  65 20 74 65 78 74 20 66  |to delete text f|
00000300  72 6f 6d 20 61 20 77 72  69 74 61 62 6c 65 0a 69  |rom a writable.i|
00000310  63 6f 6e 2e 20 55 6e 64  65 72 20 52 49 53 43 20  |con. Under RISC |
00000320  4f 53 2c 20 74 6f 20 72  65 70 6c 61 63 65 20 74  |OS, to replace t|
00000330  68 65 20 74 65 78 74 20  69 6e 20 73 75 63 68 20  |he text in such |
00000340  61 6e 20 69 63 6f 6e 20  77 69 74 68 20 6e 65 77  |an icon with new|
00000350  20 74 65 78 74 2c 20 79  6f 75 0a 66 69 72 73 74  | text, you.first|
00000360  20 68 61 76 65 20 74 6f  20 65 69 74 68 65 72 20  | have to either |
00000370  64 65 6c 65 74 65 20 61  6c 6c 20 74 68 65 20 63  |delete all the c|
00000380  68 61 72 61 63 74 65 72  73 20 6f 66 20 74 68 65  |haracters of the|
00000390  20 6f 6c 64 20 74 65 78  74 20 6f 72 20 70 72 65  | old text or pre|
000003a0  73 73 0a 43 74 72 6c 2d  55 20 74 6f 20 63 6c 65  |ss.Ctrl-U to cle|
000003b0  61 72 20 69 74 2e 20 54  68 69 73 20 63 61 6e 20  |ar it. This can |
000003c0  62 65 20 61 20 6e 75 69  73 61 6e 63 65 2c 20 65  |be a nuisance, e|
000003d0  73 70 65 63 69 61 6c 6c  79 20 69 66 20 79 6f 75  |specially if you|
000003e0  20 68 61 76 65 20 6a 75  73 74 0a 73 65 6c 65 63  | have just.selec|
000003f0  74 65 64 20 74 68 65 20  69 63 6f 6e 20 77 69 74  |ted the icon wit|
00000400  68 20 74 68 65 20 6d 6f  75 73 65 2c 20 61 73 20  |h the mouse, as |
00000410  79 6f 75 20 66 69 72 73  74 20 68 61 76 65 20 74  |you first have t|
00000420  6f 20 74 72 61 6e 73 66  65 72 20 74 6f 20 74 68  |o transfer to th|
00000430  65 0a 6b 65 79 62 6f 61  72 64 2c 20 74 68 65 6e  |e.keyboard, then|
00000440  20 70 72 65 73 73 20 43  74 72 6c 2d 55 20 62 65  | press Ctrl-U be|
00000450  66 6f 72 65 20 79 6f 75  20 63 61 6e 20 74 79 70  |fore you can typ|
00000460  65 20 69 6e 20 79 6f 75  72 20 6e 65 77 20 74 65  |e in your new te|
00000470  78 74 2e 0a 0a 57 69 74  68 20 49 43 6c 65 61 72  |xt...With IClear|
00000480  20 72 75 6e 6e 69 6e 67  2c 20 73 69 6d 70 6c 79  | running, simply|
00000490  20 64 6f 75 62 6c 65 2d  63 6c 69 63 6b 20 6f 6e  | double-click on|
000004a0  20 74 68 65 20 77 72 69  74 61 62 6c 65 20 69 63  | the writable ic|
000004b0  6f 6e 2c 20 75 73 69 6e  67 20 65 69 74 68 65 72  |on, using either|
000004c0  0a 53 65 6c 65 63 74 20  6f 72 20 41 64 6a 75 73  |.Select or Adjus|
000004d0  74 2e 20 54 68 65 20 69  63 6f 6e 20 77 69 6c 6c  |t. The icon will|
000004e0  20 62 65 20 69 6e 76 65  72 74 65 64 2c 20 77 68  | be inverted, wh|
000004f0  69 63 68 20 75 73 75 61  6c 6c 79 20 6d 65 61 6e  |ich usually mean|
00000500  73 20 74 68 61 74 20 69  74 0a 77 69 6c 6c 20 74  |s that it.will t|
00000510  75 72 6e 20 62 6c 61 63  6b 20 77 69 74 68 20 77  |urn black with w|
00000520  68 69 74 65 20 74 65 78  74 2e 20 41 73 20 73 6f  |hite text. As so|
00000530  6f 6e 20 61 73 20 79 6f  75 20 70 72 65 73 73 20  |on as you press |
00000540  61 20 6b 65 79 2c 20 74  68 65 20 74 65 78 74 20  |a key, the text |
00000550  69 6e 20 74 68 65 0a 69  63 6f 6e 20 77 69 6c 6c  |in the.icon will|
00000560  20 76 61 6e 69 73 68 2c  20 74 6f 20 62 65 20 72  | vanish, to be r|
00000570  65 70 6c 61 63 65 64 20  77 69 74 68 20 74 68 65  |eplaced with the|
00000580  20 63 68 61 72 61 63 74  65 72 20 74 68 61 74 20  | character that |
00000590  79 6f 75 20 74 79 70 65  64 2e 20 49 66 20 79 6f  |you typed. If yo|
000005a0  75 0a 63 68 61 6e 67 65  20 79 6f 75 72 20 6d 69  |u.change your mi|
000005b0  6e 64 20 61 66 74 65 72  20 69 6e 76 65 72 74 69  |nd after inverti|
000005c0  6e 67 20 74 68 65 20 69  63 6f 6e 20 61 6e 64 20  |ng the icon and |
000005d0  64 65 63 69 64 65 20 79  6f 75 20 77 61 6e 74 20  |decide you want |
000005e0  74 6f 20 6b 65 65 70 20  79 6f 75 72 0a 65 78 69  |to keep your.exi|
000005f0  73 74 69 6e 67 20 74 65  78 74 2c 20 61 20 66 75  |sting text, a fu|
00000600  72 74 68 65 72 20 63 6c  69 63 6b 20 77 69 74 68  |rther click with|
00000610  20 61 6e 79 20 6d 6f 75  73 65 20 62 75 74 74 6f  | any mouse butto|
00000620  6e 20 61 6e 79 77 68 65  72 65 20 6f 6e 20 74 68  |n anywhere on th|
00000630  65 20 73 63 72 65 65 6e  0a 77 69 6c 6c 20 64 65  |e screen.will de|
00000640  2d 69 6e 76 65 72 74 20  74 68 65 20 69 63 6f 6e  |-invert the icon|
00000650  20 61 6e 64 20 70 75 74  20 74 68 69 6e 67 73 20  | and put things |
00000660  62 61 63 6b 20 74 6f 20  6e 6f 72 6d 61 6c 2e 0a  |back to normal..|
00000670  0a 54 68 69 73 20 73 6f  66 74 77 61 72 65 20 77  |.This software w|
00000680  69 6c 6c 20 77 6f 72 6b  20 77 69 74 68 20 77 72  |ill work with wr|
00000690  69 74 61 62 6c 65 20 69  63 6f 6e 73 20 28 62 75  |itable icons (bu|
000006a0  74 74 6f 6e 20 74 79 70  65 20 31 35 29 20 61 6e  |tton type 15) an|
000006b0  64 20 61 6c 73 6f 0a 64  72 61 67 67 61 62 6c 65  |d also.draggable|
000006c0  20 77 72 69 74 61 62 6c  65 20 69 63 6f 6e 73 20  | writable icons |
000006d0  28 62 75 74 74 6f 6e 20  74 79 70 65 20 31 34 29  |(button type 14)|
000006e0  20 62 75 74 20 6e 6f 74  20 77 69 74 68 20 77 72  | but not with wr|
000006f0  69 74 61 62 6c 65 20 6d  65 6e 75 20 69 74 65 6d  |itable menu item|
00000700  73 2e 0a 0a 20 20 20 20  20 20 20 20 20 20 20 20  |s...            |
00000710  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000720  20 50 72 6f 67 72 61 6d  6d 69 6e 67 20 4e 6f 74  | Programming Not|
00000730  65 73 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |es.             |
00000740  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000750  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 20 3d 3d 3d 3d  |=========== ====|
00000760  3d 0a 0a 54 68 65 20 6d  6f 64 75 6c 65 20 69 6e  |=..The module in|
00000770  74 65 72 63 65 70 74 73  20 74 68 65 20 4d 6f 75  |tercepts the Mou|
00000780  73 65 56 20 61 6e 64 20  49 6e 73 56 20 76 65 63  |seV and InsV vec|
00000790  74 6f 72 73 20 74 6f 20  64 65 74 65 63 74 20 63  |tors to detect c|
000007a0  61 6c 6c 73 20 74 6f 0a  4f 53 5f 4d 6f 75 73 65  |alls to.OS_Mouse|
000007b0  20 61 6e 64 20 6b 65 79  70 72 65 73 73 65 73 2e  | and keypresses.|
000007c0  20 4f 53 5f 4d 6f 75 73  65 20 63 61 6c 6c 73 20  | OS_Mouse calls |
000007d0  61 72 65 20 66 69 72 73  74 20 70 61 73 73 65 64  |are first passed|
000007e0  20 6f 6e 74 6f 20 74 68  65 20 53 57 49 0a 72 6f  | onto the SWI.ro|
000007f0  75 74 69 6e 65 20 61 6e  64 20 70 72 6f 63 65 73  |utine and proces|
00000800  73 65 64 20 6f 6e 20 65  78 69 74 2e 0a 0a 42 65  |sed on exit...Be|
00000810  63 61 75 73 65 20 52 49  53 43 20 4f 53 20 77 69  |cause RISC OS wi|
00000820  6c 6c 20 6e 6f 74 20 61  75 74 6f 6d 61 74 69 63  |ll not automatic|
00000830  61 6c 6c 79 20 64 65 74  65 63 74 20 61 20 64 6f  |ally detect a do|
00000840  75 62 6c 65 2d 63 6c 69  63 6b 20 6f 76 65 72 20  |uble-click over |
00000850  61 20 77 72 69 74 61 62  6c 65 0a 69 63 6f 6e 2c  |a writable.icon,|
00000860  20 74 68 65 20 6d 6f 64  75 6c 65 20 68 61 73 20  | the module has |
00000870  74 6f 20 64 6f 20 74 68  65 20 6a 6f 62 20 69 74  |to do the job it|
00000880  73 65 6c 66 2e 20 54 68  69 73 20 69 6e 76 6f 6c  |self. This invol|
00000890  76 65 73 20 63 68 65 63  6b 69 6e 67 20 74 68 65  |ves checking the|
000008a0  20 74 69 6d 65 0a 69 6e  74 65 72 76 61 6c 20 73  | time.interval s|
000008b0  69 6e 63 65 20 74 68 65  20 70 72 65 76 69 6f 75  |ince the previou|
000008c0  73 20 63 6c 69 63 6b 2c  20 73 65 6c 65 63 74 69  |s click, selecti|
000008d0  6e 67 20 74 68 65 20 27  64 6f 75 62 6c 65 2d 61  |ng the 'double-a|
000008e0  72 72 6f 77 27 20 70 6f  69 6e 74 65 72 0a 73 70  |rrow' pointer.sp|
000008f0  72 69 74 65 2c 20 63 68  65 63 6b 69 6e 67 20 77  |rite, checking w|
00000900  68 69 63 68 20 62 75 74  74 6f 6e 20 77 61 73 20  |hich button was |
00000910  70 72 65 73 73 65 64 20  61 6e 64 20 6d 6f 6e 69  |pressed and moni|
00000920  74 6f 72 69 6e 67 20 74  68 65 20 6d 6f 75 73 65  |toring the mouse|
00000930  20 70 6f 73 69 74 69 6f  6e 2e 0a 0a 52 61 74 68  | position...Rath|
00000940  65 72 20 74 68 61 6e 20  70 75 74 20 74 6f 6f 20  |er than put too |
00000950  6d 75 63 68 20 63 6f 64  65 20 69 6e 74 6f 20 61  |much code into a|
00000960  20 76 65 63 74 6f 72 20  69 6e 74 65 72 63 65 70  | vector intercep|
00000970  74 20 72 6f 75 74 69 6e  65 2c 20 74 68 65 20 73  |t routine, the s|
00000980  6f 66 74 77 61 72 65 0a  6a 75 73 74 20 73 65 74  |oftware.just set|
00000990  73 20 6f 6e 65 20 6f 66  20 74 77 6f 20 63 61 6c  |s one of two cal|
000009a0  6c 62 61 63 6b 73 2c 20  64 65 70 65 6e 64 69 6e  |lbacks, dependin|
000009b0  67 20 6f 6e 20 74 68 65  20 74 69 6d 65 20 69 6e  |g on the time in|
000009c0  74 65 72 76 61 6c 20 73  69 6e 63 65 20 74 68 65  |terval since the|
000009d0  0a 70 72 65 76 69 6f 75  73 20 63 6c 69 63 6b 2e  |.previous click.|
000009e0  20 54 68 65 20 63 61 6c  6c 62 61 63 6b 20 72 6f  | The callback ro|
000009f0  75 74 69 6e 65 20 69 73  20 63 61 6c 6c 65 64 20  |utine is called |
00000a00  62 79 20 52 49 53 43 20  4f 53 20 61 73 20 73 6f  |by RISC OS as so|
00000a10  6f 6e 20 61 73 20 69 74  20 69 73 0a 6e 6f 74 20  |on as it is.not |
00000a20  62 75 73 79 2e 20 54 68  65 20 66 69 72 73 74 20  |busy. The first |
00000a30  6f 66 20 74 68 65 73 65  20 63 61 6c 6c 62 61 63  |of these callbac|
00000a40  6b 73 20 68 61 6e 64 6c  65 73 20 61 20 73 69 6e  |ks handles a sin|
00000a50  67 6c 65 20 63 6c 69 63  6b 2e 20 49 74 20 66 69  |gle click. It fi|
00000a60  72 73 74 0a 63 68 65 63  6b 73 20 74 6f 20 73 65  |rst.checks to se|
00000a70  65 20 69 66 20 74 68 65  20 6d 6f 64 75 6c 65 20  |e if the module |
00000a80  68 61 73 20 61 20 72 65  63 6f 72 64 20 6f 66 20  |has a record of |
00000a90  61 6e 20 69 6e 76 65 72  74 65 64 20 69 63 6f 6e  |an inverted icon|
00000aa0  20 61 6e 64 2c 20 69 66  20 73 6f 2c 0a 74 61 6b  | and, if so,.tak|
00000ab0  65 73 20 73 74 65 70 73  20 74 6f 20 63 6c 65 61  |es steps to clea|
00000ac0  72 20 69 74 2e 20 49 74  20 74 68 65 6e 20 73 74  |r it. It then st|
00000ad0  6f 72 65 73 20 61 20 72  65 63 6f 72 64 20 6f 66  |ores a record of|
00000ae0  20 77 68 69 63 68 20 62  75 74 74 6f 6e 20 77 61  | which button wa|
00000af0  73 20 70 72 65 73 73 65  64 0a 61 6e 64 20 63 68  |s pressed.and ch|
00000b00  65 63 6b 73 20 74 68 65  20 69 63 6f 6e 20 74 79  |ecks the icon ty|
00000b10  70 65 2e 20 49 66 20 74  68 65 20 63 6c 69 63 6b  |pe. If the click|
00000b20  20 77 61 73 20 6f 76 65  72 20 61 20 77 72 69 74  | was over a writ|
00000b30  61 62 6c 65 20 69 63 6f  6e 2c 20 69 74 20 73 74  |able icon, it st|
00000b40  6f 72 65 73 0a 74 68 65  20 6d 6f 75 73 65 20 70  |ores.the mouse p|
00000b50  6f 73 69 74 69 6f 6e 20  61 6e 64 20 72 65 64 65  |osition and rede|
00000b60  66 69 6e 65 73 20 6d 6f  75 73 65 20 70 6f 69 6e  |fines mouse poin|
00000b70  74 65 72 20 31 20 73 70  72 69 74 65 20 61 73 20  |ter 1 sprite as |
00000b80  70 74 72 5f 64 6f 75 62  6c 65 2e 0a 0a 4e 2e 42  |ptr_double...N.B|
00000b90  2e 20 54 68 65 72 65 20  61 70 70 65 61 72 73 20  |. There appears |
00000ba0  74 6f 20 62 65 20 6e 6f  20 77 61 79 20 6f 66 20  |to be no way of |
00000bb0  72 65 61 64 69 6e 67 20  77 68 69 63 68 20 73 70  |reading which sp|
00000bc0  72 69 74 65 20 69 73 20  75 73 65 64 20 62 79 20  |rite is used by |
00000bd0  61 0a 70 61 72 74 69 63  75 6c 61 72 20 70 6f 69  |a.particular poi|
00000be0  6e 74 65 72 20 6e 75 6d  62 65 72 2e 20 56 65 72  |nter number. Ver|
00000bf0  73 69 6f 6e 73 20 6f 66  20 74 68 69 73 20 6d 6f  |sions of this mo|
00000c00  64 75 6c 65 20 75 70 20  74 6f 20 76 31 2e 30 31  |dule up to v1.01|
00000c10  20 61 6c 77 61 79 73 0a  72 65 70 6c 61 63 65 64  | always.replaced|
00000c20  20 74 68 65 20 64 6f 75  62 6c 65 20 70 6f 69 6e  | the double poin|
00000c30  74 65 72 20 77 69 74 68  20 74 68 65 20 70 74 72  |ter with the ptr|
00000c40  5f 64 65 66 61 75 6c 74  20 73 70 72 69 74 65 20  |_default sprite |
00000c50  61 66 74 65 72 20 74 68  65 0a 64 6f 75 62 6c 65  |after the.double|
00000c60  2d 63 6c 69 63 6b 20 74  69 6d 65 2d 6f 75 74 2e  |-click time-out.|
00000c70  20 53 75 62 73 65 71 75  65 6e 74 20 76 65 72 73  | Subsequent vers|
00000c80  69 6f 6e 73 20 63 68 65  63 6b 73 20 74 68 65 20  |ions checks the |
00000c90  69 63 6f 6e 91 73 20 76  61 6c 69 64 61 74 69 6f  |icon.s validatio|
00000ca0  6e 0a 73 74 72 69 6e 67  2c 20 69 66 20 61 6e 79  |n.string, if any|
00000cb0  2c 20 6c 6f 6f 6b 69 6e  67 20 66 6f 72 20 74 68  |, looking for th|
00000cc0  65 20 90 50 91 20 69 6e  73 74 72 75 63 74 69 6f  |e .P. instructio|
00000cd0  6e 2c 20 77 68 69 63 68  20 73 65 74 73 20 61 6e  |n, which sets an|
00000ce0  20 61 6c 74 65 72 6e 61  74 69 76 65 0a 70 6f 69  | alternative.poi|
00000cf0  6e 74 65 72 20 73 70 72  69 74 65 20 77 68 65 6e  |nter sprite when|
00000d00  20 6f 76 65 72 20 74 68  65 20 69 63 6f 6e 2c 20  | over the icon, |
00000d10  61 6e 64 20 72 65 73 74  6f 72 65 20 74 68 65 20  |and restore the |
00000d20  70 6f 69 6e 74 65 72 20  74 6f 20 74 68 69 73 20  |pointer to this |
00000d30  73 70 72 69 74 65 0a 61  66 74 65 72 20 66 69 72  |sprite.after fir|
00000d40  73 74 20 63 68 65 63 6b  69 6e 67 20 69 74 73 20  |st checking its |
00000d50  70 72 65 73 65 6e 63 65  20 69 6e 20 74 68 65 20  |presence in the |
00000d60  57 69 6d 70 20 73 70 72  69 74 65 20 70 6f 6f 6c  |Wimp sprite pool|
00000d70  2e 0a 0a 54 68 65 20 6d  6f 64 75 6c 65 20 74 68  |...The module th|
00000d80  65 6e 20 73 65 74 73 20  61 20 63 61 6c 6c 2d 61  |en sets a call-a|
00000d90  66 74 65 72 2c 20 77 68  69 63 68 20 69 73 20 61  |fter, which is a|
00000da0  6e 20 69 6e 73 74 72 75  63 74 69 6f 6e 20 74 6f  |n instruction to|
00000db0  20 52 49 53 43 20 4f 53  20 74 6f 0a 63 61 6c 6c  | RISC OS to.call|
00000dc0  20 61 20 72 6f 75 74 69  6e 65 20 61 66 74 65 72  | a routine after|
00000dd0  20 61 20 63 65 72 74 61  69 6e 20 6c 65 6e 67 74  | a certain lengt|
00000de0  68 20 6f 66 20 74 69 6d  65 2e 20 49 74 20 61 6c  |h of time. It al|
00000df0  73 6f 20 63 61 6c 6c 73  20 4f 53 5f 43 61 6c 6c  |so calls OS_Call|
00000e00  45 76 65 72 79 20 74 6f  0a 61 72 72 61 6e 67 65  |Every to.arrange|
00000e10  20 66 6f 72 20 61 20 63  61 6c 6c 20 65 76 65 72  | for a call ever|
00000e20  79 20 31 30 20 63 65 6e  74 69 73 65 63 6f 6e 64  |y 10 centisecond|
00000e30  73 20 74 6f 20 61 20 72  6f 75 74 69 6e 65 20 77  |s to a routine w|
00000e40  68 69 63 68 20 63 68 65  63 6b 73 20 74 68 65 20  |hich checks the |
00000e50  6d 6f 75 73 65 0a 70 6f  73 69 74 69 6f 6e 20 61  |mouse.position a|
00000e60  6e 64 20 63 61 6e 63 65  6c 73 20 74 68 65 20 64  |nd cancels the d|
00000e70  6f 75 62 6c 65 2d 63 6c  69 63 6b 20 6d 6f 6e 69  |ouble-click moni|
00000e80  74 6f 72 69 6e 67 20 69  66 20 74 68 65 20 6d 6f  |toring if the mo|
00000e90  75 73 65 20 69 73 20 6d  6f 76 65 64 20 6d 6f 72  |use is moved mor|
00000ea0  65 0a 74 68 61 6e 20 61  20 63 65 72 74 61 69 6e  |e.than a certain|
00000eb0  20 61 6d 6f 75 6e 74 2e  0a 0a 4e 2e 42 2e 20 41  | amount...N.B. A|
00000ec0  6c 74 68 6f 75 67 68 20  74 68 65 20 6e 6f 72 6d  |lthough the norm|
00000ed0  61 6c 20 64 6f 75 62 6c  65 2d 63 6c 69 63 6b 20  |al double-click |
00000ee0  74 69 6d 65 20 6c 69 6d  69 74 20 61 6e 64 20 70  |time limit and p|
00000ef0  65 72 6d 69 74 74 65 64  20 6d 6f 75 73 65 0a 6d  |ermitted mouse.m|
00000f00  6f 76 65 6d 65 6e 74 20  63 61 6e 20 62 65 20 63  |ovement can be c|
00000f10  6f 6e 66 69 67 75 72 65  64 2c 20 74 68 65 72 65  |onfigured, there|
00000f20  20 61 70 70 65 61 72 73  20 74 6f 20 62 65 20 6e  | appears to be n|
00000f30  6f 20 77 61 79 20 6f 66  20 72 65 61 64 69 6e 67  |o way of reading|
00000f40  20 74 68 65 69 72 0a 76  61 6c 75 65 73 2c 20 6f  | their.values, o|
00000f50  74 68 65 72 20 74 68 61  6e 20 74 68 65 20 75 6e  |ther than the un|
00000f60  72 65 6c 69 61 62 6c 65  20 6d 65 74 68 6f 64 20  |reliable method |
00000f70  6f 66 20 63 68 65 63 6b  69 6e 67 20 43 4d 4f 53  |of checking CMOS|
00000f80  20 52 41 4d 20 6c 6f 63  61 74 69 6f 6e 73 2c 0a  | RAM locations,.|
00000f90  77 68 69 63 68 20 63 6f  75 6c 64 20 63 68 61 6e  |which could chan|
00000fa0  67 65 20 62 65 74 77 65  65 6e 20 64 69 66 66 65  |ge between diffe|
00000fb0  72 65 6e 74 20 76 65 72  73 69 6f 6e 73 20 6f 66  |rent versions of|
00000fc0  20 52 49 53 43 20 4f 53  2e 20 54 68 69 73 20 6d  | RISC OS. This m|
00000fd0  6f 64 75 6c 65 20 75 73  65 73 0a 74 68 65 20 64  |odule uses.the d|
00000fe0  65 66 61 75 6c 74 20 63  6f 6e 66 69 67 75 72 61  |efault configura|
00000ff0  74 69 6f 6e 20 76 61 6c  75 65 73 20 6f 66 20 31  |tion values of 1|
00001000  20 73 65 63 6f 6e 64 20  6d 61 78 69 6d 75 6d 20  | second maximum |
00001010  62 65 74 77 65 65 6e 20  63 6c 69 63 6b 73 20 61  |between clicks a|
00001020  6e 64 20 61 0a 6d 61 78  69 6d 75 6d 20 6d 6f 75  |nd a.maximum mou|
00001030  73 65 20 6d 6f 76 65 6d  65 6e 74 20 6f 66 20 31  |se movement of 1|
00001040  30 20 4f 53 20 75 6e 69  74 73 20 28 69 74 20 63  |0 OS units (it c|
00001050  68 65 63 6b 73 20 66 6f  72 20 65 69 74 68 65 72  |hecks for either|
00001060  20 31 30 20 68 6f 72 69  7a 6f 6e 74 61 6c 20 6f  | 10 horizontal o|
00001070  72 0a 31 30 20 76 65 72  74 69 63 61 6c 20 75 6e  |r.10 vertical un|
00001080  69 74 73 20 6f 66 20 6d  6f 76 65 6d 65 6e 74 29  |its of movement)|
00001090  2e 20 54 68 65 73 65 20  76 61 6c 75 65 73 20 61  |. These values a|
000010a0  72 65 20 66 69 78 65 64  20 69 6e 20 74 68 69 73  |re fixed in this|
000010b0  20 76 65 72 73 69 6f 6e  20 6f 66 0a 74 68 65 20  | version of.the |
000010c0  6d 6f 64 75 6c 65 2e 20  49 66 20 74 68 65 72 65  |module. If there|
000010d0  20 69 73 20 61 20 64 65  6d 61 6e 64 20 66 6f 72  | is a demand for|
000010e0  20 74 68 65 20 61 62 69  6c 69 74 79 20 74 6f 20  | the ability to |
000010f0  61 6c 74 65 72 20 74 68  65 73 65 20 76 61 6c 75  |alter these valu|
00001100  65 73 2c 20 49 0a 77 69  6c 6c 20 65 6e 64 65 61  |es, I.will endea|
00001110  76 6f 75 72 20 74 6f 20  69 6e 63 6c 75 64 65 20  |vour to include |
00001120  61 20 63 6f 75 70 6c 65  20 6f 66 20 53 57 49 73  |a couple of SWIs|
00001130  20 61 6e 64 2f 6f 72 20  73 74 61 72 20 63 6f 6d  | and/or star com|
00001140  6d 61 6e 64 73 20 69 6e  20 61 20 6c 61 74 65 72  |mands in a later|
00001150  0a 76 65 72 73 69 6f 6e  2e 0a 0a 49 66 20 65 69  |.version...If ei|
00001160  74 68 65 72 20 61 20 73  65 63 6f 6e 64 20 62 75  |ther a second bu|
00001170  74 74 6f 6e 20 69 73 20  70 72 65 73 73 65 64 20  |tton is pressed |
00001180  6f 72 20 74 68 65 20 6d  6f 75 73 65 20 69 73 20  |or the mouse is |
00001190  6d 6f 76 65 64 20 62 65  66 6f 72 65 20 74 68 65  |moved before the|
000011a0  0a 63 61 6c 6c 2d 61 66  74 65 72 20 68 61 73 20  |.call-after has |
000011b0  74 69 6d 65 64 20 6f 75  74 2c 20 74 68 65 20 63  |timed out, the c|
000011c0  61 6c 6c 2d 61 66 74 65  72 20 61 6e 64 20 63 61  |all-after and ca|
000011d0  6c 6c 2d 65 76 65 72 79  20 61 72 65 20 63 61 6e  |ll-every are can|
000011e0  63 65 6c 6c 65 64 20 61  6e 64 20 61 0a 73 65 63  |celled and a.sec|
000011f0  6f 6e 64 20 63 61 6c 6c  62 61 63 6b 20 69 73 20  |ond callback is |
00001200  75 73 65 64 2e 20 54 68  69 73 20 72 6f 75 74 69  |used. This routi|
00001210  6e 65 20 63 68 65 63 6b  73 20 74 68 61 74 20 74  |ne checks that t|
00001220  68 65 20 73 61 6d 65 20  62 75 74 74 6f 6e 20 68  |he same button h|
00001230  61 73 20 62 65 65 6e 0a  70 72 65 73 73 65 64 20  |as been.pressed |
00001240  61 73 20 70 72 65 76 69  6f 75 73 6c 79 2c 20 73  |as previously, s|
00001250  65 74 73 20 61 20 66 6c  61 67 20 61 6e 64 20 74  |ets a flag and t|
00001260  61 6b 65 73 20 73 74 65  70 73 20 74 6f 20 69 6e  |akes steps to in|
00001270  76 65 72 74 20 74 68 65  20 69 63 6f 6e 2e 0a 0a  |vert the icon...|
00001280  41 6c 74 68 6f 75 67 68  20 61 6e 79 20 69 63 6f  |Although any ico|
00001290  6e 20 63 61 6e 20 62 65  20 69 6e 76 65 72 74 65  |n can be inverte|
000012a0  64 20 6f 72 20 64 65 2d  69 6e 76 65 72 74 65 64  |d or de-inverted|
000012b0  20 62 79 20 6d 65 61 6e  73 20 6f 66 20 61 20 63  | by means of a c|
000012c0  61 6c 6c 20 74 6f 0a 57  69 6d 70 5f 53 65 74 49  |all to.Wimp_SetI|
000012d0  63 6f 6e 53 74 61 74 65  2c 20 74 68 65 20 70 72  |conState, the pr|
000012e0  6f 63 65 64 75 72 65 20  69 73 20 6e 6f 74 20 74  |ocedure is not t|
000012f0  68 61 74 20 73 69 6d 70  6c 65 2e 20 54 68 69 73  |hat simple. This|
00001300  20 53 57 49 20 6d 61 79  20 6f 6e 6c 79 20 62 65  | SWI may only be|
00001310  0a 63 61 6c 6c 65 64 20  77 68 69 6c 65 20 74 68  |.called while th|
00001320  65 20 61 70 70 6c 69 63  61 74 69 6f 6e 20 77 68  |e application wh|
00001330  69 63 68 20 6f 77 6e 73  20 74 68 65 20 69 63 6f  |ich owns the ico|
00001340  6e 20 69 73 20 74 68 65  20 63 75 72 72 65 6e 74  |n is the current|
00001350  6c 79 20 61 63 74 69 76  65 0a 74 61 73 6b 2e 20  |ly active.task. |
00001360  49 66 20 77 65 20 73 69  6d 70 6c 79 20 63 61 6c  |If we simply cal|
00001370  6c 20 69 74 20 77 68 65  6e 20 74 68 65 20 6d 6f  |l it when the mo|
00001380  75 73 65 20 69 73 20 63  6c 69 63 6b 65 64 2c 20  |use is clicked, |
00001390  74 68 69 73 20 6d 61 79  20 6e 6f 74 20 62 65 20  |this may not be |
000013a0  74 68 65 0a 63 61 73 65  2c 20 65 73 70 65 63 69  |the.case, especi|
000013b0  61 6c 6c 79 20 69 66 20  73 65 76 65 72 61 6c 20  |ally if several |
000013c0  6d 75 6c 74 69 2d 74 61  73 6b 69 6e 67 20 61 70  |multi-tasking ap|
000013d0  70 6c 69 63 61 74 69 6f  6e 73 20 61 72 65 20 72  |plications are r|
000013e0  75 6e 6e 69 6e 67 20 61  74 20 74 68 65 0a 73 61  |unning at the.sa|
000013f0  6d 65 20 74 69 6d 65 2e  20 57 65 20 68 61 76 65  |me time. We have|
00001400  20 74 6f 20 73 65 6e 64  20 61 20 6d 65 73 73 61  | to send a messa|
00001410  67 65 20 74 6f 20 74 68  65 20 74 61 73 6b 20 62  |ge to the task b|
00001420  75 74 20 77 65 20 63 61  6e 6e 6f 74 2c 20 6f 66  |ut we cannot, of|
00001430  20 63 6f 75 72 73 65 2c  0a 72 65 77 72 69 74 65  | course,.rewrite|
00001440  20 69 74 73 20 73 6f 66  74 77 61 72 65 2e 0a 0a  | its software...|
00001450  54 68 65 20 73 6f 6c 75  74 69 6f 6e 20 69 73 20  |The solution is |
00001460  74 6f 20 75 73 65 20 61  20 66 69 6c 74 65 72 2e  |to use a filter.|
00001470  20 57 65 20 63 6f 75 6c  64 20 75 73 65 20 61 20  | We could use a |
00001480  70 72 65 2d 66 69 6c 74  65 72 2c 20 77 68 69 63  |pre-filter, whic|
00001490  68 20 69 73 20 63 61 6c  6c 65 64 0a 6a 75 73 74  |h is called.just|
000014a0  20 62 65 66 6f 72 65 20  57 69 6d 70 5f 50 6f 6c  | before Wimp_Pol|
000014b0  6c 20 69 73 20 65 78 65  63 75 74 65 64 2c 20 6f  |l is executed, o|
000014c0  72 20 61 20 70 6f 73 74  2d 66 69 6c 74 65 72 20  |r a post-filter |
000014d0  77 68 69 63 68 20 69 73  20 63 61 6c 6c 65 64 20  |which is called |
000014e0  6f 6e 0a 72 65 74 75 72  6e 20 66 72 6f 6d 20 57  |on.return from W|
000014f0  69 6d 70 5f 50 6f 6c 6c  2e 20 49 6e 20 74 68 69  |imp_Poll. In thi|
00001500  73 20 63 61 73 65 2c 20  77 65 20 75 73 65 20 74  |s case, we use t|
00001510  68 65 20 6c 61 74 74 65  72 2e 20 54 68 65 20 74  |he latter. The t|
00001520  65 63 68 6e 69 71 75 65  20 69 73 20 74 6f 0a 73  |echnique is to.s|
00001530  65 6e 64 20 61 20 75 6e  69 71 75 65 20 6d 65 73  |end a unique mes|
00001540  73 61 67 65 20 74 6f 20  74 68 65 20 74 61 73 6b  |sage to the task|
00001550  20 77 68 69 63 68 20 6f  75 72 20 66 69 6c 74 65  | which our filte|
00001560  72 20 77 69 6c 6c 20 69  6e 74 65 72 63 65 70 74  |r will intercept|
00001570  20 61 6e 64 0a 72 65 63  6f 67 6e 69 73 65 2c 20  | and.recognise, |
00001580  74 65 6c 6c 69 6e 67 20  69 74 20 74 6f 20 69 6e  |telling it to in|
00001590  76 65 72 74 20 6f 72 20  64 65 2d 69 6e 76 65 72  |vert or de-inver|
000015a0  74 20 74 68 65 20 72 65  71 75 69 72 65 64 20 69  |t the required i|
000015b0  63 6f 6e 2e 20 56 65 72  73 69 6f 6e 0a 76 31 2e  |con. Version.v1.|
000015c0  31 30 20 61 6c 73 6f 20  75 73 65 73 20 74 68 65  |10 also uses the|
000015d0  20 66 69 6c 74 65 72 20  74 6f 20 63 68 65 63 6b  | filter to check|
000015e0  20 74 68 65 20 69 63 6f  6e 91 73 20 76 61 6c 69  | the icon.s vali|
000015f0  64 61 74 69 6f 6e 20 73  74 72 69 6e 67 20 74 6f  |dation string to|
00001600  20 67 65 74 20 74 68 65  0a 70 6f 69 6e 74 65 72  | get the.pointer|
00001610  20 73 70 72 69 74 65 20  6e 61 6d 65 2e 0a 0a 57  | sprite name...W|
00001620  65 20 63 6f 75 6c 64 20  73 65 6e 64 20 61 20 6d  |e could send a m|
00001630  65 73 73 61 67 65 2c 20  75 73 69 6e 67 20 72 65  |essage, using re|
00001640  61 73 6f 6e 20 63 6f 64  65 20 31 37 20 6f 72 20  |ason code 17 or |
00001650  31 38 2c 20 62 75 74 20  77 65 20 77 6f 75 6c 64  |18, but we would|
00001660  20 68 61 76 65 20 74 6f  0a 66 69 6e 64 20 61 20  | have to.find a |
00001670  6d 65 73 73 61 67 65 20  61 63 74 69 6f 6e 20 63  |message action c|
00001680  6f 64 65 20 74 68 61 74  20 69 73 20 6e 6f 74 20  |ode that is not |
00001690  75 73 65 64 20 66 6f 72  20 61 6e 79 74 68 69 6e  |used for anythin|
000016a0  67 20 65 6c 73 65 2c 20  77 68 69 63 68 20 77 6f  |g else, which wo|
000016b0  75 6c 64 0a 70 72 65 73  65 6e 74 20 70 72 6f 62  |uld.present prob|
000016c0  6c 65 6d 73 2e 20 49 74  20 69 73 20 61 6c 73 6f  |lems. It is also|
000016d0  20 70 65 72 6d 69 73 73  69 62 6c 65 20 66 6f 72  | permissible for|
000016e0  20 61 20 74 61 73 6b 20  74 6f 20 6d 61 73 6b 20  | a task to mask |
000016f0  6f 75 74 20 74 68 65 73  65 20 72 65 61 73 6f 6e  |out these reason|
00001700  0a 63 6f 64 65 73 2c 20  77 68 69 63 68 20 77 6f  |.codes, which wo|
00001710  75 6c 64 20 70 72 65 76  65 6e 74 20 6f 75 72 20  |uld prevent our |
00001720  6d 65 73 73 61 67 65 20  67 65 74 74 69 6e 67 20  |message getting |
00001730  74 68 72 6f 75 67 68 2e  20 53 6f 20 74 68 61 74  |through. So that|
00001740  20 74 68 69 73 20 63 61  6e 6e 6f 74 0a 68 61 70  | this cannot.hap|
00001750  70 65 6e 2c 20 74 68 65  20 6d 6f 64 75 6c 65 20  |pen, the module |
00001760  73 65 6e 64 73 20 61 20  6d 65 73 73 61 67 65 20  |sends a message |
00001770  77 69 74 68 20 72 65 61  73 6f 6e 20 63 6f 64 65  |with reason code|
00001780  20 32 2c 20 77 68 69 63  68 20 75 73 75 61 6c 6c  | 2, which usuall|
00001790  79 20 6d 65 61 6e 73 0a  27 6f 70 65 6e 20 77 69  |y means.'open wi|
000017a0  6e 64 6f 77 20 72 65 71  75 65 73 74 27 2e 20 54  |ndow request'. T|
000017b0  68 69 73 20 72 65 61 73  6f 6e 20 63 6f 64 65 20  |his reason code |
000017c0  69 73 20 6e 6f 74 20 73  75 70 70 6f 73 65 64 20  |is not supposed |
000017d0  74 6f 20 62 65 20 6d 61  73 6b 65 64 20 6f 75 74  |to be masked out|
000017e0  0a 77 68 65 6e 20 63 61  6c 6c 69 6e 67 20 57 69  |.when calling Wi|
000017f0  6d 70 5f 50 6f 6c 6c 2e  20 4f 75 72 20 6d 65 73  |mp_Poll. Our mes|
00001800  73 61 67 65 20 73 65 6e  64 73 20 52 31 2b 30 20  |sage sends R1+0 |
00001810  61 73 20 7a 65 72 6f 20  61 6e 64 20 52 31 2b 34  |as zero and R1+4|
00001820  20 61 73 0a 26 37 32 36  43 34 33 34 39 2c 20 77  | as.&726C4349, w|
00001830  68 69 63 68 20 69 73 20  74 68 65 20 41 53 43 49  |hich is the ASCI|
00001840  49 20 63 6f 64 65 20 66  6f 72 20 27 49 43 6c 72  |I code for 'IClr|
00001850  27 2e 20 54 68 69 73 20  63 6f 72 72 65 73 70 6f  |'. This correspo|
00001860  6e 64 73 20 74 6f 20 61  20 72 65 71 75 65 73 74  |nds to a request|
00001870  0a 74 6f 20 6f 70 65 6e  20 74 68 65 20 77 69 6e  |.to open the win|
00001880  64 6f 77 20 77 68 6f 73  65 20 68 61 6e 64 6c 65  |dow whose handle|
00001890  20 69 73 20 7a 65 72 6f  2c 20 77 69 74 68 20 61  | is zero, with a|
000018a0  20 6d 69 6e 69 6d 75 6d  20 78 20 63 6f 6f 72 64  | minimum x coord|
000018b0  69 6e 61 74 65 20 6f 66  0a 26 37 32 36 43 34 33  |inate of.&726C43|
000018c0  34 39 20 2d 20 61 20 6d  6f 73 74 20 75 6e 6c 69  |49 - a most unli|
000018d0  6b 65 6c 79 20 73 74 61  74 65 20 6f 66 20 61 66  |kely state of af|
000018e0  66 61 69 72 73 20 69 6e  20 61 6e 79 20 6f 74 68  |fairs in any oth|
000018f0  65 72 20 73 69 74 75 61  74 69 6f 6e 21 20 54 68  |er situation! Th|
00001900  65 0a 74 68 69 72 64 20  77 6f 72 64 20 69 6e 20  |e.third word in |
00001910  74 68 65 20 62 6c 6f 63  6b 20 63 6f 6e 74 61 69  |the block contai|
00001920  6e 73 20 74 68 65 20 61  63 74 69 6f 6e 20 63 6f  |ns the action co|
00001930  64 65 20 66 6f 72 20 74  68 65 20 63 61 6c 6c 2e  |de for the call.|
00001940  20 42 69 74 20 31 20 73  65 74 0a 64 65 6e 6f 74  | Bit 1 set.denot|
00001950  65 73 20 74 68 61 74 20  74 68 65 20 63 61 6c 6c  |es that the call|
00001960  20 69 73 20 74 6f 20 69  6e 76 65 72 74 20 6f 72  | is to invert or|
00001970  20 63 6c 65 61 72 20 74  68 65 20 69 63 6f 6e 20  | clear the icon |
00001980  2d 20 62 69 74 20 30 20  69 73 20 63 6c 65 61 72  |- bit 0 is clear|
00001990  65 64 20 74 6f 0a 63 6c  65 61 72 2c 20 73 65 74  |ed to.clear, set|
000019a0  20 74 6f 20 69 6e 76 65  72 74 2e 20 42 69 74 20  | to invert. Bit |
000019b0  32 20 69 73 20 73 65 74  20 74 6f 20 63 61 6c 6c  |2 is set to call|
000019c0  20 74 68 65 20 72 6f 75  74 69 6e 65 20 74 6f 20  | the routine to |
000019d0  72 65 61 64 20 74 68 65  0a 76 61 6c 69 64 61 74  |read the.validat|
000019e0  69 6f 6e 20 73 74 72 69  6e 67 2e 0a 0a 49 66 20  |ion string...If |
000019f0  61 20 6b 65 79 20 69 73  20 70 72 65 73 73 65 64  |a key is pressed|
00001a00  20 77 68 69 6c 65 20 74  68 65 20 69 6e 76 65 72  | while the inver|
00001a10  74 65 64 20 69 63 6f 6e  20 66 6c 61 67 20 69 73  |ted icon flag is|
00001a20  20 73 65 74 2c 20 74 68  65 20 72 6f 75 74 69 6e  | set, the routin|
00001a30  65 20 28 61 67 61 69 6e  0a 62 79 20 6d 65 61 6e  |e (again.by mean|
00001a40  73 20 6f 66 20 61 20 63  61 6c 6c 62 61 63 6b 29  |s of a callback)|
00001a50  20 73 65 6e 64 73 20 61  20 6d 65 73 73 61 67 65  | sends a message|
00001a60  20 74 6f 20 63 6c 65 61  72 20 74 68 65 20 69 63  | to clear the ic|
00001a70  6f 6e 2c 20 74 68 65 6e  20 73 65 6e 64 73 20 74  |on, then sends t|
00001a80  68 65 0a 6b 65 79 70 72  65 73 73 20 63 68 61 72  |he.keypress char|
00001a90  61 63 74 65 72 2c 20 70  72 65 63 65 64 65 64 20  |acter, preceded |
00001aa0  62 79 20 61 20 43 74 72  6c 2d 55 20 74 6f 20 64  |by a Ctrl-U to d|
00001ab0  65 6c 65 74 65 20 74 68  65 20 74 65 78 74 2e 0a  |elete the text..|
00001ac0  0a 54 68 65 20 6d 6f 64  75 6c 65 20 69 6e 63 6f  |.The module inco|
00001ad0  72 70 6f 72 61 74 65 73  20 61 20 73 65 6c 66 2d  |rporates a self-|
00001ae0  63 68 65 63 6b 69 6e 67  20 72 6f 75 74 69 6e 65  |checking routine|
00001af0  20 74 6f 20 64 65 74 65  63 74 20 63 6f 72 72 75  | to detect corru|
00001b00  70 74 69 6f 6e 20 62 79  0a 76 69 72 75 73 65 73  |ption by.viruses|
00001b10  2e 0a 0a 53 74 72 6f 6e  67 41 52 4d 20 63 6f 6d  |...StrongARM com|
00001b20  70 61 74 69 62 69 6c 69  74 79 0a 0a 54 68 65 20  |patibility..The |
00001b30  45 6e 67 69 6e 65 65 72  69 6e 67 20 53 75 70 70  |Engineering Supp|
00001b40  6f 72 74 20 41 70 70 6c  69 63 61 74 69 6f 6e 20  |ort Application |
00001b50  4e 6f 74 65 20 64 69 73  74 72 69 62 75 74 65 64  |Note distributed|
00001b60  20 62 79 20 41 63 6f 72  6e 20 77 69 74 68 20 74  | by Acorn with t|
00001b70  68 65 0a 53 74 72 6f 6e  67 41 52 4d 20 70 72 6f  |he.StrongARM pro|
00001b80  63 65 73 73 6f 72 20 73  74 61 74 65 73 20 74 68  |cessor states th|
00001b90  61 74 20 73 74 6f 72 69  6e 67 20 74 68 65 20 70  |at storing the p|
00001ba0  72 6f 67 72 61 6d 20 63  6f 75 6e 74 65 72 20 74  |rogram counter t|
00001bb0  6f 20 6d 65 6d 6f 72 79  20 73 74 6f 72 65 73 0a  |o memory stores.|
00001bc0  50 43 2b 38 20 69 6e 73  74 65 61 64 20 6f 66 20  |PC+8 instead of |
00001bd0  50 43 2b 31 32 2c 20 61  73 20 69 6e 20 74 68 65  |PC+12, as in the|
00001be0  20 63 61 73 65 20 6f 66  20 74 68 65 20 41 52 4d  | case of the ARM|
00001bf0  2c 20 61 6e 64 20 70 6f  69 6e 74 73 20 6f 75 74  |, and points out|
00001c00  20 74 68 61 74 20 74 68  65 0a 65 78 61 6d 70 6c  | that the.exampl|
00001c10  65 20 63 6f 64 65 20 6f  6e 20 70 61 67 65 20 31  |e code on page 1|
00001c20  2d 31 30 37 20 6f 66 20  74 68 65 20 50 52 4d 20  |-107 of the PRM |
00001c30  77 69 6c 6c 20 6e 6f 74  20 77 6f 72 6b 20 66 6f  |will not work fo|
00001c40  72 20 74 68 69 73 20 72  65 61 73 6f 6e 2e 0a 55  |r this reason..U|
00001c50  6e 66 6f 72 74 75 6e 61  74 65 6c 79 2c 20 74 68  |nfortunately, th|
00001c60  69 73 20 63 6f 64 65 20  68 61 64 20 62 65 65 6e  |is code had been|
00001c70  20 75 73 65 64 20 62 79  20 76 65 72 73 69 6f 6e  | used by version|
00001c80  73 20 6f 66 20 49 43 6c  65 61 72 20 75 70 20 74  |s of IClear up t|
00001c90  6f 20 76 31 2e 31 30 2c  0a 77 69 74 68 20 74 68  |o v1.10,.with th|
00001ca0  65 20 72 65 73 75 6c 74  20 74 68 61 74 20 6c 6f  |e result that lo|
00001cb0  61 64 69 6e 67 20 74 68  65 20 6d 6f 64 75 6c 65  |ading the module|
00001cc0  20 63 61 75 73 65 64 20  74 68 65 20 6d 61 63 68  | caused the mach|
00001cd0  69 6e 65 20 74 6f 20 63  72 61 73 68 2e 20 41 0a  |ine to crash. A.|
00001ce0  73 69 6d 70 6c 65 20 6d  6f 64 69 66 69 63 61 74  |simple modificat|
00001cf0  69 6f 6e 20 74 6f 20 61  20 66 65 77 20 6c 69 6e  |ion to a few lin|
00001d00  65 73 20 6f 66 20 63 6f  64 65 20 68 61 73 20 72  |es of code has r|
00001d10  65 73 74 6f 72 65 64 20  63 6f 6d 70 61 74 69 62  |estored compatib|
00001d20  69 6c 69 74 79 20 77 68  69 6c 65 0a 6d 61 69 6e  |ility while.main|
00001d30  74 61 69 6e 69 6e 67 20  62 61 63 6b 77 61 72 64  |taining backward|
00001d40  20 63 6f 6d 70 61 74 69  62 69 6c 69 74 79 20 77  | compatibility w|
00001d50  69 74 68 20 65 61 72 6c  69 65 72 20 41 52 4d 20  |ith earlier ARM |
00001d60  70 72 6f 63 65 73 73 6f  72 73 2e 0a 0a 49 6e 63  |processors...Inc|
00001d70  69 64 65 6e 74 61 6c 6c  79 2c 20 75 73 65 20 6f  |identally, use o|
00001d80  66 20 74 68 69 73 20 6d  6f 64 75 6c 65 20 72 65  |f this module re|
00001d90  76 65 61 6c 65 64 20 74  68 61 74 20 74 68 65 20  |vealed that the |
00001da0  63 6f 6e 66 69 67 75 72  61 74 69 6f 6e 20 64 69  |configuration di|
00001db0  61 6c 6f 67 75 65 0a 62  6f 78 20 6f 66 20 73 6f  |alogue.box of so|
00001dc0  66 74 77 61 72 65 20 50  43 20 45 6d 75 6c 61 74  |ftware PC Emulat|
00001dd0  6f 72 20 76 31 2e 37 30  20 63 6f 6e 74 61 69 6e  |or v1.70 contain|
00001de0  65 64 20 61 20 77 72 69  74 61 62 6c 65 20 69 63  |ed a writable ic|
00001df0  6f 6e 20 77 68 69 63 68  20 77 61 73 0a 63 72 65  |on which was.cre|
00001e00  61 74 65 64 20 69 6e 20  69 74 73 20 69 6e 76 65  |ated in its inve|
00001e10  72 74 65 64 20 73 74 61  74 65 2e 20 49 74 73 20  |rted state. Its |
00001e20  72 65 73 70 6f 6e 73 65  20 74 6f 20 61 20 64 6f  |response to a do|
00001e30  75 62 6c 65 2d 63 6c 69  63 6b 20 69 73 20 74 6f  |uble-click is to|
00001e40  20 72 65 6d 61 69 6e 0a  62 6c 61 63 6b 2d 6f 6e  | remain.black-on|
00001e50  2d 77 68 69 74 65 2e 20  41 20 73 75 62 73 65 71  |-white. A subseq|
00001e60  75 65 6e 74 20 73 69 6e  67 6c 65 20 63 6c 69 63  |uent single clic|
00001e70  6b 20 63 6c 65 61 72 73  20 69 74 20 74 6f 20 77  |k clears it to w|
00001e80  68 69 74 65 2d 6f 6e 2d  62 6c 61 63 6b 21 0a 0a  |hite-on-black!..|
00001e90  50 6c 65 61 73 65 20 73  65 6e 64 20 61 6c 6c 20  |Please send all |
00001ea0  63 6f 6d 6d 65 6e 74 73  20 61 6e 64 20 73 75 67  |comments and sug|
00001eb0  67 65 73 74 69 6f 6e 73  20 74 6f 3a 0a 0a 4d 2e  |gestions to:..M.|
00001ec0  50 2e 20 46 6f 78 2c 0a  33 31 20 50 69 65 72 73  |P. Fox,.31 Piers|
00001ed0  6f 6e 20 52 6f 61 64 2c  0a 57 69 6e 64 73 6f 72  |on Road,.Windsor|
00001ee0  2c 0a 42 65 72 6b 73 2e  20 53 4c 34 20 35 52 45  |,.Berks. SL4 5RE|
00001ef0