Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2 » StarInfo/Fletcher/ADFS/Source`1,0

StarInfo/Fletcher/ADFS/Source`1,0

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 » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2
Filename: StarInfo/Fletcher/ADFS/Source`1,0
Read OK:
File size: 1BFA bytes
Load address: 0000
Exec address: 0000
File contents
App  ADFSQuickSave
In   -
Out  ADFSQuickSave
Type Module
Ver  1.02v

Define Module
 Name      ADFSQuickSave
 Author    Justin Fletcher
 Commands
  Name     ADFSQuickSave
  Help     ...
           ADFSQuickSave allows you to drag unsaved files onto the ADFS
           Filer icon to save them in the directory named :|M
           ADFS::[drive]<QuickSave$Path>[file]|M
           So you should set QuickSave$Path to something like .$.temp.|M
           This is dedicated to Jonix, as he wanted it :-)|M
           Note: You will need to have clicked on the ADFS Filer before
           it will do anything.
 End Commands
 PostFilter
  Task     ADFS Filer
  Name     ADFSQuickSave
  Accept   MouseClick
  Accept   UserMessage
  Accept   UserMessageRecorded
  Code     filter
 End Filter
 Init      init
End Module

#REM Off
; *******************************************************************
; Subroutine:   init
; Description:  Initialise the module - set the flag marking us as
;               having not added message 1 to those we like
; Parameters:   none
; Returns:      none
; Note:         Yucky way of working, but I'm not intending to ROM
;               this module.
; *******************************************************************
.init
   STMFD   (sp)!,{r0-r5,link}            ; Stack registers
   MOV     r0,#0                         ; 0 the flag
   STR     r0,`added                     ; store in module
   LDMFD   (sp)!,{r0-r5,pc}              ; Return from call

