Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199604.adf » Features » StarInfo/Fletcher/AllWCD/Source`v1,

StarInfo/Fletcher/AllWCD/Source`v1,

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199604.adf » Features
Filename: StarInfo/Fletcher/AllWCD/Source`v1,
Read OK:
File size: 0DAD bytes
Load address: 0000
Exec address: 0000
File contents
App  AllWriteClickDrag
In   -
Out  AllWCD
Type Module
Ver  1.00d
Max  32k

Define Workspace
 Name      createiconblock
 Default   r1
 Prefix    ci_
  `window   !   Window handle
  `left     !   left of box
  `bottom   !   bottom of box
  `right    !   right of box
  `top      !   top of box
  `flags    !   icon flags
  `string   !   pointer to string
  `valid    !   pointer to validation
  `len      !   length of string
 Name      basiciconblock
 Default   r2
 Prefix    ib_
  `left     !   left of box
  `bottom   !   bottom of box
  `right    !   right of box
  `top      !   top of box
  `flags    !   icon flags
  `string   !   pointer to string
  `valid    !   pointer to validation
  `len      !   length of string
 Name      windowblock
 Default   r1
 Prefix    cw_
  `left     !   left of VWA
  `bottom   !   bottom of VWA
  `right    !   right of VWA
  `top      !   top of VWA
  `vwaleft  !   VWA in TWA left
  `vwatop   !   VWA in TWA top
  `position !   position in window stack
  `winflags !   window flags
  `cols1    !   first block of colours
  `cols2    !   second block of colours
  `twaleft  !   left of TWA
  `twabottom !   bottom of TWA
  `twaright !   right of TWA
  `tawtop   !   top of TWA
  `tbflags  !   title bar flags
  `tbbut    !   title bar button type
  `sprite   !   sprite area for window
  `reserved !   reserved ?
  `title    $12 title icon
  `numicons !   number of icons
  `icons    ^basiciconblock
End Workspace

DEFINE MODULE
 Name    AllWCD
 Help    All Write/Click/Drag
 Version 1.00
 Author  Justin Fletcher
 COMMANDS
  Name   AllWCD
  Help   ...
    The AllWCD module forces all writable icons to be of type 14
    (Write/Click/Drag) rather than type 15 (Write only). The main reason you
    may wish to do this is to force all applications to allow TextCopy to
    drag all writable icons around the desktop.|M
    For best effect, the module should have been loaded BEFORE the desktop
    has started.
 END COMMANDS
 WimpSWIs
   SWI     Wimp_CreateIcon
   Pre     createicon
   SWI     Wimp_CreateWindow
   Pre     createwindow
 End WimpSWIs
END MODULE

.createicon
   STMFD   (sp)!,{r0-r5,link}            ; Stack registers
   LDRW    r2,`ci_flags                  ; get the flags
   AND     r0,r2,#&F000                  ; leave just button type
   CMP     r0,#&F000                     ; is it type 15 ?
   LDMNEFD (sp)!,{r0-r5,pc}              ; Return from call if not
   BIC     r2,r2,#&1000                  ; clear bit 12 to leave type 14
   STRW    r2,`ci_flags                  ; store back in block
   LDMFD   (sp)!,{r0-r5,pc}              ; Return from call

.createwindow
   STMFD   (sp)!,{r0-r5,link}            ; Stack registers
   LDRW    r5,`cw_numicons               ; get the number of icons
   ADRW    r2,`cw_icons                  ; pointer to icon data
$loop
   CMP     r5,#0
   BLE     $exit
   LDRW    r3,`ib_flags                  ; get the flags
   AND     r0,r3,#&F000                  ; leave just button type
   CMP     r0,#&F000                     ; is it type 15 ?
   BNE     $next                         ; if not then go on to next icon
   BIC     r3,r3,#&1000                  ; clear bit 12 to leave type 14
   STRW    r3,`ib_flags                  ; store back in block
$next
   ADD     r2,r2,#`len_basiciconblock    ; increment position
   SUB     r5,r5,#1                      ; decrement number left
   B       $loop
$exit
   LDMFD   (sp)!,{r0-r5,pc}              ; Return from call

# POST
# RUN <CODE>
# END