; *******************************************************************
; Subroutine:   filter
; Description:  Wimp_Poll filtered off
; Parameters:   r0 = reason (17)
;               r1-> user block
; Returns:      r0 = -1 if it shouldn't be passed on
; *******************************************************************
.filter
   STMFD   (sp)!,{r0-r5,link}            ; Stack registers
   REM     "%c04%c30Our event"
   CMP     r0,#6                         ; is it a mouseclick ?
   BNE     $notmouse
   LDR     r1,`added                     ; get the flag
   CMP     r1,#0                         ; have we added it ?
   BNE     $exit                         ; if so, exit
   STR     r0,`added                     ; if not, store 6 in the block
   ADR     r0,$`messages                 ; get the message block
   SWI     "XWimp_AddMessages"           ; add them
   B       $exit                         ; and exit

$notmouse
   CMP     r0,#17                        ; is this a user message ?
   CMPNE   r0,#18                        ; is this a user message ?
   BNE     $exit                         ; if not, exit
   LDR     r0,[r1,#16]                   ; get messagenumber
   REM     "Message : %r0"
   CMP     r0,#1                         ; is this a DataSave ?
   BNE     $exit                         ; if not exit

   LDR     r2,[r1,#20]                   ; read the number of the window
   CMN     r2,#2                         ; is it iconbar ?
   BNE     $exit                         ; if not, exit
   STR     r2,$`buffer                   ; store it in the scratch space
   LDR     r2,[r1,#24]                   ; read the number of the icon
   STR     r2,$`buffer+4                 ; store it in the scratch space
   LADR     r1,$`buffer                   ; pointer to scratch
   SWI     "XWimp_GetIconState"          ; find out about the icon
   BVS     $exit                         ; if error, exit
   LDR     r0,[r1,#16+8]                 ; read the flags
   TST     r0,#1                         ; is there text in the icon ?
   BEQ     $exit                         ; if not, exit
   TST     r0,#256                       ; is it indirect ?
   LDRNE   r0,[r1,#20+8]                 ; if so, get address
   ADDEQ   r0,r1,#20+8                   ; if not, use the offset

   LDRB    r2,[r0,#0]                    ; get first byte of disc name
   CMP     r2,#ASC(":")                  ; is it a colon ?
   ADDEQ   r0,r0,#1                      ; if so, skip it

   ADR     r1,$`buffer                   ; pointer to the start of the buffer
   BL      movectrl                      ; copy the string
   BL      lenctrl                       ; find the length (to r1)
   LADR     r0,$`buffer                   ; buffer to store
   ADD     r1,r1,r0                      ; increment buffer by strlen

   ADR     r0,$`var                      ; variable to read
   MOV     r2,#256                       ; length of buffer
   MOV     r3,#0                         ; name pointer (0 to start)
   MOV     r4,#3                         ; expand to text
   SWI     "XOS_ReadVarVal"              ; read the variable
   BVS     $exit

   REM     "Val = %$1"

   MOV     r0,r1                         ; r0=buffer start
   LDR     r1,[sp,#4]                    ; re-read block pointer
   ADD     r4,r1,#44                     ; r4=leafname

$loop
   LDRB    r3,[r4]                       ; read a byte from the user block
   STRB    r3,[r0,r2]                    ; store in our block
   ADD     r4,r4,#1                      ; increment r4
   ADD     r2,r2,#1                      ; increment r2
   CMP     r3,#31                        ; is it ctrl ?
   BGT     $loop                         ; if not then loop

   ADD     r4,r1,#44                     ; points to the userblock filename
   ADR     r0,$`startbuffer              ; r0=the filename buffer
   MOV     r2,#0                         ; offset into buffer

$loop2
   LDRB    r3,[r0,r2]                    ; read from our buffer
   STRB    r3,[r4,r2]                    ; store in user block
   ADD     r2,r2,#1                      ; increment offset
   CMP     r3,#31                        ; is it ctrl ?
   BGT     $loop2                        ; if not get next one

   ADD     r0,r2,#3+44                   ; add three to the length
   BIC     r0,r0,#3                      ; clear the bottom bits
   STR     r0,[r1]                       ; store as length of block

   ADD     r0,r1,#44
   REM     "Filename = %$0"

   MOV     r0,#2                         ; DataSaveAck
   STR     r0,[r1,#16]                   ; store in block
   LDR     r0,[r1,#8]                    ; get the old pointer
   STR     r0,[r1,#12]                   ; store back
   LDR     r2,[r1,#4]                    ; r2= task to use
   MOV     r0,#17
   SWI     "XWimp_SendMessage"           ; send the message
   BVS     $exit

   MVN     r0,#NOT -1                    ; ignore message
   STR     r0,[sp,#0]                    ; store on stack

$exit
   LDMFD   (sp)!,{r0-r5,pc}^             ; Return from call with flags

$`var
   EQUZA   "QuickSave$Path"
                                         ; The variable to use
$`messages
   EQUD    1                             ; DataSave
   EQUD    0                             ; end of list

   EQUS    "xx"                          ; to ensure that $`buffer is aligned
$`startbuffer
   EQUS    "ADFS::"                      ; the bit for the start of the line
$`buffer
   RES     256                           ; for storing the filename in

.`added
   EQUD    0

#library "Strings",#movectrl.lenctrl

#Post
*Set QuickSave$Path .$.temp.
*Filer_OpenDir ADFS::4.$.temp

#Run <CODE>
00000000  41 70 70 20 20 41 44 46  53 51 75 69 63 6b 53 61  |App  ADFSQuickSa|
00000010  76 65 0a 49 6e 20 20 20  2d 0a 4f 75 74 20 20 41  |ve.In   -.Out  A|
00000020  44 46 53 51 75 69 63 6b  53 61 76 65 0a 54 79 70  |DFSQuickSave.Typ|
00000030  65 20 4d 6f 64 75 6c 65  0a 56 65 72 20 20 31 2e  |e Module.Ver  1.|
00000040  30 32 76 0a 0a 44 65 66  69 6e 65 20 4d 6f 64 75  |02v..Define Modu|
00000050  6c 65 0a 20 4e 61 6d 65  20 20 20 20 20 20 41 44  |le. Name      AD|
00000060  46 53 51 75 69 63 6b 53  61 76 65 0a 20 41 75 74  |FSQuickSave. Aut|
00000070  68 6f 72 20 20 20 20 4a  75 73 74 69 6e 20 46 6c  |hor    Justin Fl|
00000080  65 74 63 68 65 72 0a 20  43 6f 6d 6d 61 6e 64 73  |etcher. Commands|
00000090  0a 20 20 4e 61 6d 65 20  20 20 20 20 41 44 46 53  |.  Name     ADFS|
000000a0  51 75 69 63 6b 53 61 76  65 0a 20 20 48 65 6c 70  |QuickSave.  Help|
000000b0  20 20 20 20 20 2e 2e 2e  0a 20 20 20 20 20 20 20  |     ....       |
000000c0  20 20 20 20 41 44 46 53  51 75 69 63 6b 53 61 76  |    ADFSQuickSav|
000000d0  65 20 61 6c 6c 6f 77 73  20 79 6f 75 20 74 6f 20  |e allows you to |
000000e0  64 72 61 67 20 75 6e 73  61 76 65 64 20 66 69 6c  |drag unsaved fil|
000000f0  65 73 20 6f 6e 74 6f 20  74 68 65 20 41 44 46 53  |es onto the ADFS|
00000100  0a 20 20 20 20 20 20 20  20 20 20 20 46 69 6c 65  |.           File|
00000110  72 20 69 63 6f 6e 20 74  6f 20 73 61 76 65 20 74  |r icon to save t|
00000120  68 65 6d 20 69 6e 20 74  68 65 20 64 69 72 65 63  |hem in the direc|
00000130  74 6f 72 79 20 6e 61 6d  65 64 20 3a 7c 4d 0a 20  |tory named :|M. |
00000140  20 20 20 20 20 20 20 20  20 20 41 44 46 53 3a 3a  |          ADFS::|
00000150  5b 64 72 69 76 65 5d 3c  51 75 69 63 6b 53 61 76  |[drive]<QuickSav|
00000160  65 24 50 61 74 68 3e 5b  66 69 6c 65 5d 7c 4d 0a  |e$Path>[file]|M.|
00000170  20 20 20 20 20 20 20 20  20 20 20 53 6f 20 79 6f  |           So yo|
00000180  75 20 73 68 6f 75 6c 64  20 73 65 74 20 51 75 69  |u should set Qui|
00000190  63 6b 53 61 76 65 24 50  61 74 68 20 74 6f 20 73  |ckSave$Path to s|
000001a0  6f 6d 65 74 68 69 6e 67  20 6c 69 6b 65 20 2e 24  |omething like .$|
000001b0  2e 74 65 6d 70 2e 7c 4d  0a 20 20 20 20 20 20 20  |.temp.|M.       |
000001c0  20 20 20 20 54 68 69 73  20 69 73 20 64 65 64 69  |    This is dedi|
000001d0  63 61 74 65 64 20 74 6f  20 4a 6f 6e 69 78 2c 20  |cated to Jonix, |
000001e0  61 73 20 68 65 20 77 61  6e 74 65 64 20 69 74 20  |as he wanted it |
000001f0  3a 2d 29 7c 4d 0a 20 20  20 20 20 20 20 20 20 20  |:-)|M.          |
00000200  20 4e 6f 74 65 3a 20 59  6f 75 20 77 69 6c 6c 20  | Note: You will |
00000210  6e 65 65 64 20 74 6f 20  68 61 76 65 20 63 6c 69  |need to have cli|
00000220  63 6b 65 64 20 6f 6e 20  74 68 65 20 41 44 46 53  |cked on the ADFS|
00000230  20 46 69 6c 65 72 20 62  65 66 6f 72 65 0a 20 20  | Filer before.  |
00000240  20 20 20 20 20 20 20 20  20 69 74 20 77 69 6c 6c  |         it will|
00000250  20 64 6f 20 61 6e 79 74  68 69 6e 67 2e 0a 20 45  | do anything.. E|
00000260  6e 64 20 43 6f 6d 6d 61  6e 64 73 0a 20 50 6f 73  |nd Commands. Pos|
00000270  74 46 69 6c 74 65 72 0a  20 20 54 61 73 6b 20 20  |tFilter.  Task  |
00000280  20 20 20 41 44 46 53 20  46 69 6c 65 72 0a 20 20  |   ADFS Filer.  |
00000290  4e 61 6d 65 20 20 20 20  20 41 44 46 53 51 75 69  |Name     ADFSQui|
000002a0  63 6b 53 61 76 65 0a 20  20 41 63 63 65 70 74 20  |ckSave.  Accept |
000002b0  20 20 4d 6f 75 73 65 43  6c 69 63 6b 0a 20 20 41  |  MouseClick.  A|
000002c0  63 63 65 70 74 20 20 20  55 73 65 72 4d 65 73 73  |ccept   UserMess|
000002d0  61 67 65 0a 20 20 41 63  63 65 70 74 20 20 20 55  |age.  Accept   U|
000002e0  73 65 72 4d 65 73 73 61  67 65 52 65 63 6f 72 64  |serMessageRecord|
000002f0  65 64 0a 20 20 43 6f 64  65 20 20 20 20 20 66 69  |ed.  Code     fi|
00000300  6c 74 65 72 0a 20 45 6e  64 20 46 69 6c 74 65 72  |lter. End Filter|
00000310  0a 20 49 6e 69 74 20 20  20 20 20 20 69 6e 69 74  |. Init      init|
00000320  0a 45 6e 64 20 4d 6f 64  75 6c 65 0a 0a 23 52 45  |.End Module..#RE|
00000330  4d 20 4f 66 66 0a 3b 20  2a 2a 2a 2a 2a 2a 2a 2a  |M Off.; ********|
00000340  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000370  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 0a 3b 20 53 75  |***********.; Su|
00000380  62 72 6f 75 74 69 6e 65  3a 20 20 20 69 6e 69 74  |broutine:   init|
00000390  0a 3b 20 44 65 73 63 72  69 70 74 69 6f 6e 3a 20  |.; Description: |
000003a0  20 49 6e 69 74 69 61 6c  69 73 65 20 74 68 65 20  | Initialise the |
000003b0  6d 6f 64 75 6c 65 20 2d  20 73 65 74 20 74 68 65  |module - set the|
000003c0  20 66 6c 61 67 20 6d 61  72 6b 69 6e 67 20 75 73  | flag marking us|
000003d0  20 61 73 0a 3b 20 20 20  20 20 20 20 20 20 20 20  | as.;           |
000003e0  20 20 20 20 68 61 76 69  6e 67 20 6e 6f 74 20 61  |    having not a|
000003f0  64 64 65 64 20 6d 65 73  73 61 67 65 20 31 20 74  |dded message 1 t|
00000400  6f 20 74 68 6f 73 65 20  77 65 20 6c 69 6b 65 0a  |o those we like.|
00000410  3b 20 50 61 72 61 6d 65  74 65 72 73 3a 20 20 20  |; Parameters:   |
00000420  6e 6f 6e 65 0a 3b 20 52  65 74 75 72 6e 73 3a 20  |none.; Returns: |
00000430  20 20 20 20 20 6e 6f 6e  65 0a 3b 20 4e 6f 74 65  |     none.; Note|
00000440  3a 20 20 20 20 20 20 20  20 20 59 75 63 6b 79 20  |:         Yucky |
00000450  77 61 79 20 6f 66 20 77  6f 72 6b 69 6e 67 2c 20  |way of working, |
00000460  62 75 74 20 49 27 6d 20  6e 6f 74 20 69 6e 74 65  |but I'm not inte|
00000470  6e 64 69 6e 67 20 74 6f  20 52 4f 4d 0a 3b 20 20  |nding to ROM.;  |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 74 68 69  |             thi|
00000490  73 20 6d 6f 64 75 6c 65  2e 0a 3b 20 2a 2a 2a 2a  |s module..; ****|
000004a0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000004d0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 0a  |***************.|
000004e0  2e 69 6e 69 74 0a 20 20  20 53 54 4d 46 44 20 20  |.init.   STMFD  |
000004f0  20 28 73 70 29 21 2c 7b  72 30 2d 72 35 2c 6c 69  | (sp)!,{r0-r5,li|
00000500  6e 6b 7d 20 20 20 20 20  20 20 20 20 20 20 20 3b  |nk}            ;|
00000510  20 53 74 61 63 6b 20 72  65 67 69 73 74 65 72 73  | Stack registers|
00000520  0a 20 20 20 4d 4f 56 20  20 20 20 20 72 30 2c 23  |.   MOV     r0,#|
00000530  30 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0               |
00000540  20 20 20 20 20 20 20 20  20 20 3b 20 30 20 74 68  |          ; 0 th|
00000550  65 20 66 6c 61 67 0a 20  20 20 53 54 52 20 20 20  |e flag.   STR   |
00000560  20 20 72 30 2c 60 61 64  64 65 64 20 20 20 20 20  |  r0,`added     |
00000570  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000580  3b 20 73 74 6f 72 65 20  69 6e 20 6d 6f 64 75 6c  |; store in modul|
00000590  65 0a 20 20 20 4c 44 4d  46 44 20 20 20 28 73 70  |e.   LDMFD   (sp|
000005a0  29 21 2c 7b 72 30 2d 72  35 2c 70 63 7d 20 20 20  |)!,{r0-r5,pc}   |
000005b0  20 20 20 20 20 20 20 20  20 20 20 3b 20 52 65 74  |           ; Ret|
000005c0  75 72 6e 20 66 72 6f 6d  20 63 61 6c 6c 0a 0a 3b  |urn from call..;|
000005d0  20 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ***************|
000005e0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000610  2a 2a 2a 2a 0a 3b 20 53  75 62 72 6f 75 74 69 6e  |****.; Subroutin|
00000620  65 3a 20 20 20 66 69 6c  74 65 72 0a 3b 20 44 65  |e:   filter.; De|
00000630  73 63 72 69 70 74 69 6f  6e 3a 20 20 57 69 6d 70  |scription:  Wimp|
00000640  5f 50 6f 6c 6c 20 66 69  6c 74 65 72 65 64 20 6f  |_Poll filtered o|
00000650  66 66 0a 3b 20 50 61 72  61 6d 65 74 65 72 73 3a  |ff.; Parameters:|
00000660  20 20 20 72 30 20 3d 20  72 65 61 73 6f 6e 20 28  |   r0 = reason (|
00000670  31 37 29 0a 3b 20 20 20  20 20 20 20 20 20 20 20  |17).;           |
00000680  20 20 20 20 72 31 2d 3e  20 75 73 65 72 20 62 6c  |    r1-> user bl|
00000690  6f 63 6b 0a 3b 20 52 65  74 75 72 6e 73 3a 20 20  |ock.; Returns:  |
000006a0  20 20 20 20 72 30 20 3d  20 2d 31 20 69 66 20 69  |    r0 = -1 if i|
000006b0  74 20 73 68 6f 75 6c 64  6e 27 74 20 62 65 20 70  |t shouldn't be p|
000006c0  61 73 73 65 64 20 6f 6e  0a 3b 20 2a 2a 2a 2a 2a  |assed on.; *****|
000006d0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000700  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 0a 2e  |**************..|
00000710  66 69 6c 74 65 72 0a 20  20 20 53 54 4d 46 44 20  |filter.   STMFD |
00000720  20 20 28 73 70 29 21 2c  7b 72 30 2d 72 35 2c 6c  |  (sp)!,{r0-r5,l|
00000730  69 6e 6b 7d 20 20 20 20  20 20 20 20 20 20 20 20  |ink}            |
00000740  3b 20 53 74 61 63 6b 20  72 65 67 69 73 74 65 72  |; Stack register|
00000750  73 0a 20 20 20 52 45 4d  20 20 20 20 20 22 25 63  |s.   REM     "%c|
00000760  30 34 25 63 33 30 4f 75  72 20 65 76 65 6e 74 22  |04%c30Our event"|
00000770  0a 20 20 20 43 4d 50 20  20 20 20 20 72 30 2c 23  |.   CMP     r0,#|
00000780  36 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |6               |
00000790  20 20 20 20 20 20 20 20  20 20 3b 20 69 73 20 69  |          ; is i|
000007a0  74 20 61 20 6d 6f 75 73  65 63 6c 69 63 6b 20 3f  |t a mouseclick ?|
000007b0  0a 20 20 20 42 4e 45 20  20 20 20 20 24 6e 6f 74  |.   BNE     $not|
000007c0  6d 6f 75 73 65 0a 20 20  20 4c 44 52 20 20 20 20  |mouse.   LDR    |
000007d0  20 72 31 2c 60 61 64 64  65 64 20 20 20 20 20 20  | r1,`added      |
000007e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
000007f0  20 67 65 74 20 74 68 65  20 66 6c 61 67 0a 20 20  | get the flag.  |
00000800  20 43 4d 50 20 20 20 20  20 72 31 2c 23 30 20 20  | CMP     r1,#0  |
00000810  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000820  20 20 20 20 20 20 20 3b  20 68 61 76 65 20 77 65  |       ; have we|
00000830  20 61 64 64 65 64 20 69  74 20 3f 0a 20 20 20 42  | added it ?.   B|
00000840  4e 45 20 20 20 20 20 24  65 78 69 74 20 20 20 20  |NE     $exit    |
00000850  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000860  20 20 20 20 20 3b 20 69  66 20 73 6f 2c 20 65 78  |     ; if so, ex|
00000870  69 74 0a 20 20 20 53 54  52 20 20 20 20 20 72 30  |it.   STR     r0|
00000880  2c 60 61 64 64 65 64 20  20 20 20 20 20 20 20 20  |,`added         |
00000890  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 69 66  |            ; if|
000008a0  20 6e 6f 74 2c 20 73 74  6f 72 65 20 36 20 69 6e  | not, store 6 in|
000008b0  20 74 68 65 20 62 6c 6f  63 6b 0a 20 20 20 41 44  | the block.   AD|
000008c0  52 20 20 20 20 20 72 30  2c 24 60 6d 65 73 73 61  |R     r0,$`messa|
000008d0  67 65 73 20 20 20 20 20  20 20 20 20 20 20 20 20  |ges             |
000008e0  20 20 20 20 3b 20 67 65  74 20 74 68 65 20 6d 65  |    ; get the me|
000008f0  73 73 61 67 65 20 62 6c  6f 63 6b 0a 20 20 20 53  |ssage block.   S|
00000900  57 49 20 20 20 20 20 22  58 57 69 6d 70 5f 41 64  |WI     "XWimp_Ad|
00000910  64 4d 65 73 73 61 67 65  73 22 20 20 20 20 20 20  |dMessages"      |
00000920  20 20 20 20 20 3b 20 61  64 64 20 74 68 65 6d 0a  |     ; add them.|
00000930  20 20 20 42 20 20 20 20  20 20 20 24 65 78 69 74  |   B       $exit|
00000940  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000950  20 20 20 20 20 20 20 20  20 3b 20 61 6e 64 20 65  |         ; and e|
00000960  78 69 74 0a 0a 24 6e 6f  74 6d 6f 75 73 65 0a 20  |xit..$notmouse. |
00000970  20 20 43 4d 50 20 20 20  20 20 72 30 2c 23 31 37  |  CMP     r0,#17|
00000980  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000990  20 20 20 20 20 20 20 20  3b 20 69 73 20 74 68 69  |        ; is thi|
000009a0  73 20 61 20 75 73 65 72  20 6d 65 73 73 61 67 65  |s a user message|
000009b0  20 3f 0a 20 20 20 43 4d  50 4e 45 20 20 20 72 30  | ?.   CMPNE   r0|
000009c0  2c 23 31 38 20 20 20 20  20 20 20 20 20 20 20 20  |,#18            |
000009d0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 69 73  |            ; is|
000009e0  20 74 68 69 73 20 61 20  75 73 65 72 20 6d 65 73  | this a user mes|
000009f0  73 61 67 65 20 3f 0a 20  20 20 42 4e 45 20 20 20  |sage ?.   BNE   |
00000a00  20 20 24 65 78 69 74 20  20 20 20 20 20 20 20 20  |  $exit         |
00000a10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a20  3b 20 69 66 20 6e 6f 74  2c 20 65 78 69 74 0a 20  |; if not, exit. |
00000a30  20 20 4c 44 52 20 20 20  20 20 72 30 2c 5b 72 31  |  LDR     r0,[r1|
00000a40  2c 23 31 36 5d 20 20 20  20 20 20 20 20 20 20 20  |,#16]           |
00000a50  20 20 20 20 20 20 20 20  3b 20 67 65 74 20 6d 65  |        ; get me|
00000a60  73 73 61 67 65 6e 75 6d  62 65 72 0a 20 20 20 52  |ssagenumber.   R|
00000a70  45 4d 20 20 20 20 20 22  4d 65 73 73 61 67 65 20  |EM     "Message |
00000a80  3a 20 25 72 30 22 0a 20  20 20 43 4d 50 20 20 20  |: %r0".   CMP   |
00000a90  20 20 72 30 2c 23 31 20  20 20 20 20 20 20 20 20  |  r0,#1         |
00000aa0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ab0  3b 20 69 73 20 74 68 69  73 20 61 20 44 61 74 61  |; is this a Data|
00000ac0  53 61 76 65 20 3f 0a 20  20 20 42 4e 45 20 20 20  |Save ?.   BNE   |
00000ad0  20 20 24 65 78 69 74 20  20 20 20 20 20 20 20 20  |  $exit         |
00000ae0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000af0  3b 20 69 66 20 6e 6f 74  20 65 78 69 74 0a 0a 20  |; if not exit.. |
00000b00  20 20 4c 44 52 20 20 20  20 20 72 32 2c 5b 72 31  |  LDR     r2,[r1|
00000b10  2c 23 32 30 5d 20 20 20  20 20 20 20 20 20 20 20  |,#20]           |
00000b20  20 20 20 20 20 20 20 20  3b 20 72 65 61 64 20 74  |        ; read t|
00000b30  68 65 20 6e 75 6d 62 65  72 20 6f 66 20 74 68 65  |he number of the|
00000b40  20 77 69 6e 64 6f 77 0a  20 20 20 43 4d 4e 20 20  | window.   CMN  |
00000b50  20 20 20 72 32 2c 23 32  20 20 20 20 20 20 20 20  |   r2,#2        |
00000b60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000b70  20 3b 20 69 73 20 69 74  20 69 63 6f 6e 62 61 72  | ; is it iconbar|
00000b80  20 3f 0a 20 20 20 42 4e  45 20 20 20 20 20 24 65  | ?.   BNE     $e|
00000b90  78 69 74 20 20 20 20 20  20 20 20 20 20 20 20 20  |xit             |
00000ba0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 69 66  |            ; if|
00000bb0  20 6e 6f 74 2c 20 65 78  69 74 0a 20 20 20 53 54  | not, exit.   ST|
00000bc0  52 20 20 20 20 20 72 32  2c 24 60 62 75 66 66 65  |R     r2,$`buffe|
00000bd0  72 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |r               |
00000be0  20 20 20 20 3b 20 73 74  6f 72 65 20 69 74 20 69  |    ; store it i|
00000bf0  6e 20 74 68 65 20 73 63  72 61 74 63 68 20 73 70  |n the scratch sp|
00000c00  61 63 65 0a 20 20 20 4c  44 52 20 20 20 20 20 72  |ace.   LDR     r|
00000c10  32 2c 5b 72 31 2c 23 32  34 5d 20 20 20 20 20 20  |2,[r1,#24]      |
00000c20  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 72  |             ; r|
00000c30  65 61 64 20 74 68 65 20  6e 75 6d 62 65 72 20 6f  |ead the number o|
00000c40  66 20 74 68 65 20 69 63  6f 6e 0a 20 20 20 53 54  |f the icon.   ST|
00000c50  52 20 20 20 20 20 72 32  2c 24 60 62 75 66 66 65  |R     r2,$`buffe|
00000c60  72 2b 34 20 20 20 20 20  20 20 20 20 20 20 20 20  |r+4             |
00000c70  20 20 20 20 3b 20 73 74  6f 72 65 20 69 74 20 69  |    ; store it i|
00000c80  6e 20 74 68 65 20 73 63  72 61 74 63 68 20 73 70  |n the scratch sp|
00000c90  61 63 65 0a 20 20 20 4c  41 44 52 20 20 20 20 20  |ace.   LADR     |
00000ca0  72 31 2c 24 60 62 75 66  66 65 72 20 20 20 20 20  |r1,$`buffer     |
00000cb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00000cc0  70 6f 69 6e 74 65 72 20  74 6f 20 73 63 72 61 74  |pointer to scrat|
00000cd0  63 68 0a 20 20 20 53 57  49 20 20 20 20 20 22 58  |ch.   SWI     "X|
00000ce0  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
00000cf0  65 22 20 20 20 20 20 20  20 20 20 20 3b 20 66 69  |e"          ; fi|
00000d00  6e 64 20 6f 75 74 20 61  62 6f 75 74 20 74 68 65  |nd out about the|
00000d10  20 69 63 6f 6e 0a 20 20  20 42 56 53 20 20 20 20  | icon.   BVS    |
00000d20  20 24 65 78 69 74 20 20  20 20 20 20 20 20 20 20  | $exit          |
00000d30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00000d40  20 69 66 20 65 72 72 6f  72 2c 20 65 78 69 74 0a  | if error, exit.|
00000d50  20 20 20 4c 44 52 20 20  20 20 20 72 30 2c 5b 72  |   LDR     r0,[r|
00000d60  31 2c 23 31 36 2b 38 5d  20 20 20 20 20 20 20 20  |1,#16+8]        |
00000d70  20 20 20 20 20 20 20 20  20 3b 20 72 65 61 64 20  |         ; read |
00000d80  74 68 65 20 66 6c 61 67  73 0a 20 20 20 54 53 54  |the flags.   TST|
00000d90  20 20 20 20 20 72 30 2c  23 31 20 20 20 20 20 20  |     r0,#1      |
00000da0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000db0  20 20 20 3b 20 69 73 20  74 68 65 72 65 20 74 65  |   ; is there te|
00000dc0  78 74 20 69 6e 20 74 68  65 20 69 63 6f 6e 20 3f  |xt in the icon ?|
00000dd0  0a 20 20 20 42 45 51 20  20 20 20 20 24 65 78 69  |.   BEQ     $exi|
00000de0  74 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |t               |
00000df0  20 20 20 20 20 20 20 20  20 20 3b 20 69 66 20 6e  |          ; if n|
00000e00  6f 74 2c 20 65 78 69 74  0a 20 20 20 54 53 54 20  |ot, exit.   TST |
00000e10  20 20 20 20 72 30 2c 23  32 35 36 20 20 20 20 20  |    r0,#256     |
00000e20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e30  20 20 3b 20 69 73 20 69  74 20 69 6e 64 69 72 65  |  ; is it indire|
00000e40  63 74 20 3f 0a 20 20 20  4c 44 52 4e 45 20 20 20  |ct ?.   LDRNE   |
00000e50  72 30 2c 5b 72 31 2c 23  32 30 2b 38 5d 20 20 20  |r0,[r1,#20+8]   |
00000e60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00000e70  69 66 20 73 6f 2c 20 67  65 74 20 61 64 64 72 65  |if so, get addre|
00000e80  73 73 0a 20 20 20 41 44  44 45 51 20 20 20 72 30  |ss.   ADDEQ   r0|
00000e90  2c 72 31 2c 23 32 30 2b  38 20 20 20 20 20 20 20  |,r1,#20+8       |
00000ea0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 69 66  |            ; if|
00000eb0  20 6e 6f 74 2c 20 75 73  65 20 74 68 65 20 6f 66  | not, use the of|
00000ec0  66 73 65 74 0a 0a 20 20  20 4c 44 52 42 20 20 20  |fset..   LDRB   |
00000ed0  20 72 32 2c 5b 72 30 2c  23 30 5d 20 20 20 20 20  | r2,[r0,#0]     |
00000ee0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00000ef0  20 67 65 74 20 66 69 72  73 74 20 62 79 74 65 20  | get first byte |
00000f00  6f 66 20 64 69 73 63 20  6e 61 6d 65 0a 20 20 20  |of disc name.   |
00000f10  43 4d 50 20 20 20 20 20  72 32 2c 23 41 53 43 28  |CMP     r2,#ASC(|
00000f20  22 3a 22 29 20 20 20 20  20 20 20 20 20 20 20 20  |":")            |
00000f30  20 20 20 20 20 20 3b 20  69 73 20 69 74 20 61 20  |      ; is it a |
00000f40  63 6f 6c 6f 6e 20 3f 0a  20 20 20 41 44 44 45 51  |colon ?.   ADDEQ|
00000f50  20 20 20 72 30 2c 72 30  2c 23 31 20 20 20 20 20  |   r0,r0,#1     |
00000f60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f70  20 3b 20 69 66 20 73 6f  2c 20 73 6b 69 70 20 69  | ; if so, skip i|
00000f80  74 0a 0a 20 20 20 41 44  52 20 20 20 20 20 72 31  |t..   ADR     r1|
00000f90  2c 24 60 62 75 66 66 65  72 20 20 20 20 20 20 20  |,$`buffer       |
00000fa0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 70 6f  |            ; po|
00000fb0  69 6e 74 65 72 20 74 6f  20 74 68 65 20 73 74 61  |inter to the sta|
00000fc0  72 74 20 6f 66 20 74 68  65 20 62 75 66 66 65 72  |rt of the buffer|
00000fd0  0a 20 20 20 42 4c 20 20  20 20 20 20 6d 6f 76 65  |.   BL      move|
00000fe0  63 74 72 6c 20 20 20 20  20 20 20 20 20 20 20 20  |ctrl            |
00000ff0  20 20 20 20 20 20 20 20  20 20 3b 20 63 6f 70 79  |          ; copy|
00001000  20 74 68 65 20 73 74 72  69 6e 67 0a 20 20 20 42  | the string.   B|
00001010  4c 20 20 20 20 20 20 6c  65 6e 63 74 72 6c 20 20  |L      lenctrl  |
00001020  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001030  20 20 20 20 20 3b 20 66  69 6e 64 20 74 68 65 20  |     ; find the |
00001040  6c 65 6e 67 74 68 20 28  74 6f 20 72 31 29 0a 20  |length (to r1). |
00001050  20 20 4c 41 44 52 20 20  20 20 20 72 30 2c 24 60  |  LADR     r0,$`|
00001060  62 75 66 66 65 72 20 20  20 20 20 20 20 20 20 20  |buffer          |
00001070  20 20 20 20 20 20 20 20  20 3b 20 62 75 66 66 65  |         ; buffe|
00001080  72 20 74 6f 20 73 74 6f  72 65 0a 20 20 20 41 44  |r to store.   AD|
00001090  44 20 20 20 20 20 72 31  2c 72 31 2c 72 30 20 20  |D     r1,r1,r0  |
000010a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010b0  20 20 20 20 3b 20 69 6e  63 72 65 6d 65 6e 74 20  |    ; increment |
000010c0  62 75 66 66 65 72 20 62  79 20 73 74 72 6c 65 6e  |buffer by strlen|
000010d0  0a 0a 20 20 20 41 44 52  20 20 20 20 20 72 30 2c  |..   ADR     r0,|
000010e0  24 60 76 61 72 20 20 20  20 20 20 20 20 20 20 20  |$`var           |
000010f0  20 20 20 20 20 20 20 20  20 20 20 3b 20 76 61 72  |           ; var|
00001100  69 61 62 6c 65 20 74 6f  20 72 65 61 64 0a 20 20  |iable to read.  |
00001110  20 4d 4f 56 20 20 20 20  20 72 32 2c 23 32 35 36  | MOV     r2,#256|
00001120  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001130  20 20 20 20 20 20 20 3b  20 6c 65 6e 67 74 68 20  |       ; length |
00001140  6f 66 20 62 75 66 66 65  72 0a 20 20 20 4d 4f 56  |of buffer.   MOV|
00001150  20 20 20 20 20 72 33 2c  23 30 20 20 20 20 20 20  |     r3,#0      |
00001160  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001170  20 20 20 3b 20 6e 61 6d  65 20 70 6f 69 6e 74 65  |   ; name pointe|
00001180  72 20 28 30 20 74 6f 20  73 74 61 72 74 29 0a 20  |r (0 to start). |
00001190  20 20 4d 4f 56 20 20 20  20 20 72 34 2c 23 33 20  |  MOV     r4,#3 |
000011a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000011b0  20 20 20 20 20 20 20 20  3b 20 65 78 70 61 6e 64  |        ; expand|
000011c0  20 74 6f 20 74 65 78 74  0a 20 20 20 53 57 49 20  | to text.   SWI |
000011d0  20 20 20 20 22 58 4f 53  5f 52 65 61 64 56 61 72  |    "XOS_ReadVar|
000011e0  56 61 6c 22 20 20 20 20  20 20 20 20 20 20 20 20  |Val"            |
000011f0  20 20 3b 20 72 65 61 64  20 74 68 65 20 76 61 72  |  ; read the var|
00001200  69 61 62 6c 65 0a 20 20  20 42 56 53 20 20 20 20  |iable.   BVS    |
00001210  20 24 65 78 69 74 0a 0a  20 20 20 52 45 4d 20 20  | $exit..   REM  |
00001220  20 20 20 22 56 61 6c 20  3d 20 25 24 31 22 0a 0a  |   "Val = %$1"..|
00001230  20 20 20 4d 4f 56 20 20  20 20 20 72 30 2c 72 31  |   MOV     r0,r1|
00001240  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001250  20 20 20 20 20 20 20 20  20 3b 20 72 30 3d 62 75  |         ; r0=bu|
00001260  66 66 65 72 20 73 74 61  72 74 0a 20 20 20 4c 44  |ffer start.   LD|
00001270  52 20 20 20 20 20 72 31  2c 5b 73 70 2c 23 34 5d  |R     r1,[sp,#4]|
00001280  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001290  20 20 20 20 3b 20 72 65  2d 72 65 61 64 20 62 6c  |    ; re-read bl|
000012a0  6f 63 6b 20 70 6f 69 6e  74 65 72 0a 20 20 20 41  |ock pointer.   A|
000012b0  44 44 20 20 20 20 20 72  34 2c 72 31 2c 23 34 34  |DD     r4,r1,#44|
000012c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000012d0  20 20 20 20 20 3b 20 72  34 3d 6c 65 61 66 6e 61  |     ; r4=leafna|
000012e0  6d 65 0a 0a 24 6c 6f 6f  70 0a 20 20 20 4c 44 52  |me..$loop.   LDR|
000012f0  42 20 20 20 20 72 33 2c  5b 72 34 5d 20 20 20 20  |B    r3,[r4]    |
00001300  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001310  20 20 20 3b 20 72 65 61  64 20 61 20 62 79 74 65  |   ; read a byte|
00001320  20 66 72 6f 6d 20 74 68  65 20 75 73 65 72 20 62  | from the user b|
00001330  6c 6f 63 6b 0a 20 20 20  53 54 52 42 20 20 20 20  |lock.   STRB    |
00001340  72 33 2c 5b 72 30 2c 72  32 5d 20 20 20 20 20 20  |r3,[r0,r2]      |
00001350  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00001360  73 74 6f 72 65 20 69 6e  20 6f 75 72 20 62 6c 6f  |store in our blo|
00001370  63 6b 0a 20 20 20 41 44  44 20 20 20 20 20 72 34  |ck.   ADD     r4|
00001380  2c 72 34 2c 23 31 20 20  20 20 20 20 20 20 20 20  |,r4,#1          |
00001390  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 69 6e  |            ; in|
000013a0  63 72 65 6d 65 6e 74 20  72 34 0a 20 20 20 41 44  |crement r4.   AD|
000013b0  44 20 20 20 20 20 72 32  2c 72 32 2c 23 31 20 20  |D     r2,r2,#1  |
000013c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000013d0  20 20 20 20 3b 20 69 6e  63 72 65 6d 65 6e 74 20  |    ; increment |
000013e0  72 32 0a 20 20 20 43 4d  50 20 20 20 20 20 72 33  |r2.   CMP     r3|
000013f0  2c 23 33 31 20 20 20 20  20 20 20 20 20 20 20 20  |,#31            |
00001400  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 69 73  |            ; is|
00001410  20 69 74 20 63 74 72 6c  20 3f 0a 20 20 20 42 47  | it ctrl ?.   BG|
00001420  54 20 20 20 20 20 24 6c  6f 6f 70 20 20 20 20 20  |T     $loop     |
00001430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001440  20 20 20 20 3b 20 69 66  20 6e 6f 74 20 74 68 65  |    ; if not the|
00001450  6e 20 6c 6f 6f 70 0a 0a  20 20 20 41 44 44 20 20  |n loop..   ADD  |
00001460  20 20 20 72 34 2c 72 31  2c 23 34 34 20 20 20 20  |   r4,r1,#44    |
00001470  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001480  20 3b 20 70 6f 69 6e 74  73 20 74 6f 20 74 68 65  | ; points to the|
00001490  20 75 73 65 72 62 6c 6f  63 6b 20 66 69 6c 65 6e  | userblock filen|
000014a0  61 6d 65 0a 20 20 20 41  44 52 20 20 20 20 20 72  |ame.   ADR     r|
000014b0  30 2c 24 60 73 74 61 72  74 62 75 66 66 65 72 20  |0,$`startbuffer |
000014c0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 72  |             ; r|
000014d0  30 3d 74 68 65 20 66 69  6c 65 6e 61 6d 65 20 62  |0=the filename b|
000014e0  75 66 66 65 72 0a 20 20  20 4d 4f 56 20 20 20 20  |uffer.   MOV    |
000014f0  20 72 32 2c 23 30 20 20  20 20 20 20 20 20 20 20  | r2,#0          |
00001500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001510  20 6f 66 66 73 65 74 20  69 6e 74 6f 20 62 75 66  | offset into buf|
00001520  66 65 72 0a 0a 24 6c 6f  6f 70 32 0a 20 20 20 4c  |fer..$loop2.   L|
00001530  44 52 42 20 20 20 20 72  33 2c 5b 72 30 2c 72 32  |DRB    r3,[r0,r2|
00001540  5d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |]               |
00001550  20 20 20 20 20 3b 20 72  65 61 64 20 66 72 6f 6d  |     ; read from|
00001560  20 6f 75 72 20 62 75 66  66 65 72 0a 20 20 20 53  | our buffer.   S|
00001570  54 52 42 20 20 20 20 72  33 2c 5b 72 34 2c 72 32  |TRB    r3,[r4,r2|
00001580  5d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |]               |
00001590  20 20 20 20 20 3b 20 73  74 6f 72 65 20 69 6e 20  |     ; store in |
000015a0  75 73 65 72 20 62 6c 6f  63 6b 0a 20 20 20 41 44  |user block.   AD|
000015b0  44 20 20 20 20 20 72 32  2c 72 32 2c 23 31 20 20  |D     r2,r2,#1  |
000015c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000015d0  20 20 20 20 3b 20 69 6e  63 72 65 6d 65 6e 74 20  |    ; increment |
000015e0  6f 66 66 73 65 74 0a 20  20 20 43 4d 50 20 20 20  |offset.   CMP   |
000015f0  20 20 72 33 2c 23 33 31  20 20 20 20 20 20 20 20  |  r3,#31        |
00001600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001610  3b 20 69 73 20 69 74 20  63 74 72 6c 20 3f 0a 20  |; is it ctrl ?. |
00001620  20 20 42 47 54 20 20 20  20 20 24 6c 6f 6f 70 32  |  BGT     $loop2|
00001630  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001640  20 20 20 20 20 20 20 20  3b 20 69 66 20 6e 6f 74  |        ; if not|
00001650  20 67 65 74 20 6e 65 78  74 20 6f 6e 65 0a 0a 20  | get next one.. |
00001660  20 20 41 44 44 20 20 20  20 20 72 30 2c 72 32 2c  |  ADD     r0,r2,|
00001670  23 33 2b 34 34 20 20 20  20 20 20 20 20 20 20 20  |#3+44           |
00001680  20 20 20 20 20 20 20 20  3b 20 61 64 64 20 74 68  |        ; add th|
00001690  72 65 65 20 74 6f 20 74  68 65 20 6c 65 6e 67 74  |ree to the lengt|
000016a0  68 0a 20 20 20 42 49 43  20 20 20 20 20 72 30 2c  |h.   BIC     r0,|
000016b0  72 30 2c 23 33 20 20 20  20 20 20 20 20 20 20 20  |r0,#3           |
000016c0  20 20 20 20 20 20 20 20  20 20 20 3b 20 63 6c 65  |           ; cle|
000016d0  61 72 20 74 68 65 20 62  6f 74 74 6f 6d 20 62 69  |ar the bottom bi|
000016e0  74 73 0a 20 20 20 53 54  52 20 20 20 20 20 72 30  |ts.   STR     r0|
000016f0  2c 5b 72 31 5d 20 20 20  20 20 20 20 20 20 20 20  |,[r1]           |
00001700  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 73 74  |            ; st|
00001710  6f 72 65 20 61 73 20 6c  65 6e 67 74 68 20 6f 66  |ore as length of|
00001720  20 62 6c 6f 63 6b 0a 0a  20 20 20 41 44 44 20 20  | block..   ADD  |
00001730  20 20 20 72 30 2c 72 31  2c 23 34 34 0a 20 20 20  |   r0,r1,#44.   |
00001740  52 45 4d 20 20 20 20 20  22 46 69 6c 65 6e 61 6d  |REM     "Filenam|
00001750  65 20 3d 20 25 24 30 22  0a 0a 20 20 20 4d 4f 56  |e = %$0"..   MOV|
00001760  20 20 20 20 20 72 30 2c  23 32 20 20 20 20 20 20  |     r0,#2      |
00001770  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001780  20 20 20 3b 20 44 61 74  61 53 61 76 65 41 63 6b  |   ; DataSaveAck|
00001790  0a 20 20 20 53 54 52 20  20 20 20 20 72 30 2c 5b  |.   STR     r0,[|
000017a0  72 31 2c 23 31 36 5d 20  20 20 20 20 20 20 20 20  |r1,#16]         |
000017b0  20 20 20 20 20 20 20 20  20 20 3b 20 73 74 6f 72  |          ; stor|
000017c0  65 20 69 6e 20 62 6c 6f  63 6b 0a 20 20 20 4c 44  |e in block.   LD|
000017d0  52 20 20 20 20 20 72 30  2c 5b 72 31 2c 23 38 5d  |R     r0,[r1,#8]|
000017e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000017f0  20 20 20 20 3b 20 67 65  74 20 74 68 65 20 6f 6c  |    ; get the ol|
00001800  64 20 70 6f 69 6e 74 65  72 0a 20 20 20 53 54 52  |d pointer.   STR|
00001810  20 20 20 20 20 72 30 2c  5b 72 31 2c 23 31 32 5d  |     r0,[r1,#12]|
00001820  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001830  20 20 20 3b 20 73 74 6f  72 65 20 62 61 63 6b 0a  |   ; store back.|
00001840  20 20 20 4c 44 52 20 20  20 20 20 72 32 2c 5b 72  |   LDR     r2,[r|
00001850  31 2c 23 34 5d 20 20 20  20 20 20 20 20 20 20 20  |1,#4]           |
00001860  20 20 20 20 20 20 20 20  20 3b 20 72 32 3d 20 74  |         ; r2= t|
00001870  61 73 6b 20 74 6f 20 75  73 65 0a 20 20 20 4d 4f  |ask to use.   MO|
00001880  56 20 20 20 20 20 72 30  2c 23 31 37 0a 20 20 20  |V     r0,#17.   |
00001890  53 57 49 20 20 20 20 20  22 58 57 69 6d 70 5f 53  |SWI     "XWimp_S|
000018a0  65 6e 64 4d 65 73 73 61  67 65 22 20 20 20 20 20  |endMessage"     |
000018b0  20 20 20 20 20 20 3b 20  73 65 6e 64 20 74 68 65  |      ; send the|
000018c0  20 6d 65 73 73 61 67 65  0a 20 20 20 42 56 53 20  | message.   BVS |
000018d0  20 20 20 20 24 65 78 69  74 0a 0a 20 20 20 4d 56  |    $exit..   MV|
000018e0  4e 20 20 20 20 20 72 30  2c 23 4e 4f 54 20 2d 31  |N     r0,#NOT -1|
000018f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001900  20 20 20 20 3b 20 69 67  6e 6f 72 65 20 6d 65 73  |    ; ignore mes|
00001910  73 61 67 65 0a 20 20 20  53 54 52 20 20 20 20 20  |sage.   STR     |
00001920  72 30 2c 5b 73 70 2c 23  30 5d 20 20 20 20 20 20  |r0,[sp,#0]      |
00001930  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00001940  73 74 6f 72 65 20 6f 6e  20 73 74 61 63 6b 0a 0a  |store on stack..|
00001950  24 65 78 69 74 0a 20 20  20 4c 44 4d 46 44 20 20  |$exit.   LDMFD  |
00001960  20 28 73 70 29 21 2c 7b  72 30 2d 72 35 2c 70 63  | (sp)!,{r0-r5,pc|
00001970  7d 5e 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |}^             ;|
00001980  20 52 65 74 75 72 6e 20  66 72 6f 6d 20 63 61 6c  | Return from cal|
00001990  6c 20 77 69 74 68 20 66  6c 61 67 73 0a 0a 24 60  |l with flags..$`|
000019a0  76 61 72 0a 20 20 20 45  51 55 5a 41 20 20 20 22  |var.   EQUZA   "|
000019b0  51 75 69 63 6b 53 61 76  65 24 50 61 74 68 22 0a  |QuickSave$Path".|
000019c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000019e0  20 20 20 20 20 20 20 20  20 3b 20 54 68 65 20 76  |         ; The v|
000019f0  61 72 69 61 62 6c 65 20  74 6f 20 75 73 65 0a 24  |ariable to use.$|
00001a00  60 6d 65 73 73 61 67 65  73 0a 20 20 20 45 51 55  |`messages.   EQU|
00001a10  44 20 20 20 20 31 20 20  20 20 20 20 20 20 20 20  |D    1          |
00001a20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001a30  20 20 20 3b 20 44 61 74  61 53 61 76 65 0a 20 20  |   ; DataSave.  |
00001a40  20 45 51 55 44 20 20 20  20 30 20 20 20 20 20 20  | EQUD    0      |
00001a50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001a60  20 20 20 20 20 20 20 3b  20 65 6e 64 20 6f 66 20  |       ; end of |
00001a70  6c 69 73 74 0a 0a 20 20  20 45 51 55 53 20 20 20  |list..   EQUS   |
00001a80  20 22 78 78 22 20 20 20  20 20 20 20 20 20 20 20  | "xx"           |
00001a90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001aa0  20 74 6f 20 65 6e 73 75  72 65 20 74 68 61 74 20  | to ensure that |
00001ab0  24 60 62 75 66 66 65 72  20 69 73 20 61 6c 69 67  |$`buffer is alig|
00001ac0  6e 65 64 0a 24 60 73 74  61 72 74 62 75 66 66 65  |ned.$`startbuffe|
00001ad0  72 0a 20 20 20 45 51 55  53 20 20 20 20 22 41 44  |r.   EQUS    "AD|
00001ae0  46 53 3a 3a 22 20 20 20  20 20 20 20 20 20 20 20  |FS::"           |
00001af0  20 20 20 20 20 20 20 20  20 20 20 3b 20 74 68 65  |           ; the|
00001b00  20 62 69 74 20 66 6f 72  20 74 68 65 20 73 74 61  | bit for the sta|
00001b10  72 74 20 6f 66 20 74 68  65 20 6c 69 6e 65 0a 24  |rt of the line.$|
00001b20  60 62 75 66 66 65 72 0a  20 20 20 52 45 53 20 20  |`buffer.   RES  |
00001b30  20 20 20 32 35 36 20 20  20 20 20 20 20 20 20 20  |   256          |
00001b40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001b50  20 3b 20 66 6f 72 20 73  74 6f 72 69 6e 67 20 74  | ; for storing t|
00001b60  68 65 20 66 69 6c 65 6e  61 6d 65 20 69 6e 0a 0a  |he filename in..|
00001b70  2e 60 61 64 64 65 64 0a  20 20 20 45 51 55 44 20  |.`added.   EQUD |
00001b80  20 20 20 30 0a 0a 23 6c  69 62 72 61 72 79 20 22  |   0..#library "|
00001b90  53 74 72 69 6e 67 73 22  2c 23 6d 6f 76 65 63 74  |Strings",#movect|
00001ba0  72 6c 2e 6c 65 6e 63 74  72 6c 0a 0a 23 50 6f 73  |rl.lenctrl..#Pos|
00001bb0  74 0a 2a 53 65 74 20 51  75 69 63 6b 53 61 76 65  |t.*Set QuickSave|
00001bc0  24 50 61 74 68 20 2e 24  2e 74 65 6d 70 2e 0a 2a  |$Path .$.temp..*|
00001bd0  46 69 6c 65 72 5f 4f 70  65 6e 44 69 72 20 41 44  |Filer_OpenDir AD|
00001be0  46 53 3a 3a 34 2e 24 2e  74 65 6d 70 0a 0a 23 52  |FS::4.$.temp..#R|
00001bf0  75 6e 20 3c 43 4f 44 45  3e 0a                    |un <CODE>.|
00001bfa