00000000  41 70 70 20 20 41 6c 6c  57 72 69 74 65 43 6c 69  |App  AllWriteCli|
00000010  63 6b 44 72 61 67 0a 49  6e 20 20 20 2d 0a 4f 75  |ckDrag.In   -.Ou|
00000020  74 20 20 41 6c 6c 57 43  44 0a 54 79 70 65 20 4d  |t  AllWCD.Type M|
00000030  6f 64 75 6c 65 0a 56 65  72 20 20 31 2e 30 30 64  |odule.Ver  1.00d|
00000040  0a 4d 61 78 20 20 33 32  6b 0a 0a 44 65 66 69 6e  |.Max  32k..Defin|
00000050  65 20 57 6f 72 6b 73 70  61 63 65 0a 20 4e 61 6d  |e Workspace. Nam|
00000060  65 20 20 20 20 20 20 63  72 65 61 74 65 69 63 6f  |e      createico|
00000070  6e 62 6c 6f 63 6b 0a 20  44 65 66 61 75 6c 74 20  |nblock. Default |
00000080  20 20 72 31 0a 20 50 72  65 66 69 78 20 20 20 20  |  r1. Prefix    |
00000090  63 69 5f 0a 20 20 60 77  69 6e 64 6f 77 20 20 20  |ci_.  `window   |
000000a0  21 20 20 20 57 69 6e 64  6f 77 20 68 61 6e 64 6c  |!   Window handl|
000000b0  65 0a 20 20 60 6c 65 66  74 20 20 20 20 20 21 20  |e.  `left     ! |
000000c0  20 20 6c 65 66 74 20 6f  66 20 62 6f 78 0a 20 20  |  left of box.  |
000000d0  60 62 6f 74 74 6f 6d 20  20 20 21 20 20 20 62 6f  |`bottom   !   bo|
000000e0  74 74 6f 6d 20 6f 66 20  62 6f 78 0a 20 20 60 72  |ttom of box.  `r|
000000f0  69 67 68 74 20 20 20 20  21 20 20 20 72 69 67 68  |ight    !   righ|
00000100  74 20 6f 66 20 62 6f 78  0a 20 20 60 74 6f 70 20  |t of box.  `top |
00000110  20 20 20 20 20 21 20 20  20 74 6f 70 20 6f 66 20  |     !   top of |
00000120  62 6f 78 0a 20 20 60 66  6c 61 67 73 20 20 20 20  |box.  `flags    |
00000130  21 20 20 20 69 63 6f 6e  20 66 6c 61 67 73 0a 20  |!   icon flags. |
00000140  20 60 73 74 72 69 6e 67  20 20 20 21 20 20 20 70  | `string   !   p|
00000150  6f 69 6e 74 65 72 20 74  6f 20 73 74 72 69 6e 67  |ointer to string|
00000160  0a 20 20 60 76 61 6c 69  64 20 20 20 20 21 20 20  |.  `valid    !  |
00000170  20 70 6f 69 6e 74 65 72  20 74 6f 20 76 61 6c 69  | pointer to vali|
00000180  64 61 74 69 6f 6e 0a 20  20 60 6c 65 6e 20 20 20  |dation.  `len   |
00000190  20 20 20 21 20 20 20 6c  65 6e 67 74 68 20 6f 66  |   !   length of|
000001a0  20 73 74 72 69 6e 67 0a  20 4e 61 6d 65 20 20 20  | string. Name   |
000001b0  20 20 20 62 61 73 69 63  69 63 6f 6e 62 6c 6f 63  |   basiciconbloc|
000001c0  6b 0a 20 44 65 66 61 75  6c 74 20 20 20 72 32 0a  |k. Default   r2.|
000001d0  20 50 72 65 66 69 78 20  20 20 20 69 62 5f 0a 20  | Prefix    ib_. |
000001e0  20 60 6c 65 66 74 20 20  20 20 20 21 20 20 20 6c  | `left     !   l|
000001f0  65 66 74 20 6f 66 20 62  6f 78 0a 20 20 60 62 6f  |eft of box.  `bo|
00000200  74 74 6f 6d 20 20 20 21  20 20 20 62 6f 74 74 6f  |ttom   !   botto|
00000210  6d 20 6f 66 20 62 6f 78  0a 20 20 60 72 69 67 68  |m of box.  `righ|
00000220  74 20 20 20 20 21 20 20  20 72 69 67 68 74 20 6f  |t    !   right o|
00000230  66 20 62 6f 78 0a 20 20  60 74 6f 70 20 20 20 20  |f box.  `top    |
00000240  20 20 21 20 20 20 74 6f  70 20 6f 66 20 62 6f 78  |  !   top of box|
00000250  0a 20 20 60 66 6c 61 67  73 20 20 20 20 21 20 20  |.  `flags    !  |
00000260  20 69 63 6f 6e 20 66 6c  61 67 73 0a 20 20 60 73  | icon flags.  `s|
00000270  74 72 69 6e 67 20 20 20  21 20 20 20 70 6f 69 6e  |tring   !   poin|
00000280  74 65 72 20 74 6f 20 73  74 72 69 6e 67 0a 20 20  |ter to string.  |
00000290  60 76 61 6c 69 64 20 20  20 20 21 20 20 20 70 6f  |`valid    !   po|
000002a0  69 6e 74 65 72 20 74 6f  20 76 61 6c 69 64 61 74  |inter to validat|
000002b0  69 6f 6e 0a 20 20 60 6c  65 6e 20 20 20 20 20 20  |ion.  `len      |
000002c0  21 20 20 20 6c 65 6e 67  74 68 20 6f 66 20 73 74  |!   length of st|
000002d0  72 69 6e 67 0a 20 4e 61  6d 65 20 20 20 20 20 20  |ring. Name      |
000002e0  77 69 6e 64 6f 77 62 6c  6f 63 6b 0a 20 44 65 66  |windowblock. Def|
000002f0  61 75 6c 74 20 20 20 72  31 0a 20 50 72 65 66 69  |ault   r1. Prefi|
00000300  78 20 20 20 20 63 77 5f  0a 20 20 60 6c 65 66 74  |x    cw_.  `left|
00000310  20 20 20 20 20 21 20 20  20 6c 65 66 74 20 6f 66  |     !   left of|
00000320  20 56 57 41 0a 20 20 60  62 6f 74 74 6f 6d 20 20  | VWA.  `bottom  |
00000330  20 21 20 20 20 62 6f 74  74 6f 6d 20 6f 66 20 56  | !   bottom of V|
00000340  57 41 0a 20 20 60 72 69  67 68 74 20 20 20 20 21  |WA.  `right    !|
00000350  20 20 20 72 69 67 68 74  20 6f 66 20 56 57 41 0a  |   right of VWA.|
00000360  20 20 60 74 6f 70 20 20  20 20 20 20 21 20 20 20  |  `top      !   |
00000370  74 6f 70 20 6f 66 20 56  57 41 0a 20 20 60 76 77  |top of VWA.  `vw|
00000380  61 6c 65 66 74 20 20 21  20 20 20 56 57 41 20 69  |aleft  !   VWA i|
00000390  6e 20 54 57 41 20 6c 65  66 74 0a 20 20 60 76 77  |n TWA left.  `vw|
000003a0  61 74 6f 70 20 20 20 21  20 20 20 56 57 41 20 69  |atop   !   VWA i|
000003b0  6e 20 54 57 41 20 74 6f  70 0a 20 20 60 70 6f 73  |n TWA top.  `pos|
000003c0  69 74 69 6f 6e 20 21 20  20 20 70 6f 73 69 74 69  |ition !   positi|
000003d0  6f 6e 20 69 6e 20 77 69  6e 64 6f 77 20 73 74 61  |on in window sta|
000003e0  63 6b 0a 20 20 60 77 69  6e 66 6c 61 67 73 20 21  |ck.  `winflags !|
000003f0  20 20 20 77 69 6e 64 6f  77 20 66 6c 61 67 73 0a  |   window flags.|
00000400  20 20 60 63 6f 6c 73 31  20 20 20 20 21 20 20 20  |  `cols1    !   |
00000410  66 69 72 73 74 20 62 6c  6f 63 6b 20 6f 66 20 63  |first block of c|
00000420  6f 6c 6f 75 72 73 0a 20  20 60 63 6f 6c 73 32 20  |olours.  `cols2 |
00000430  20 20 20 21 20 20 20 73  65 63 6f 6e 64 20 62 6c  |   !   second bl|
00000440  6f 63 6b 20 6f 66 20 63  6f 6c 6f 75 72 73 0a 20  |ock of colours. |
00000450  20 60 74 77 61 6c 65 66  74 20 20 21 20 20 20 6c  | `twaleft  !   l|
00000460  65 66 74 20 6f 66 20 54  57 41 0a 20 20 60 74 77  |eft of TWA.  `tw|
00000470  61 62 6f 74 74 6f 6d 20  21 20 20 20 62 6f 74 74  |abottom !   bott|
00000480  6f 6d 20 6f 66 20 54 57  41 0a 20 20 60 74 77 61  |om of TWA.  `twa|
00000490  72 69 67 68 74 20 21 20  20 20 72 69 67 68 74 20  |right !   right |
000004a0  6f 66 20 54 57 41 0a 20  20 60 74 61 77 74 6f 70  |of TWA.  `tawtop|
000004b0  20 20 20 21 20 20 20 74  6f 70 20 6f 66 20 54 57  |   !   top of TW|
000004c0  41 0a 20 20 60 74 62 66  6c 61 67 73 20 20 21 20  |A.  `tbflags  ! |
000004d0  20 20 74 69 74 6c 65 20  62 61 72 20 66 6c 61 67  |  title bar flag|
000004e0  73 0a 20 20 60 74 62 62  75 74 20 20 20 20 21 20  |s.  `tbbut    ! |
000004f0  20 20 74 69 74 6c 65 20  62 61 72 20 62 75 74 74  |  title bar butt|
00000500  6f 6e 20 74 79 70 65 0a  20 20 60 73 70 72 69 74  |on type.  `sprit|
00000510  65 20 20 20 21 20 20 20  73 70 72 69 74 65 20 61  |e   !   sprite a|
00000520  72 65 61 20 66 6f 72 20  77 69 6e 64 6f 77 0a 20  |rea for window. |
00000530  20 60 72 65 73 65 72 76  65 64 20 21 20 20 20 72  | `reserved !   r|
00000540  65 73 65 72 76 65 64 20  3f 0a 20 20 60 74 69 74  |eserved ?.  `tit|
00000550  6c 65 20 20 20 20 24 31  32 20 74 69 74 6c 65 20  |le    $12 title |
00000560  69 63 6f 6e 0a 20 20 60  6e 75 6d 69 63 6f 6e 73  |icon.  `numicons|
00000570  20 21 20 20 20 6e 75 6d  62 65 72 20 6f 66 20 69  | !   number of i|
00000580  63 6f 6e 73 0a 20 20 60  69 63 6f 6e 73 20 20 20  |cons.  `icons   |
00000590  20 5e 62 61 73 69 63 69  63 6f 6e 62 6c 6f 63 6b  | ^basiciconblock|
000005a0  0a 45 6e 64 20 57 6f 72  6b 73 70 61 63 65 0a 0a  |.End Workspace..|
000005b0  44 45 46 49 4e 45 20 4d  4f 44 55 4c 45 0a 20 4e  |DEFINE MODULE. N|
000005c0  61 6d 65 20 20 20 20 41  6c 6c 57 43 44 0a 20 48  |ame    AllWCD. H|
000005d0  65 6c 70 20 20 20 20 41  6c 6c 20 57 72 69 74 65  |elp    All Write|
000005e0  2f 43 6c 69 63 6b 2f 44  72 61 67 0a 20 56 65 72  |/Click/Drag. Ver|
000005f0  73 69 6f 6e 20 31 2e 30  30 0a 20 41 75 74 68 6f  |sion 1.00. Autho|
00000600  72 20 20 4a 75 73 74 69  6e 20 46 6c 65 74 63 68  |r  Justin Fletch|
00000610  65 72 0a 20 43 4f 4d 4d  41 4e 44 53 0a 20 20 4e  |er. COMMANDS.  N|
00000620  61 6d 65 20 20 20 41 6c  6c 57 43 44 0a 20 20 48  |ame   AllWCD.  H|
00000630  65 6c 70 20 20 20 2e 2e  2e 0a 20 20 20 20 54 68  |elp   ....    Th|
00000640  65 20 41 6c 6c 57 43 44  20 6d 6f 64 75 6c 65 20  |e AllWCD module |
00000650  66 6f 72 63 65 73 20 61  6c 6c 20 77 72 69 74 61  |forces all writa|
00000660  62 6c 65 20 69 63 6f 6e  73 20 74 6f 20 62 65 20  |ble icons to be |
00000670  6f 66 20 74 79 70 65 20  31 34 0a 20 20 20 20 28  |of type 14.    (|
00000680  57 72 69 74 65 2f 43 6c  69 63 6b 2f 44 72 61 67  |Write/Click/Drag|
00000690  29 20 72 61 74 68 65 72  20 74 68 61 6e 20 74 79  |) rather than ty|
000006a0  70 65 20 31 35 20 28 57  72 69 74 65 20 6f 6e 6c  |pe 15 (Write onl|
000006b0  79 29 2e 20 54 68 65 20  6d 61 69 6e 20 72 65 61  |y). The main rea|
000006c0  73 6f 6e 20 79 6f 75 0a  20 20 20 20 6d 61 79 20  |son you.    may |
000006d0  77 69 73 68 20 74 6f 20  64 6f 20 74 68 69 73 20  |wish to do this |
000006e0  69 73 20 74 6f 20 66 6f  72 63 65 20 61 6c 6c 20  |is to force all |
000006f0  61 70 70 6c 69 63 61 74  69 6f 6e 73 20 74 6f 20  |applications to |
00000700  61 6c 6c 6f 77 20 54 65  78 74 43 6f 70 79 20 74  |allow TextCopy t|
00000710  6f 0a 20 20 20 20 64 72  61 67 20 61 6c 6c 20 77  |o.    drag all w|
00000720  72 69 74 61 62 6c 65 20  69 63 6f 6e 73 20 61 72  |ritable icons ar|
00000730  6f 75 6e 64 20 74 68 65  20 64 65 73 6b 74 6f 70  |ound the desktop|
00000740  2e 7c 4d 0a 20 20 20 20  46 6f 72 20 62 65 73 74  |.|M.    For best|
00000750  20 65 66 66 65 63 74 2c  20 74 68 65 20 6d 6f 64  | effect, the mod|
00000760  75 6c 65 20 73 68 6f 75  6c 64 20 68 61 76 65 20  |ule should have |
00000770  62 65 65 6e 20 6c 6f 61  64 65 64 20 42 45 46 4f  |been loaded BEFO|
00000780  52 45 20 74 68 65 20 64  65 73 6b 74 6f 70 0a 20  |RE the desktop. |
00000790  20 20 20 68 61 73 20 73  74 61 72 74 65 64 2e 0a  |   has started..|
000007a0  20 45 4e 44 20 43 4f 4d  4d 41 4e 44 53 0a 20 57  | END COMMANDS. W|
000007b0  69 6d 70 53 57 49 73 0a  20 20 20 53 57 49 20 20  |impSWIs.   SWI  |
000007c0  20 20 20 57 69 6d 70 5f  43 72 65 61 74 65 49 63  |   Wimp_CreateIc|
000007d0  6f 6e 0a 20 20 20 50 72  65 20 20 20 20 20 63 72  |on.   Pre     cr|
000007e0  65 61 74 65 69 63 6f 6e  0a 20 20 20 53 57 49 20  |eateicon.   SWI |
000007f0  20 20 20 20 57 69 6d 70  5f 43 72 65 61 74 65 57  |    Wimp_CreateW|
00000800  69 6e 64 6f 77 0a 20 20  20 50 72 65 20 20 20 20  |indow.   Pre    |
00000810  20 63 72 65 61 74 65 77  69 6e 64 6f 77 0a 20 45  | createwindow. E|
00000820  6e 64 20 57 69 6d 70 53  57 49 73 0a 45 4e 44 20  |nd WimpSWIs.END |
00000830  4d 4f 44 55 4c 45 0a 0a  2e 63 72 65 61 74 65 69  |MODULE...createi|
00000840  63 6f 6e 0a 20 20 20 53  54 4d 46 44 20 20 20 28  |con.   STMFD   (|
00000850  73 70 29 21 2c 7b 72 30  2d 72 35 2c 6c 69 6e 6b  |sp)!,{r0-r5,link|
00000860  7d 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 53  |}            ; S|
00000870  74 61 63 6b 20 72 65 67  69 73 74 65 72 73 0a 20  |tack registers. |
00000880  20 20 4c 44 52 57 20 20  20 20 72 32 2c 60 63 69  |  LDRW    r2,`ci|
00000890  5f 66 6c 61 67 73 20 20  20 20 20 20 20 20 20 20  |_flags          |
000008a0  20 20 20 20 20 20 20 20  3b 20 67 65 74 20 74 68  |        ; get th|
000008b0  65 20 66 6c 61 67 73 0a  20 20 20 41 4e 44 20 20  |e flags.   AND  |
000008c0  20 20 20 72 30 2c 72 32  2c 23 26 46 30 30 30 20  |   r0,r2,#&F000 |
000008d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000008e0  20 3b 20 6c 65 61 76 65  20 6a 75 73 74 20 62 75  | ; leave just bu|
000008f0  74 74 6f 6e 20 74 79 70  65 0a 20 20 20 43 4d 50  |tton type.   CMP|
00000900  20 20 20 20 20 72 30 2c  23 26 46 30 30 30 20 20  |     r0,#&F000  |
00000910  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000920  20 20 20 3b 20 69 73 20  69 74 20 74 79 70 65 20  |   ; is it type |
00000930  31 35 20 3f 0a 20 20 20  4c 44 4d 4e 45 46 44 20  |15 ?.   LDMNEFD |
00000940  28 73 70 29 21 2c 7b 72  30 2d 72 35 2c 70 63 7d  |(sp)!,{r0-r5,pc}|
00000950  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00000960  52 65 74 75 72 6e 20 66  72 6f 6d 20 63 61 6c 6c  |Return from call|
00000970  20 69 66 20 6e 6f 74 0a  20 20 20 42 49 43 20 20  | if not.   BIC  |
00000980  20 20 20 72 32 2c 72 32  2c 23 26 31 30 30 30 20  |   r2,r2,#&1000 |
00000990  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000009a0  20 3b 20 63 6c 65 61 72  20 62 69 74 20 31 32 20  | ; clear bit 12 |
000009b0  74 6f 20 6c 65 61 76 65  20 74 79 70 65 20 31 34  |to leave type 14|
000009c0  0a 20 20 20 53 54 52 57  20 20 20 20 72 32 2c 60  |.   STRW    r2,`|
000009d0  63 69 5f 66 6c 61 67 73  20 20 20 20 20 20 20 20  |ci_flags        |
000009e0  20 20 20 20 20 20 20 20  20 20 3b 20 73 74 6f 72  |          ; stor|
000009f0  65 20 62 61 63 6b 20 69  6e 20 62 6c 6f 63 6b 0a  |e back in block.|
00000a00  20 20 20 4c 44 4d 46 44  20 20 20 28 73 70 29 21  |   LDMFD   (sp)!|
00000a10  2c 7b 72 30 2d 72 35 2c  70 63 7d 20 20 20 20 20  |,{r0-r5,pc}     |
00000a20  20 20 20 20 20 20 20 20  20 3b 20 52 65 74 75 72  |         ; Retur|
00000a30  6e 20 66 72 6f 6d 20 63  61 6c 6c 0a 0a 2e 63 72  |n from call...cr|
00000a40  65 61 74 65 77 69 6e 64  6f 77 0a 20 20 20 53 54  |eatewindow.   ST|
00000a50  4d 46 44 20 20 20 28 73  70 29 21 2c 7b 72 30 2d  |MFD   (sp)!,{r0-|
00000a60  72 35 2c 6c 69 6e 6b 7d  20 20 20 20 20 20 20 20  |r5,link}        |
00000a70  20 20 20 20 3b 20 53 74  61 63 6b 20 72 65 67 69  |    ; Stack regi|
00000a80  73 74 65 72 73 0a 20 20  20 4c 44 52 57 20 20 20  |sters.   LDRW   |
00000a90  20 72 35 2c 60 63 77 5f  6e 75 6d 69 63 6f 6e 73  | r5,`cw_numicons|
00000aa0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00000ab0  20 67 65 74 20 74 68 65  20 6e 75 6d 62 65 72 20  | get the number |
00000ac0  6f 66 20 69 63 6f 6e 73  0a 20 20 20 41 44 52 57  |of icons.   ADRW|
00000ad0  20 20 20 20 72 32 2c 60  63 77 5f 69 63 6f 6e 73  |    r2,`cw_icons|
00000ae0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000af0  20 20 3b 20 70 6f 69 6e  74 65 72 20 74 6f 20 69  |  ; pointer to i|
00000b00  63 6f 6e 20 64 61 74 61  0a 24 6c 6f 6f 70 0a 20  |con data.$loop. |
00000b10  20 20 43 4d 50 20 20 20  20 20 72 35 2c 23 30 0a  |  CMP     r5,#0.|
00000b20  20 20 20 42 4c 45 20 20  20 20 20 24 65 78 69 74  |   BLE     $exit|
00000b30  0a 20 20 20 4c 44 52 57  20 20 20 20 72 33 2c 60  |.   LDRW    r3,`|
00000b40  69 62 5f 66 6c 61 67 73  20 20 20 20 20 20 20 20  |ib_flags        |
00000b50  20 20 20 20 20 20 20 20  20 20 3b 20 67 65 74 20  |          ; get |
00000b60  74 68 65 20 66 6c 61 67  73 0a 20 20 20 41 4e 44  |the flags.   AND|
00000b70  20 20 20 20 20 72 30 2c  72 33 2c 23 26 46 30 30  |     r0,r3,#&F00|
00000b80  30 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0               |
00000b90  20 20 20 3b 20 6c 65 61  76 65 20 6a 75 73 74 20  |   ; leave just |
00000ba0  62 75 74 74 6f 6e 20 74  79 70 65 0a 20 20 20 43  |button type.   C|
00000bb0  4d 50 20 20 20 20 20 72  30 2c 23 26 46 30 30 30  |MP     r0,#&F000|
00000bc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000bd0  20 20 20 20 20 3b 20 69  73 20 69 74 20 74 79 70  |     ; is it typ|
00000be0  65 20 31 35 20 3f 0a 20  20 20 42 4e 45 20 20 20  |e 15 ?.   BNE   |
00000bf0  20 20 24 6e 65 78 74 20  20 20 20 20 20 20 20 20  |  $next         |
00000c00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000c10  3b 20 69 66 20 6e 6f 74  20 74 68 65 6e 20 67 6f  |; if not then go|
00000c20  20 6f 6e 20 74 6f 20 6e  65 78 74 20 69 63 6f 6e  | on to next icon|
00000c30  0a 20 20 20 42 49 43 20  20 20 20 20 72 33 2c 72  |.   BIC     r3,r|
00000c40  33 2c 23 26 31 30 30 30  20 20 20 20 20 20 20 20  |3,#&1000        |
00000c50  20 20 20 20 20 20 20 20  20 20 3b 20 63 6c 65 61  |          ; clea|
00000c60  72 20 62 69 74 20 31 32  20 74 6f 20 6c 65 61 76  |r bit 12 to leav|
00000c70  65 20 74 79 70 65 20 31  34 0a 20 20 20 53 54 52  |e type 14.   STR|
00000c80  57 20 20 20 20 72 33 2c  60 69 62 5f 66 6c 61 67  |W    r3,`ib_flag|
00000c90  73 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |s               |
00000ca0  20 20 20 3b 20 73 74 6f  72 65 20 62 61 63 6b 20  |   ; store back |
00000cb0  69 6e 20 62 6c 6f 63 6b  0a 24 6e 65 78 74 0a 20  |in block.$next. |
00000cc0  20 20 41 44 44 20 20 20  20 20 72 32 2c 72 32 2c  |  ADD     r2,r2,|
00000cd0  23 60 6c 65 6e 5f 62 61  73 69 63 69 63 6f 6e 62  |#`len_basiciconb|
00000ce0  6c 6f 63 6b 20 20 20 20  3b 20 69 6e 63 72 65 6d  |lock    ; increm|
00000cf0  65 6e 74 20 70 6f 73 69  74 69 6f 6e 0a 20 20 20  |ent position.   |
00000d00  53 55 42 20 20 20 20 20  72 35 2c 72 35 2c 23 31  |SUB     r5,r5,#1|
00000d10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000d20  20 20 20 20 20 20 3b 20  64 65 63 72 65 6d 65 6e  |      ; decremen|
00000d30  74 20 6e 75 6d 62 65 72  20 6c 65 66 74 0a 20 20  |t number left.  |
00000d40  20 42 20 20 20 20 20 20  20 24 6c 6f 6f 70 0a 24  | B       $loop.$|
00000d50  65 78 69 74 0a 20 20 20  4c 44 4d 46 44 20 20 20  |exit.   LDMFD   |
00000d60  28 73 70 29 21 2c 7b 72  30 2d 72 35 2c 70 63 7d  |(sp)!,{r0-r5,pc}|
00000d70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00000d80  52 65 74 75 72 6e 20 66  72 6f 6d 20 63 61 6c 6c  |Return from call|
00000d90  0a 0a 23 20 50 4f 53 54  0a 23 20 52 55 4e 20 3c  |..# POST.# RUN <|
00000da0  43 4f 44 45 3e 0a 23 20  45 4e 44 0a 0a           |CODE>.# END..|
00000dad