Home » Archimedes archive » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs » !Desktop+/s/Desktop+
!Desktop+/s/Desktop+
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 » Acorn User - Updated Shareware Collection (1994).adf » Programs |
Filename: | !Desktop+/s/Desktop+ |
Read OK: | ✔ |
File size: | 140FD bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
; > desktop+ ; See elsewhere for development notes. ; ; See module help text for details of function (nb, best to load module & use *help, as text in source below ; is compacted via use of PrettyPrint dictionary & so isn't easy to read directly), or figure it out ; yourself from this code & the credits below. ; ; Note: Me (the name I call myself & the author of this gibberish), is Michael Rozdoba ; I can be reached at 10 Octavia Close, Bedlington, Northumberland, NE22 6LG. ; ; IMPORTANT: since this code incorporates some code written by another person (see below), I cannot claim ; copyright on all of this material. ; ; Warning: Re Fancy filer icon text. ; If another application behaves badly by changing font$path such that it no longer contains the ; Resources:$.Fonts reference, then Desktop+ may be unable to find the font it requires on a mode ; change (eg between modes 12 & 27). ; If this occurs, then the previous font handle will continue to be used - this may result in ; text of the wrong (eg half or double) height. ; If this situation arises, you should check font$path to see if it has been modified by other ; scruffy program code - if so, reset it by ; *Set Font$Path <Font$Path>, Resources:$.Fonts. {note the .} ; Either do this from the command line, or then force a further mode change. ; ; Credits: ; ~~~~~~~~ ; Some of the source code from SolidDrag, (Acorn Computing cover disc, June 1993, v11 n4, by Paul Dellar) ; has been used below (after bug fixes), to provide part of the application solid drag code. ; Note, original SolidDrag {before bug fixes}: Source - 10835 bytes, Module - 896 bytes. ; Desktop+ Source - ~82000 bytes, Module - ~6500 bytes. ; ; The original inspiration for the approach used throughout this module (SWI traps via the hardware vector, ; & post filters), is also due to Paul Dellar & his original SolidDrag module, for which I am very grateful, ; though I think I may have used these two together in a way which he didn't anticipate. ; ; Forcing applications to use solid drags rather than dashed outlines, is based both on the idea & the code ; of Paul's SolidDrag, though the code has been extended to cope with a wider range of situations, & ; several bugs have been fixed (I hope!). ; ; Solid drags on Filer file icons was entirely my idea, as is the code. ; During development I came across a PD application called Filer+ (by Ting Zwei Kuei, April 1993) which ; achieves similar results, though via a direct patch into the original Acorn Filer module. ; This served to test Desktop+'s function against, & led me to discover a few shortcoming's which I was then ; able to fix; these include a couple of situations which Filer+ doesn't correctly handle. ; ; Support for semi-transparent solid drags was incorporated after seeing the benefits this can provide, via ; Dave Lawrence's direct DragASprite patch (*Info, BBC Acorn User, July 1993), though I specifically didn't ; read his code (I wouldn't want to be accused of plagiarism), & this implementation is naturally more ; cumbersome to code as it acts via pre & post processing to the DragASprite_Start call, rather than via a ; direct patch. ; ; Use of fancy text (ie antialiased fonts) in filer windows was inspired by Dave Lawrence's minimalist patch, ; thought implementation is entirely different. Also, here, I have been able to correctly set the background ; colour to light grey (rather than having to adopt white), & further, maintain correct font sizes when ; changing modes (eg 12 to 27), which the BAU patch didn't manage. ; ; Lastly, the idea for replacement of the familiar blue folder directory icons, by arbitrary sprites ; (specified via the directory name), is due to Filer+. Though once again, the difference in implementation ; means that the code used to achieve this result share very little in common. ; ; AND FINALLY: Why this module is worth using - ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; It does all the things that the above patches do, & does some of them better (for instance, the fancy ; filer text, & the solid drags of filer icons). ; It integrates them all into one small module, & as it doesn't patch directly into ROM modules, these ; don't need to be copied to RAM (eg this module uses under 6� Kb in total, whereas Filer+ uses over 27Kb ; as it has to copy Filer to RAM). ; Due to the means of implementation, each option can be turned on or off independently, whenever you want. ; r0 RN 0 r1 RN 1 r2 RN 2 r3 RN 3 r4 RN 4 r5 RN 5 r6 RN 6 r7 RN 7 r8 RN 8 r9 RN 9 r10 RN 10 r11 RN 11 r12 RN 12 sp RN 13 lr RN 14 pc RN 15 Wimp_DragBox EQU &400D0 XWimp_DragBox EQU &600D0 XWimp_GetPointerInfo EQU &600CF XWimp_GetWindowInfo EQU &600CC XOS_ReadModeVariable EQU &20035 XWimp_SendMessage EQU &600E7 XTaskManager_TaskNameFromHandle EQU &62680 XTaskManager_EnumerateTasks EQU &62681 XWimp_GetIconState EQU &600CE XDragASprite_Start EQU &62400 XDragASprite_Stop EQU &62401 XOS_AddCallBack EQU &20054 XOS_SpriteOp EQU &2002E XWimp_SpriteOp EQU &600E9 XWimp_BaseOfSprites EQU &600EA V_FLAG EQU 1:SHL:28 XFilter_RegisterPostFilter EQU &62641 XFilter_DeRegisterPostFilter EQU &62643 XFont_FindFont EQU &60081 XFont_LoseFont EQU &60082 XWimp_ForceRedraw EQU &600D1 XWimp_Initialise EQU &600C0 XWimp_CloseDown EQU &600DD XOS_Module EQU &2001E XOS_EvaluateExpression EQU &2002D XOS_SetVarVal EQU &20024 XOS_ConvertBinary1 EQU &200DD XOS_ReadUnsigned EQU &20021 XWimp_ReadSysInfo EQU &600F2 XWindLimit EQU 11 YWindLimit EQU 12 XEigFactor EQU 4 YEigFactor EQU 5 Service_Reset EQU &27 Service_NewFilterManager EQU &87 Service_ModeChange EQU &46 wsp2_size EQU 92 module_base DCD 0 DCD initialise - module_base DCD finalise - module_base DCD service - module_base DCD title_string - module_base DCD help_string - module_base DCD help_table - module_base ; --------------------------------------------------------------------------------------------------------- initialise STMFD sp!, {lr} BL checkhostosversion ; if error, nothing to undo BLVC readenviro ; never returns an error BLVC register_filter ; if error, nothing to undo STMVSFD sp!, {r0} BVS init_u1 BLVC claim_swi_vector STMVSFD sp!, {r0} BVS init_u2 BLVC getfilertaskhandle ; if error, nothing here to undo BLVC getfonthandle STMVSFD sp!, {r0} BVS init_u3 BLVC forceredraw ; if error, nothing here to undo BLVC createvble STMVSFD sp!, {r0} BVS init_u4 LDMFD sp!, {pc} init_u4 LDR r0, fonthandle SWI XFont_LoseFont init_u3 BL release_swi_vector init_u2 ; undo register_filter ADR r0, title_string ADRL r1, filter_code MOV r2, #0 MOV r3, #0 LDR r4, mask SWI XFilter_DeRegisterPostFilter init_u1 LDMFD sp!, {r0,lr} ORRS pc, lr, #V_FLAG mask DCD 2_00000001100100000001 ; had to unmask redraw event, so can mark icon plots due to redraw ; had to unmask messages as MenusDeleted message can cause an icon plot register_filter STMFD sp!,{lr} ADR r0, title_string ADRL r1, filter_code MOV r2, #0 MOV r3, #0 STR r3, dragging_flag LDR r4, mask SWI XFilter_RegisterPostFilter LDMFD sp!,{pc} checkhostosversion STMFD sp!, {lr} MOV r0, #18 ADR r1, chov_text SWI XOS_Module LDMFD sp!, {lr} ORRVSS pc, lr, #V_FLAG LDR r0, [r3, #20] ADD r0, r3, r0 ;ptr to UtilityModule help string chov_l1 LDRB r1, [r0], #1 CMP r1, #0 ADREQ r0, chov_error ORREQS pc, lr, #V_FLAG CMP r1, #'.' BNE chov_l1 LDRB r1, [r0, #-2] ;version number a.bc LDRB r2, [r0, #0] LDRB r3, [r0, #1] SUB r1, r1, #'0' SUB r2, r2, #'0' SUB r3, r3, #'0' ADD r4, r1, r1, ASL #2 ;r4 = 5a ADD r0, r2, r4, ASL #1 ;r0 = b+10a ADD r0, r0, r0, ASL #2 ;r0 = 5b+50a ADD r0, r3, r0, ASL #1 ;r0 = c+10b+100a MOV r4, #300 ADD r4, r4, #10 CMP r0, r4 ADRLT r0, chov_error ;return error if host os version < 3.10 ORRLTS pc, lr, #V_FLAG BICGES pc, lr, #V_FLAG chov_text DCB "UtilityModule", 0 ALIGN chov_error DCD 0 ;NB Haven't got an official error number - this is a BASIC error number DCB "Desktop+ requires at least RISC OS 3.10", 0 ALIGN readenviro STMFD sp!, {lr} MOV r0, r10 MOV r1, #0 MOV r2, #0 SWI XOS_EvaluateExpression STRVC r2, options LDMFD sp!, {pc}^ ; don't want to return with v set! atask DCB "TASK" acth DCD 0 ;current task handle store forceredraw STMFD sp!, {lr} MOV r0, #5 ;to read current task handle SWI XWimp_ReadSysInfo LDMVSFD sp!, {pc} STR r0, acth ;This avoids problem if call to module resulting in this code CMP r0, #0 ;executing, was from a task (otherwise this bodge generates BNE fr_alreadytask ;an error as we are effectively trying to init a task twice) MOV r0, #200 LDR r1, atask ADR r2, title_string SWI XWimp_Initialise ;It seems, not allowed to use _ForceRedraw unless am a task. STMFD sp!, {r1} ;This gets around problem, but is it safe legit code, ;& even if it is, is there a better way to do this? fr_alreadytask MOV r0, #-1 ;NB I discovered after writing this initially without the MOV r1, #XWindLimit ;above check on current task status, that this doesn't work SWI XOS_ReadModeVariable ;when called from a task. ADD r3, r2, #1 ;The above check using Wimp_ReadSysInfo cures this problem, MOV r1, #XEigFactor ;& I think this somewhat unorthodox method is now safe, SWI XOS_ReadModeVariable ;though it remains to answer, is there a better way? MOV r3, r3, ASL r2 MOV r1, #YWindLimit SWI XOS_ReadModeVariable ADD r4, r2, #1 MOV r1, #YEigFactor SWI XOS_ReadModeVariable MOV r4, r4, ASL r2 MOV r1, #0 MOV r2, #0 SWI XWimp_ForceRedraw LDR r0, acth ;if external caller is a task, didn't need to start a grubby CMP r0, #0 ;task here, & can just return now LDMNEFD sp!, {pc} LDMFD sp!, {r0} LDR r1, atask SWI XWimp_CloseDown LDMFD sp!, {pc} getfilertaskhandle ; note, rest of this section is also mine STMFD sp!, {lr} ; Question: is there an easier way to convert task name MOV r0, #0 ; to task handle? gfthl1 CMP r0, #0 LDMLTFD sp!, {pc} ADRL r1, workspace2 MOV r2, #wsp2_size SWI XTaskManager_EnumerateTasks LDMVSFD sp!, {pc} ADRL r3, workspace2 gfthl2 CMP r3, r1 BGE gfthl1 LDR r4, [r3, #4] LDMIA r4, {r5, r6} BIC r6, r6, #255<<16 BIC r6, r6, #255<<24 LDR r12, gftha1 CMP r5, r12 CMPEQ r6, #'r' ADDNE r3, r3, #16 BNE gfthl2 LDR r0, [r3] MOV r0, r0, LSL #16 MOV r0, r0, LSR #16 STR r0, filertaskhandle LDMFD sp!, {pc} getfonthandle STMFD sp!, {lr} ADR r1, fontid ADR r2, pointsizes LDMIA r2, {r2, r3} MOV r4, #0 MOV r5, #0 SWI XFont_FindFont STRVC r0, fonthandle LDMFD sp!, {pc} fonthandle DCD 0 fontid DCB "Homerton.Medium",0 ALIGN pointsizes DCD 11*16, 11*16 gftha1 DCD 'F'+('i'<<8)+('l'<<16)+('e'<<24) ; --------------------------------------------------------------------------------------------------------- finalise STMFD sp!, {lr} BL release_swi_vector LDMVSFD sp!, {pc} ADRVC r0, title_string ADRVCL r1, filter_code MOVVC r2, #0 MOVVC r3, #0 LDRVC r4, mask SWIVC XFilter_DeRegisterPostFilter LDMVSFD sp!, {pc} BLVC destroyvble LDMVSFD sp!, {pc} LDR r0, fonthandle SWI XFont_LoseFont BL forceredraw LDMFD sp!, {pc}^ ; ^, as we don't care about errors from lose font or redraw ; --------------------------------------------------------------------------------------------------------- ; The following code type system variable provides a means of reading/writing to Desktop+'s options ; flag. ; NB Code for vble will be copied to heap & NOT used in situ so must refer to options addr in ; this module via a copy of that addr set up by createvble inside the code vble. ; This won't cause any problems if module moves, as finalisation/reinit will destroy/recreate it. createvble STMFD sp!, {lr} ADRL r0, options STR r0, vbleoptionsaddr ADR r0, forceredraw STR r0, vbleforceredrawaddr ADR r0, vblename ADR r1, vblecode MOV r2, #vblecodeend-vblecode ;to create MOV r3, #0 MOV r4, #16 SWI XOS_SetVarVal LDMFD sp!, {pc} destroyvble STMFD sp!, {lr} ADR r0, vblename ADR r1, vblecode MOV r2, #-1 ;to flag destroy MOV r3, #0 MOV r4, #16 SWI XOS_SetVarVal LDMFD sp!, {pc} vblename DCB "Desktop+_Options",0 ALIGN vblecode ;values input/output as strings B vblewrite ;here, use a string like '2_11111' + terminator vbleread ;on exit: r0 ptr to value, r1 may be corrupted, r2 length (no terminator necessary) STMFD sp!, {lr} LDR lr, vbleoptionsaddr LDR r0, [lr] ;got actual value of options ADR r1, vblebuffer MOV r2, #vblebufferend-vblebuffer SWI XOS_ConvertBinary1 LDMVSFD sp!, {pc} ADR r0, vblebufferread ;pt to '2_' chars preceeding 8 digit binary SUB r2, r1, r0 ;& set length (as r1 pts to terminating null written by _Convert) LDMFD sp!, {pc} vblewrite ;on entry: r1 ptr to value, r2 length. on exit: r1,r2,r4,r10-r12 may be corrupted STMFD sp!, {r0, lr} MOV r0, #10 SWI XOS_ReadUnsigned LDMVSFD sp!, {r1, pc} ;note use of r1 to get initial value of r0 off stack, leaving error ptr now in r0 LDR lr, vbleoptionsaddr ;r2 now has new value to be written LDR r1, [lr] ;read old value to r1 STR r2, [lr] ;write new value EOR r2, r1, r2 ;compare bits of old with new TST r2, #1<<3 ;see if fancy text option has changed TSTEQ r2, #1<<4 ;see if sprite directories option has changed STMNEFD sp!, {r3} ;if either has changed then, must preserve r3 ADRNE lr, vblewritereturn ; (as forceredraw doesn't) LDRNE pc, vbleforceredrawaddr ; & branch into module code to do a force redraw LDMFD sp!, {r0, pc} ;if not, then return vblewritereturn LDMFD sp!, {r3} ;after calling forceredraw, code returns here, where we LDMVSFD sp!, {r1, pc} ;restore r3, & return, preserving current r0, if an error LDMFD sp!, {r0, pc} ;has occurred DCB 0, 0 vblebufferread DCB '2', '_' vblebuffer DCD 0, 0, 0 vblebufferend vbleoptionsaddr DCD 0 vbleforceredrawaddr DCD 0 vblecodeend ; --------------------------------------------------------------------------------------------------------- service CMP r1, #Service_Reset CMPNE r1, #Service_NewFilterManager CMPNE r1, #Service_ModeChange MOVNES pc, lr STMFD sp!,{r0-r5,lr} CMP r1, #Service_Reset BNE next_service BL claim_swi_vector LDMFD sp!,{r0-r5,pc}^ next_service CMP r1, #Service_NewFilterManager BNE next_service2 BL register_filter LDMFD sp!,{r0-r5,pc}^ next_service2 ADR r1, fontid ;not 100% sure of what I'm doing here ADR r2, pointsizes ;must have this code entered in SVC mode LDMIA r2, {r2, r3} ;& calls to Font_ must not generate this service MOV r4, #0 ;(as Font_ not re-entrant) MOV r5, #0 ;I think this is all ok, as would be expected SWI XFont_FindFont ;however PRM is rather vague re processor mode LDR r1, fonthandle ;& source of generation for services STRVC r0, fonthandle MOVVC r0, r1 SWIVC XFont_LoseFont LDMFD sp!,{r0-r5,pc}^ ; --------------------------------------------------------------------------------------------------------- title_string DCB "Desktop+",0 help_string DCB "Desktop+ ",9,"1.54 (26 Jan 1994)",0 ALIGN help_table DCB "Desktop+_Options",0 ALIGN DCD 0 ;no code (only help text) DCD 0 DCD 0 DCD help_text1 - module_base DCD 0 ;table terminator help_text1 DCB 13 DCB "Desktop+",27,41,"a RISC OS 3.10/3.11 specific patch, which provides several enhancements" DCB 27,40,"your desktop:",13,13 DCB "(0) Many applica",27,9,"s can be forced",27,40,"use solid ",27,31," drags instead of dashed boxes;",13 DCB "(1) The Filer can be made",27,40,"use solid ",27,31," drags;",13 DCB "(2) All solid ",27,31," drags can be made semi-transparent;",13 DCB "(3) The Filer can be made",27,40,"use fancy text;",13 DCB "(4) Directories/",27,7,"s can be displayed using user defined ",27,31,"s.",13,13 DCB "To use op",27,9," 4, you need",27,40,"load suitable ",27,31,"s into",27,2,"Wimp ",27,31," pool, with " DCB 27,11,"s:",13 DCB "��#<n>, $<n>, sm#<n> & sm$<n>, per ",27,3,"y, where <n> is",27,2,27,11," of",27,2,27,3,"y concerned,",13 DCB "& ",27,7,"/<abc>, small/<abc>, where <abc>",27,41 DCB "a 3 character file name suffix.",13,13 DCB "A combina",27,9," of these op",27,9,"s",27,41,27,28,"ed using a ",27,36," such as 2_10111, which in",27,2 DCB "example given, turns",27,38,"op",27,9,"s on except fancy text.",13 DCB "The ",27,36," may be passed using either '*RMLoad Desktop+ 2_10111', or after loading, using " DCB "*Set�Desktop+_Op",27,9,"s�2_10111.",13 DCB "You may also read",27,2,27,5," op",27,9,"s from this system variable.",13 DCB "If you do not specify a choice of op",27,9,"s, only (0) & (4) will be used.",13 DCB 0 ALIGN ; --------------------------------------------------------------------------------------------------------- release_swi_vector MOV r0, #8 LDR r1, [r0] LDR r2, new_branch ; check that our SWI decoder hasn't been replaced CMP r1, r2 LDREQ r1, old_branch ; replace original decoder if it hasn't STREQ r1, [r0] MOVEQ r0, #0 STREQ r1, old_branch MOVEQS pc, lr LDR r2, old_branch ; if the old branch is already there then do nothing CMP r1, r2 MOVEQS pc, lr ADR r0, error_block ; otherwise return an error ORRS pc, lr, #V_FLAG error_block DCD &103 DCB "Can't detach SWI handler", 0 ALIGN ; --------------------------------------------------------------------------------------------------------- claim_swi_vector MOV r0, #8 LDR r0, [r0] ; get branch to SWI handler STR r0, old_branch ADR r1, second_branch-8 ; insert in our own code SUB r0, r0, r1, LSR #2 BIC r0, r0, #&FF000000 ; Bug fix for when old branch < replacement. ORR r0, r0, #&EA000000 STR r0, second_branch ADD r0, r0, #(second_branch-first_branch) / 4 ; Can get away with this, but should be aware ; for future reference, that this calc is potentially subject ; to same flaw as corrupted instruction field above. ; nb here, we could only get corruption if second branch was ; to a point between first & second in this code (as this ; would change sign of branch offset when making it relative ; to first), but this is clearly nonsense, so we are ok. SUB r0, r0, #&D0000000 STR r0, first_branch ; convert to a BNE MOV r1, #8 ADR r0, swi_patch-8-8 MOV r0, r0, LSR #2 ADD r0, r0, #&EA000000 STR r0, [r1] STR r0, new_branch ; put in a branch to our code MOVS pc, lr ; --------------------------------------------------------------------------------------------------------- swi_patch STMFD sp!,{lr} BIC lr, lr, #&FC000003 LDR lr, [lr,#-4] ; get SWI instruction BIC lr, lr, #&FF000000 BIC lr, lr, #&20000 SUB lr, lr, #&40000 CMP lr, #&E2 ; is it Wimp_PlotIcon CMPNE lr, #&D0 ; or _DragBox CMPNE lr, #&C9 ; or _UpdateWindow CMPNE lr, #&2400 ; or DragASprite_Start CMPNE lr, #&C3 ; or Wimp_DeleteWindow ? CMPNE lr, #&C2 ; or _CreateIcon LDMNEFD sp!, {lr} ; otherwise drop through to SWI handler first_branch DCD 0 CMP lr, #&C9 ; if it's update, copy out window handle LDREQ lr, [r1] ; then pass call on STREQ lr, windowhandle BEQ continue CMP lr, #&2400 BEQ is_dragaspritestart CMP lr, #&E2 ; if plot icon, jump to code to deal with this BEQ is_ploticon CMP lr, #&C3 ; if delete window, jump to code to handle this BEQ is_deletewindow CMP lr, #&C2 ; if create icon, jump to code to handle this BEQ is_createicon ; else drop through to drag box code LDR lr, [r1,#4] ; get drag type CMP lr, #5 BNE continue LDR lr, dragging_flag CMP lr, #0 BEQ callback_code MOV lr, #0 ; Make code end a current drag if another requested STR lr, dragging_flag ; This is consistent with DragASprite which does this & SWI XDragASprite_Stop ; avoids bug if this code thinks it's dragging, even when BVC callback_code ; it never got started. LDMFD sp!, {pc}^ ; If an error, behave as before (ie ignore request). not_sprite LDMFD sp!,{r0-r4,lr} continue LDMFD sp!, {lr} ; call Wimp_DragBox as usual second_branch DCD 0 workspace % 52 bdingbox % 16 initbox % 16 callback_code STMFD sp!,{r0-r4,lr} MOV r4, r1 ADR r1, workspace SWI XWimp_GetPointerInfo LDR r0, [r1, #16] CMP r0, #0 ; if there's no icon under the pointer then BLT is_filer ; see if belongs to filer LDR lr, options ;ignore application solid drag option, if option not TST lr, #1<<0 ;activated BEQ not_sprite ;following code modifies bding box st now can use 'constrain ; ptr to parent box', rather than 'constrain box to parent' ;this shouldn't be necessary as DragASprite can accept both ;forms, however the latter doesn't work correctly ;instead, it calculates pos of sprite within initial box ;& then passes the minimal bding box for the sprite to an ;invisible wimp_dragbox, thus if initial box given to this ;code doesn't exactly match the sprite size, behaviour will ;be incorrect. ADD lr, r4, #8 STMFD sp!, {r4-r7} LDMIA lr, {r0-r7} ;r0-r3 init drag box pos, r4-r7 parent box ADR lr, initbox ;make a copy of init box STMIA lr, {r0-r3} LDR lr, workspace ;mouse x SUB r0, lr, r0 SUB r2, lr, r2 LDR lr, workspace+4 ;mouse y SUB r1, lr, r1 SUB r3, lr, r3 ADD r4, r4, r0 ADD r6, r6, r2 ADD r5, r5, r1 ADD r7, r7, r3 ADD r6, r6, #1 ADD r7, r7, #1 ADR lr, bdingbox STMIA lr, {r4-r7} LDMFD sp!, {r4-r7} ADR r1, workspace+12 SWI XWimp_GetIconState ; get data block for icon under the pointer LDR r3, [r1, #24] TST r3, #2 ; if it's not a sprite then do nothing BEQ not_sprite LDR r0, [r1, #16] ; get icon width in r3 LDR r2, [r1, #8] SUB r2, r0, r2 LDR r0, [r4, #16] SUB r2, r2, r0 LDR r0, [r4, #8] ADDS r2, r2, r0 ; get drag box width in r2 RSBLT r2, r2, #0 ; if widths are wrong then do a normal drag, ie guess we have a multiple file drag CMP r2, #120 ; old value of 70 rejects some file icons placed on pinboard ; nb this value is a critical bound for abs(icon under ptr's width - drag box width) ; if actual value is greater than this, assume we have a multiple drag ; this method is used so that it will deal with general multiple icon drags any app BGT isit_multipin LDR r0, [r1, #20] LDR r2, [r1, #12] SUB r2, r0, r2 LDR r0, [r4, #20] SUB r2, r2, r0 LDR r0, [r4, #12] ADDS r2, r2, r0 ; get drag box height in r2 RSBLT r2, r2, #0 ; if heights are wrong then do a normal drag, ie guess we have a multiple file drag CMP r2, #40 ; critical bound for abs(icon under ptr's height - drag box height) BGT isit_multipin TST r3, #256 ; is it indirected ? BNE indirected ADD r2, r1, #28 ; sprite name directly specified B found_start ; this will find sprite area before do_drag indirected TST r3, #1 BNE text_and_sprite LDR r3, [r1, #36] ; get indirected sprite name length LDR r2, [r1, #28] LDR r1, [r1, #32] CMP r3, #0 ; if length = 0 then r2 points to start of sprite ADDEQ r2, r2, #4 CMP r1, #-1 MOVEQ r1, #1 ; if area is -1, treat it as wimp area (ie +1) - this seems to be needed in FormEd B do_drag text_and_sprite LDR r2, [r1, #32] CMP r2, #0 BLE not_sprite find_start LDRB r3, [r2], #1 ; extract sprite name from validation string CMP r3, #'S' CMPNE r3, #'s' BEQ found_start ; found a command, now look for next semicolon command_end CMP r3, #'\' ; '\' means next character is literal, not a command ADDEQ r2, r2, #1 CMP r3, #';' BEQ find_start CMP r3, #' ' LDRGEB r3, [r2], #1 BGE command_end B not_sprite found_start LDR r0, [r1] ; get icon's parent window handle ADRL r1, workspace2 ; can't use old space, as code still needs data in it STR r0, [r1] ; so copy handle into new block & get window info ORR r1, r1, #1 ; need to modify ptr to block, so that wimp will return SWI XWimp_GetWindowInfo ; only header of this data BIC r1, r1, #3 BVS not_sprite LDR r1, [r1, #68] ; extract window's sprite area ptr do_drag CMP r1, #1 ; if we can't find the sprite then proceed as normal MOV r0, #&118 STMFD sp!, {r2} ; need to preserve the sprite's name in r2 SWIEQ XWimp_SpriteOp SWINE XOS_SpriteOp LDMFD sp!, {r2} BVC got_sprite CMP r1, #1 ; if couldn't find sprite in given area, & that area is not BEQ not_sprite ; wimp, then look again, in wimp area this time; MOV r1, #1 ; this line isn't needed by wimp_spriteop, but is needed by MOV r0, #&118 ; subsequent code, if sprite is found in wimp area SWI XWimp_SpriteOp BVS not_sprite got_sprite STMFD sp!, {r1,r2,r4,r5,r6} ; trap DragASprite bug re drag failure if sprite is MOV r0, #&128 ; 256 colour CMP r1, #1 SWIEQ XWimp_SpriteOp SWINE XOS_SpriteOp ; get sprite info (mode in r6) LDMVSFD sp!, {r1,r2,r4,r5,r6} BVS not_sprite MOV r0, r6 MOV r1, #9 SWI XOS_ReadModeVariable ; get log base 2 bits per pixel LDMCSFD sp!, {r1,r2,r4,r5,r6} BCS not_sprite CMP r2, #3 LDMFD sp!, {r1,r2,r4,r5,r6} BEQ not_sprite ; if 256 colour, do an outline drag ADR r0, workspace LDR r0, [r0, #36] ; get flags word TST r0, #&200 ORRNE r0, r0, #2_100000 ; set or clear bit 5 BICEQ r0, r0, #2_100000 AND r0, r0, #2_111001 TST r0, #1 ADREQ r3, flags_table ADRNE r3, both_table LDRB r0, [r3, r0, LSR #3] ; look up flags in table ADD r0, r0, #128+64+32 ;necessary to be consistent with Wimp_DragBox. ADR r3, initbox ADR r4, bdingbox SWI XDragASprite_Start STRVC r0, dragging_flag ; {The following is speculative; ie I am unsure as to the truth of various bits of it, to varying degrees} ; ; The following commented out code is wrong: this code is not part of a module swi handler; it cannot ; assume X bit set status or that V bit is clear on entry, since it has not been called by nice RISC OS swi ; decoder, but directly by hardware vector (see eg PRM RISC OS 3, 1-28). ; In my fix of Paul's code, explicitly clear v bit if no error, & avoid error handling if error (which is ; dependent on X bit of SWI instruction), by passing call on to previous SWI handler, rather than giving up ; with an error (regardless of whether that would be v bit set return, or error generation). ; For my record, if wanted to return error, I think would need to do: ; store x bit at initial SWI decode; ; read this when error occurs, & if set, return with v bit set & error block ptr in r0, BUT ; if clear, then (I'm not sure about this): ; call OS_ServiceCall, reason code 6, ; then call OS_GenerateError, with error block (won't return) ; ; QUESTION: ; Can anyone reading this, confirm this assumption or otherwise? ; Any clarification would be appreciated. ; I (Michael Rozdoba) can be reached at: ; 10 Octavia Close, Bedlington, Northumberland, NE22 6LG. ; ; LDMVCFD sp!,{r0-r4,lr,pc}^ ; return immediately if there's no error ; ADD sp, sp, #4 ; LDMFD sp!,{r1-r4,lr} ; LDMFD sp!,{lr} ; otherwise return with V set and error pointer in r0 ; ORRS pc, lr, #V_FLAG ; ; My modified code described above is: BVS not_sprite LDMFD sp!, {r0-r4,lr} LDMFD sp!, {lr} BICS pc, lr, #V_FLAG ;force vbit clear, but preserve all other flags ; --------------------------------------------------------------------------------------------------------- LEFT EQU 0 HCENTRE EQU 1 RIGHT EQU 2 BOTTOM EQU 0 VCENTRE EQU 4 TOP EQU 8 both_table DCB TOP + LEFT DCB TOP + HCENTRE DCB VCENTRE + LEFT DCB VCENTRE + HCENTRE DCB TOP + RIGHT DCB BOTTOM + HCENTRE DCB VCENTRE + RIGHT DCB VCENTRE + LEFT flags_table DCB BOTTOM + LEFT DCB BOTTOM + HCENTRE DCB VCENTRE + LEFT DCB VCENTRE + HCENTRE DCB BOTTOM + RIGHT DCB BOTTOM + HCENTRE DCB VCENTRE + RIGHT DCB VCENTRE + HCENTRE old_branch DCD 0 ; branch to original SWI decoder new_branch DCD 0 ; branch to our new SWI decoder dragging_flag DCD 0 ; set when there's a sprite drag in progress ; --------------------------------------------------------------------------------------------------------- filter_code ; Stop the sprite dragging operation. Some major mods to STMFD sp!, {lr} ; filter, made below, to allow tracking of 'safe' plots CMP r0, #7 BNE fc_nextcheck1 LDR lr, dragging_flag CMP lr, #0 MOVNE lr, #0 STRNE lr, dragging_flag SWINE XDragASprite_Stop fc_nextcheck1 LDR lr, filertaskhandle CMP lr, #-1 ; need something like this to handle case where module BEQ needreadfth ; was say loaded at boot, & then wasn't able to read resumewithfth ; filer task handle - but is there a better way? CMP lr, r2 MOVEQ lr, #1 MOVNE lr, #0 STR lr, filerflag ; record whether current task is filer or not (used eg by fancy font support) CMP r0, #1 MOVEQ lr, #0 ; iff task is filer & event is not redraw, mark plotflag ok STR lr, plotflag ; to store sprite from any subsequent PlotIcon LDMFD sp!, {pc}^ needreadfth STMFD sp!, {r0-r6} BL getfilertaskhandle LDMFD sp!, {r0-r6} LDR lr, filertaskhandle B resumewithfth ; --------------------------------------------------------------------------------------------------------- isit_multipin ;nb we have already decided it is a multi-icon drag LDR r2, workspace+12 MOV r0, #19 ADRL r1, message SWI XWimp_SendMessage ; r2 = task handle BVS not_sprite MOV r0, r2 SWI XTaskManager_TaskNameFromHandle BVS not_sprite TST r0, #3 BNE not_sprite ;if not word aligned, 'not_sprite' (am assuming it will be) LDMIA r0, {r0,r1,r2} ;again, poss prob if name len < 12 - sod it - can't be AND r2, r2, #&FF ;bothered to check name char by char LDR r3, ici_pin CMP r0, r3 LDREQ r3, ici_pin+4 CMPEQ r1, r3 LDREQ r3, ici_pin+8 CMPEQ r2, r3 BNE not_sprite ;if not pinboard, do not_sprite code (ie outline drag) STMFD sp!, {r4,r5} ;(����) these 16 lines ensure multi icon is centred on ptr ADR lr, initbox ; and not over the group of pinboard icons LDMIA lr, {r0-r3} ; ADD r4, r0, r2 ; LDR lr, workspace ; SUB r4, lr, r4, ASR #1 ; ADD r5, r1, r3 ; LDR lr, workspace+4 ; SUB r5, lr, r5, ASR #1 ; ADD r0, r0, r4 ; ADD r1, r1, r5 ; ADD r2, r2, r4 ; ADD r3, r3, r5 ; ADR lr, initbox ; STMIA lr, {r0-r3} ; LDMFD sp!, {r4,r5} ; MOV r1, #1 ;else jmp to do_drag with sprite name from multiname below ADR r2, multiname LDR r0, workspace+36 ;make do_drag code think the icon under ptr is vertically ORR r0, r0, #16 ;centred, as this will force it to vertically centre sprite STR r0, workspace+36 ;within drag box B do_drag ; --------------------------------------------------------------------------------------------------------- multiname DCB "multifile", 0 ALIGN is_filer ; all of this section has been added by me LDR lr, options ;if filer solid drag option not enabled, do outline TST lr, #1<<1 BEQ not_sprite LDR r2, [r1, #12] ; window handle CMP r2, #0 BLT not_sprite STR r2, dragwindowhandle ; for use when looking for sprite name to match those recorded by PlotIcon MOV r0, #19 ADRL r1, message SWI XWimp_SendMessage ; r2 = task handle BVS not_sprite MOV r2, r2, LSL #16 ; nb not sure how many bits of handle significant, however it MOV r2, r2, LSR #16 ; is the case that r2 & handle passed to filter are only ; common in at most bottom 16 bits, for same task LDR r0, filertaskhandle CMP r0, r2 BNE not_sprite ; not over filer (or registered icon), so revert to outline STMFD sp!, {r4-r7} ADD r4, r4, #8 LDMIA r4, {r0,r1,r2,r3} ; initial box position SUB r6, r2, r0 ; width SUB r7, r3, r1 ; height CMP r7, #44 ; nb these figures are the exact heights of filer template icons (****) CMPNE r7, #116 ; for small/full-info & large icons filer display options (****) BNE isf_gotmulti ; guess we have a multiple file drag CMP r6, #224 ; nb these figures are the exact widths of filer template icons (****) CMPNE r6, #976 ; for small icons, full info & large icons filer display options (****) CMPNE r6, #180 ; (****) BNE isf_gotmulti ; guess we have a multiple file drag CMP r7, #44 ADDEQ r4, r0, #4 ADDEQ r5, r1, #4 ADDEQ r6, r4, #36 ADDEQ r7, r5, #36 BLEQ isf_gotsmall ; (����) this code ensures sprite is centred on ptr & not over filer icon ADDNE r4, r0, #56 ADDNE r5, r1, #44 ADDNE r6, r4, #68 ADDNE r7, r5, #68 ADRL r0, workspace2 STMIA r0, {r4-r7} ; this gives an initial box over the file sprite - important to recalc this, ; especially if display is full info else sprite appears over middle of text LDMFD sp!, {r4-r7} ; rather than over file sprite on left LDR r0, dragwindowhandle ADR r1, namelist ADR r3, namelistend dragnamescan LDR r2, [r1], #20 CMP r2, r0 BEQ draggotname ;if we have a match of window handles, exit search CMP r1, r3 BLT dragnamescan B not_sprite ;couldn't find a name for this window, so use not_sprite (ie outline drag) draggotname SUB r2, r1, #16 ;calc name ptr in namelist based on r1 from above scan draggotnameptr MOV r0, #&18 SWI XWimp_SpriteOp BVS not_sprite ;couldn't find sprite in wimp area, so do outline MOV r0, #&28 STMFD sp!, {r5,r6} SWI XWimp_SpriteOp ;get sprite mode in r6 LDMVSFD sp!, {r5,r6} BVS not_sprite MOV r5, r2 ;preserve sprite name ptr, for use by DragASprite_Start MOV r0, r6 MOV r1, #9 SWI XOS_ReadModeVariable ; get log base 2 bits per pixel LDMCSFD sp!, {r5,r6} BCS not_sprite CMP r2, #3 MOV r2, r5 LDMFD sp!, {r5,r6} BEQ not_sprite ; if 256 colour, do an outline drag MOV r0, #2_11000101 MOV r1, #1 ADRL r3, workspace2 SWI XDragASprite_Start BVS not_sprite LDMFD sp!, {r0-r4,lr} LDMFD sp!, {lr} BICS pc, lr, #V_FLAG ;force vbit clear, but preserve all other flags dragwindowhandle DCD 0 isf_gotmulti ADRL r4, workspace2 ADD r5, r0, r2 ; (����) these 10 lines ensure multiicon is centred on ptr LDR r7, workspace ; & not over filer icon group SUB r5, r7, r5, ASR #1 ; ADD r6, r1, r3 ; LDR r7, workspace+4 ; SUB r6, r7, r6, ASR #1 ; ADD r0, r0, r5 ; ADD r1, r1, r6 ; ADD r2, r2, r5 ; ADD r3, r3, r6 ; STMIA r4, {r0-r3} LDMFD sp!, {r4-r7} ADR r2, multiname B draggotnameptr isf_gotsmall ; (����) this code ensures small sprite is centred on ptr & not over filer icon ADD r0, r4, r6 LDR r2, workspace SUB r0, r2, r0, ASR #1 ADD r1, r5, r7 LDR r2, workspace+4 SUB r1, r2, r1, ASR #1 ADD r4, r4, r0 ADD r5, r5, r1 ADD r6, r6, r0 ADD r7, r7, r1 MOV pc, lr ; --------------------------------------------------------------------------------------------------------- options DCD 2_00000000000000000000000000010001 plotflag ; all of this section has been added by me DCD 0 filerflag DCD 0 windowhandle DCD 0 ; as used by last _UpdateWindow (needed by ; PlotIcon intercept, when logging sprite name/window handle) namelist DCD -1, 0, 0, 0, 0 ; entry 0 (handle -1, & 16 bytes zeroed for name) DCD -1, 0, 0, 0, 0 ; allow upto 4 to be stored DCD -1, 0, 0, 0, 0 DCD -1, 0, 0, 0, 0 namelistend lastname % 16 filertaskhandle DCD -1 is_ploticon LDR lr, filerflag CMP lr, #1 BNE continue ;else, we have a filer PlotIcon call STMFD sp!, {r0,r2-r7} LDMIA r1, {r0-r7} ADRL lr, icon STMIA lr, {r0-r7} ;icon data copied for processing TST r4, #2_000000001 ; text? TSTNE r4, #2_000000010 ; & sprite? TSTNE r4, #2_100000000 ; & indirected? NB expect these conditions will always be met LDMEQFD sp!, {r0,r2-r7} ADREQL r1, icon BEQ continue ;all following operations only act if above conditions met ADRL r0, workspace2 ADD r1, r0, #wsp2_size-4-3 ;Now copy validation string from r6 to workspace2 ispipl1 LDRB r2, [r6], #1 ;-4 to leave space for ';Fab', & -3 to allow for name STRB r2, [r0], #1 ;extension by directory replacement code CMP r2, #0 ;Assume terminator is 0 CMPNE r0, r1 BNE ispipl1 CMP r0, r1 BEQ done_ispiprocess ;if couldn't copy validation string out, use original icon ADRL r1, workspace2 STR r1, icon+24 ;alter icon to use this copied validation string dirchange LDR lr, options ;if sprite directory option not enabled, skip TST lr, #1<<4 BEQ dirchangedone ;nb have r1 ptr to modifiable validation string, & ;flags in r4, & r0 pts to v string term + 1 LDMIA r1, {r2-r4} BIC r4, r4, #255<<24 BIC r4, r4, #255<<16 ;this forces names directoryo & small_diro to be treated ADR lr, dtxt ;as for directory & small_dir (they are used by new filer) LDMIA lr, {r5-r7} CMP r2, r5 CMPEQ r3, r6 CMPEQ r4, r7 ADREQ lr, lastname ;lastname is used as workspace to build new sprite name MOVEQ r5, #0 ;this flags will only accept big sprite (original being 'directory') BEQ dc_gotdir ADR lr, sdtxt LDMIA lr, {r5-r7} CMP r2, r5 CMPEQ r3, r6 CMPEQ r4, r7 LDRNE r4, icon+16 BNE dc_changefilespritename ;else gotsdir ADR lr, lastname+2 MOV r5, #1 ;this flags look for small, but if not found, try big MOV r2, #'s' ;(as original is 'small_dir') ORR r2, r2, #'m'<<8 STR r2, lastname dc_gotdir ADR r3, lastname+12 ADR r2, icon+16 LDMIA r2, {r4, r7} ;r4=flags, r7=text buffer ptr TST r4, #1<<21 MOVNE r2, #'$' ;if icon selected, put a '$' into new name MOVEQ r2, #'#' ;else insert a '#' ORRNE r5, r5, #2 ;bit 1 set iff is selected (to allow look for # if no $) STRB r2, [lr], #1 dcl1 LDRB r2, [r7], #1 CMP r2, #32 ;need this as seems filer may put spaces after text in text MOVLE r2, #0 ;buffer, &/or use terminators other than 0 STRB r2, [lr], #1 CMP r2, #0 CMPNE lr, r3 BNE dcl1 ;got new name to look for STMFD sp!, {r0} dc_tom_reentry MOV r0, #24 ADR r2, lastname SWI XWimp_SpriteOp BVC dc_gotname ;ptr in r2 TST r5, #1 BEQ dc_tryoncemore MOV r0, #24 ADRL r2, lastname+2 ;ptr in r2 SWI XWimp_SpriteOp ORRVC r4, r4, #1<<11 ;if had to settle for a big sprite when wanted small, BVC dc_gotname ;set flag bit to render it at half size dc_tryoncemore TST r5, #2 LDMEQFD sp!, {r0} BEQ dirchangedone ;if is # type & not found above, then use old MOV r0, #'#' TST r5, #1 STREQB r0, lastname STRNEB r0, lastname+2 BIC r5, r5, #2 ;clear bit 1, so if not found this code won't keep looping ORR r5, r5, #4 ;set another bit, so if found, can avoid manual inversion B dc_tom_reentry ;ie if no $ sprites, use # sprites again, but with selected ; bit set as for normal file icons dc_gotname TST r5, #4 BNE dc_invdone TST r4, #1<<21 ;if icon selected swap fore/back colours, so text part still BEQ dc_colsswapped ;looks inverted even though am going to turn selected bit off TST r4, #2_001000000 ;(to stop sprite part being inverted as well) ANDEQ r0, r4, #15*(1<<28) ;if already antialiased, can't swap colours this way - should ANDEQ r6, r4, #15*(1<<24) ;do so via val str, but not likely to occur, so just ignore BICEQ r4, r4, #255*(1<<24) ORREQ r4, r4, r0, LSR #4 ORREQ r4, r4, r6, LSL #4 dc_colsswapped BIC r4, r4, #1<<21 ;clear selected bit incase is selected (am now using two dc_invdone ; different sprites to indicate whether selected or not) ADD sp, sp, #4 ;don't need old v string tail ptr, so drop off stack LDR r0, icon+24 ADD r0, r0, #1 dcl2 LDRB r1, [r2], #1 ;copy new name into validation string STRB r1, [r0], #1 CMP r1, #0 BNE dcl2 B dirchangedone dc_changefilespritename LDR r1, icon+20 ;text ptr MOV r2, r1 dcl3 LDRB r3, [r2], #1 CMP r3, #32 BGT dcl3 SUB r2, r2, #1 ;r2 pts to text terminator SUB r5, r2, r1 ;# chars in text CMP r5, #4 BLT dirchangedone ;if less than 4 chars, can't end in our affix /<abc> LDRB r3, [r2, #-4] CMP r3, #'/' ; CMPNE r3, #'\' ;removed in v 1.54 - see History BNE dirchangedone ;not our affix LDR r5, icon+24 ;valid str ptr LDRB r3, [r5], #1 CMP r3, #'s' BNE dirchangedone ;in case doesn't start with sprite name, get out now ADR r1, lastname ADR r6, lastname+12 dcl4 LDRB r3, [r5], #1 CMP r3, #';' CMPNE r3, #31 MOVLE r3, #0 SUBLE r5, r5, #1 STRB r3, [r1], #1 SUBLE r1, r1, #1 CMPGT r6, r1 BGT dcl4 ;else r5 pts to term of spr name in val str & r1 pts to term in buffer LDRB r3, [r2, #-4] STRB r3, [r1, #-4] LDRB r3, [r2, #-3] STRB r3, [r1, #-3] LDRB r3, [r2, #-2] STRB r3, [r1, #-2] LDRB r3, [r2, #-1] STRB r3, [r1, #-1] MOV r6, r0 ;must restore this after SWI MOV r7, r2 MOV r0, #24 ADR r2, lastname SWI XWimp_SpriteOp MOV r0, r6 BVS dirchangedone ;couldn't find sprite, so get out LDRB r3, [r7, #-4] ;else copy affix into val string, overwriting end of sprite name STRB r3, [r5, #-4] LDRB r3, [r7, #-3] STRB r3, [r5, #-3] LDRB r3, [r7, #-2] STRB r3, [r5, #-2] LDRB r3, [r7, #-1] STRB r3, [r5, #-1] dirchangedone ;must have preserved r4, & r0 must pt to v string term + 1 STR r4, icon+16 ;needed if fancy text option not selected LDR lr, options ;if fancy filer icon text not enabled, don't convert to it TST lr, #1<<3 BEQ done_ispiprocess TST r4, #2_001000000 ; not already antialiased? BNE done_ispiprocess ; if already antialiased, skip make fancy SUB r0, r0, #1 MOV r1, #';' STRB r1, [r0], #1 MOV r1, #'F' STRB r1, [r0], #1 MOV r1, r4, LSR #28 ;extract background colour CMP r1, #9 ADDGT r1, r1, #'a'-'9'-1 ADD r1, r1, #'0' STRB r1, [r0], #1 MOV r1, r4, LSR #24 ;extract foreground colour AND r1, r1, #15 CMP r1, #9 ADDGT r1, r1, #'a'-'9'-1 ADD r1, r1, #'0' STRB r1, [r0], #1 MOV r1, #0 STRB r1, [r0] ;new validation string written, now setting font colours BIC r4, r4, #255<<24 LDR r1, fonthandle ORR r4, r4, r1, LSL #24 ;put font handle into flags ORR r4, r4, #1<<6 ;set fancy font bit TST r4, #1<<4 ;if vertically centred, then is small display, so need to BICNE r4, r4, #(1<<9)+(1<<3) ;turn right justification & horizontal centring off STR r4, icon+16 done_ispiprocess LDMFD sp!, {r0,r2-r7} ADR r1, icon ;make subsequent code (& Wimp) act on modified icon LDR lr, plotflag ; filer ploticon sprite name extraction CMP lr, #1 BNE continue LDR lr, [r1, #16] STMFD sp!, {r0-r8} ; get ptr to validation string LDR r3, [r1, #24] LDRB r0, [r3], #1 CMP r0, #'s' CMPNE r0, #'S' LDMNEFD sp!, {r0-r8} BNE continue ; if first char isn't an S command, ignore ADR r1, lastname MOV r2, #12 ispil1 ; extract name LDRB r0, [r3], #1 CMP r0, #';' MOVEQ r0, #0 STRB r0, [r1], #1 SUBS r2, r2, #1 CMPNE r0, #0 BNE ispil1 CMP r2, #0 BEQ ispil2 ;all 12 chars filled, so got name padded with 0's (no 0's needed) ispil3 STRB r0, [r1], #1 ;else pad out to 12 chars with 0's SUBS r2, r2, #1 BNE ispil3 ispil2 MOV r5, #'#' ;handle odd case where dealing with above # <-> $ named dirs LDR r3, lastname AND r4, r3, #255 CMP r4, #'$' STREQB r5, lastname BEQ ispi_selected MOV r3, r3, LSR #16 AND r3, r3, #255 CMP r3, #'$' STREQB r5, lastname+2 BEQ ispi_selected TST lr, #(1<<21) BEQ ispi_notselected ;if plot is unselecting icon, try to remove from our list ; else is selected, so try to add ispi_selected LDR r0, windowhandle ADRL lr, namelist ADR r1, namelistend ispil4 LDR r2, [lr], #20 CMP r2, r0 CMPNE r2, #-1 ADDEQ lr, lr, #-20 ADREQ r1, lastname LDMEQIA r1, {r1-r3} STMEQIA lr, {r0-r3} LDMEQFD sp!, {r0-r8} BEQ continue ;handle & name stored, so get out of here (pass call on) CMP lr, r1 BLT ispil4 ;can't find space so give up & pass call on LDMFD sp!, {r0-r8} B continue ispi_notselected LDR r0, windowhandle ADRL lr, namelist ADRL r1, namelistend ADRL r2, lastname LDMIA r2, {r2-r4} ispil5 LDMIA lr, {r5-r8} CMP r0, r5 CMPEQ r2, r6 CMPEQ r3, r7 CMPEQ r4, r8 MOVEQ r0, #-1 STREQ r0, [lr] LDMEQFD sp!, {r0-r8} BEQ continue ;handle erased with -1, so get out of here (pass call on) ADD lr, lr, #20 CMP lr, r1 BLT ispil5 ;can't find match so give up & pass call on (ie it may have been overwritten) LDMFD sp!, {r0-r8} B continue ; --------------------------------------------------------------------------------------------------------- dtxt DCB "sdirectory",0,0 ALIGN sdtxt DCB "ssmall_dir",0,0 ALIGN ; --------------------------------------------------------------------------------------------------------- icon % 32 ; used by PlotIcon intercept (which also uses workspace2 below) workspace2 ; for window info (also used for getting filer % wsp2_size ; task handle) message ; for getting window's task handle DCD 20, 0, 0, 0, 0 ; --------------------------------------------------------------------------------------------------------- is_deletewindow ;this code is needed to forget selected icons, if their ;parent filer window is deleted while they are still STMFD sp!, {r0-r3} ;selected LDR r1, [r1] ;handle of window being closed & deleted ADRL r0, namelist ADRL r2, namelistend MOV r3, #-1 isdwl1 LDR lr, [r0], #20 CMP r1, lr ;if window being deleted matches one of those in namelist STREQ r3, [r0, #-20] ; then erase it from namelist (as deleting that window will CMP r0, r2 ; effectively deselect that icon) BLT isdwl1 ;loop back until all in list have been checked LDMFD sp!, {r0-r3} B continue ; --------------------------------------------------------------------------------------------------------- is_createicon ;NB following imposes lots of small conditions on data ;these make code simpler, but make compatibility with new pinboard less likely ;hopefully this won't be a problem, as D+ won't then be needed LDR lr, options ;if sprite directory option not enabled, 'continue' TST lr, #1<<4 BEQ continue LDR lr, [r1, #20] ;flags TST lr, #1<<0 TSTNE lr, #1<<1 TSTNE lr, #1<<8 BEQ continue ;'continue' unless is indirected text & sprite icon LDR lr, [r1, #28] ;val str ptr TST lr, #3 BNE continue ;if val str not word aligned, 'continue' STMFD sp!, {r2-r7} ; ADR r2, ici_sdir ; LDMIA r2, {r2,r3,r4} ; LDMIA lr, {r5,r6,r7} ;nb strictly, shouldn't do this - poss prob if len < 12 ; BIC r7, r7, #&FF000000 ; CMP r2, r5 ; CMPEQ r3, r6 ; CMPEQ r4, r7 ; LDMNEFD sp!, {r2-r7} ; BNE continue ;'continue' unless validation string matches ici_sdir (upto & including 1st 0) LDR lr, [r1, #32] ;text buffer length CMP lr, #14 LDMNEFD sp!, {r2-r7} BNE continue ;continue unless text buffer is 14 bytes long STMFD sp!, {r0-r1} MOV r0, #5 SWI XWimp_ReadSysInfo ;get current task's handle LDMVSFD sp!, {r0-r7} BVS continue CMP r0, #0 LDMEQFD sp!, {r0-r7} BEQ continue ;if no tasks are active, 'continue' SWI XTaskManager_TaskNameFromHandle LDMVSFD sp!, {r0-r7} BVS continue TST r0, #3 LDMNEFD sp!, {r0-r7} BNE continue ;if not word aligned, 'continue' (am assuming it will be) LDMIA r0, {r0,r1,r2} ;again, poss prob if name len < 12 - sod it - can't be AND r2, r2, #&FF ;bothered to check name char by char ADR r3, ici_pin LDMIA r3, {r3,r4,r5} CMP r0, r3 CMPEQ r1, r4 CMPEQ r2, r5 LDMNEFD sp!, {r0-r7} BNE continue ;if name isn't 'Pinboard', 'continue' LDR r1, [sp, #4] ;r1 saved above, must be at this location LDR lr, [r1, #28] ADR r2, ici_sdir LDMIA r2, {r2,r3,r4} LDMIA lr, {r5,r6,r7} ;nb strictly, shouldn't do this - poss prob if len < 12 BIC r7, r7, #&FF000000 CMP r2, r5 CMPEQ r3, r6 CMPEQ r4, r7 BNE ici_changefilespritename ;unless validation string matches ici_sdir (upto & including 1st 0) LDR lr, [r1, #24] ;text buffer ptr ADR r2, ici_spr MOV r3, #'#' STRB r3, [r2], #1 MOV r3, #14 ici_l1 LDRB r4, [lr], #1 CMP r4, #32 MOVLT r4, #0 STRB r4, [r2], #1 SUBS r3, r3, #1 CMPNE r4, #0 BNE ici_l1 ;now have new spr name in ici_spr ici_gotnewsprite MOV r0, #24 ADR r2, ici_spr SWI XWimp_SpriteOp LDMVSFD sp!, {r0-r7} BVS continue ;if no such sprite, 'continue' LDR r1, [sp, #4] ;r1 saved above, must be at this location LDR lr, [r1, #28] ADD lr, lr, #1 ;ptr to char after 'S' in validation str ;NB Next bit is very dodgy - shouldn't be writing to this memory ;ie to pinboard's own memory used to store val str data ADR r0, ici_spr ;however, if it works once, then as we are only working with known code ici_l2 LDRB r1, [r0], #1 ;(ie current pinboard), can safely expect to get away with it STRB r1, [lr], #1 CMP r1, #0 BNE ici_l2 LDMFD sp!, {r0-r7} B continue ici_changefilespritename ;build new name in ici_spr & B ici_gotnewsprite MOV lr, r1 LDR r1, [lr, #24] ;text ptr MOV r2, r1 ici_l3 LDRB r3, [r2], #1 CMP r3, #32 BGT ici_l3 SUB r2, r2, #1 ;r2 pts to text terminator SUB r5, r2, r1 ;# chars in text CMP r5, #4 LDMLTFD sp!, {r0-r7} BLT continue ;if less than 4 chars, can't end in our affix /<abc> LDRB r3, [r2, #-4] CMP r3, #'/' ; CMPNE r3, #'\' ;removed in v 1.54 - see History LDMNEFD sp!, {r0-r7} BNE continue ;not our affix LDR r5, [lr, #28] ;valid str ptr LDRB r3, [r5], #1 CMP r3, #'S' LDMNEFD sp!, {r0-r7} BNE continue ;in case doesn't start with sprite name, get out now ADR r1, ici_spr ADR r6, ici_spr+15 ici_l4 LDRB r3, [r5], #1 CMP r3, #';' CMPNE r3, #31 MOVLE r3, #0 SUBLE r5, r5, #1 STRB r3, [r1], #1 SUBLE r1, r1, #1 CMPGT r6, r1 BGT ici_l4 ;else r5 pts to term of spr name in val str & r1 pts to term in buffer LDRB r3, [r2, #-4] STRB r3, [r1, #-4] LDRB r3, [r2, #-3] STRB r3, [r1, #-3] LDRB r3, [r2, #-2] STRB r3, [r1, #-2] LDRB r3, [r2, #-1] STRB r3, [r1, #-1] B ici_gotnewsprite ici_sdir DCB "SDirectory",0,0 ALIGN ici_spr DCB 0 % 16 ALIGN ici_pin DCB "Pinboard",0,0,0,0 ALIGN ; --------------------------------------------------------------------------------------------------------- workspace3 % 20 ;space used below to get ptr info (in 1.52 used workspace2, which corrupted ; drag box data if drag call came from D+'s filer solid drag patch - nb in that ; case code below thinks it may have come from (new) filer, so has to try changing ; sprite name if sprite dir option on; this is ok, even if call is from D+ ; (no name change will occur, as if possible, it will have been done already ; or rather, it will be reset here to the value it already has) ; now that this data corruption problem has been fixed. idass_pack DCB "pack" idass_mult DCB "mult" is_dragaspritestart LDR lr, options ;Code between here & idass_l1 deals with case where a TST lr, #1<<4 ;solid drag request comes direct from filer module - BEQ idass_l1 ;We need to make a mod st sprite directories/files drag as LDR lr, filerflag ;their new sprites, & not as the filer specified sprite. TST lr, #1 ;Code works thus: if sprite dir option enabled & flag set in BEQ idass_l2 ;filter implies call is from filer, then get window STMFD sp!, {r0-r5} ;handle under ptr & compare with handles stored in the ;plot_icon list (formerly used when solid drags were due to ;this module's code patching the wimp_dragbox call); ;a match should be found, yielding the desired sprite name ;to be used in the plot_icon interception & the solid drag. ;NB when used with new filer etc, should turn off D+ options ;filer solid drags, see-thro drags & fancy filer text - ;the app solid drags & sprite directories options are still ;useable. LDR r2, [r2] ;first 4 chars in drag spr name ADR r3, idass_pack ;NB need to ignore above change if spr name starts 'pack' or ASSERT idass_mult = idass_pack+4 ; 'mult', as sprite may then not be a single file spr as LDMIA r3, {r3,r4} ; stored in list, but be a multifile type sprite. CMP r2, r3 CMPNE r2, r4 BEQ idass_l4 idass_l3 ADR r1, workspace3 SWI XWimp_GetPointerInfo BVS idass_l4 LDR r0, [r1, #12] ;window handle ADRL r1, namelist ADRL r3, namelistend idass_l5 LDR r2, [r1], #20 CMP r2, r0 BEQ idass_l6 ;if we have a match of window handles, exit search CMP r1, r3 BLT idass_l5 B idass_l4 ;couldn't find a name for this window idass_l6 SUB r2, r1, #16 ;calc name ptr in namelist based on r1 from above scan STR r2, [sp, #8] idass_l4 LDMFD sp!, {r0-r5} idass_l2 LDR lr, options idass_l1 TST lr, #1<<2 ;if semi-transparent solid drags not enabled, pass on. BEQ continue CMP r1, #0 BEQ continue ; if system sprite area (unlikely), don't bother doing mods ; (can't be bothered to find sprite ptr) STMFD sp!, {r0-r7} CMP r1, #1 BNE das_findptr ;if not wimp area, look in given area SWI XWimp_BaseOfSprites ;{quickest way to copy sprite to another area (can't use LDMVSFD sp!, {r0-r7} ; select directly as it only returns ptr if in user area)} BVS continue STMFD sp!, {r0} MOV r0, #&118 SWI XOS_SpriteOp ;look in RMA area ADDVC sp, sp, #4 ;forget about r0 (ROM spr area) on stack, if now got ptr BVC das_gotptr ;assume if can't find sprite, then r2 preserved (valid ?) LDMFD sp!, {r1} ;& fall through to code to look now in ROM area das_findptr MOV r0, #&118 SWI XOS_SpriteOp LDMVSFD sp!, {r0-r7} BVS continue das_gotptr MOV r4, r2 ;in r4 LDR r5, [r4] ;offset to next sprite (ie size of sprite) in r5 ADD lr, r4, #32 LDMIA lr, {r1, r3} CMP r1, r3 SUBEQ lr, r5, r1 ;if no mask, add space for one (sprite size-image offset) ADDEQ r6, r5, lr ;ptr in r4, & size new sprite now in r6 MOVNE r6, r5 ADD r6, r6, #16 ;add on size for area header MOV r0, #6 MOV r3, r6 SWI XOS_Module ;try to get space for new sprite LDMVSFD sp!, {r0-r7} BVS continue ;if can't get memory, pass sprite on unmodified ; else got ptr to block in r2 MOV r7, r2 ;keep a copy of block ptr in r7 ADD r0, r4, r5 ;end source sprite MOV r1, r7 STR r6, [r1], #4 ;set size new sprite area MOV lr, #1 STR lr, [r1], #4 ;one sprite in area MOV lr, #16 STR lr, [r1], #4 ;sprite offset ADD lr, r5, #16 STR lr, [r1], #4 ;free offset (there is no free after this sprite is added) das_spritecopy LDR lr, [r4], #4 ;can assume sprite size is integer number of words STR lr, [r1], #4 CMP r4, r0 BLT das_spritecopy ;now have sprite copied to new area ;r7 is area ptr ADD r0, r7, #16+32 LDMIA r0, {r0, r1} CMP r0, r1 ;if eq, create mask MOV r0, #&200 ORR r0, r0, #&1D MOV r1, r7 ADD r2, r7, #16 SWIEQ XOS_SpriteOp ;if no mask, create one LDMVSFD sp!, {r0-r7} BVS continue ;this shouldn't happen MOV r0, #&228 SWI XOS_SpriteOp ;read info - have width/height (pixels) in r3/r4 LDMVSFD sp!, {r0-r7} BVS continue ;this shouldn't happen STMFD sp!, {r1, r2} MOV r0, r6 MOV r1, #9 SWI XOS_ReadModeVariable MOV r0, r2 LDMFD sp!, {r1, r2} LDMVSFD sp!, {r0-r7} BVS continue CMP r0, #2 BNE das_useswi ;if not a 16 colour sprite, use SWI to perforate mask ;else do it manually - important for speed, especially ;on an ARM2 machine for big sprites, eg mode 27 multifile ;which is about 114x113 pixels, & then takes about 2 seconds ;to perforate using the SWI call. LDR r0, [r2, #36] ;mask offset ADD r0, r2, r0 ;mask ptr MOV r5, #15 ORR r5, r5, r5, ASL #8 ORR r5, r5, r5, ASL #16 ;left aligned 32 bit check (to be bic'ed into words) MOV r6, r5, ASL #4 ;right aligned 32 bit check LDR r1, [r2, #16] ;width in words - 1 LDR r3, [r2, #20] ;height in scanlines - 1 das_rowloop2 MOV r4, r1 ;set up width count EOR r5, r5, r6 EOR r6, r6, r5 EOR r5, r6, r5 ;swap r5 and r6 das_colloop2 LDR r2, [r0] BIC r2, r2, r6 STR r2, [r0], #4 SUBS r4, r4, #1 BPL das_colloop2 SUBS r3, r3, #1 BPL das_rowloop2 B das_maskperf das_useswi SUB r6, r3, #1 ;copy width-1 to r6 SUB r4, r4, #1 ; height-1 to r4 MOV r0, #&22C MOV r5, #0 das_rowloop MOV r3, r6 TST r4, #1 SUBNE r3, r3, #1 ;if r4 odd, start with column one to left of right side das_colloop SWI XOS_SpriteOp LDMVSFD sp!, {r0-r7} BVS continue ;this shouldn't happen SUBS r3, r3, #2 BPL das_colloop SUBS r4, r4, #1 BPL das_rowloop ;mask now perforated das_maskperf STR r7, das_temp LDMFD sp!, {r0-r7} ADR lr, das_regdump STMIA lr, {r0-r7} ;dump original reg contents, where can get them back if LDR r1, das_temp ; dragasprite returns an error ADD r2, r1, #16+4 ;ptr to sprite name in r2 & area in r1 (to modified copy) STMFD sp!, {r1} ;preserve sprite area ptr MOV lr, pc ;can't use 'ADR lr, das_return', as it 0's PSR ADD lr, lr, #8 B second_branch ;pass call on, but so that it will return here! SWI XDragASprite_Start ;this is never executed - BUT it is essential so that next ; SWI handler can find SWI number from lr das_return LDMFD sp!, {lr} ;restore workspace (spr area) ptr STMFD sp!, {r0, r2} ;store r0,r2 as want to use these (nb r0 may hold error ptr) MOV r0, pc STMFD sp!, {r0} ;preserve V bit for subsequent test (as want to free our memory, in either case) MOV r0, #7 MOV r2, lr SWI XOS_Module ;free memory - if any problems ignore, as can't fix them, are minor & unexpected ; & as would either need complex report procedure including cancel of dragasprite ; or would need to cancel dragasprite, & then have another go, using unmodified spr ;NB ignore error is ok, as (I think) only get error if block ;not valid, but this can't happen here (unless an interupt ;routine trashes the memory - which would bugger everything ;anyway). LDMFD sp!, {lr} ;this holds v bit from dragasprite LDMFD sp!, {r0, r2} TST lr, #V_FLAG ;if dragasprite returned an error ADRNE lr, das_regdump ;revert to original call, & pass it on LDMNEIA lr, {r0-r7} BNE continue LDMFD sp!, {lr} ;else return after explicitly clearing v bit BICS pc, lr, #V_FLAG das_temp DCD 0 das_regdump % 32 END
00000000 3b 20 3e 20 64 65 73 6b 74 6f 70 2b 0a 0a 3b 20 |; > desktop+..; | 00000010 53 65 65 20 65 6c 73 65 77 68 65 72 65 20 66 6f |See elsewhere fo| 00000020 72 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 6e 6f |r development no| 00000030 74 65 73 2e 0a 3b 0a 3b 20 53 65 65 20 6d 6f 64 |tes..;.; See mod| 00000040 75 6c 65 20 68 65 6c 70 20 74 65 78 74 20 66 6f |ule help text fo| 00000050 72 20 64 65 74 61 69 6c 73 20 6f 66 20 66 75 6e |r details of fun| 00000060 63 74 69 6f 6e 20 28 6e 62 2c 20 62 65 73 74 20 |ction (nb, best | 00000070 74 6f 20 6c 6f 61 64 20 6d 6f 64 75 6c 65 20 26 |to load module &| 00000080 20 75 73 65 20 2a 68 65 6c 70 2c 20 61 73 20 74 | use *help, as t| 00000090 65 78 74 20 69 6e 20 73 6f 75 72 63 65 20 62 65 |ext in source be| 000000a0 6c 6f 77 0a 3b 20 20 69 73 20 63 6f 6d 70 61 63 |low.; is compac| 000000b0 74 65 64 20 76 69 61 20 75 73 65 20 6f 66 20 50 |ted via use of P| 000000c0 72 65 74 74 79 50 72 69 6e 74 20 64 69 63 74 69 |rettyPrint dicti| 000000d0 6f 6e 61 72 79 20 26 20 73 6f 20 69 73 6e 27 74 |onary & so isn't| 000000e0 20 65 61 73 79 20 74 6f 20 72 65 61 64 20 64 69 | easy to read di| 000000f0 72 65 63 74 6c 79 29 2c 20 6f 72 20 66 69 67 75 |rectly), or figu| 00000100 72 65 20 69 74 20 6f 75 74 20 0a 3b 20 20 79 6f |re it out .; yo| 00000110 75 72 73 65 6c 66 20 66 72 6f 6d 20 74 68 69 73 |urself from this| 00000120 20 63 6f 64 65 20 26 20 74 68 65 20 63 72 65 64 | code & the cred| 00000130 69 74 73 20 62 65 6c 6f 77 2e 0a 3b 0a 3b 20 4e |its below..;.; N| 00000140 6f 74 65 3a 20 4d 65 20 28 74 68 65 20 6e 61 6d |ote: Me (the nam| 00000150 65 20 49 20 63 61 6c 6c 20 6d 79 73 65 6c 66 20 |e I call myself | 00000160 26 20 74 68 65 20 61 75 74 68 6f 72 20 6f 66 20 |& the author of | 00000170 74 68 69 73 20 67 69 62 62 65 72 69 73 68 29 2c |this gibberish),| 00000180 20 69 73 20 4d 69 63 68 61 65 6c 20 52 6f 7a 64 | is Michael Rozd| 00000190 6f 62 61 0a 3b 20 20 20 20 20 20 20 49 20 63 61 |oba.; I ca| 000001a0 6e 20 62 65 20 72 65 61 63 68 65 64 20 61 74 20 |n be reached at | 000001b0 31 30 20 4f 63 74 61 76 69 61 20 43 6c 6f 73 65 |10 Octavia Close| 000001c0 2c 20 42 65 64 6c 69 6e 67 74 6f 6e 2c 20 4e 6f |, Bedlington, No| 000001d0 72 74 68 75 6d 62 65 72 6c 61 6e 64 2c 20 4e 45 |rthumberland, NE| 000001e0 32 32 20 36 4c 47 2e 0a 3b 0a 3b 20 49 4d 50 4f |22 6LG..;.; IMPO| 000001f0 52 54 41 4e 54 3a 20 73 69 6e 63 65 20 74 68 69 |RTANT: since thi| 00000200 73 20 63 6f 64 65 20 69 6e 63 6f 72 70 6f 72 61 |s code incorpora| 00000210 74 65 73 20 73 6f 6d 65 20 63 6f 64 65 20 77 72 |tes some code wr| 00000220 69 74 74 65 6e 20 62 79 20 61 6e 6f 74 68 65 72 |itten by another| 00000230 20 70 65 72 73 6f 6e 20 28 73 65 65 20 62 65 6c | person (see bel| 00000240 6f 77 29 2c 20 49 20 63 61 6e 6e 6f 74 20 63 6c |ow), I cannot cl| 00000250 61 69 6d 0a 3b 20 20 20 20 20 20 20 20 20 20 20 |aim.; | 00000260 20 63 6f 70 79 72 69 67 68 74 20 6f 6e 20 61 6c | copyright on al| 00000270 6c 20 6f 66 20 74 68 69 73 20 6d 61 74 65 72 69 |l of this materi| 00000280 61 6c 2e 0a 3b 0a 3b 20 57 61 72 6e 69 6e 67 3a |al..;.; Warning:| 00000290 20 52 65 20 46 61 6e 63 79 20 66 69 6c 65 72 20 | Re Fancy filer | 000002a0 69 63 6f 6e 20 74 65 78 74 2e 0a 3b 20 20 20 20 |icon text..; | 000002b0 20 20 20 20 20 20 49 66 20 61 6e 6f 74 68 65 72 | If another| 000002c0 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 62 65 68 | application beh| 000002d0 61 76 65 73 20 62 61 64 6c 79 20 62 79 20 63 68 |aves badly by ch| 000002e0 61 6e 67 69 6e 67 20 66 6f 6e 74 24 70 61 74 68 |anging font$path| 000002f0 20 73 75 63 68 20 74 68 61 74 20 69 74 20 6e 6f | such that it no| 00000300 20 6c 6f 6e 67 65 72 20 63 6f 6e 74 61 69 6e 73 | longer contains| 00000310 20 74 68 65 0a 3b 20 20 20 20 20 20 20 20 20 20 | the.; | 00000320 52 65 73 6f 75 72 63 65 73 3a 24 2e 46 6f 6e 74 |Resources:$.Font| 00000330 73 20 72 65 66 65 72 65 6e 63 65 2c 20 74 68 65 |s reference, the| 00000340 6e 20 44 65 73 6b 74 6f 70 2b 20 6d 61 79 20 62 |n Desktop+ may b| 00000350 65 20 75 6e 61 62 6c 65 20 74 6f 20 66 69 6e 64 |e unable to find| 00000360 20 74 68 65 20 66 6f 6e 74 20 69 74 20 72 65 71 | the font it req| 00000370 75 69 72 65 73 20 6f 6e 20 61 20 6d 6f 64 65 0a |uires on a mode.| 00000380 3b 20 20 20 20 20 20 20 20 20 20 63 68 61 6e 67 |; chang| 00000390 65 20 28 65 67 20 62 65 74 77 65 65 6e 20 6d 6f |e (eg between mo| 000003a0 64 65 73 20 31 32 20 26 20 32 37 29 2e 0a 3b 20 |des 12 & 27)..; | 000003b0 20 20 20 20 20 20 20 20 20 49 66 20 74 68 69 73 | If this| 000003c0 20 6f 63 63 75 72 73 2c 20 74 68 65 6e 20 74 68 | occurs, then th| 000003d0 65 20 70 72 65 76 69 6f 75 73 20 66 6f 6e 74 20 |e previous font | 000003e0 68 61 6e 64 6c 65 20 77 69 6c 6c 20 63 6f 6e 74 |handle will cont| 000003f0 69 6e 75 65 20 74 6f 20 62 65 20 75 73 65 64 20 |inue to be used | 00000400 2d 20 74 68 69 73 20 6d 61 79 20 72 65 73 75 6c |- this may resul| 00000410 74 20 69 6e 0a 3b 20 20 20 20 20 20 20 20 20 20 |t in.; | 00000420 74 65 78 74 20 6f 66 20 74 68 65 20 77 72 6f 6e |text of the wron| 00000430 67 20 28 65 67 20 68 61 6c 66 20 6f 72 20 64 6f |g (eg half or do| 00000440 75 62 6c 65 29 20 68 65 69 67 68 74 2e 0a 3b 20 |uble) height..; | 00000450 20 20 20 20 20 20 20 20 20 49 66 20 74 68 69 73 | If this| 00000460 20 73 69 74 75 61 74 69 6f 6e 20 61 72 69 73 65 | situation arise| 00000470 73 2c 20 79 6f 75 20 73 68 6f 75 6c 64 20 63 68 |s, you should ch| 00000480 65 63 6b 20 66 6f 6e 74 24 70 61 74 68 20 74 6f |eck font$path to| 00000490 20 73 65 65 20 69 66 20 69 74 20 68 61 73 20 62 | see if it has b| 000004a0 65 65 6e 20 6d 6f 64 69 66 69 65 64 20 62 79 20 |een modified by | 000004b0 6f 74 68 65 72 0a 3b 20 20 20 20 20 20 20 20 20 |other.; | 000004c0 20 73 63 72 75 66 66 79 20 70 72 6f 67 72 61 6d | scruffy program| 000004d0 20 63 6f 64 65 20 2d 20 69 66 20 73 6f 2c 20 72 | code - if so, r| 000004e0 65 73 65 74 20 69 74 20 62 79 0a 3b 20 20 20 20 |eset it by.; | 000004f0 20 20 20 20 20 20 20 20 2a 53 65 74 20 46 6f 6e | *Set Fon| 00000500 74 24 50 61 74 68 20 3c 46 6f 6e 74 24 50 61 74 |t$Path <Font$Pat| 00000510 68 3e 2c 20 52 65 73 6f 75 72 63 65 73 3a 24 2e |h>, Resources:$.| 00000520 46 6f 6e 74 73 2e 20 20 20 20 20 7b 6e 6f 74 65 |Fonts. {note| 00000530 20 74 68 65 20 2e 7d 0a 3b 20 20 20 20 20 20 20 | the .}.; | 00000540 20 20 20 45 69 74 68 65 72 20 64 6f 20 74 68 69 | Either do thi| 00000550 73 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d 6d 61 |s from the comma| 00000560 6e 64 20 6c 69 6e 65 2c 20 6f 72 20 74 68 65 6e |nd line, or then| 00000570 20 66 6f 72 63 65 20 61 20 66 75 72 74 68 65 72 | force a further| 00000580 20 6d 6f 64 65 20 63 68 61 6e 67 65 2e 0a 3b 0a | mode change..;.| 00000590 3b 20 43 72 65 64 69 74 73 3a 0a 3b 20 7e 7e 7e |; Credits:.; ~~~| 000005a0 7e 7e 7e 7e 7e 0a 3b 20 53 6f 6d 65 20 6f 66 20 |~~~~~.; Some of | 000005b0 74 68 65 20 73 6f 75 72 63 65 20 63 6f 64 65 20 |the source code | 000005c0 66 72 6f 6d 20 53 6f 6c 69 64 44 72 61 67 2c 20 |from SolidDrag, | 000005d0 28 41 63 6f 72 6e 20 43 6f 6d 70 75 74 69 6e 67 |(Acorn Computing| 000005e0 20 63 6f 76 65 72 20 64 69 73 63 2c 20 4a 75 6e | cover disc, Jun| 000005f0 65 20 31 39 39 33 2c 20 76 31 31 20 6e 34 2c 20 |e 1993, v11 n4, | 00000600 62 79 20 50 61 75 6c 20 44 65 6c 6c 61 72 29 0a |by Paul Dellar).| 00000610 3b 20 20 68 61 73 20 62 65 65 6e 20 75 73 65 64 |; has been used| 00000620 20 62 65 6c 6f 77 20 28 61 66 74 65 72 20 62 75 | below (after bu| 00000630 67 20 66 69 78 65 73 29 2c 20 74 6f 20 70 72 6f |g fixes), to pro| 00000640 76 69 64 65 20 70 61 72 74 20 6f 66 20 74 68 65 |vide part of the| 00000650 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 73 6f 6c | application sol| 00000660 69 64 20 64 72 61 67 20 63 6f 64 65 2e 0a 3b 20 |id drag code..; | 00000670 20 20 4e 6f 74 65 2c 20 6f 72 69 67 69 6e 61 6c | Note, original| 00000680 20 53 6f 6c 69 64 44 72 61 67 20 7b 62 65 66 6f | SolidDrag {befo| 00000690 72 65 20 62 75 67 20 66 69 78 65 73 7d 3a 20 53 |re bug fixes}: S| 000006a0 6f 75 72 63 65 20 2d 20 20 31 30 38 33 35 20 62 |ource - 10835 b| 000006b0 79 74 65 73 2c 20 20 20 20 4d 6f 64 75 6c 65 20 |ytes, Module | 000006c0 2d 20 20 20 38 39 36 20 62 79 74 65 73 2e 0a 3b |- 896 bytes..;| 000006d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000006e0 20 20 44 65 73 6b 74 6f 70 2b 20 20 20 20 20 20 | Desktop+ | 000006f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000700 53 6f 75 72 63 65 20 2d 20 7e 38 32 30 30 30 20 |Source - ~82000 | 00000710 62 79 74 65 73 2c 20 20 20 20 4d 6f 64 75 6c 65 |bytes, Module| 00000720 20 2d 20 7e 36 35 30 30 20 62 79 74 65 73 2e 0a | - ~6500 bytes..| 00000730 3b 0a 3b 20 54 68 65 20 6f 72 69 67 69 6e 61 6c |;.; The original| 00000740 20 69 6e 73 70 69 72 61 74 69 6f 6e 20 66 6f 72 | inspiration for| 00000750 20 74 68 65 20 61 70 70 72 6f 61 63 68 20 75 73 | the approach us| 00000760 65 64 20 74 68 72 6f 75 67 68 6f 75 74 20 74 68 |ed throughout th| 00000770 69 73 20 6d 6f 64 75 6c 65 20 28 53 57 49 20 74 |is module (SWI t| 00000780 72 61 70 73 20 76 69 61 20 74 68 65 20 68 61 72 |raps via the har| 00000790 64 77 61 72 65 20 76 65 63 74 6f 72 2c 0a 3b 20 |dware vector,.; | 000007a0 20 26 20 70 6f 73 74 20 66 69 6c 74 65 72 73 29 | & post filters)| 000007b0 2c 20 69 73 20 61 6c 73 6f 20 64 75 65 20 74 6f |, is also due to| 000007c0 20 50 61 75 6c 20 44 65 6c 6c 61 72 20 26 20 68 | Paul Dellar & h| 000007d0 69 73 20 6f 72 69 67 69 6e 61 6c 20 53 6f 6c 69 |is original Soli| 000007e0 64 44 72 61 67 20 6d 6f 64 75 6c 65 2c 20 66 6f |dDrag module, fo| 000007f0 72 20 77 68 69 63 68 20 49 20 61 6d 20 76 65 72 |r which I am ver| 00000800 79 20 67 72 61 74 65 66 75 6c 2c 0a 3b 20 20 74 |y grateful,.; t| 00000810 68 6f 75 67 68 20 49 20 74 68 69 6e 6b 20 49 20 |hough I think I | 00000820 6d 61 79 20 68 61 76 65 20 75 73 65 64 20 74 68 |may have used th| 00000830 65 73 65 20 74 77 6f 20 74 6f 67 65 74 68 65 72 |ese two together| 00000840 20 69 6e 20 61 20 77 61 79 20 77 68 69 63 68 20 | in a way which | 00000850 68 65 20 64 69 64 6e 27 74 20 61 6e 74 69 63 69 |he didn't antici| 00000860 70 61 74 65 2e 0a 3b 0a 3b 20 46 6f 72 63 69 6e |pate..;.; Forcin| 00000870 67 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 74 |g applications t| 00000880 6f 20 75 73 65 20 73 6f 6c 69 64 20 64 72 61 67 |o use solid drag| 00000890 73 20 72 61 74 68 65 72 20 74 68 61 6e 20 64 61 |s rather than da| 000008a0 73 68 65 64 20 6f 75 74 6c 69 6e 65 73 2c 20 69 |shed outlines, i| 000008b0 73 20 62 61 73 65 64 20 62 6f 74 68 20 6f 6e 20 |s based both on | 000008c0 74 68 65 20 69 64 65 61 20 26 20 74 68 65 20 63 |the idea & the c| 000008d0 6f 64 65 0a 3b 20 20 6f 66 20 50 61 75 6c 27 73 |ode.; of Paul's| 000008e0 20 53 6f 6c 69 64 44 72 61 67 2c 20 74 68 6f 75 | SolidDrag, thou| 000008f0 67 68 20 74 68 65 20 63 6f 64 65 20 68 61 73 20 |gh the code has | 00000900 62 65 65 6e 20 65 78 74 65 6e 64 65 64 20 74 6f |been extended to| 00000910 20 63 6f 70 65 20 77 69 74 68 20 61 20 77 69 64 | cope with a wid| 00000920 65 72 20 72 61 6e 67 65 20 6f 66 20 73 69 74 75 |er range of situ| 00000930 61 74 69 6f 6e 73 2c 20 26 0a 3b 20 20 73 65 76 |ations, &.; sev| 00000940 65 72 61 6c 20 62 75 67 73 20 68 61 76 65 20 62 |eral bugs have b| 00000950 65 65 6e 20 66 69 78 65 64 20 28 49 20 68 6f 70 |een fixed (I hop| 00000960 65 21 29 2e 0a 3b 0a 3b 20 53 6f 6c 69 64 20 64 |e!)..;.; Solid d| 00000970 72 61 67 73 20 6f 6e 20 46 69 6c 65 72 20 66 69 |rags on Filer fi| 00000980 6c 65 20 69 63 6f 6e 73 20 77 61 73 20 65 6e 74 |le icons was ent| 00000990 69 72 65 6c 79 20 6d 79 20 69 64 65 61 2c 20 61 |irely my idea, a| 000009a0 73 20 69 73 20 74 68 65 20 63 6f 64 65 2e 0a 3b |s is the code..;| 000009b0 20 44 75 72 69 6e 67 20 64 65 76 65 6c 6f 70 6d | During developm| 000009c0 65 6e 74 20 49 20 63 61 6d 65 20 61 63 72 6f 73 |ent I came acros| 000009d0 73 20 61 20 50 44 20 61 70 70 6c 69 63 61 74 69 |s a PD applicati| 000009e0 6f 6e 20 63 61 6c 6c 65 64 20 46 69 6c 65 72 2b |on called Filer+| 000009f0 20 28 62 79 20 54 69 6e 67 20 5a 77 65 69 20 4b | (by Ting Zwei K| 00000a00 75 65 69 2c 20 41 70 72 69 6c 20 31 39 39 33 29 |uei, April 1993)| 00000a10 20 77 68 69 63 68 0a 3b 20 20 61 63 68 69 65 76 | which.; achiev| 00000a20 65 73 20 73 69 6d 69 6c 61 72 20 72 65 73 75 6c |es similar resul| 00000a30 74 73 2c 20 74 68 6f 75 67 68 20 76 69 61 20 61 |ts, though via a| 00000a40 20 64 69 72 65 63 74 20 70 61 74 63 68 20 69 6e | direct patch in| 00000a50 74 6f 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 |to the original | 00000a60 41 63 6f 72 6e 20 46 69 6c 65 72 20 6d 6f 64 75 |Acorn Filer modu| 00000a70 6c 65 2e 0a 3b 20 54 68 69 73 20 73 65 72 76 65 |le..; This serve| 00000a80 64 20 74 6f 20 74 65 73 74 20 44 65 73 6b 74 6f |d to test Deskto| 00000a90 70 2b 27 73 20 66 75 6e 63 74 69 6f 6e 20 61 67 |p+'s function ag| 00000aa0 61 69 6e 73 74 2c 20 26 20 6c 65 64 20 6d 65 20 |ainst, & led me | 00000ab0 74 6f 20 64 69 73 63 6f 76 65 72 20 61 20 66 65 |to discover a fe| 00000ac0 77 20 73 68 6f 72 74 63 6f 6d 69 6e 67 27 73 20 |w shortcoming's | 00000ad0 77 68 69 63 68 20 49 20 77 61 73 20 74 68 65 6e |which I was then| 00000ae0 0a 3b 20 20 61 62 6c 65 20 74 6f 20 66 69 78 3b |.; able to fix;| 00000af0 20 74 68 65 73 65 20 69 6e 63 6c 75 64 65 20 61 | these include a| 00000b00 20 63 6f 75 70 6c 65 20 6f 66 20 73 69 74 75 61 | couple of situa| 00000b10 74 69 6f 6e 73 20 77 68 69 63 68 20 46 69 6c 65 |tions which File| 00000b20 72 2b 20 64 6f 65 73 6e 27 74 20 63 6f 72 72 65 |r+ doesn't corre| 00000b30 63 74 6c 79 20 68 61 6e 64 6c 65 2e 0a 3b 0a 3b |ctly handle..;.;| 00000b40 20 53 75 70 70 6f 72 74 20 66 6f 72 20 73 65 6d | Support for sem| 00000b50 69 2d 74 72 61 6e 73 70 61 72 65 6e 74 20 73 6f |i-transparent so| 00000b60 6c 69 64 20 64 72 61 67 73 20 77 61 73 20 69 6e |lid drags was in| 00000b70 63 6f 72 70 6f 72 61 74 65 64 20 61 66 74 65 72 |corporated after| 00000b80 20 73 65 65 69 6e 67 20 74 68 65 20 62 65 6e 65 | seeing the bene| 00000b90 66 69 74 73 20 74 68 69 73 20 63 61 6e 20 70 72 |fits this can pr| 00000ba0 6f 76 69 64 65 2c 20 76 69 61 0a 3b 20 20 44 61 |ovide, via.; Da| 00000bb0 76 65 20 4c 61 77 72 65 6e 63 65 27 73 20 64 69 |ve Lawrence's di| 00000bc0 72 65 63 74 20 44 72 61 67 41 53 70 72 69 74 65 |rect DragASprite| 00000bd0 20 70 61 74 63 68 20 28 2a 49 6e 66 6f 2c 20 42 | patch (*Info, B| 00000be0 42 43 20 41 63 6f 72 6e 20 55 73 65 72 2c 20 4a |BC Acorn User, J| 00000bf0 75 6c 79 20 31 39 39 33 29 2c 20 74 68 6f 75 67 |uly 1993), thoug| 00000c00 68 20 49 20 73 70 65 63 69 66 69 63 61 6c 6c 79 |h I specifically| 00000c10 20 64 69 64 6e 27 74 0a 3b 20 20 72 65 61 64 20 | didn't.; read | 00000c20 68 69 73 20 63 6f 64 65 20 28 49 20 77 6f 75 6c |his code (I woul| 00000c30 64 6e 27 74 20 77 61 6e 74 20 74 6f 20 62 65 20 |dn't want to be | 00000c40 61 63 63 75 73 65 64 20 6f 66 20 70 6c 61 67 69 |accused of plagi| 00000c50 61 72 69 73 6d 29 2c 20 26 20 74 68 69 73 20 69 |arism), & this i| 00000c60 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 69 73 |mplementation is| 00000c70 20 6e 61 74 75 72 61 6c 6c 79 20 6d 6f 72 65 0a | naturally more.| 00000c80 3b 20 20 63 75 6d 62 65 72 73 6f 6d 65 20 74 6f |; cumbersome to| 00000c90 20 63 6f 64 65 20 61 73 20 69 74 20 61 63 74 73 | code as it acts| 00000ca0 20 76 69 61 20 70 72 65 20 26 20 70 6f 73 74 20 | via pre & post | 00000cb0 70 72 6f 63 65 73 73 69 6e 67 20 74 6f 20 74 68 |processing to th| 00000cc0 65 20 44 72 61 67 41 53 70 72 69 74 65 5f 53 74 |e DragASprite_St| 00000cd0 61 72 74 20 63 61 6c 6c 2c 20 72 61 74 68 65 72 |art call, rather| 00000ce0 20 74 68 61 6e 20 76 69 61 20 61 0a 3b 20 20 64 | than via a.; d| 00000cf0 69 72 65 63 74 20 70 61 74 63 68 2e 0a 3b 0a 3b |irect patch..;.;| 00000d00 20 55 73 65 20 6f 66 20 66 61 6e 63 79 20 74 65 | Use of fancy te| 00000d10 78 74 20 28 69 65 20 61 6e 74 69 61 6c 69 61 73 |xt (ie antialias| 00000d20 65 64 20 66 6f 6e 74 73 29 20 69 6e 20 66 69 6c |ed fonts) in fil| 00000d30 65 72 20 77 69 6e 64 6f 77 73 20 77 61 73 20 69 |er windows was i| 00000d40 6e 73 70 69 72 65 64 20 62 79 20 44 61 76 65 20 |nspired by Dave | 00000d50 4c 61 77 72 65 6e 63 65 27 73 20 6d 69 6e 69 6d |Lawrence's minim| 00000d60 61 6c 69 73 74 20 70 61 74 63 68 2c 0a 3b 20 20 |alist patch,.; | 00000d70 74 68 6f 75 67 68 74 20 69 6d 70 6c 65 6d 65 6e |thought implemen| 00000d80 74 61 74 69 6f 6e 20 69 73 20 65 6e 74 69 72 65 |tation is entire| 00000d90 6c 79 20 64 69 66 66 65 72 65 6e 74 2e 20 41 6c |ly different. Al| 00000da0 73 6f 2c 20 68 65 72 65 2c 20 49 20 68 61 76 65 |so, here, I have| 00000db0 20 62 65 65 6e 20 61 62 6c 65 20 74 6f 20 63 6f | been able to co| 00000dc0 72 72 65 63 74 6c 79 20 73 65 74 20 74 68 65 20 |rrectly set the | 00000dd0 62 61 63 6b 67 72 6f 75 6e 64 0a 3b 20 20 63 6f |background.; co| 00000de0 6c 6f 75 72 20 74 6f 20 6c 69 67 68 74 20 67 72 |lour to light gr| 00000df0 65 79 20 28 72 61 74 68 65 72 20 74 68 61 6e 20 |ey (rather than | 00000e00 68 61 76 69 6e 67 20 74 6f 20 61 64 6f 70 74 20 |having to adopt | 00000e10 77 68 69 74 65 29 2c 20 26 20 66 75 72 74 68 65 |white), & furthe| 00000e20 72 2c 20 6d 61 69 6e 74 61 69 6e 20 63 6f 72 72 |r, maintain corr| 00000e30 65 63 74 20 66 6f 6e 74 20 73 69 7a 65 73 20 77 |ect font sizes w| 00000e40 68 65 6e 0a 3b 20 20 63 68 61 6e 67 69 6e 67 20 |hen.; changing | 00000e50 6d 6f 64 65 73 20 28 65 67 20 31 32 20 74 6f 20 |modes (eg 12 to | 00000e60 32 37 29 2c 20 77 68 69 63 68 20 74 68 65 20 42 |27), which the B| 00000e70 41 55 20 70 61 74 63 68 20 64 69 64 6e 27 74 20 |AU patch didn't | 00000e80 6d 61 6e 61 67 65 2e 0a 3b 0a 3b 20 4c 61 73 74 |manage..;.; Last| 00000e90 6c 79 2c 20 74 68 65 20 69 64 65 61 20 66 6f 72 |ly, the idea for| 00000ea0 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 6f 66 20 | replacement of | 00000eb0 74 68 65 20 66 61 6d 69 6c 69 61 72 20 62 6c 75 |the familiar blu| 00000ec0 65 20 66 6f 6c 64 65 72 20 64 69 72 65 63 74 6f |e folder directo| 00000ed0 72 79 20 69 63 6f 6e 73 2c 20 62 79 20 61 72 62 |ry icons, by arb| 00000ee0 69 74 72 61 72 79 20 73 70 72 69 74 65 73 0a 3b |itrary sprites.;| 00000ef0 20 20 28 73 70 65 63 69 66 69 65 64 20 76 69 61 | (specified via| 00000f00 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 6e | the directory n| 00000f10 61 6d 65 29 2c 20 69 73 20 64 75 65 20 74 6f 20 |ame), is due to | 00000f20 46 69 6c 65 72 2b 2e 20 54 68 6f 75 67 68 20 6f |Filer+. Though o| 00000f30 6e 63 65 20 61 67 61 69 6e 2c 20 74 68 65 20 64 |nce again, the d| 00000f40 69 66 66 65 72 65 6e 63 65 20 69 6e 20 69 6d 70 |ifference in imp| 00000f50 6c 65 6d 65 6e 74 61 74 69 6f 6e 0a 3b 20 20 6d |lementation.; m| 00000f60 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 63 6f |eans that the co| 00000f70 64 65 20 75 73 65 64 20 74 6f 20 61 63 68 69 65 |de used to achie| 00000f80 76 65 20 74 68 69 73 20 72 65 73 75 6c 74 20 73 |ve this result s| 00000f90 68 61 72 65 20 76 65 72 79 20 6c 69 74 74 6c 65 |hare very little| 00000fa0 20 69 6e 20 63 6f 6d 6d 6f 6e 2e 0a 3b 0a 3b 20 | in common..;.; | 00000fb0 41 4e 44 20 46 49 4e 41 4c 4c 59 3a 20 57 68 79 |AND FINALLY: Why| 00000fc0 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 69 73 20 | this module is | 00000fd0 77 6f 72 74 68 20 75 73 69 6e 67 20 2d 0a 3b 20 |worth using -.; | 00000fe0 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~~~~~~~~~| * 00001000 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 0a 3b 20 |~~~~~~~~~~~~~.; | 00001010 20 49 74 20 64 6f 65 73 20 61 6c 6c 20 74 68 65 | It does all the| 00001020 20 74 68 69 6e 67 73 20 74 68 61 74 20 74 68 65 | things that the| 00001030 20 61 62 6f 76 65 20 70 61 74 63 68 65 73 20 64 | above patches d| 00001040 6f 2c 20 26 20 64 6f 65 73 20 73 6f 6d 65 20 6f |o, & does some o| 00001050 66 20 74 68 65 6d 20 62 65 74 74 65 72 20 28 66 |f them better (f| 00001060 6f 72 20 69 6e 73 74 61 6e 63 65 2c 20 74 68 65 |or instance, the| 00001070 20 66 61 6e 63 79 0a 3b 20 20 66 69 6c 65 72 20 | fancy.; filer | 00001080 74 65 78 74 2c 20 26 20 74 68 65 20 73 6f 6c 69 |text, & the soli| 00001090 64 20 64 72 61 67 73 20 6f 66 20 66 69 6c 65 72 |d drags of filer| 000010a0 20 69 63 6f 6e 73 29 2e 0a 3b 20 20 49 74 20 69 | icons)..; It i| 000010b0 6e 74 65 67 72 61 74 65 73 20 74 68 65 6d 20 61 |ntegrates them a| 000010c0 6c 6c 20 69 6e 74 6f 20 6f 6e 65 20 73 6d 61 6c |ll into one smal| 000010d0 6c 20 6d 6f 64 75 6c 65 2c 20 26 20 61 73 20 69 |l module, & as i| 000010e0 74 20 64 6f 65 73 6e 27 74 20 70 61 74 63 68 20 |t doesn't patch | 000010f0 64 69 72 65 63 74 6c 79 20 69 6e 74 6f 20 52 4f |directly into RO| 00001100 4d 20 6d 6f 64 75 6c 65 73 2c 20 74 68 65 73 65 |M modules, these| 00001110 0a 3b 20 20 64 6f 6e 27 74 20 6e 65 65 64 20 74 |.; don't need t| 00001120 6f 20 62 65 20 63 6f 70 69 65 64 20 74 6f 20 52 |o be copied to R| 00001130 41 4d 20 28 65 67 20 74 68 69 73 20 6d 6f 64 75 |AM (eg this modu| 00001140 6c 65 20 75 73 65 73 20 75 6e 64 65 72 20 36 bd |le uses under 6.| 00001150 20 4b 62 20 69 6e 20 74 6f 74 61 6c 2c 20 77 68 | Kb in total, wh| 00001160 65 72 65 61 73 20 46 69 6c 65 72 2b 20 75 73 65 |ereas Filer+ use| 00001170 73 20 6f 76 65 72 20 32 37 4b 62 0a 3b 20 20 61 |s over 27Kb.; a| 00001180 73 20 69 74 20 68 61 73 20 74 6f 20 63 6f 70 79 |s it has to copy| 00001190 20 46 69 6c 65 72 20 74 6f 20 52 41 4d 29 2e 0a | Filer to RAM)..| 000011a0 3b 20 20 44 75 65 20 74 6f 20 74 68 65 20 6d 65 |; Due to the me| 000011b0 61 6e 73 20 6f 66 20 69 6d 70 6c 65 6d 65 6e 74 |ans of implement| 000011c0 61 74 69 6f 6e 2c 20 65 61 63 68 20 6f 70 74 69 |ation, each opti| 000011d0 6f 6e 20 63 61 6e 20 62 65 20 74 75 72 6e 65 64 |on can be turned| 000011e0 20 6f 6e 20 6f 72 20 6f 66 66 20 69 6e 64 65 70 | on or off indep| 000011f0 65 6e 64 65 6e 74 6c 79 2c 20 77 68 65 6e 65 76 |endently, whenev| 00001200 65 72 20 79 6f 75 20 77 61 6e 74 2e 0a 3b 0a 0a |er you want..;..| 00001210 72 30 20 52 4e 20 30 0a 72 31 20 52 4e 20 31 0a |r0 RN 0.r1 RN 1.| 00001220 72 32 20 52 4e 20 32 0a 72 33 20 52 4e 20 33 0a |r2 RN 2.r3 RN 3.| 00001230 72 34 20 52 4e 20 34 0a 72 35 20 52 4e 20 35 0a |r4 RN 4.r5 RN 5.| 00001240 72 36 20 52 4e 20 36 0a 72 37 20 52 4e 20 37 0a |r6 RN 6.r7 RN 7.| 00001250 72 38 20 52 4e 20 38 0a 72 39 20 52 4e 20 39 0a |r8 RN 8.r9 RN 9.| 00001260 72 31 30 20 52 4e 20 31 30 0a 72 31 31 20 52 4e |r10 RN 10.r11 RN| 00001270 20 31 31 0a 72 31 32 20 52 4e 20 31 32 0a 73 70 | 11.r12 RN 12.sp| 00001280 20 52 4e 20 31 33 0a 6c 72 20 52 4e 20 31 34 0a | RN 13.lr RN 14.| 00001290 70 63 20 52 4e 20 31 35 0a 0a 57 69 6d 70 5f 44 |pc RN 15..Wimp_D| 000012a0 72 61 67 42 6f 78 20 20 20 20 20 20 20 20 20 20 |ragBox | 000012b0 20 20 20 20 20 20 20 20 20 20 45 51 55 20 26 34 | EQU &4| 000012c0 30 30 44 30 0a 58 57 69 6d 70 5f 44 72 61 67 42 |00D0.XWimp_DragB| 000012d0 6f 78 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ox | 000012e0 20 20 20 20 20 45 51 55 20 26 36 30 30 44 30 0a | EQU &600D0.| 000012f0 58 57 69 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 |XWimp_GetPointer| 00001300 49 6e 66 6f 20 20 20 20 20 20 20 20 20 20 20 20 |Info | 00001310 45 51 55 20 26 36 30 30 43 46 0a 58 57 69 6d 70 |EQU &600CF.XWimp| 00001320 5f 47 65 74 57 69 6e 64 6f 77 49 6e 66 6f 20 20 |_GetWindowInfo | 00001330 20 20 20 20 20 20 20 20 20 20 20 45 51 55 20 26 | EQU &| 00001340 36 30 30 43 43 0a 58 4f 53 5f 52 65 61 64 4d 6f |600CC.XOS_ReadMo| 00001350 64 65 56 61 72 69 61 62 6c 65 20 20 20 20 20 20 |deVariable | 00001360 20 20 20 20 20 20 45 51 55 20 26 32 30 30 33 35 | EQU &20035| 00001370 0a 58 57 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 |.XWimp_SendMessa| 00001380 67 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ge | 00001390 20 45 51 55 20 26 36 30 30 45 37 0a 58 54 61 73 | EQU &600E7.XTas| 000013a0 6b 4d 61 6e 61 67 65 72 5f 54 61 73 6b 4e 61 6d |kManager_TaskNam| 000013b0 65 46 72 6f 6d 48 61 6e 64 6c 65 20 45 51 55 20 |eFromHandle EQU | 000013c0 26 36 32 36 38 30 0a 58 54 61 73 6b 4d 61 6e 61 |&62680.XTaskMana| 000013d0 67 65 72 5f 45 6e 75 6d 65 72 61 74 65 54 61 73 |ger_EnumerateTas| 000013e0 6b 73 20 20 20 20 20 45 51 55 20 26 36 32 36 38 |ks EQU &6268| 000013f0 31 0a 58 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 |1.XWimp_GetIconS| 00001400 74 61 74 65 20 20 20 20 20 20 20 20 20 20 20 20 |tate | 00001410 20 20 45 51 55 20 26 36 30 30 43 45 0a 58 44 72 | EQU &600CE.XDr| 00001420 61 67 41 53 70 72 69 74 65 5f 53 74 61 72 74 20 |agASprite_Start | 00001430 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 55 | EQU| 00001440 20 26 36 32 34 30 30 0a 58 44 72 61 67 41 53 70 | &62400.XDragASp| 00001450 72 69 74 65 5f 53 74 6f 70 20 20 20 20 20 20 20 |rite_Stop | 00001460 20 20 20 20 20 20 20 20 45 51 55 20 26 36 32 34 | EQU &624| 00001470 30 31 0a 58 4f 53 5f 41 64 64 43 61 6c 6c 42 61 |01.XOS_AddCallBa| 00001480 63 6b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ck | 00001490 20 20 20 45 51 55 20 26 32 30 30 35 34 0a 58 4f | EQU &20054.XO| 000014a0 53 5f 53 70 72 69 74 65 4f 70 20 20 20 20 20 20 |S_SpriteOp | 000014b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 | EQ| 000014c0 55 20 26 32 30 30 32 45 0a 58 57 69 6d 70 5f 53 |U &2002E.XWimp_S| 000014d0 70 72 69 74 65 4f 70 20 20 20 20 20 20 20 20 20 |priteOp | 000014e0 20 20 20 20 20 20 20 20 20 45 51 55 20 26 36 30 | EQU &60| 000014f0 30 45 39 0a 58 57 69 6d 70 5f 42 61 73 65 4f 66 |0E9.XWimp_BaseOf| 00001500 53 70 72 69 74 65 73 20 20 20 20 20 20 20 20 20 |Sprites | 00001510 20 20 20 20 45 51 55 20 26 36 30 30 45 41 0a 56 | EQU &600EA.V| 00001520 5f 46 4c 41 47 20 20 20 20 20 20 20 20 20 20 20 |_FLAG | 00001530 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 | E| 00001540 51 55 20 31 3a 53 48 4c 3a 32 38 0a 58 46 69 6c |QU 1:SHL:28.XFil| 00001550 74 65 72 5f 52 65 67 69 73 74 65 72 50 6f 73 74 |ter_RegisterPost| 00001560 46 69 6c 74 65 72 20 20 20 20 20 20 45 51 55 20 |Filter EQU | 00001570 26 36 32 36 34 31 0a 58 46 69 6c 74 65 72 5f 44 |&62641.XFilter_D| 00001580 65 52 65 67 69 73 74 65 72 50 6f 73 74 46 69 6c |eRegisterPostFil| 00001590 74 65 72 20 20 20 20 45 51 55 20 26 36 32 36 34 |ter EQU &6264| 000015a0 33 0a 58 46 6f 6e 74 5f 46 69 6e 64 46 6f 6e 74 |3.XFont_FindFont| 000015b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000015c0 20 20 45 51 55 20 26 36 30 30 38 31 0a 58 46 6f | EQU &60081.XFo| 000015d0 6e 74 5f 4c 6f 73 65 46 6f 6e 74 20 20 20 20 20 |nt_LoseFont | 000015e0 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 55 | EQU| 000015f0 20 26 36 30 30 38 32 0a 58 57 69 6d 70 5f 46 6f | &60082.XWimp_Fo| 00001600 72 63 65 52 65 64 72 61 77 20 20 20 20 20 20 20 |rceRedraw | 00001610 20 20 20 20 20 20 20 20 45 51 55 20 26 36 30 30 | EQU &600| 00001620 44 31 0a 58 57 69 6d 70 5f 49 6e 69 74 69 61 6c |D1.XWimp_Initial| 00001630 69 73 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |ise | 00001640 20 20 20 45 51 55 20 26 36 30 30 43 30 0a 58 57 | EQU &600C0.XW| 00001650 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 20 20 20 |imp_CloseDown | 00001660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 | EQ| 00001670 55 20 26 36 30 30 44 44 0a 58 4f 53 5f 4d 6f 64 |U &600DD.XOS_Mod| 00001680 75 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |ule | 00001690 20 20 20 20 20 20 20 20 20 45 51 55 20 26 32 30 | EQU &20| 000016a0 30 31 45 0a 58 4f 53 5f 45 76 61 6c 75 61 74 65 |01E.XOS_Evaluate| 000016b0 45 78 70 72 65 73 73 69 6f 6e 20 20 20 20 20 20 |Expression | 000016c0 20 20 20 20 45 51 55 20 26 32 30 30 32 44 0a 58 | EQU &2002D.X| 000016d0 4f 53 5f 53 65 74 56 61 72 56 61 6c 20 20 20 20 |OS_SetVarVal | 000016e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 | E| 000016f0 51 55 20 26 32 30 30 32 34 0a 58 4f 53 5f 43 6f |QU &20024.XOS_Co| 00001700 6e 76 65 72 74 42 69 6e 61 72 79 31 20 20 20 20 |nvertBinary1 | 00001710 20 20 20 20 20 20 20 20 20 20 45 51 55 20 26 32 | EQU &2| 00001720 30 30 44 44 0a 58 4f 53 5f 52 65 61 64 55 6e 73 |00DD.XOS_ReadUns| 00001730 69 67 6e 65 64 20 20 20 20 20 20 20 20 20 20 20 |igned | 00001740 20 20 20 20 20 45 51 55 20 26 32 30 30 32 31 0a | EQU &20021.| 00001750 58 57 69 6d 70 5f 52 65 61 64 53 79 73 49 6e 66 |XWimp_ReadSysInf| 00001760 6f 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |o | 00001770 45 51 55 20 26 36 30 30 46 32 0a 58 57 69 6e 64 |EQU &600F2.XWind| 00001780 4c 69 6d 69 74 20 20 20 20 20 20 20 20 20 20 20 |Limit | 00001790 20 20 20 20 20 20 20 20 20 20 20 45 51 55 20 31 | EQU 1| 000017a0 31 0a 59 57 69 6e 64 4c 69 6d 69 74 20 20 20 20 |1.YWindLimit | 000017b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000017c0 20 20 45 51 55 20 31 32 0a 58 45 69 67 46 61 63 | EQU 12.XEigFac| 000017d0 74 6f 72 20 20 20 20 20 20 20 20 20 20 20 20 20 |tor | 000017e0 20 20 20 20 20 20 20 20 20 45 51 55 20 34 0a 59 | EQU 4.Y| 000017f0 45 69 67 46 61 63 74 6f 72 20 20 20 20 20 20 20 |EigFactor | 00001800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 | E| 00001810 51 55 20 35 0a 53 65 72 76 69 63 65 5f 52 65 73 |QU 5.Service_Res| 00001820 65 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |et | 00001830 20 20 20 20 20 45 51 55 20 26 32 37 0a 53 65 72 | EQU &27.Ser| 00001840 76 69 63 65 5f 4e 65 77 46 69 6c 74 65 72 4d 61 |vice_NewFilterMa| 00001850 6e 61 67 65 72 20 20 20 20 20 20 20 20 45 51 55 |nager EQU| 00001860 20 26 38 37 0a 53 65 72 76 69 63 65 5f 4d 6f 64 | &87.Service_Mod| 00001870 65 43 68 61 6e 67 65 20 20 20 20 20 20 20 20 20 |eChange | 00001880 20 20 20 20 20 45 51 55 20 26 34 36 0a 77 73 70 | EQU &46.wsp| 00001890 32 5f 73 69 7a 65 20 20 20 20 20 20 20 20 20 20 |2_size | 000018a0 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 55 | EQU| 000018b0 20 39 32 0a 0a 6d 6f 64 75 6c 65 5f 62 61 73 65 | 92..module_base| 000018c0 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 |. DCD | 000018d0 20 30 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 | 0. DCD | 000018e0 20 20 20 69 6e 69 74 69 61 6c 69 73 65 20 2d 20 | initialise - | 000018f0 6d 6f 64 75 6c 65 5f 62 61 73 65 0a 20 20 20 20 |module_base. | 00001900 20 20 20 20 44 43 44 20 20 20 20 20 66 69 6e 61 | DCD fina| 00001910 6c 69 73 65 20 2d 20 6d 6f 64 75 6c 65 5f 62 61 |lise - module_ba| 00001920 73 65 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 |se. DCD | 00001930 20 20 20 73 65 72 76 69 63 65 20 2d 20 6d 6f 64 | service - mod| 00001940 75 6c 65 5f 62 61 73 65 0a 20 20 20 20 20 20 20 |ule_base. | 00001950 20 44 43 44 20 20 20 20 20 74 69 74 6c 65 5f 73 | DCD title_s| 00001960 74 72 69 6e 67 20 2d 20 6d 6f 64 75 6c 65 5f 62 |tring - module_b| 00001970 61 73 65 0a 20 20 20 20 20 20 20 20 44 43 44 20 |ase. DCD | 00001980 20 20 20 20 68 65 6c 70 5f 73 74 72 69 6e 67 20 | help_string | 00001990 2d 20 6d 6f 64 75 6c 65 5f 62 61 73 65 0a 20 20 |- module_base. | 000019a0 20 20 20 20 20 20 44 43 44 20 20 20 20 20 68 65 | DCD he| 000019b0 6c 70 5f 74 61 62 6c 65 20 2d 20 6d 6f 64 75 6c |lp_table - modul| 000019c0 65 5f 62 61 73 65 0a 0a 3b 20 2d 2d 2d 2d 2d 2d |e_base..; ------| 000019d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001a30 2d 2d 2d 0a 0a 69 6e 69 74 69 61 6c 69 73 65 0a |---..initialise.| 00001a40 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 | STMFD | 00001a50 73 70 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 20 |sp!, {lr}. | 00001a60 20 20 42 4c 20 20 20 20 20 20 63 68 65 63 6b 68 | BL checkh| 00001a70 6f 73 74 6f 73 76 65 72 73 69 6f 6e 20 20 20 20 |ostosversion | 00001a80 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 65 | ; if e| 00001a90 72 72 6f 72 2c 20 6e 6f 74 68 69 6e 67 20 74 6f |rror, nothing to| 00001aa0 20 75 6e 64 6f 0a 20 20 20 20 20 20 20 20 42 4c | undo. BL| 00001ab0 56 43 20 20 20 20 72 65 61 64 65 6e 76 69 72 6f |VC readenviro| 00001ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001ad0 20 20 20 20 20 20 3b 20 6e 65 76 65 72 20 72 65 | ; never re| 00001ae0 74 75 72 6e 73 20 61 6e 20 65 72 72 6f 72 0a 20 |turns an error. | 00001af0 20 20 20 20 20 20 20 42 4c 56 43 20 20 20 20 72 | BLVC r| 00001b00 65 67 69 73 74 65 72 5f 66 69 6c 74 65 72 20 20 |egister_filter | 00001b10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00001b20 20 69 66 20 65 72 72 6f 72 2c 20 6e 6f 74 68 69 | if error, nothi| 00001b30 6e 67 20 74 6f 20 75 6e 64 6f 0a 20 20 20 20 20 |ng to undo. | 00001b40 20 20 20 53 54 4d 56 53 46 44 20 73 70 21 2c 20 | STMVSFD sp!, | 00001b50 7b 72 30 7d 0a 20 20 20 20 20 20 20 20 42 56 53 |{r0}. BVS| 00001b60 20 20 20 20 20 69 6e 69 74 5f 75 31 0a 20 20 20 | init_u1. | 00001b70 20 20 20 20 20 42 4c 56 43 20 20 20 20 63 6c 61 | BLVC cla| 00001b80 69 6d 5f 73 77 69 5f 76 65 63 74 6f 72 0a 20 20 |im_swi_vector. | 00001b90 20 20 20 20 20 20 53 54 4d 56 53 46 44 20 73 70 | STMVSFD sp| 00001ba0 21 2c 20 7b 72 30 7d 0a 20 20 20 20 20 20 20 20 |!, {r0}. | 00001bb0 42 56 53 20 20 20 20 20 69 6e 69 74 5f 75 32 0a |BVS init_u2.| 00001bc0 20 20 20 20 20 20 20 20 42 4c 56 43 20 20 20 20 | BLVC | 00001bd0 67 65 74 66 69 6c 65 72 74 61 73 6b 68 61 6e 64 |getfilertaskhand| 00001be0 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |le | 00001bf0 3b 20 69 66 20 65 72 72 6f 72 2c 20 6e 6f 74 68 |; if error, noth| 00001c00 69 6e 67 20 68 65 72 65 20 74 6f 20 75 6e 64 6f |ing here to undo| 00001c10 0a 20 20 20 20 20 20 20 20 42 4c 56 43 20 20 20 |. BLVC | 00001c20 20 67 65 74 66 6f 6e 74 68 61 6e 64 6c 65 0a 20 | getfonthandle. | 00001c30 20 20 20 20 20 20 20 53 54 4d 56 53 46 44 20 73 | STMVSFD s| 00001c40 70 21 2c 20 7b 72 30 7d 0a 20 20 20 20 20 20 20 |p!, {r0}. | 00001c50 20 42 56 53 20 20 20 20 20 69 6e 69 74 5f 75 33 | BVS init_u3| 00001c60 0a 20 20 20 20 20 20 20 20 42 4c 56 43 20 20 20 |. BLVC | 00001c70 20 66 6f 72 63 65 72 65 64 72 61 77 20 20 20 20 | forceredraw | 00001c80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c90 20 3b 20 69 66 20 65 72 72 6f 72 2c 20 6e 6f 74 | ; if error, not| 00001ca0 68 69 6e 67 20 68 65 72 65 20 74 6f 20 75 6e 64 |hing here to und| 00001cb0 6f 0a 20 20 20 20 20 20 20 20 42 4c 56 43 20 20 |o. BLVC | 00001cc0 20 20 63 72 65 61 74 65 76 62 6c 65 0a 20 20 20 | createvble. | 00001cd0 20 20 20 20 20 53 54 4d 56 53 46 44 20 73 70 21 | STMVSFD sp!| 00001ce0 2c 20 7b 72 30 7d 0a 20 20 20 20 20 20 20 20 42 |, {r0}. B| 00001cf0 56 53 20 20 20 20 20 69 6e 69 74 5f 75 34 0a 20 |VS init_u4. | 00001d00 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 00001d10 70 21 2c 20 7b 70 63 7d 0a 69 6e 69 74 5f 75 34 |p!, {pc}.init_u4| 00001d20 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 00001d30 20 72 30 2c 20 66 6f 6e 74 68 61 6e 64 6c 65 0a | r0, fonthandle.| 00001d40 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 00001d50 58 46 6f 6e 74 5f 4c 6f 73 65 46 6f 6e 74 0a 69 |XFont_LoseFont.i| 00001d60 6e 69 74 5f 75 33 0a 20 20 20 20 20 20 20 20 42 |nit_u3. B| 00001d70 4c 20 20 20 20 20 20 72 65 6c 65 61 73 65 5f 73 |L release_s| 00001d80 77 69 5f 76 65 63 74 6f 72 0a 69 6e 69 74 5f 75 |wi_vector.init_u| 00001d90 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |2 | 00001da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001db0 20 20 20 20 20 20 20 20 20 20 3b 20 75 6e 64 6f | ; undo| 00001dc0 20 72 65 67 69 73 74 65 72 5f 66 69 6c 74 65 72 | register_filter| 00001dd0 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 |. ADR | 00001de0 20 72 30 2c 20 74 69 74 6c 65 5f 73 74 72 69 6e | r0, title_strin| 00001df0 67 0a 20 20 20 20 20 20 20 20 41 44 52 4c 20 20 |g. ADRL | 00001e00 20 20 72 31 2c 20 66 69 6c 74 65 72 5f 63 6f 64 | r1, filter_cod| 00001e10 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |e. MOV | 00001e20 20 20 72 32 2c 20 23 30 0a 20 20 20 20 20 20 20 | r2, #0. | 00001e30 20 4d 4f 56 20 20 20 20 20 72 33 2c 20 23 30 0a | MOV r3, #0.| 00001e40 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00001e50 72 34 2c 20 6d 61 73 6b 0a 20 20 20 20 20 20 20 |r4, mask. | 00001e60 20 53 57 49 20 20 20 20 20 58 46 69 6c 74 65 72 | SWI XFilter| 00001e70 5f 44 65 52 65 67 69 73 74 65 72 50 6f 73 74 46 |_DeRegisterPostF| 00001e80 69 6c 74 65 72 0a 69 6e 69 74 5f 75 31 0a 20 20 |ilter.init_u1. | 00001e90 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 | LDMFD sp| 00001ea0 21 2c 20 7b 72 30 2c 6c 72 7d 0a 20 20 20 20 20 |!, {r0,lr}. | 00001eb0 20 20 20 4f 52 52 53 20 20 20 20 70 63 2c 20 6c | ORRS pc, l| 00001ec0 72 2c 20 23 56 5f 46 4c 41 47 0a 6d 61 73 6b 0a |r, #V_FLAG.mask.| 00001ed0 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 20 | DCD | 00001ee0 32 5f 30 30 30 30 30 30 30 31 31 30 30 31 30 30 |2_00000001100100| 00001ef0 30 30 30 30 30 31 20 20 20 20 20 20 20 20 20 20 |000001 | 00001f00 3b 20 68 61 64 20 74 6f 20 75 6e 6d 61 73 6b 20 |; had to unmask | 00001f10 72 65 64 72 61 77 20 65 76 65 6e 74 2c 20 73 6f |redraw event, so| 00001f20 20 63 61 6e 20 6d 61 72 6b 20 69 63 6f 6e 20 70 | can mark icon p| 00001f30 6c 6f 74 73 20 64 75 65 20 74 6f 20 72 65 64 72 |lots due to redr| 00001f40 61 77 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |aw. | 00001f50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001f70 20 20 20 3b 20 68 61 64 20 74 6f 20 75 6e 6d 61 | ; had to unma| 00001f80 73 6b 20 6d 65 73 73 61 67 65 73 20 61 73 20 4d |sk messages as M| 00001f90 65 6e 75 73 44 65 6c 65 74 65 64 20 6d 65 73 73 |enusDeleted mess| 00001fa0 61 67 65 20 63 61 6e 20 63 61 75 73 65 20 61 6e |age can cause an| 00001fb0 20 69 63 6f 6e 20 70 6c 6f 74 0a 72 65 67 69 73 | icon plot.regis| 00001fc0 74 65 72 5f 66 69 6c 74 65 72 0a 20 20 20 20 20 |ter_filter. | 00001fd0 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 2c 7b | STMFD sp!,{| 00001fe0 6c 72 7d 0a 20 20 20 20 20 20 20 20 41 44 52 20 |lr}. ADR | 00001ff0 20 20 20 20 72 30 2c 20 74 69 74 6c 65 5f 73 74 | r0, title_st| 00002000 72 69 6e 67 0a 20 20 20 20 20 20 20 20 41 44 52 |ring. ADR| 00002010 4c 20 20 20 20 72 31 2c 20 66 69 6c 74 65 72 5f |L r1, filter_| 00002020 63 6f 64 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 |code. MOV| 00002030 20 20 20 20 20 72 32 2c 20 23 30 0a 20 20 20 20 | r2, #0. | 00002040 20 20 20 20 4d 4f 56 20 20 20 20 20 72 33 2c 20 | MOV r3, | 00002050 23 30 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 |#0. STR | 00002060 20 20 20 72 33 2c 20 64 72 61 67 67 69 6e 67 5f | r3, dragging_| 00002070 66 6c 61 67 0a 20 20 20 20 20 20 20 20 4c 44 52 |flag. LDR| 00002080 20 20 20 20 20 72 34 2c 20 6d 61 73 6b 0a 20 20 | r4, mask. | 00002090 20 20 20 20 20 20 53 57 49 20 20 20 20 20 58 46 | SWI XF| 000020a0 69 6c 74 65 72 5f 52 65 67 69 73 74 65 72 50 6f |ilter_RegisterPo| 000020b0 73 74 46 69 6c 74 65 72 0a 20 20 20 20 20 20 20 |stFilter. | 000020c0 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 7b 70 63 | LDMFD sp!,{pc| 000020d0 7d 0a 0a 63 68 65 63 6b 68 6f 73 74 6f 73 76 65 |}..checkhostosve| 000020e0 72 73 69 6f 6e 0a 20 20 20 20 20 20 20 20 53 54 |rsion. ST| 000020f0 4d 46 44 20 20 20 73 70 21 2c 20 7b 6c 72 7d 0a |MFD sp!, {lr}.| 00002100 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00002110 72 30 2c 20 23 31 38 0a 20 20 20 20 20 20 20 20 |r0, #18. | 00002120 41 44 52 20 20 20 20 20 72 31 2c 20 63 68 6f 76 |ADR r1, chov| 00002130 5f 74 65 78 74 0a 20 20 20 20 20 20 20 20 53 57 |_text. SW| 00002140 49 20 20 20 20 20 58 4f 53 5f 4d 6f 64 75 6c 65 |I XOS_Module| 00002150 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 |. LDMFD | 00002160 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 | sp!, {lr}. | 00002170 20 20 20 4f 52 52 56 53 53 20 20 70 63 2c 20 6c | ORRVSS pc, l| 00002180 72 2c 20 23 56 5f 46 4c 41 47 0a 20 20 20 20 20 |r, #V_FLAG. | 00002190 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b | LDR r0, [| 000021a0 72 33 2c 20 23 32 30 5d 0a 20 20 20 20 20 20 20 |r3, #20]. | 000021b0 20 41 44 44 20 20 20 20 20 72 30 2c 20 72 33 2c | ADD r0, r3,| 000021c0 20 72 30 20 20 20 20 20 20 20 20 20 20 20 20 20 | r0 | 000021d0 20 20 20 20 20 20 20 20 20 3b 70 74 72 20 74 6f | ;ptr to| 000021e0 20 55 74 69 6c 69 74 79 4d 6f 64 75 6c 65 20 68 | UtilityModule h| 000021f0 65 6c 70 20 73 74 72 69 6e 67 0a 63 68 6f 76 5f |elp string.chov_| 00002200 6c 31 20 4c 44 52 42 20 20 20 20 72 31 2c 20 5b |l1 LDRB r1, [| 00002210 72 30 5d 2c 20 23 31 0a 20 20 20 20 20 20 20 20 |r0], #1. | 00002220 43 4d 50 20 20 20 20 20 72 31 2c 20 23 30 0a 20 |CMP r1, #0. | 00002230 20 20 20 20 20 20 20 41 44 52 45 51 20 20 20 72 | ADREQ r| 00002240 30 2c 20 63 68 6f 76 5f 65 72 72 6f 72 0a 20 20 |0, chov_error. | 00002250 20 20 20 20 20 20 4f 52 52 45 51 53 20 20 70 63 | ORREQS pc| 00002260 2c 20 6c 72 2c 20 23 56 5f 46 4c 41 47 0a 20 20 |, lr, #V_FLAG. | 00002270 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 | CMP r1| 00002280 2c 20 23 27 2e 27 0a 20 20 20 20 20 20 20 20 42 |, #'.'. B| 00002290 4e 45 20 20 20 20 20 63 68 6f 76 5f 6c 31 0a 20 |NE chov_l1. | 000022a0 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 72 | LDRB r| 000022b0 31 2c 20 5b 72 30 2c 20 23 2d 32 5d 20 20 20 20 |1, [r0, #-2] | 000022c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000022d0 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 20 61 |version number a| 000022e0 2e 62 63 0a 20 20 20 20 20 20 20 20 4c 44 52 42 |.bc. LDRB| 000022f0 20 20 20 20 72 32 2c 20 5b 72 30 2c 20 23 30 5d | r2, [r0, #0]| 00002300 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 |. LDRB | 00002310 20 72 33 2c 20 5b 72 30 2c 20 23 31 5d 0a 20 20 | r3, [r0, #1]. | 00002320 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 31 | SUB r1| 00002330 2c 20 72 31 2c 20 23 27 30 27 0a 20 20 20 20 20 |, r1, #'0'. | 00002340 20 20 20 53 55 42 20 20 20 20 20 72 32 2c 20 72 | SUB r2, r| 00002350 32 2c 20 23 27 30 27 0a 20 20 20 20 20 20 20 20 |2, #'0'. | 00002360 53 55 42 20 20 20 20 20 72 33 2c 20 72 33 2c 20 |SUB r3, r3, | 00002370 23 27 30 27 0a 20 20 20 20 20 20 20 20 41 44 44 |#'0'. ADD| 00002380 20 20 20 20 20 72 34 2c 20 72 31 2c 20 72 31 2c | r4, r1, r1,| 00002390 20 41 53 4c 20 23 32 20 20 20 20 20 20 20 20 20 | ASL #2 | 000023a0 20 20 20 20 20 3b 72 34 20 3d 20 35 61 0a 20 20 | ;r4 = 5a. | 000023b0 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 30 | ADD r0| 000023c0 2c 20 72 32 2c 20 72 34 2c 20 41 53 4c 20 23 31 |, r2, r4, ASL #1| 000023d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 | ;r| 000023e0 30 20 3d 20 62 2b 31 30 61 0a 20 20 20 20 20 20 |0 = b+10a. | 000023f0 20 20 41 44 44 20 20 20 20 20 72 30 2c 20 72 30 | ADD r0, r0| 00002400 2c 20 72 30 2c 20 41 53 4c 20 23 32 20 20 20 20 |, r0, ASL #2 | 00002410 20 20 20 20 20 20 20 20 20 20 3b 72 30 20 3d 20 | ;r0 = | 00002420 35 62 2b 35 30 61 0a 20 20 20 20 20 20 20 20 41 |5b+50a. A| 00002430 44 44 20 20 20 20 20 72 30 2c 20 72 33 2c 20 72 |DD r0, r3, r| 00002440 30 2c 20 41 53 4c 20 23 31 20 20 20 20 20 20 20 |0, ASL #1 | 00002450 20 20 20 20 20 20 20 3b 72 30 20 3d 20 63 2b 31 | ;r0 = c+1| 00002460 30 62 2b 31 30 30 61 0a 20 20 20 20 20 20 20 20 |0b+100a. | 00002470 4d 4f 56 20 20 20 20 20 72 34 2c 20 23 33 30 30 |MOV r4, #300| 00002480 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 |. ADD | 00002490 20 72 34 2c 20 72 34 2c 20 23 31 30 0a 20 20 20 | r4, r4, #10. | 000024a0 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 30 2c | CMP r0,| 000024b0 20 72 34 0a 20 20 20 20 20 20 20 20 41 44 52 4c | r4. ADRL| 000024c0 54 20 20 20 72 30 2c 20 63 68 6f 76 5f 65 72 72 |T r0, chov_err| 000024d0 6f 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |or | 000024e0 20 20 20 20 3b 72 65 74 75 72 6e 20 65 72 72 6f | ;return erro| 000024f0 72 20 69 66 20 68 6f 73 74 20 6f 73 20 76 65 72 |r if host os ver| 00002500 73 69 6f 6e 20 3c 20 33 2e 31 30 0a 20 20 20 20 |sion < 3.10. | 00002510 20 20 20 20 4f 52 52 4c 54 53 20 20 70 63 2c 20 | ORRLTS pc, | 00002520 6c 72 2c 20 23 56 5f 46 4c 41 47 0a 20 20 20 20 |lr, #V_FLAG. | 00002530 20 20 20 20 42 49 43 47 45 53 20 20 70 63 2c 20 | BICGES pc, | 00002540 6c 72 2c 20 23 56 5f 46 4c 41 47 0a 63 68 6f 76 |lr, #V_FLAG.chov| 00002550 5f 74 65 78 74 0a 20 20 20 20 20 20 20 20 44 43 |_text. DC| 00002560 42 20 20 20 20 20 22 55 74 69 6c 69 74 79 4d 6f |B "UtilityMo| 00002570 64 75 6c 65 22 2c 20 30 0a 20 20 20 20 20 20 20 |dule", 0. | 00002580 20 41 4c 49 47 4e 0a 63 68 6f 76 5f 65 72 72 6f | ALIGN.chov_erro| 00002590 72 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 |r. DCD | 000025a0 20 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 | 0 | 000025b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000025c0 20 20 3b 4e 42 20 48 61 76 65 6e 27 74 20 67 6f | ;NB Haven't go| 000025d0 74 20 61 6e 20 6f 66 66 69 63 69 61 6c 20 65 72 |t an official er| 000025e0 72 6f 72 20 6e 75 6d 62 65 72 20 2d 20 74 68 69 |ror number - thi| 000025f0 73 20 69 73 20 61 20 42 41 53 49 43 20 65 72 72 |s is a BASIC err| 00002600 6f 72 20 6e 75 6d 62 65 72 0a 20 20 20 20 20 20 |or number. | 00002610 20 20 44 43 42 20 20 20 20 20 22 44 65 73 6b 74 | DCB "Deskt| 00002620 6f 70 2b 20 72 65 71 75 69 72 65 73 20 61 74 20 |op+ requires at | 00002630 6c 65 61 73 74 20 52 49 53 43 20 4f 53 20 33 2e |least RISC OS 3.| 00002640 31 30 22 2c 20 30 0a 20 20 20 20 20 20 20 20 41 |10", 0. A| 00002650 4c 49 47 4e 0a 0a 72 65 61 64 65 6e 76 69 72 6f |LIGN..readenviro| 00002660 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 |. STMFD | 00002670 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 | sp!, {lr}. | 00002680 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 72 | MOV r0, r| 00002690 31 30 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |10. MOV | 000026a0 20 20 20 72 31 2c 20 23 30 0a 20 20 20 20 20 20 | r1, #0. | 000026b0 20 20 4d 4f 56 20 20 20 20 20 72 32 2c 20 23 30 | MOV r2, #0| 000026c0 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 000026d0 20 58 4f 53 5f 45 76 61 6c 75 61 74 65 45 78 70 | XOS_EvaluateExp| 000026e0 72 65 73 73 69 6f 6e 0a 20 20 20 20 20 20 20 20 |ression. | 000026f0 53 54 52 56 43 20 20 20 72 32 2c 20 6f 70 74 69 |STRVC r2, opti| 00002700 6f 6e 73 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |ons. LDMF| 00002710 44 20 20 20 73 70 21 2c 20 7b 70 63 7d 5e 20 20 |D sp!, {pc}^ | 00002720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002730 20 20 20 20 3b 20 64 6f 6e 27 74 20 77 61 6e 74 | ; don't want| 00002740 20 74 6f 20 72 65 74 75 72 6e 20 77 69 74 68 20 | to return with | 00002750 76 20 73 65 74 21 0a 0a 61 74 61 73 6b 20 20 20 |v set!..atask | 00002760 44 43 42 20 22 54 41 53 4b 22 0a 61 63 74 68 20 |DCB "TASK".acth | 00002770 20 20 20 44 43 44 20 20 20 20 20 30 20 20 20 20 | DCD 0 | 00002780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002790 20 20 20 20 20 20 20 20 20 20 20 3b 63 75 72 72 | ;curr| 000027a0 65 6e 74 20 74 61 73 6b 20 68 61 6e 64 6c 65 20 |ent task handle | 000027b0 73 74 6f 72 65 0a 66 6f 72 63 65 72 65 64 72 61 |store.forceredra| 000027c0 77 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 |w. STMFD | 000027d0 20 20 73 70 21 2c 20 7b 6c 72 7d 0a 0a 20 20 20 | sp!, {lr}.. | 000027e0 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c | MOV r0,| 000027f0 20 23 35 20 20 20 20 20 20 20 20 20 20 20 20 20 | #5 | 00002800 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 74 6f | ;to| 00002810 20 72 65 61 64 20 63 75 72 72 65 6e 74 20 74 61 | read current ta| 00002820 73 6b 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 |sk handle. | 00002830 20 20 53 57 49 20 20 20 20 20 58 57 69 6d 70 5f | SWI XWimp_| 00002840 52 65 61 64 53 79 73 49 6e 66 6f 0a 20 20 20 20 |ReadSysInfo. | 00002850 20 20 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c | LDMVSFD sp!,| 00002860 20 7b 70 63 7d 0a 20 20 20 20 20 20 20 20 53 54 | {pc}. ST| 00002870 52 20 20 20 20 20 72 30 2c 20 61 63 74 68 20 20 |R r0, acth | 00002880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002890 20 20 20 20 20 20 3b 54 68 69 73 20 61 76 6f 69 | ;This avoi| 000028a0 64 73 20 70 72 6f 62 6c 65 6d 20 69 66 20 63 61 |ds problem if ca| 000028b0 6c 6c 20 74 6f 20 6d 6f 64 75 6c 65 20 72 65 73 |ll to module res| 000028c0 75 6c 74 69 6e 67 20 69 6e 20 74 68 69 73 20 63 |ulting in this c| 000028d0 6f 64 65 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |ode. CMP | 000028e0 20 20 20 20 72 30 2c 20 23 30 20 20 20 20 20 20 | r0, #0 | 000028f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002900 20 20 20 20 3b 65 78 65 63 75 74 69 6e 67 2c 20 | ;executing, | 00002910 77 61 73 20 66 72 6f 6d 20 61 20 74 61 73 6b 20 |was from a task | 00002920 28 6f 74 68 65 72 77 69 73 65 20 74 68 69 73 20 |(otherwise this | 00002930 62 6f 64 67 65 20 67 65 6e 65 72 61 74 65 73 0a |bodge generates.| 00002940 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 | BNE | 00002950 66 72 5f 61 6c 72 65 61 64 79 74 61 73 6b 20 20 |fr_alreadytask | 00002960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002970 3b 61 6e 20 65 72 72 6f 72 20 61 73 20 77 65 20 |;an error as we | 00002980 61 72 65 20 65 66 66 65 63 74 69 76 65 6c 79 20 |are effectively | 00002990 74 72 79 69 6e 67 20 74 6f 20 69 6e 69 74 20 61 |trying to init a| 000029a0 20 74 61 73 6b 20 74 77 69 63 65 29 0a 0a 20 20 | task twice).. | 000029b0 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 | MOV r0| 000029c0 2c 20 23 32 30 30 0a 20 20 20 20 20 20 20 20 4c |, #200. L| 000029d0 44 52 20 20 20 20 20 72 31 2c 20 61 74 61 73 6b |DR r1, atask| 000029e0 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 |. ADR | 000029f0 20 72 32 2c 20 74 69 74 6c 65 5f 73 74 72 69 6e | r2, title_strin| 00002a00 67 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |g. SWI | 00002a10 20 20 58 57 69 6d 70 5f 49 6e 69 74 69 61 6c 69 | XWimp_Initiali| 00002a20 73 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |se | 00002a30 20 20 3b 49 74 20 73 65 65 6d 73 2c 20 6e 6f 74 | ;It seems, not| 00002a40 20 61 6c 6c 6f 77 65 64 20 74 6f 20 75 73 65 20 | allowed to use | 00002a50 5f 46 6f 72 63 65 52 65 64 72 61 77 20 75 6e 6c |_ForceRedraw unl| 00002a60 65 73 73 20 61 6d 20 61 20 74 61 73 6b 2e 0a 20 |ess am a task.. | 00002a70 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 | STMFD s| 00002a80 70 21 2c 20 7b 72 31 7d 20 20 20 20 20 20 20 20 |p!, {r1} | 00002a90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002aa0 54 68 69 73 20 67 65 74 73 20 61 72 6f 75 6e 64 |This gets around| 00002ab0 20 70 72 6f 62 6c 65 6d 2c 20 62 75 74 20 69 73 | problem, but is| 00002ac0 20 69 74 20 73 61 66 65 20 6c 65 67 69 74 20 63 | it safe legit c| 00002ad0 6f 64 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 |ode,. | 00002ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00002b00 20 20 20 20 20 3b 26 20 65 76 65 6e 20 69 66 20 | ;& even if | 00002b10 69 74 20 69 73 2c 20 69 73 20 74 68 65 72 65 20 |it is, is there | 00002b20 61 20 62 65 74 74 65 72 20 77 61 79 20 74 6f 20 |a better way to | 00002b30 64 6f 20 74 68 69 73 3f 0a 66 72 5f 61 6c 72 65 |do this?.fr_alre| 00002b40 61 64 79 74 61 73 6b 0a 20 20 20 20 20 20 20 20 |adytask. | 00002b50 4d 4f 56 20 20 20 20 20 72 30 2c 20 23 2d 31 20 |MOV r0, #-1 | 00002b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002b70 20 20 20 20 20 20 20 20 3b 4e 42 20 49 20 64 69 | ;NB I di| 00002b80 73 63 6f 76 65 72 65 64 20 61 66 74 65 72 20 77 |scovered after w| 00002b90 72 69 74 69 6e 67 20 74 68 69 73 20 69 6e 69 74 |riting this init| 00002ba0 69 61 6c 6c 79 20 77 69 74 68 6f 75 74 20 74 68 |ially without th| 00002bb0 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |e. MOV | 00002bc0 20 20 72 31 2c 20 23 58 57 69 6e 64 4c 69 6d 69 | r1, #XWindLimi| 00002bd0 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |t | 00002be0 20 20 3b 61 62 6f 76 65 20 63 68 65 63 6b 20 6f | ;above check o| 00002bf0 6e 20 63 75 72 72 65 6e 74 20 74 61 73 6b 20 73 |n current task s| 00002c00 74 61 74 75 73 2c 20 74 68 61 74 20 74 68 69 73 |tatus, that this| 00002c10 20 64 6f 65 73 6e 27 74 20 77 6f 72 6b 0a 20 20 | doesn't work. | 00002c20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 58 4f | SWI XO| 00002c30 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 61 62 |S_ReadModeVariab| 00002c40 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 3b 77 |le ;w| 00002c50 68 65 6e 20 63 61 6c 6c 65 64 20 66 72 6f 6d 20 |hen called from | 00002c60 61 20 74 61 73 6b 2e 0a 20 20 20 20 20 20 20 20 |a task.. | 00002c70 41 44 44 20 20 20 20 20 72 33 2c 20 72 32 2c 20 |ADD r3, r2, | 00002c80 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#1 | 00002c90 20 20 20 20 20 20 20 20 3b 54 68 65 20 61 62 6f | ;The abo| 00002ca0 76 65 20 63 68 65 63 6b 20 75 73 69 6e 67 20 57 |ve check using W| 00002cb0 69 6d 70 5f 52 65 61 64 53 79 73 49 6e 66 6f 20 |imp_ReadSysInfo | 00002cc0 63 75 72 65 73 20 74 68 69 73 20 70 72 6f 62 6c |cures this probl| 00002cd0 65 6d 2c 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |em,. MOV | 00002ce0 20 20 20 20 72 31 2c 20 23 58 45 69 67 46 61 63 | r1, #XEigFac| 00002cf0 74 6f 72 20 20 20 20 20 20 20 20 20 20 20 20 20 |tor | 00002d00 20 20 20 20 3b 26 20 49 20 74 68 69 6e 6b 20 74 | ;& I think t| 00002d10 68 69 73 20 73 6f 6d 65 77 68 61 74 20 75 6e 6f |his somewhat uno| 00002d20 72 74 68 6f 64 6f 78 20 6d 65 74 68 6f 64 20 69 |rthodox method i| 00002d30 73 20 6e 6f 77 20 73 61 66 65 2c 0a 20 20 20 20 |s now safe,. | 00002d40 20 20 20 20 53 57 49 20 20 20 20 20 58 4f 53 5f | SWI XOS_| 00002d50 52 65 61 64 4d 6f 64 65 56 61 72 69 61 62 6c 65 |ReadModeVariable| 00002d60 20 20 20 20 20 20 20 20 20 20 20 20 3b 74 68 6f | ;tho| 00002d70 75 67 68 20 69 74 20 72 65 6d 61 69 6e 73 20 74 |ugh it remains t| 00002d80 6f 20 61 6e 73 77 65 72 2c 20 69 73 20 74 68 65 |o answer, is the| 00002d90 72 65 20 61 20 62 65 74 74 65 72 20 77 61 79 3f |re a better way?| 00002da0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00002db0 20 72 33 2c 20 72 33 2c 20 41 53 4c 20 72 32 0a | r3, r3, ASL r2.| 00002dc0 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00002dd0 72 31 2c 20 23 59 57 69 6e 64 4c 69 6d 69 74 0a |r1, #YWindLimit.| 00002de0 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 00002df0 58 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 |XOS_ReadModeVari| 00002e00 61 62 6c 65 0a 20 20 20 20 20 20 20 20 41 44 44 |able. ADD| 00002e10 20 20 20 20 20 72 34 2c 20 72 32 2c 20 23 31 0a | r4, r2, #1.| 00002e20 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00002e30 72 31 2c 20 23 59 45 69 67 46 61 63 74 6f 72 0a |r1, #YEigFactor.| 00002e40 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 00002e50 58 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 |XOS_ReadModeVari| 00002e60 61 62 6c 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 |able. MOV| 00002e70 20 20 20 20 20 72 34 2c 20 72 34 2c 20 41 53 4c | r4, r4, ASL| 00002e80 20 72 32 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 | r2. MOV | 00002e90 20 20 20 20 72 31 2c 20 23 30 0a 20 20 20 20 20 | r1, #0. | 00002ea0 20 20 20 4d 4f 56 20 20 20 20 20 72 32 2c 20 23 | MOV r2, #| 00002eb0 30 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |0. SWI | 00002ec0 20 20 58 57 69 6d 70 5f 46 6f 72 63 65 52 65 64 | XWimp_ForceRed| 00002ed0 72 61 77 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 |raw.. LDR| 00002ee0 20 20 20 20 20 72 30 2c 20 61 63 74 68 20 20 20 | r0, acth | 00002ef0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002f00 20 20 20 20 20 3b 69 66 20 65 78 74 65 72 6e 61 | ;if externa| 00002f10 6c 20 63 61 6c 6c 65 72 20 69 73 20 61 20 74 61 |l caller is a ta| 00002f20 73 6b 2c 20 64 69 64 6e 27 74 20 6e 65 65 64 20 |sk, didn't need | 00002f30 74 6f 20 73 74 61 72 74 20 61 20 67 72 75 62 62 |to start a grubb| 00002f40 79 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |y. CMP | 00002f50 20 20 72 30 2c 20 23 30 20 20 20 20 20 20 20 20 | r0, #0 | 00002f60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002f70 20 20 3b 74 61 73 6b 20 68 65 72 65 2c 20 26 20 | ;task here, & | 00002f80 63 61 6e 20 6a 75 73 74 20 72 65 74 75 72 6e 20 |can just return | 00002f90 6e 6f 77 0a 20 20 20 20 20 20 20 20 4c 44 4d 4e |now. LDMN| 00002fa0 45 46 44 20 73 70 21 2c 20 7b 70 63 7d 0a 0a 20 |EFD sp!, {pc}.. | 00002fb0 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 00002fc0 70 21 2c 20 7b 72 30 7d 0a 20 20 20 20 20 20 20 |p!, {r0}. | 00002fd0 20 4c 44 52 20 20 20 20 20 72 31 2c 20 61 74 61 | LDR r1, ata| 00002fe0 73 6b 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 |sk. SWI | 00002ff0 20 20 20 58 57 69 6d 70 5f 43 6c 6f 73 65 44 6f | XWimp_CloseDo| 00003000 77 6e 0a 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |wn.. LDMF| 00003010 44 20 20 20 73 70 21 2c 20 7b 70 63 7d 0a 0a 67 |D sp!, {pc}..g| 00003020 65 74 66 69 6c 65 72 74 61 73 6b 68 61 6e 64 6c |etfilertaskhandl| 00003030 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 00003040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00003050 20 6e 6f 74 65 2c 20 72 65 73 74 20 6f 66 20 74 | note, rest of t| 00003060 68 69 73 20 73 65 63 74 69 6f 6e 20 69 73 20 61 |his section is a| 00003070 6c 73 6f 20 6d 69 6e 65 0a 20 20 20 20 20 20 20 |lso mine. | 00003080 20 53 54 4d 46 44 20 20 20 73 70 21 2c 20 7b 6c | STMFD sp!, {l| 00003090 72 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |r} | 000030a0 20 20 20 20 20 20 20 20 20 3b 20 51 75 65 73 74 | ; Quest| 000030b0 69 6f 6e 3a 20 69 73 20 74 68 65 72 65 20 61 6e |ion: is there an| 000030c0 20 65 61 73 69 65 72 20 77 61 79 20 74 6f 20 63 | easier way to c| 000030d0 6f 6e 76 65 72 74 20 74 61 73 6b 20 6e 61 6d 65 |onvert task name| 000030e0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 000030f0 20 72 30 2c 20 23 30 20 20 20 20 20 20 20 20 20 | r0, #0 | 00003100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003110 20 3b 20 20 20 20 20 20 20 20 20 20 20 74 6f 20 | ; to | 00003120 74 61 73 6b 20 68 61 6e 64 6c 65 3f 0a 67 66 74 |task handle?.gft| 00003130 68 6c 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |hl1. CMP | 00003140 20 20 20 20 72 30 2c 20 23 30 0a 20 20 20 20 20 | r0, #0. | 00003150 20 20 20 4c 44 4d 4c 54 46 44 20 73 70 21 2c 20 | LDMLTFD sp!, | 00003160 7b 70 63 7d 0a 20 20 20 20 20 20 20 20 41 44 52 |{pc}. ADR| 00003170 4c 20 20 20 20 72 31 2c 20 77 6f 72 6b 73 70 61 |L r1, workspa| 00003180 63 65 32 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |ce2. MOV | 00003190 20 20 20 20 72 32 2c 20 23 77 73 70 32 5f 73 69 | r2, #wsp2_si| 000031a0 7a 65 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 |ze. SWI | 000031b0 20 20 20 58 54 61 73 6b 4d 61 6e 61 67 65 72 5f | XTaskManager_| 000031c0 45 6e 75 6d 65 72 61 74 65 54 61 73 6b 73 0a 20 |EnumerateTasks. | 000031d0 20 20 20 20 20 20 20 4c 44 4d 56 53 46 44 20 73 | LDMVSFD s| 000031e0 70 21 2c 20 7b 70 63 7d 0a 20 20 20 20 20 20 20 |p!, {pc}. | 000031f0 20 41 44 52 4c 20 20 20 20 72 33 2c 20 77 6f 72 | ADRL r3, wor| 00003200 6b 73 70 61 63 65 32 0a 67 66 74 68 6c 32 0a 20 |kspace2.gfthl2. | 00003210 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00003220 33 2c 20 72 31 0a 20 20 20 20 20 20 20 20 42 47 |3, r1. BG| 00003230 45 20 20 20 20 20 67 66 74 68 6c 31 0a 20 20 20 |E gfthl1. | 00003240 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 34 2c | LDR r4,| 00003250 20 5b 72 33 2c 20 23 34 5d 0a 20 20 20 20 20 20 | [r3, #4]. | 00003260 20 20 4c 44 4d 49 41 20 20 20 72 34 2c 20 7b 72 | LDMIA r4, {r| 00003270 35 2c 20 72 36 7d 0a 20 20 20 20 20 20 20 20 42 |5, r6}. B| 00003280 49 43 20 20 20 20 20 72 36 2c 20 72 36 2c 20 23 |IC r6, r6, #| 00003290 32 35 35 3c 3c 31 36 0a 20 20 20 20 20 20 20 20 |255<<16. | 000032a0 42 49 43 20 20 20 20 20 72 36 2c 20 72 36 2c 20 |BIC r6, r6, | 000032b0 23 32 35 35 3c 3c 32 34 0a 20 20 20 20 20 20 20 |#255<<24. | 000032c0 20 4c 44 52 20 20 20 20 20 72 31 32 2c 20 67 66 | LDR r12, gf| 000032d0 74 68 61 31 0a 20 20 20 20 20 20 20 20 43 4d 50 |tha1. CMP| 000032e0 20 20 20 20 20 72 35 2c 20 72 31 32 0a 20 20 20 | r5, r12. | 000032f0 20 20 20 20 20 43 4d 50 45 51 20 20 20 72 36 2c | CMPEQ r6,| 00003300 20 23 27 72 27 0a 20 20 20 20 20 20 20 20 41 44 | #'r'. AD| 00003310 44 4e 45 20 20 20 72 33 2c 20 72 33 2c 20 23 31 |DNE r3, r3, #1| 00003320 36 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 |6. BNE | 00003330 20 20 67 66 74 68 6c 32 0a 20 20 20 20 20 20 20 | gfthl2. | 00003340 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b 72 33 | LDR r0, [r3| 00003350 5d 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |]. MOV | 00003360 20 20 72 30 2c 20 72 30 2c 20 4c 53 4c 20 23 31 | r0, r0, LSL #1| 00003370 36 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |6. MOV | 00003380 20 20 72 30 2c 20 72 30 2c 20 4c 53 52 20 23 31 | r0, r0, LSR #1| 00003390 36 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 20 |6. STR | 000033a0 20 20 72 30 2c 20 66 69 6c 65 72 74 61 73 6b 68 | r0, filertaskh| 000033b0 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 4c 44 |andle. LD| 000033c0 4d 46 44 20 20 20 73 70 21 2c 20 7b 70 63 7d 0a |MFD sp!, {pc}.| 000033d0 0a 67 65 74 66 6f 6e 74 68 61 6e 64 6c 65 0a 20 |.getfonthandle. | 000033e0 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 | STMFD s| 000033f0 70 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 20 20 |p!, {lr}. | 00003400 20 41 44 52 20 20 20 20 20 72 31 2c 20 66 6f 6e | ADR r1, fon| 00003410 74 69 64 0a 20 20 20 20 20 20 20 20 41 44 52 20 |tid. ADR | 00003420 20 20 20 20 72 32 2c 20 70 6f 69 6e 74 73 69 7a | r2, pointsiz| 00003430 65 73 0a 20 20 20 20 20 20 20 20 4c 44 4d 49 41 |es. LDMIA| 00003440 20 20 20 72 32 2c 20 7b 72 32 2c 20 72 33 7d 0a | r2, {r2, r3}.| 00003450 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00003460 72 34 2c 20 23 30 0a 20 20 20 20 20 20 20 20 4d |r4, #0. M| 00003470 4f 56 20 20 20 20 20 72 35 2c 20 23 30 0a 20 20 |OV r5, #0. | 00003480 20 20 20 20 20 20 53 57 49 20 20 20 20 20 58 46 | SWI XF| 00003490 6f 6e 74 5f 46 69 6e 64 46 6f 6e 74 0a 20 20 20 |ont_FindFont. | 000034a0 20 20 20 20 20 53 54 52 56 43 20 20 20 72 30 2c | STRVC r0,| 000034b0 20 66 6f 6e 74 68 61 6e 64 6c 65 0a 20 20 20 20 | fonthandle. | 000034c0 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c | LDMFD sp!,| 000034d0 20 7b 70 63 7d 0a 66 6f 6e 74 68 61 6e 64 6c 65 | {pc}.fonthandle| 000034e0 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 |. DCD | 000034f0 20 30 0a 66 6f 6e 74 69 64 0a 20 20 20 20 20 20 | 0.fontid. | 00003500 20 20 44 43 42 20 20 20 20 20 22 48 6f 6d 65 72 | DCB "Homer| 00003510 74 6f 6e 2e 4d 65 64 69 75 6d 22 2c 30 0a 20 20 |ton.Medium",0. | 00003520 20 20 20 20 20 20 41 4c 49 47 4e 0a 70 6f 69 6e | ALIGN.poin| 00003530 74 73 69 7a 65 73 0a 20 20 20 20 20 20 20 20 44 |tsizes. D| 00003540 43 44 20 20 20 20 20 31 31 2a 31 36 2c 20 31 31 |CD 11*16, 11| 00003550 2a 31 36 0a 0a 67 66 74 68 61 31 20 20 44 43 44 |*16..gftha1 DCD| 00003560 20 20 20 20 20 27 46 27 2b 28 27 69 27 3c 3c 38 | 'F'+('i'<<8| 00003570 29 2b 28 27 6c 27 3c 3c 31 36 29 2b 28 27 65 27 |)+('l'<<16)+('e'| 00003580 3c 3c 32 34 29 0a 0a 0a 3b 20 2d 2d 2d 2d 2d 2d |<<24)...; ------| 00003590 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000035f0 2d 2d 2d 0a 0a 66 69 6e 61 6c 69 73 65 0a 20 20 |---..finalise. | 00003600 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 | STMFD sp| 00003610 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 20 20 20 |!, {lr}. | 00003620 42 4c 20 20 20 20 20 20 72 65 6c 65 61 73 65 5f |BL release_| 00003630 73 77 69 5f 76 65 63 74 6f 72 0a 20 20 20 20 20 |swi_vector. | 00003640 20 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c 20 | LDMVSFD sp!, | 00003650 7b 70 63 7d 0a 20 20 20 20 20 20 20 20 41 44 52 |{pc}. ADR| 00003660 56 43 20 20 20 72 30 2c 20 74 69 74 6c 65 5f 73 |VC r0, title_s| 00003670 74 72 69 6e 67 0a 20 20 20 20 20 20 20 20 41 44 |tring. AD| 00003680 52 56 43 4c 20 20 72 31 2c 20 66 69 6c 74 65 72 |RVCL r1, filter| 00003690 5f 63 6f 64 65 0a 20 20 20 20 20 20 20 20 4d 4f |_code. MO| 000036a0 56 56 43 20 20 20 72 32 2c 20 23 30 0a 20 20 20 |VVC r2, #0. | 000036b0 20 20 20 20 20 4d 4f 56 56 43 20 20 20 72 33 2c | MOVVC r3,| 000036c0 20 23 30 0a 20 20 20 20 20 20 20 20 4c 44 52 56 | #0. LDRV| 000036d0 43 20 20 20 72 34 2c 20 6d 61 73 6b 0a 20 20 20 |C r4, mask. | 000036e0 20 20 20 20 20 53 57 49 56 43 20 20 20 58 46 69 | SWIVC XFi| 000036f0 6c 74 65 72 5f 44 65 52 65 67 69 73 74 65 72 50 |lter_DeRegisterP| 00003700 6f 73 74 46 69 6c 74 65 72 0a 20 20 20 20 20 20 |ostFilter. | 00003710 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c 20 7b | LDMVSFD sp!, {| 00003720 70 63 7d 0a 20 20 20 20 20 20 20 20 42 4c 56 43 |pc}. BLVC| 00003730 20 20 20 20 64 65 73 74 72 6f 79 76 62 6c 65 0a | destroyvble.| 00003740 20 20 20 20 20 20 20 20 4c 44 4d 56 53 46 44 20 | LDMVSFD | 00003750 73 70 21 2c 20 7b 70 63 7d 0a 20 20 20 20 20 20 |sp!, {pc}. | 00003760 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 66 6f | LDR r0, fo| 00003770 6e 74 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |nthandle. | 00003780 20 53 57 49 20 20 20 20 20 58 46 6f 6e 74 5f 4c | SWI XFont_L| 00003790 6f 73 65 46 6f 6e 74 0a 20 20 20 20 20 20 20 20 |oseFont. | 000037a0 42 4c 20 20 20 20 20 20 66 6f 72 63 65 72 65 64 |BL forcered| 000037b0 72 61 77 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |raw. LDMF| 000037c0 44 20 20 20 73 70 21 2c 20 7b 70 63 7d 5e 20 20 |D sp!, {pc}^ | 000037d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000037e0 20 20 20 20 3b 20 5e 2c 20 61 73 20 77 65 20 64 | ; ^, as we d| 000037f0 6f 6e 27 74 20 63 61 72 65 20 61 62 6f 75 74 20 |on't care about | 00003800 65 72 72 6f 72 73 20 66 72 6f 6d 20 6c 6f 73 65 |errors from lose| 00003810 20 66 6f 6e 74 20 6f 72 20 72 65 64 72 61 77 0a | font or redraw.| 00003820 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.; -------------| 00003830 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00003880 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 20 20 |------------.. | 00003890 20 20 20 20 20 20 3b 20 54 68 65 20 66 6f 6c 6c | ; The foll| 000038a0 6f 77 69 6e 67 20 63 6f 64 65 20 74 79 70 65 20 |owing code type | 000038b0 73 79 73 74 65 6d 20 76 61 72 69 61 62 6c 65 20 |system variable | 000038c0 70 72 6f 76 69 64 65 73 20 61 20 6d 65 61 6e 73 |provides a means| 000038d0 20 6f 66 20 72 65 61 64 69 6e 67 2f 77 72 69 74 | of reading/writ| 000038e0 69 6e 67 20 74 6f 20 44 65 73 6b 74 6f 70 2b 27 |ing to Desktop+'| 000038f0 73 20 6f 70 74 69 6f 6e 73 0a 20 20 20 20 20 20 |s options. | 00003900 20 20 3b 20 66 6c 61 67 2e 0a 0a 20 20 20 20 20 | ; flag... | 00003910 20 20 20 3b 20 4e 42 20 43 6f 64 65 20 66 6f 72 | ; NB Code for| 00003920 20 76 62 6c 65 20 77 69 6c 6c 20 62 65 20 63 6f | vble will be co| 00003930 70 69 65 64 20 74 6f 20 68 65 61 70 20 26 20 4e |pied to heap & N| 00003940 4f 54 20 75 73 65 64 20 69 6e 20 73 69 74 75 20 |OT used in situ | 00003950 73 6f 20 6d 75 73 74 20 72 65 66 65 72 20 74 6f |so must refer to| 00003960 20 6f 70 74 69 6f 6e 73 20 61 64 64 72 20 69 6e | options addr in| 00003970 0a 20 20 20 20 20 20 20 20 3b 20 20 20 20 74 68 |. ; th| 00003980 69 73 20 6d 6f 64 75 6c 65 20 76 69 61 20 61 20 |is module via a | 00003990 63 6f 70 79 20 6f 66 20 74 68 61 74 20 61 64 64 |copy of that add| 000039a0 72 20 73 65 74 20 75 70 20 62 79 20 63 72 65 61 |r set up by crea| 000039b0 74 65 76 62 6c 65 20 69 6e 73 69 64 65 20 74 68 |tevble inside th| 000039c0 65 20 63 6f 64 65 20 76 62 6c 65 2e 0a 20 20 20 |e code vble.. | 000039d0 20 20 20 20 20 3b 20 54 68 69 73 20 77 6f 6e 27 | ; This won'| 000039e0 74 20 63 61 75 73 65 20 61 6e 79 20 70 72 6f 62 |t cause any prob| 000039f0 6c 65 6d 73 20 69 66 20 6d 6f 64 75 6c 65 20 6d |lems if module m| 00003a00 6f 76 65 73 2c 20 61 73 20 66 69 6e 61 6c 69 73 |oves, as finalis| 00003a10 61 74 69 6f 6e 2f 72 65 69 6e 69 74 20 77 69 6c |ation/reinit wil| 00003a20 6c 20 64 65 73 74 72 6f 79 2f 72 65 63 72 65 61 |l destroy/recrea| 00003a30 74 65 20 69 74 2e 0a 0a 63 72 65 61 74 65 76 62 |te it...createvb| 00003a40 6c 65 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 |le. STMFD| 00003a50 20 20 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 20 20 | sp!, {lr}. | 00003a60 20 20 20 20 20 41 44 52 4c 20 20 20 20 72 30 2c | ADRL r0,| 00003a70 20 6f 70 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 | options. | 00003a80 20 53 54 52 20 20 20 20 20 72 30 2c 20 76 62 6c | STR r0, vbl| 00003a90 65 6f 70 74 69 6f 6e 73 61 64 64 72 0a 20 20 20 |eoptionsaddr. | 00003aa0 20 20 20 20 20 41 44 52 20 20 20 20 20 72 30 2c | ADR r0,| 00003ab0 20 66 6f 72 63 65 72 65 64 72 61 77 0a 20 20 20 | forceredraw. | 00003ac0 20 20 20 20 20 53 54 52 20 20 20 20 20 72 30 2c | STR r0,| 00003ad0 20 76 62 6c 65 66 6f 72 63 65 72 65 64 72 61 77 | vbleforceredraw| 00003ae0 61 64 64 72 0a 20 20 20 20 20 20 20 20 41 44 52 |addr. ADR| 00003af0 20 20 20 20 20 72 30 2c 20 76 62 6c 65 6e 61 6d | r0, vblenam| 00003b00 65 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 |e. ADR | 00003b10 20 20 72 31 2c 20 76 62 6c 65 63 6f 64 65 0a 20 | r1, vblecode. | 00003b20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00003b30 32 2c 20 23 76 62 6c 65 63 6f 64 65 65 6e 64 2d |2, #vblecodeend-| 00003b40 76 62 6c 65 63 6f 64 65 20 20 20 20 20 20 20 3b |vblecode ;| 00003b50 74 6f 20 63 72 65 61 74 65 0a 20 20 20 20 20 20 |to create. | 00003b60 20 20 4d 4f 56 20 20 20 20 20 72 33 2c 20 23 30 | MOV r3, #0| 00003b70 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00003b80 20 72 34 2c 20 23 31 36 0a 20 20 20 20 20 20 20 | r4, #16. | 00003b90 20 53 57 49 20 20 20 20 20 58 4f 53 5f 53 65 74 | SWI XOS_Set| 00003ba0 56 61 72 56 61 6c 0a 20 20 20 20 20 20 20 20 4c |VarVal. L| 00003bb0 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 70 63 7d |DMFD sp!, {pc}| 00003bc0 0a 0a 64 65 73 74 72 6f 79 76 62 6c 65 0a 20 20 |..destroyvble. | 00003bd0 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 | STMFD sp| 00003be0 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 20 20 20 |!, {lr}. | 00003bf0 41 44 52 20 20 20 20 20 72 30 2c 20 76 62 6c 65 |ADR r0, vble| 00003c00 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 41 44 52 |name. ADR| 00003c10 20 20 20 20 20 72 31 2c 20 76 62 6c 65 63 6f 64 | r1, vblecod| 00003c20 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |e. MOV | 00003c30 20 20 72 32 2c 20 23 2d 31 20 20 20 20 20 20 20 | r2, #-1 | 00003c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003c50 20 20 3b 74 6f 20 66 6c 61 67 20 64 65 73 74 72 | ;to flag destr| 00003c60 6f 79 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |oy. MOV | 00003c70 20 20 20 72 33 2c 20 23 30 0a 20 20 20 20 20 20 | r3, #0. | 00003c80 20 20 4d 4f 56 20 20 20 20 20 72 34 2c 20 23 31 | MOV r4, #1| 00003c90 36 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |6. SWI | 00003ca0 20 20 58 4f 53 5f 53 65 74 56 61 72 56 61 6c 0a | XOS_SetVarVal.| 00003cb0 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 | LDMFD | 00003cc0 73 70 21 2c 20 7b 70 63 7d 0a 0a 76 62 6c 65 6e |sp!, {pc}..vblen| 00003cd0 61 6d 65 0a 20 20 20 20 20 20 20 20 44 43 42 20 |ame. DCB | 00003ce0 20 20 20 20 22 44 65 73 6b 74 6f 70 2b 5f 4f 70 | "Desktop+_Op| 00003cf0 74 69 6f 6e 73 22 2c 30 0a 20 20 20 20 20 20 20 |tions",0. | 00003d00 20 41 4c 49 47 4e 0a 0a 76 62 6c 65 63 6f 64 65 | ALIGN..vblecode| 00003d10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00003d30 20 20 20 20 20 20 20 20 3b 76 61 6c 75 65 73 20 | ;values | 00003d40 69 6e 70 75 74 2f 6f 75 74 70 75 74 20 61 73 20 |input/output as | 00003d50 73 74 72 69 6e 67 73 0a 20 20 20 20 20 20 20 20 |strings. | 00003d60 42 20 20 20 20 20 20 20 76 62 6c 65 77 72 69 74 |B vblewrit| 00003d70 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 00003d80 20 20 20 20 20 20 20 20 3b 68 65 72 65 2c 20 75 | ;here, u| 00003d90 73 65 20 61 20 73 74 72 69 6e 67 20 6c 69 6b 65 |se a string like| 00003da0 20 27 32 5f 31 31 31 31 31 27 20 2b 20 74 65 72 | '2_11111' + ter| 00003db0 6d 69 6e 61 74 6f 72 0a 0a 76 62 6c 65 72 65 61 |minator..vblerea| 00003dc0 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |d | 00003dd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003de0 20 20 20 20 20 20 20 20 20 3b 6f 6e 20 65 78 69 | ;on exi| 00003df0 74 3a 20 72 30 20 70 74 72 20 74 6f 20 76 61 6c |t: r0 ptr to val| 00003e00 75 65 2c 20 72 31 20 6d 61 79 20 62 65 20 63 6f |ue, r1 may be co| 00003e10 72 72 75 70 74 65 64 2c 20 72 32 20 6c 65 6e 67 |rrupted, r2 leng| 00003e20 74 68 20 28 6e 6f 20 74 65 72 6d 69 6e 61 74 6f |th (no terminato| 00003e30 72 20 6e 65 63 65 73 73 61 72 79 29 0a 20 20 20 |r necessary). | 00003e40 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 | STMFD sp!| 00003e50 2c 20 7b 6c 72 7d 0a 20 20 20 20 20 20 20 20 4c |, {lr}. L| 00003e60 44 52 20 20 20 20 20 6c 72 2c 20 76 62 6c 65 6f |DR lr, vbleo| 00003e70 70 74 69 6f 6e 73 61 64 64 72 0a 20 20 20 20 20 |ptionsaddr. | 00003e80 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b | LDR r0, [| 00003e90 6c 72 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 |lr] | 00003ea0 20 20 20 20 20 20 20 20 20 20 20 3b 67 6f 74 20 | ;got | 00003eb0 61 63 74 75 61 6c 20 76 61 6c 75 65 20 6f 66 20 |actual value of | 00003ec0 6f 70 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 |options. | 00003ed0 41 44 52 20 20 20 20 20 72 31 2c 20 76 62 6c 65 |ADR r1, vble| 00003ee0 62 75 66 66 65 72 0a 20 20 20 20 20 20 20 20 4d |buffer. M| 00003ef0 4f 56 20 20 20 20 20 72 32 2c 20 23 76 62 6c 65 |OV r2, #vble| 00003f00 62 75 66 66 65 72 65 6e 64 2d 76 62 6c 65 62 75 |bufferend-vblebu| 00003f10 66 66 65 72 0a 20 20 20 20 20 20 20 20 53 57 49 |ffer. SWI| 00003f20 20 20 20 20 20 58 4f 53 5f 43 6f 6e 76 65 72 74 | XOS_Convert| 00003f30 42 69 6e 61 72 79 31 0a 20 20 20 20 20 20 20 20 |Binary1. | 00003f40 4c 44 4d 56 53 46 44 20 73 70 21 2c 20 7b 70 63 |LDMVSFD sp!, {pc| 00003f50 7d 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 |}. ADR | 00003f60 20 20 72 30 2c 20 76 62 6c 65 62 75 66 66 65 72 | r0, vblebuffer| 00003f70 72 65 61 64 20 20 20 20 20 20 20 20 20 20 20 20 |read | 00003f80 20 20 3b 70 74 20 74 6f 20 27 32 5f 27 20 63 68 | ;pt to '2_' ch| 00003f90 61 72 73 20 70 72 65 63 65 65 64 69 6e 67 20 38 |ars preceeding 8| 00003fa0 20 64 69 67 69 74 20 62 69 6e 61 72 79 0a 20 20 | digit binary. | 00003fb0 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 | SUB r2| 00003fc0 2c 20 72 31 2c 20 72 30 20 20 20 20 20 20 20 20 |, r1, r0 | 00003fd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 26 | ;&| 00003fe0 20 73 65 74 20 6c 65 6e 67 74 68 20 28 61 73 20 | set length (as | 00003ff0 72 31 20 70 74 73 20 74 6f 20 74 65 72 6d 69 6e |r1 pts to termin| 00004000 61 74 69 6e 67 20 6e 75 6c 6c 20 77 72 69 74 74 |ating null writt| 00004010 65 6e 20 62 79 20 5f 43 6f 6e 76 65 72 74 29 0a |en by _Convert).| 00004020 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 | LDMFD | 00004030 73 70 21 2c 20 7b 70 63 7d 0a 0a 76 62 6c 65 77 |sp!, {pc}..vblew| 00004040 72 69 74 65 20 20 20 20 20 20 20 20 20 20 20 20 |rite | 00004050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004060 20 20 20 20 20 20 20 20 20 20 20 3b 6f 6e 20 65 | ;on e| 00004070 6e 74 72 79 3a 20 72 31 20 70 74 72 20 74 6f 20 |ntry: r1 ptr to | 00004080 76 61 6c 75 65 2c 20 72 32 20 6c 65 6e 67 74 68 |value, r2 length| 00004090 2e 20 20 20 6f 6e 20 65 78 69 74 3a 20 72 31 2c |. on exit: r1,| 000040a0 72 32 2c 72 34 2c 72 31 30 2d 72 31 32 20 6d 61 |r2,r4,r10-r12 ma| 000040b0 79 20 62 65 20 63 6f 72 72 75 70 74 65 64 0a 20 |y be corrupted. | 000040c0 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 | STMFD s| 000040d0 70 21 2c 20 7b 72 30 2c 20 6c 72 7d 0a 20 20 20 |p!, {r0, lr}. | 000040e0 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c | MOV r0,| 000040f0 20 23 31 30 0a 20 20 20 20 20 20 20 20 53 57 49 | #10. SWI| 00004100 20 20 20 20 20 58 4f 53 5f 52 65 61 64 55 6e 73 | XOS_ReadUns| 00004110 69 67 6e 65 64 0a 20 20 20 20 20 20 20 20 4c 44 |igned. LD| 00004120 4d 56 53 46 44 20 73 70 21 2c 20 7b 72 31 2c 20 |MVSFD sp!, {r1, | 00004130 70 63 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 |pc} | 00004140 20 20 20 20 20 20 3b 6e 6f 74 65 20 75 73 65 20 | ;note use | 00004150 6f 66 20 72 31 20 74 6f 20 67 65 74 20 69 6e 69 |of r1 to get ini| 00004160 74 69 61 6c 20 76 61 6c 75 65 20 6f 66 20 72 30 |tial value of r0| 00004170 20 6f 66 66 20 73 74 61 63 6b 2c 20 6c 65 61 76 | off stack, leav| 00004180 69 6e 67 20 65 72 72 6f 72 20 70 74 72 20 6e 6f |ing error ptr no| 00004190 77 20 69 6e 20 72 30 0a 20 20 20 20 20 20 20 20 |w in r0. | 000041a0 4c 44 52 20 20 20 20 20 6c 72 2c 20 76 62 6c 65 |LDR lr, vble| 000041b0 6f 70 74 69 6f 6e 73 61 64 64 72 20 20 20 20 20 |optionsaddr | 000041c0 20 20 20 20 20 20 20 20 3b 72 32 20 6e 6f 77 20 | ;r2 now | 000041d0 68 61 73 20 6e 65 77 20 76 61 6c 75 65 20 74 6f |has new value to| 000041e0 20 62 65 20 77 72 69 74 74 65 6e 0a 20 20 20 20 | be written. | 000041f0 20 20 20 20 4c 44 52 20 20 20 20 20 72 31 2c 20 | LDR r1, | 00004200 5b 6c 72 5d 20 20 20 20 20 20 20 20 20 20 20 20 |[lr] | 00004210 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 65 61 | ;rea| 00004220 64 20 6f 6c 64 20 76 61 6c 75 65 20 74 6f 20 72 |d old value to r| 00004230 31 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 20 |1. STR | 00004240 20 20 72 32 2c 20 5b 6c 72 5d 20 20 20 20 20 20 | r2, [lr] | 00004250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004260 20 20 3b 77 72 69 74 65 20 6e 65 77 20 76 61 6c | ;write new val| 00004270 75 65 0a 20 20 20 20 20 20 20 20 45 4f 52 20 20 |ue. EOR | 00004280 20 20 20 72 32 2c 20 72 31 2c 20 72 32 20 20 20 | r2, r1, r2 | 00004290 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000042a0 20 20 20 3b 63 6f 6d 70 61 72 65 20 62 69 74 73 | ;compare bits| 000042b0 20 6f 66 20 6f 6c 64 20 77 69 74 68 20 6e 65 77 | of old with new| 000042c0 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 20 20 |. TST | 000042d0 20 72 32 2c 20 23 31 3c 3c 33 20 20 20 20 20 20 | r2, #1<<3 | 000042e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000042f0 20 3b 73 65 65 20 69 66 20 66 61 6e 63 79 20 74 | ;see if fancy t| 00004300 65 78 74 20 6f 70 74 69 6f 6e 20 68 61 73 20 63 |ext option has c| 00004310 68 61 6e 67 65 64 0a 20 20 20 20 20 20 20 20 54 |hanged. T| 00004320 53 54 45 51 20 20 20 72 32 2c 20 23 31 3c 3c 34 |STEQ r2, #1<<4| 00004330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004340 20 20 20 20 20 20 20 3b 73 65 65 20 69 66 20 73 | ;see if s| 00004350 70 72 69 74 65 20 64 69 72 65 63 74 6f 72 69 65 |prite directorie| 00004360 73 20 6f 70 74 69 6f 6e 20 68 61 73 20 63 68 61 |s option has cha| 00004370 6e 67 65 64 0a 20 20 20 20 20 20 20 20 53 54 4d |nged. STM| 00004380 4e 45 46 44 20 73 70 21 2c 20 7b 72 33 7d 20 20 |NEFD sp!, {r3} | 00004390 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000043a0 20 20 20 20 20 3b 69 66 20 65 69 74 68 65 72 20 | ;if either | 000043b0 68 61 73 20 63 68 61 6e 67 65 64 20 74 68 65 6e |has changed then| 000043c0 2c 20 6d 75 73 74 20 70 72 65 73 65 72 76 65 20 |, must preserve | 000043d0 72 33 0a 20 20 20 20 20 20 20 20 41 44 52 4e 45 |r3. ADRNE| 000043e0 20 20 20 6c 72 2c 20 76 62 6c 65 77 72 69 74 65 | lr, vblewrite| 000043f0 72 65 74 75 72 6e 20 20 20 20 20 20 20 20 20 20 |return | 00004400 20 20 20 3b 20 28 61 73 20 66 6f 72 63 65 72 65 | ; (as forcere| 00004410 64 72 61 77 20 64 6f 65 73 6e 27 74 29 0a 20 20 |draw doesn't). | 00004420 20 20 20 20 20 20 4c 44 52 4e 45 20 20 20 70 63 | LDRNE pc| 00004430 2c 20 76 62 6c 65 66 6f 72 63 65 72 65 64 72 61 |, vbleforceredra| 00004440 77 61 64 64 72 20 20 20 20 20 20 20 20 20 3b 20 |waddr ; | 00004450 26 20 62 72 61 6e 63 68 20 69 6e 74 6f 20 6d 6f |& branch into mo| 00004460 64 75 6c 65 20 63 6f 64 65 20 74 6f 20 64 6f 20 |dule code to do | 00004470 61 20 66 6f 72 63 65 20 72 65 64 72 61 77 0a 20 |a force redraw. | 00004480 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 00004490 70 21 2c 20 7b 72 30 2c 20 70 63 7d 20 20 20 20 |p!, {r0, pc} | 000044a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000044b0 69 66 20 6e 6f 74 2c 20 74 68 65 6e 20 72 65 74 |if not, then ret| 000044c0 75 72 6e 0a 76 62 6c 65 77 72 69 74 65 72 65 74 |urn.vblewriteret| 000044d0 75 72 6e 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |urn. LDMF| 000044e0 44 20 20 20 73 70 21 2c 20 7b 72 33 7d 20 20 20 |D sp!, {r3} | 000044f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004500 20 20 20 20 3b 61 66 74 65 72 20 63 61 6c 6c 69 | ;after calli| 00004510 6e 67 20 66 6f 72 63 65 72 65 64 72 61 77 2c 20 |ng forceredraw, | 00004520 63 6f 64 65 20 72 65 74 75 72 6e 73 20 68 65 72 |code returns her| 00004530 65 2c 20 77 68 65 72 65 20 77 65 0a 20 20 20 20 |e, where we. | 00004540 20 20 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c | LDMVSFD sp!,| 00004550 20 7b 72 31 2c 20 70 63 7d 20 20 20 20 20 20 20 | {r1, pc} | 00004560 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 65 73 | ;res| 00004570 74 6f 72 65 20 72 33 2c 20 26 20 72 65 74 75 72 |tore r3, & retur| 00004580 6e 2c 20 70 72 65 73 65 72 76 69 6e 67 20 63 75 |n, preserving cu| 00004590 72 72 65 6e 74 20 72 30 2c 20 69 66 20 61 6e 20 |rrent r0, if an | 000045a0 65 72 72 6f 72 0a 20 20 20 20 20 20 20 20 4c 44 |error. LD| 000045b0 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 2c 20 |MFD sp!, {r0, | 000045c0 70 63 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 |pc} | 000045d0 20 20 20 20 20 20 3b 68 61 73 20 6f 63 63 75 72 | ;has occur| 000045e0 72 65 64 0a 0a 20 20 20 20 20 20 20 20 44 43 42 |red.. DCB| 000045f0 20 20 20 20 20 30 2c 20 30 0a 76 62 6c 65 62 75 | 0, 0.vblebu| 00004600 66 66 65 72 72 65 61 64 0a 20 20 20 20 20 20 20 |fferread. | 00004610 20 44 43 42 20 20 20 20 20 27 32 27 2c 20 27 5f | DCB '2', '_| 00004620 27 0a 76 62 6c 65 62 75 66 66 65 72 0a 20 20 20 |'.vblebuffer. | 00004630 20 20 20 20 20 44 43 44 20 20 20 20 20 30 2c 20 | DCD 0, | 00004640 30 2c 20 30 0a 76 62 6c 65 62 75 66 66 65 72 65 |0, 0.vblebuffere| 00004650 6e 64 0a 0a 76 62 6c 65 6f 70 74 69 6f 6e 73 61 |nd..vbleoptionsa| 00004660 64 64 72 0a 20 20 20 20 20 20 20 20 44 43 44 20 |ddr. DCD | 00004670 20 20 20 20 30 0a 76 62 6c 65 66 6f 72 63 65 72 | 0.vbleforcer| 00004680 65 64 72 61 77 61 64 64 72 0a 20 20 20 20 20 20 |edrawaddr. | 00004690 20 20 44 43 44 20 20 20 20 20 30 0a 0a 76 62 6c | DCD 0..vbl| 000046a0 65 63 6f 64 65 65 6e 64 0a 0a 3b 20 2d 2d 2d 2d |ecodeend..; ----| 000046b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00004710 2d 2d 2d 2d 2d 0a 0a 73 65 72 76 69 63 65 0a 20 |-----..service. | 00004720 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00004730 31 2c 20 23 53 65 72 76 69 63 65 5f 52 65 73 65 |1, #Service_Rese| 00004740 74 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 20 |t. CMPNE | 00004750 20 20 72 31 2c 20 23 53 65 72 76 69 63 65 5f 4e | r1, #Service_N| 00004760 65 77 46 69 6c 74 65 72 4d 61 6e 61 67 65 72 0a |ewFilterManager.| 00004770 20 20 20 20 20 20 20 20 43 4d 50 4e 45 20 20 20 | CMPNE | 00004780 72 31 2c 20 23 53 65 72 76 69 63 65 5f 4d 6f 64 |r1, #Service_Mod| 00004790 65 43 68 61 6e 67 65 0a 20 20 20 20 20 20 20 20 |eChange. | 000047a0 4d 4f 56 4e 45 53 20 20 70 63 2c 20 6c 72 0a 20 |MOVNES pc, lr. | 000047b0 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 | STMFD s| 000047c0 70 21 2c 7b 72 30 2d 72 35 2c 6c 72 7d 0a 20 20 |p!,{r0-r5,lr}. | 000047d0 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 | CMP r1| 000047e0 2c 20 23 53 65 72 76 69 63 65 5f 52 65 73 65 74 |, #Service_Reset| 000047f0 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 00004800 20 6e 65 78 74 5f 73 65 72 76 69 63 65 0a 20 20 | next_service. | 00004810 20 20 20 20 20 20 42 4c 20 20 20 20 20 20 63 6c | BL cl| 00004820 61 69 6d 5f 73 77 69 5f 76 65 63 74 6f 72 0a 20 |aim_swi_vector. | 00004830 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 00004840 70 21 2c 7b 72 30 2d 72 35 2c 70 63 7d 5e 0a 0a |p!,{r0-r5,pc}^..| 00004850 6e 65 78 74 5f 73 65 72 76 69 63 65 0a 20 20 20 |next_service. | 00004860 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c | CMP r1,| 00004870 20 23 53 65 72 76 69 63 65 5f 4e 65 77 46 69 6c | #Service_NewFil| 00004880 74 65 72 4d 61 6e 61 67 65 72 0a 20 20 20 20 20 |terManager. | 00004890 20 20 20 42 4e 45 20 20 20 20 20 6e 65 78 74 5f | BNE next_| 000048a0 73 65 72 76 69 63 65 32 0a 20 20 20 20 20 20 20 |service2. | 000048b0 20 42 4c 20 20 20 20 20 20 72 65 67 69 73 74 65 | BL registe| 000048c0 72 5f 66 69 6c 74 65 72 0a 20 20 20 20 20 20 20 |r_filter. | 000048d0 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 7b 72 30 | LDMFD sp!,{r0| 000048e0 2d 72 35 2c 70 63 7d 5e 0a 0a 6e 65 78 74 5f 73 |-r5,pc}^..next_s| 000048f0 65 72 76 69 63 65 32 0a 20 20 20 20 20 20 20 20 |ervice2. | 00004900 41 44 52 20 20 20 20 20 72 31 2c 20 66 6f 6e 74 |ADR r1, font| 00004910 69 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |id | 00004920 20 20 20 20 20 20 20 20 3b 6e 6f 74 20 31 30 30 | ;not 100| 00004930 25 20 73 75 72 65 20 6f 66 20 77 68 61 74 20 49 |% sure of what I| 00004940 27 6d 20 64 6f 69 6e 67 20 68 65 72 65 0a 20 20 |'m doing here. | 00004950 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 32 | ADR r2| 00004960 2c 20 70 6f 69 6e 74 73 69 7a 65 73 20 20 20 20 |, pointsizes | 00004970 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 6d | ;m| 00004980 75 73 74 20 68 61 76 65 20 74 68 69 73 20 63 6f |ust have this co| 00004990 64 65 20 65 6e 74 65 72 65 64 20 69 6e 20 53 56 |de entered in SV| 000049a0 43 20 6d 6f 64 65 0a 20 20 20 20 20 20 20 20 4c |C mode. L| 000049b0 44 4d 49 41 20 20 20 72 32 2c 20 7b 72 32 2c 20 |DMIA r2, {r2, | 000049c0 72 33 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 |r3} | 000049d0 20 20 20 20 20 20 20 3b 26 20 63 61 6c 6c 73 20 | ;& calls | 000049e0 74 6f 20 46 6f 6e 74 5f 20 6d 75 73 74 20 6e 6f |to Font_ must no| 000049f0 74 20 67 65 6e 65 72 61 74 65 20 74 68 69 73 20 |t generate this | 00004a00 73 65 72 76 69 63 65 0a 20 20 20 20 20 20 20 20 |service. | 00004a10 4d 4f 56 20 20 20 20 20 72 34 2c 20 23 30 20 20 |MOV r4, #0 | 00004a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004a30 20 20 20 20 20 20 20 20 3b 28 61 73 20 46 6f 6e | ;(as Fon| 00004a40 74 5f 20 6e 6f 74 20 72 65 2d 65 6e 74 72 61 6e |t_ not re-entran| 00004a50 74 29 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |t). MOV | 00004a60 20 20 20 72 35 2c 20 23 30 20 20 20 20 20 20 20 | r5, #0 | 00004a70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004a80 20 20 20 3b 49 20 74 68 69 6e 6b 20 74 68 69 73 | ;I think this| 00004a90 20 69 73 20 61 6c 6c 20 6f 6b 2c 20 61 73 20 77 | is all ok, as w| 00004aa0 6f 75 6c 64 20 62 65 20 65 78 70 65 63 74 65 64 |ould be expected| 00004ab0 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 00004ac0 20 58 46 6f 6e 74 5f 46 69 6e 64 46 6f 6e 74 20 | XFont_FindFont | 00004ad0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004ae0 20 3b 68 6f 77 65 76 65 72 20 50 52 4d 20 69 73 | ;however PRM is| 00004af0 20 72 61 74 68 65 72 20 76 61 67 75 65 20 72 65 | rather vague re| 00004b00 20 70 72 6f 63 65 73 73 6f 72 20 6d 6f 64 65 0a | processor mode.| 00004b10 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00004b20 72 31 2c 20 66 6f 6e 74 68 61 6e 64 6c 65 20 20 |r1, fonthandle | 00004b30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004b40 3b 26 20 73 6f 75 72 63 65 20 6f 66 20 67 65 6e |;& source of gen| 00004b50 65 72 61 74 69 6f 6e 20 66 6f 72 20 73 65 72 76 |eration for serv| 00004b60 69 63 65 73 0a 20 20 20 20 20 20 20 20 53 54 52 |ices. STR| 00004b70 56 43 20 20 20 72 30 2c 20 66 6f 6e 74 68 61 6e |VC r0, fonthan| 00004b80 64 6c 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 56 |dle. MOVV| 00004b90 43 20 20 20 72 30 2c 20 72 31 0a 20 20 20 20 20 |C r0, r1. | 00004ba0 20 20 20 53 57 49 56 43 20 20 20 58 46 6f 6e 74 | SWIVC XFont| 00004bb0 5f 4c 6f 73 65 46 6f 6e 74 0a 20 20 20 20 20 20 |_LoseFont. | 00004bc0 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 7b 72 | LDMFD sp!,{r| 00004bd0 30 2d 72 35 2c 70 63 7d 5e 0a 0a 3b 20 2d 2d 2d |0-r5,pc}^..; ---| 00004be0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00004c40 2d 2d 2d 2d 2d 2d 0a 0a 74 69 74 6c 65 5f 73 74 |------..title_st| 00004c50 72 69 6e 67 0a 20 20 20 20 20 20 20 20 44 43 42 |ring. DCB| 00004c60 20 20 20 20 20 22 44 65 73 6b 74 6f 70 2b 22 2c | "Desktop+",| 00004c70 30 0a 0a 68 65 6c 70 5f 73 74 72 69 6e 67 0a 20 |0..help_string. | 00004c80 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 22 | DCB "| 00004c90 44 65 73 6b 74 6f 70 2b 20 20 22 2c 39 2c 22 31 |Desktop+ ",9,"1| 00004ca0 2e 35 34 20 28 32 36 20 4a 61 6e 20 31 39 39 34 |.54 (26 Jan 1994| 00004cb0 29 22 2c 30 0a 20 20 20 20 20 20 20 20 41 4c 49 |)",0. ALI| 00004cc0 47 4e 0a 0a 68 65 6c 70 5f 74 61 62 6c 65 0a 20 |GN..help_table. | 00004cd0 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 22 | DCB "| 00004ce0 44 65 73 6b 74 6f 70 2b 5f 4f 70 74 69 6f 6e 73 |Desktop+_Options| 00004cf0 22 2c 30 0a 20 20 20 20 20 20 20 20 41 4c 49 47 |",0. ALIG| 00004d00 4e 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 |N. DCD | 00004d10 20 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 | 0 | 00004d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004d30 20 20 3b 6e 6f 20 63 6f 64 65 20 28 6f 6e 6c 79 | ;no code (only| 00004d40 20 68 65 6c 70 20 74 65 78 74 29 0a 20 20 20 20 | help text). | 00004d50 20 20 20 20 44 43 44 20 20 20 20 20 30 0a 20 20 | DCD 0. | 00004d60 20 20 20 20 20 20 44 43 44 20 20 20 20 20 30 0a | DCD 0.| 00004d70 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 20 | DCD | 00004d80 68 65 6c 70 5f 74 65 78 74 31 20 2d 20 6d 6f 64 |help_text1 - mod| 00004d90 75 6c 65 5f 62 61 73 65 0a 0a 20 20 20 20 20 20 |ule_base.. | 00004da0 20 20 44 43 44 20 20 20 20 20 30 20 20 20 20 20 | DCD 0 | 00004db0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004dc0 20 20 20 20 20 20 20 20 20 20 3b 74 61 62 6c 65 | ;table| 00004dd0 20 74 65 72 6d 69 6e 61 74 6f 72 0a 0a 68 65 6c | terminator..hel| 00004de0 70 5f 74 65 78 74 31 0a 20 20 20 20 20 20 20 20 |p_text1. | 00004df0 44 43 42 20 20 20 20 20 31 33 0a 20 20 20 20 20 |DCB 13. | 00004e00 20 20 20 44 43 42 20 20 20 20 20 22 44 65 73 6b | DCB "Desk| 00004e10 74 6f 70 2b 22 2c 32 37 2c 34 31 2c 22 61 20 52 |top+",27,41,"a R| 00004e20 49 53 43 20 4f 53 20 33 2e 31 30 2f 33 2e 31 31 |ISC OS 3.10/3.11| 00004e30 20 73 70 65 63 69 66 69 63 20 70 61 74 63 68 2c | specific patch,| 00004e40 20 77 68 69 63 68 20 70 72 6f 76 69 64 65 73 20 | which provides | 00004e50 73 65 76 65 72 61 6c 20 65 6e 68 61 6e 63 65 6d |several enhancem| 00004e60 65 6e 74 73 22 0a 20 20 20 20 20 20 20 20 44 43 |ents". DC| 00004e70 42 20 20 20 20 20 32 37 2c 34 30 2c 22 79 6f 75 |B 27,40,"you| 00004e80 72 20 64 65 73 6b 74 6f 70 3a 22 2c 31 33 2c 31 |r desktop:",13,1| 00004e90 33 0a 20 20 20 20 20 20 20 20 44 43 42 20 20 20 |3. DCB | 00004ea0 20 20 22 28 30 29 20 4d 61 6e 79 20 61 70 70 6c | "(0) Many appl| 00004eb0 69 63 61 22 2c 32 37 2c 39 2c 22 73 20 63 61 6e |ica",27,9,"s can| 00004ec0 20 62 65 20 66 6f 72 63 65 64 22 2c 32 37 2c 34 | be forced",27,4| 00004ed0 30 2c 22 75 73 65 20 73 6f 6c 69 64 20 22 2c 32 |0,"use solid ",2| 00004ee0 37 2c 33 31 2c 22 20 64 72 61 67 73 20 69 6e 73 |7,31," drags ins| 00004ef0 74 65 61 64 20 6f 66 20 64 61 73 68 65 64 20 62 |tead of dashed b| 00004f00 6f 78 65 73 3b 22 2c 31 33 0a 20 20 20 20 20 20 |oxes;",13. | 00004f10 20 20 44 43 42 20 20 20 20 20 22 28 31 29 20 54 | DCB "(1) T| 00004f20 68 65 20 46 69 6c 65 72 20 63 61 6e 20 62 65 20 |he Filer can be | 00004f30 6d 61 64 65 22 2c 32 37 2c 34 30 2c 22 75 73 65 |made",27,40,"use| 00004f40 20 73 6f 6c 69 64 20 22 2c 32 37 2c 33 31 2c 22 | solid ",27,31,"| 00004f50 20 64 72 61 67 73 3b 22 2c 31 33 0a 20 20 20 20 | drags;",13. | 00004f60 20 20 20 20 44 43 42 20 20 20 20 20 22 28 32 29 | DCB "(2)| 00004f70 20 41 6c 6c 20 73 6f 6c 69 64 20 22 2c 32 37 2c | All solid ",27,| 00004f80 33 31 2c 22 20 64 72 61 67 73 20 63 61 6e 20 62 |31," drags can b| 00004f90 65 20 6d 61 64 65 20 73 65 6d 69 2d 74 72 61 6e |e made semi-tran| 00004fa0 73 70 61 72 65 6e 74 3b 22 2c 31 33 0a 20 20 20 |sparent;",13. | 00004fb0 20 20 20 20 20 44 43 42 20 20 20 20 20 22 28 33 | DCB "(3| 00004fc0 29 20 54 68 65 20 46 69 6c 65 72 20 63 61 6e 20 |) The Filer can | 00004fd0 62 65 20 6d 61 64 65 22 2c 32 37 2c 34 30 2c 22 |be made",27,40,"| 00004fe0 75 73 65 20 66 61 6e 63 79 20 74 65 78 74 3b 22 |use fancy text;"| 00004ff0 2c 31 33 0a 20 20 20 20 20 20 20 20 44 43 42 20 |,13. DCB | 00005000 20 20 20 20 22 28 34 29 20 44 69 72 65 63 74 6f | "(4) Directo| 00005010 72 69 65 73 2f 22 2c 32 37 2c 37 2c 22 73 20 63 |ries/",27,7,"s c| 00005020 61 6e 20 62 65 20 64 69 73 70 6c 61 79 65 64 20 |an be displayed | 00005030 75 73 69 6e 67 20 75 73 65 72 20 64 65 66 69 6e |using user defin| 00005040 65 64 20 22 2c 32 37 2c 33 31 2c 22 73 2e 22 2c |ed ",27,31,"s.",| 00005050 31 33 2c 31 33 0a 20 20 20 20 20 20 20 20 44 43 |13,13. DC| 00005060 42 20 20 20 20 20 22 54 6f 20 75 73 65 20 6f 70 |B "To use op| 00005070 22 2c 32 37 2c 39 2c 22 20 34 2c 20 79 6f 75 20 |",27,9," 4, you | 00005080 6e 65 65 64 22 2c 32 37 2c 34 30 2c 22 6c 6f 61 |need",27,40,"loa| 00005090 64 20 73 75 69 74 61 62 6c 65 20 22 2c 32 37 2c |d suitable ",27,| 000050a0 33 31 2c 22 73 20 69 6e 74 6f 22 2c 32 37 2c 32 |31,"s into",27,2| 000050b0 2c 22 57 69 6d 70 20 22 2c 32 37 2c 33 31 2c 22 |,"Wimp ",27,31,"| 000050c0 20 70 6f 6f 6c 2c 20 77 69 74 68 20 22 0a 20 20 | pool, with ". | 000050d0 20 20 20 20 20 20 44 43 42 20 20 20 20 20 32 37 | DCB 27| 000050e0 2c 31 31 2c 22 73 3a 22 2c 31 33 0a 20 20 20 20 |,11,"s:",13. | 000050f0 20 20 20 20 44 43 42 20 20 20 20 20 22 a0 a0 23 | DCB "..#| 00005100 3c 6e 3e 2c 20 24 3c 6e 3e 2c 20 73 6d 23 3c 6e |<n>, $<n>, sm#<n| 00005110 3e 20 26 20 73 6d 24 3c 6e 3e 2c 20 70 65 72 20 |> & sm$<n>, per | 00005120 22 2c 32 37 2c 33 2c 22 79 2c 20 77 68 65 72 65 |",27,3,"y, where| 00005130 20 3c 6e 3e 20 69 73 22 2c 32 37 2c 32 2c 32 37 | <n> is",27,2,27| 00005140 2c 31 31 2c 22 20 6f 66 22 2c 32 37 2c 32 2c 32 |,11," of",27,2,2| 00005150 37 2c 33 2c 22 79 20 63 6f 6e 63 65 72 6e 65 64 |7,3,"y concerned| 00005160 2c 22 2c 31 33 0a 20 20 20 20 20 20 20 20 44 43 |,",13. DC| 00005170 42 20 20 20 20 20 22 26 20 22 2c 32 37 2c 37 2c |B "& ",27,7,| 00005180 22 2f 3c 61 62 63 3e 2c 20 73 6d 61 6c 6c 2f 3c |"/<abc>, small/<| 00005190 61 62 63 3e 2c 20 77 68 65 72 65 20 3c 61 62 63 |abc>, where <abc| 000051a0 3e 22 2c 32 37 2c 34 31 0a 20 20 20 20 20 20 20 |>",27,41. | 000051b0 20 44 43 42 20 20 20 20 20 22 61 20 33 20 63 68 | DCB "a 3 ch| 000051c0 61 72 61 63 74 65 72 20 66 69 6c 65 20 6e 61 6d |aracter file nam| 000051d0 65 20 73 75 66 66 69 78 2e 22 2c 31 33 2c 31 33 |e suffix.",13,13| 000051e0 0a 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 |. DCB | 000051f0 20 22 41 20 63 6f 6d 62 69 6e 61 22 2c 32 37 2c | "A combina",27,| 00005200 39 2c 22 20 6f 66 20 74 68 65 73 65 20 6f 70 22 |9," of these op"| 00005210 2c 32 37 2c 39 2c 22 73 22 2c 32 37 2c 34 31 2c |,27,9,"s",27,41,| 00005220 32 37 2c 32 38 2c 22 65 64 20 75 73 69 6e 67 20 |27,28,"ed using | 00005230 61 20 22 2c 32 37 2c 33 36 2c 22 20 73 75 63 68 |a ",27,36," such| 00005240 20 61 73 20 32 5f 31 30 31 31 31 2c 20 77 68 69 | as 2_10111, whi| 00005250 63 68 20 69 6e 22 2c 32 37 2c 32 0a 20 20 20 20 |ch in",27,2. | 00005260 20 20 20 20 44 43 42 20 20 20 20 20 22 65 78 61 | DCB "exa| 00005270 6d 70 6c 65 20 67 69 76 65 6e 2c 20 74 75 72 6e |mple given, turn| 00005280 73 22 2c 32 37 2c 33 38 2c 22 6f 70 22 2c 32 37 |s",27,38,"op",27| 00005290 2c 39 2c 22 73 20 6f 6e 20 65 78 63 65 70 74 20 |,9,"s on except | 000052a0 66 61 6e 63 79 20 74 65 78 74 2e 22 2c 31 33 0a |fancy text.",13.| 000052b0 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 000052c0 22 54 68 65 20 22 2c 32 37 2c 33 36 2c 22 20 6d |"The ",27,36," m| 000052d0 61 79 20 62 65 20 70 61 73 73 65 64 20 75 73 69 |ay be passed usi| 000052e0 6e 67 20 65 69 74 68 65 72 20 27 2a 52 4d 4c 6f |ng either '*RMLo| 000052f0 61 64 20 44 65 73 6b 74 6f 70 2b 20 32 5f 31 30 |ad Desktop+ 2_10| 00005300 31 31 31 27 2c 20 6f 72 20 61 66 74 65 72 20 6c |111', or after l| 00005310 6f 61 64 69 6e 67 2c 20 75 73 69 6e 67 20 22 0a |oading, using ".| 00005320 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 00005330 22 2a 53 65 74 a0 44 65 73 6b 74 6f 70 2b 5f 4f |"*Set.Desktop+_O| 00005340 70 22 2c 32 37 2c 39 2c 22 73 a0 32 5f 31 30 31 |p",27,9,"s.2_101| 00005350 31 31 2e 22 2c 31 33 0a 20 20 20 20 20 20 20 20 |11.",13. | 00005360 44 43 42 20 20 20 20 20 22 59 6f 75 20 6d 61 79 |DCB "You may| 00005370 20 61 6c 73 6f 20 72 65 61 64 22 2c 32 37 2c 32 | also read",27,2| 00005380 2c 32 37 2c 35 2c 22 20 6f 70 22 2c 32 37 2c 39 |,27,5," op",27,9| 00005390 2c 22 73 20 66 72 6f 6d 20 74 68 69 73 20 73 79 |,"s from this sy| 000053a0 73 74 65 6d 20 76 61 72 69 61 62 6c 65 2e 22 2c |stem variable.",| 000053b0 31 33 0a 20 20 20 20 20 20 20 20 44 43 42 20 20 |13. DCB | 000053c0 20 20 20 22 49 66 20 79 6f 75 20 64 6f 20 6e 6f | "If you do no| 000053d0 74 20 73 70 65 63 69 66 79 20 61 20 63 68 6f 69 |t specify a choi| 000053e0 63 65 20 6f 66 20 6f 70 22 2c 32 37 2c 39 2c 22 |ce of op",27,9,"| 000053f0 73 2c 20 6f 6e 6c 79 20 28 30 29 20 26 20 28 34 |s, only (0) & (4| 00005400 29 20 77 69 6c 6c 20 62 65 20 75 73 65 64 2e 22 |) will be used."| 00005410 2c 31 33 0a 20 20 20 20 20 20 20 20 44 43 42 20 |,13. DCB | 00005420 20 20 20 20 30 0a 20 20 20 20 20 20 20 20 41 4c | 0. AL| 00005430 49 47 4e 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d |IGN..; ---------| 00005440 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000054a0 0a 0a 72 65 6c 65 61 73 65 5f 73 77 69 5f 76 65 |..release_swi_ve| 000054b0 63 74 6f 72 0a 20 20 20 20 20 20 20 20 4d 4f 56 |ctor. MOV| 000054c0 20 20 20 20 20 72 30 2c 20 23 38 0a 20 20 20 20 | r0, #8. | 000054d0 20 20 20 20 4c 44 52 20 20 20 20 20 72 31 2c 20 | LDR r1, | 000054e0 5b 72 30 5d 0a 20 20 20 20 20 20 20 20 4c 44 52 |[r0]. LDR| 000054f0 20 20 20 20 20 72 32 2c 20 6e 65 77 5f 62 72 61 | r2, new_bra| 00005500 6e 63 68 20 20 20 20 20 20 20 20 20 20 20 20 20 |nch | 00005510 20 20 20 20 20 3b 20 63 68 65 63 6b 20 74 68 61 | ; check tha| 00005520 74 20 6f 75 72 20 53 57 49 20 64 65 63 6f 64 65 |t our SWI decode| 00005530 72 20 68 61 73 6e 27 74 20 62 65 65 6e 20 72 65 |r hasn't been re| 00005540 70 6c 61 63 65 64 0a 20 20 20 20 20 20 20 20 43 |placed. C| 00005550 4d 50 20 20 20 20 20 72 31 2c 20 72 32 0a 20 20 |MP r1, r2. | 00005560 20 20 20 20 20 20 4c 44 52 45 51 20 20 20 72 31 | LDREQ r1| 00005570 2c 20 6f 6c 64 5f 62 72 61 6e 63 68 20 20 20 20 |, old_branch | 00005580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00005590 72 65 70 6c 61 63 65 20 6f 72 69 67 69 6e 61 6c |replace original| 000055a0 20 64 65 63 6f 64 65 72 20 69 66 20 69 74 20 68 | decoder if it h| 000055b0 61 73 6e 27 74 0a 20 20 20 20 20 20 20 20 53 54 |asn't. ST| 000055c0 52 45 51 20 20 20 72 31 2c 20 5b 72 30 5d 0a 20 |REQ r1, [r0]. | 000055d0 20 20 20 20 20 20 20 4d 4f 56 45 51 20 20 20 72 | MOVEQ r| 000055e0 30 2c 20 23 30 0a 20 20 20 20 20 20 20 20 53 54 |0, #0. ST| 000055f0 52 45 51 20 20 20 72 31 2c 20 6f 6c 64 5f 62 72 |REQ r1, old_br| 00005600 61 6e 63 68 0a 20 20 20 20 20 20 20 20 4d 4f 56 |anch. MOV| 00005610 45 51 53 20 20 70 63 2c 20 6c 72 0a 0a 20 20 20 |EQS pc, lr.. | 00005620 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 32 2c | LDR r2,| 00005630 20 6f 6c 64 5f 62 72 61 6e 63 68 20 20 20 20 20 | old_branch | 00005640 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i| 00005650 66 20 74 68 65 20 6f 6c 64 20 62 72 61 6e 63 68 |f the old branch| 00005660 20 69 73 20 61 6c 72 65 61 64 79 20 74 68 65 72 | is already ther| 00005670 65 20 74 68 65 6e 20 64 6f 20 6e 6f 74 68 69 6e |e then do nothin| 00005680 67 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |g. CMP | 00005690 20 20 72 31 2c 20 72 32 0a 20 20 20 20 20 20 20 | r1, r2. | 000056a0 20 4d 4f 56 45 51 53 20 20 70 63 2c 20 6c 72 0a | MOVEQS pc, lr.| 000056b0 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 72 |. ADR r| 000056c0 30 2c 20 65 72 72 6f 72 5f 62 6c 6f 63 6b 20 20 |0, error_block | 000056d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000056e0 20 3b 20 6f 74 68 65 72 77 69 73 65 20 72 65 74 | ; otherwise ret| 000056f0 75 72 6e 20 61 6e 20 65 72 72 6f 72 0a 20 20 20 |urn an error. | 00005700 20 20 20 20 20 4f 52 52 53 20 20 70 63 2c 20 6c | ORRS pc, l| 00005710 72 2c 20 23 56 5f 46 4c 41 47 0a 0a 65 72 72 6f |r, #V_FLAG..erro| 00005720 72 5f 62 6c 6f 63 6b 20 20 20 20 20 44 43 44 20 |r_block DCD | 00005730 20 20 20 20 26 31 30 33 0a 20 20 20 20 20 20 20 | &103. | 00005740 20 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 | DCB | 00005750 20 22 43 61 6e 27 74 20 64 65 74 61 63 68 20 53 | "Can't detach S| 00005760 57 49 20 68 61 6e 64 6c 65 72 22 2c 20 30 0a 20 |WI handler", 0. | 00005770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 | A| 00005780 4c 49 47 4e 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d |LIGN..; --------| 00005790 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000057f0 2d 0a 0a 63 6c 61 69 6d 5f 73 77 69 5f 76 65 63 |-..claim_swi_vec| 00005800 74 6f 72 0a 0a 20 20 20 20 20 20 20 20 4d 4f 56 |tor.. MOV| 00005810 20 20 20 20 20 72 30 2c 20 23 38 0a 20 20 20 20 | r0, #8. | 00005820 20 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 | LDR r0, | 00005830 5b 72 30 5d 20 20 20 20 20 20 20 20 20 20 20 20 |[r0] | 00005840 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 | ; ge| 00005850 74 20 62 72 61 6e 63 68 20 74 6f 20 53 57 49 20 |t branch to SWI | 00005860 68 61 6e 64 6c 65 72 0a 20 20 20 20 20 20 20 20 |handler. | 00005870 53 54 52 20 20 20 20 20 72 30 2c 20 6f 6c 64 5f |STR r0, old_| 00005880 62 72 61 6e 63 68 0a 0a 20 20 20 20 20 20 20 20 |branch.. | 00005890 41 44 52 20 20 20 20 20 72 31 2c 20 73 65 63 6f |ADR r1, seco| 000058a0 6e 64 5f 62 72 61 6e 63 68 2d 38 20 20 20 20 20 |nd_branch-8 | 000058b0 20 20 20 20 20 20 20 20 3b 20 69 6e 73 65 72 74 | ; insert| 000058c0 20 69 6e 20 6f 75 72 20 6f 77 6e 20 63 6f 64 65 | in our own code| 000058d0 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 20 20 |. SUB | 000058e0 20 72 30 2c 20 72 30 2c 20 72 31 2c 20 4c 53 52 | r0, r0, r1, LSR| 000058f0 20 23 32 0a 0a 20 20 20 20 20 20 20 20 42 49 43 | #2.. BIC| 00005900 20 20 20 20 20 72 30 2c 20 72 30 2c 20 23 26 46 | r0, r0, #&F| 00005910 46 30 30 30 30 30 30 20 20 20 20 20 20 20 20 20 |F000000 | 00005920 20 20 20 20 20 3b 20 42 75 67 20 66 69 78 20 66 | ; Bug fix f| 00005930 6f 72 20 77 68 65 6e 20 6f 6c 64 20 62 72 61 6e |or when old bran| 00005940 63 68 20 3c 20 72 65 70 6c 61 63 65 6d 65 6e 74 |ch < replacement| 00005950 2e 0a 20 20 20 20 20 20 20 20 4f 52 52 20 20 20 |.. ORR | 00005960 20 20 72 30 2c 20 72 30 2c 20 23 26 45 41 30 30 | r0, r0, #&EA00| 00005970 30 30 30 30 0a 0a 20 20 20 20 20 20 20 20 53 54 |0000.. ST| 00005980 52 20 20 20 20 20 72 30 2c 20 73 65 63 6f 6e 64 |R r0, second| 00005990 5f 62 72 61 6e 63 68 0a 0a 20 20 20 20 20 20 20 |_branch.. | 000059a0 20 41 44 44 20 20 20 20 20 72 30 2c 20 72 30 2c | ADD r0, r0,| 000059b0 20 23 28 73 65 63 6f 6e 64 5f 62 72 61 6e 63 68 | #(second_branch| 000059c0 2d 66 69 72 73 74 5f 62 72 61 6e 63 68 29 20 2f |-first_branch) /| 000059d0 20 34 20 20 20 3b 20 43 61 6e 20 67 65 74 20 61 | 4 ; Can get a| 000059e0 77 61 79 20 77 69 74 68 20 74 68 69 73 2c 20 62 |way with this, b| 000059f0 75 74 20 73 68 6f 75 6c 64 20 62 65 20 61 77 61 |ut should be awa| 00005a00 72 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |re. | 00005a10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00005a30 20 20 20 3b 20 66 6f 72 20 66 75 74 75 72 65 20 | ; for future | 00005a40 72 65 66 65 72 65 6e 63 65 2c 20 74 68 61 74 20 |reference, that | 00005a50 74 68 69 73 20 63 61 6c 63 20 69 73 20 70 6f 74 |this calc is pot| 00005a60 65 6e 74 69 61 6c 6c 79 20 73 75 62 6a 65 63 74 |entially subject| 00005a70 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00005a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00005aa0 20 3b 20 74 6f 20 73 61 6d 65 20 66 6c 61 77 20 | ; to same flaw | 00005ab0 61 73 20 63 6f 72 72 75 70 74 65 64 20 69 6e 73 |as corrupted ins| 00005ac0 74 72 75 63 74 69 6f 6e 20 66 69 65 6c 64 20 61 |truction field a| 00005ad0 62 6f 76 65 2e 0a 20 20 20 20 20 20 20 20 20 20 |bove.. | 00005ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00005b00 20 20 20 20 20 20 3b 20 6e 62 20 68 65 72 65 2c | ; nb here,| 00005b10 20 77 65 20 63 6f 75 6c 64 20 6f 6e 6c 79 20 67 | we could only g| 00005b20 65 74 20 63 6f 72 72 75 70 74 69 6f 6e 20 69 66 |et corruption if| 00005b30 20 73 65 63 6f 6e 64 20 62 72 61 6e 63 68 20 77 | second branch w| 00005b40 61 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |as. | 00005b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00005b70 20 20 20 3b 20 74 6f 20 61 20 70 6f 69 6e 74 20 | ; to a point | 00005b80 62 65 74 77 65 65 6e 20 66 69 72 73 74 20 26 20 |between first & | 00005b90 73 65 63 6f 6e 64 20 69 6e 20 74 68 69 73 20 63 |second in this c| 00005ba0 6f 64 65 20 28 61 73 20 74 68 69 73 0a 20 20 20 |ode (as this. | 00005bb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00005bd0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 77 | ; w| 00005be0 6f 75 6c 64 20 63 68 61 6e 67 65 20 73 69 67 6e |ould change sign| 00005bf0 20 6f 66 20 62 72 61 6e 63 68 20 6f 66 66 73 65 | of branch offse| 00005c00 74 20 77 68 65 6e 20 6d 61 6b 69 6e 67 20 69 74 |t when making it| 00005c10 20 72 65 6c 61 74 69 76 65 0a 20 20 20 20 20 20 | relative. | 00005c20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00005c40 20 20 20 20 20 20 20 20 20 20 3b 20 74 6f 20 66 | ; to f| 00005c50 69 72 73 74 29 2c 20 62 75 74 20 74 68 69 73 20 |irst), but this | 00005c60 69 73 20 63 6c 65 61 72 6c 79 20 6e 6f 6e 73 65 |is clearly nonse| 00005c70 6e 73 65 2c 20 73 6f 20 77 65 20 61 72 65 20 6f |nse, so we are o| 00005c80 6b 2e 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 |k.. SUB | 00005c90 20 20 20 72 30 2c 20 72 30 2c 20 23 26 44 30 30 | r0, r0, #&D00| 00005ca0 30 30 30 30 30 0a 20 20 20 20 20 20 20 20 53 54 |00000. ST| 00005cb0 52 20 20 20 20 20 72 30 2c 20 66 69 72 73 74 5f |R r0, first_| 00005cc0 62 72 61 6e 63 68 20 20 20 20 20 20 20 20 20 20 |branch | 00005cd0 20 20 20 20 20 20 3b 20 63 6f 6e 76 65 72 74 20 | ; convert | 00005ce0 74 6f 20 61 20 42 4e 45 0a 0a 20 20 20 20 20 20 |to a BNE.. | 00005cf0 20 20 4d 4f 56 20 20 20 20 20 72 31 2c 20 23 38 | MOV r1, #8| 00005d00 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 |. ADR | 00005d10 20 72 30 2c 20 73 77 69 5f 70 61 74 63 68 2d 38 | r0, swi_patch-8| 00005d20 2d 38 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |-8. MOV | 00005d30 20 20 20 72 30 2c 20 72 30 2c 20 4c 53 52 20 23 | r0, r0, LSR #| 00005d40 32 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 |2. ADD | 00005d50 20 20 72 30 2c 20 72 30 2c 20 23 26 45 41 30 30 | r0, r0, #&EA00| 00005d60 30 30 30 30 0a 20 20 20 20 20 20 20 20 53 54 52 |0000. STR| 00005d70 20 20 20 20 20 72 30 2c 20 5b 72 31 5d 0a 20 20 | r0, [r1]. | 00005d80 20 20 20 20 20 20 53 54 52 20 20 20 20 20 72 30 | STR r0| 00005d90 2c 20 6e 65 77 5f 62 72 61 6e 63 68 20 20 20 20 |, new_branch | 00005da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00005db0 70 75 74 20 69 6e 20 61 20 62 72 61 6e 63 68 20 |put in a branch | 00005dc0 74 6f 20 6f 75 72 20 63 6f 64 65 0a 0a 20 20 20 |to our code.. | 00005dd0 20 20 20 20 20 4d 4f 56 53 20 20 20 20 20 70 63 | MOVS pc| 00005de0 2c 20 6c 72 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d |, lr..; --------| 00005df0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00005e50 2d 0a 0a 73 77 69 5f 70 61 74 63 68 0a 20 20 20 |-..swi_patch. | 00005e60 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 | STMFD sp!| 00005e70 2c 7b 6c 72 7d 0a 20 20 20 20 20 20 20 20 42 49 |,{lr}. BI| 00005e80 43 20 20 20 20 20 6c 72 2c 20 6c 72 2c 20 23 26 |C lr, lr, #&| 00005e90 46 43 30 30 30 30 30 33 0a 20 20 20 20 20 20 20 |FC000003. | 00005ea0 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 6c 72 | LDR lr, [lr| 00005eb0 2c 23 2d 34 5d 20 20 20 20 20 20 20 20 20 20 20 |,#-4] | 00005ec0 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 53 | ; get S| 00005ed0 57 49 20 69 6e 73 74 72 75 63 74 69 6f 6e 0a 0a |WI instruction..| 00005ee0 20 20 20 20 20 20 20 20 42 49 43 20 20 20 20 20 | BIC | 00005ef0 6c 72 2c 20 6c 72 2c 20 23 26 46 46 30 30 30 30 |lr, lr, #&FF0000| 00005f00 30 30 0a 20 20 20 20 20 20 20 20 42 49 43 20 20 |00. BIC | 00005f10 20 20 20 6c 72 2c 20 6c 72 2c 20 23 26 32 30 30 | lr, lr, #&200| 00005f20 30 30 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 |00. SUB | 00005f30 20 20 20 6c 72 2c 20 6c 72 2c 20 23 26 34 30 30 | lr, lr, #&400| 00005f40 30 30 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |00.. CMP | 00005f50 20 20 20 20 6c 72 2c 20 23 26 45 32 20 20 20 20 | lr, #&E2 | 00005f60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005f70 20 20 20 20 3b 20 69 73 20 69 74 20 20 20 20 20 | ; is it | 00005f80 57 69 6d 70 5f 50 6c 6f 74 49 63 6f 6e 0a 20 20 |Wimp_PlotIcon. | 00005f90 20 20 20 20 20 20 43 4d 50 4e 45 20 20 20 6c 72 | CMPNE lr| 00005fa0 2c 20 23 26 44 30 20 20 20 20 20 20 20 20 20 20 |, #&D0 | 00005fb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00005fc0 6f 72 20 20 20 20 20 20 20 20 20 20 20 20 5f 44 |or _D| 00005fd0 72 61 67 42 6f 78 0a 20 20 20 20 20 20 20 20 43 |ragBox. C| 00005fe0 4d 50 4e 45 20 20 20 6c 72 2c 20 23 26 43 39 20 |MPNE lr, #&C9 | 00005ff0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006000 20 20 20 20 20 20 20 3b 20 6f 72 20 20 20 20 20 | ; or | 00006010 20 20 20 20 20 20 20 5f 55 70 64 61 74 65 57 69 | _UpdateWi| 00006020 6e 64 6f 77 0a 20 20 20 20 20 20 20 20 43 4d 50 |ndow. CMP| 00006030 4e 45 20 20 20 6c 72 2c 20 23 26 32 34 30 30 20 |NE lr, #&2400 | 00006040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006050 20 20 20 20 20 3b 20 6f 72 20 44 72 61 67 41 53 | ; or DragAS| 00006060 70 72 69 74 65 5f 53 74 61 72 74 0a 20 20 20 20 |prite_Start. | 00006070 20 20 20 20 43 4d 50 4e 45 20 20 20 6c 72 2c 20 | CMPNE lr, | 00006080 23 26 43 33 20 20 20 20 20 20 20 20 20 20 20 20 |#&C3 | 00006090 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 6f 72 | ; or| 000060a0 20 20 20 20 20 20 20 20 57 69 6d 70 5f 44 65 6c | Wimp_Del| 000060b0 65 74 65 57 69 6e 64 6f 77 20 3f 0a 20 20 20 20 |eteWindow ?. | 000060c0 20 20 20 20 43 4d 50 4e 45 20 20 20 6c 72 2c 20 | CMPNE lr, | 000060d0 23 26 43 32 20 20 20 20 20 20 20 20 20 20 20 20 |#&C2 | 000060e0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 6f 72 | ; or| 000060f0 20 20 20 20 20 20 20 20 20 20 20 20 5f 43 72 65 | _Cre| 00006100 61 74 65 49 63 6f 6e 0a 20 20 20 20 20 20 20 20 |ateIcon. | 00006110 4c 44 4d 4e 45 46 44 20 73 70 21 2c 20 7b 6c 72 |LDMNEFD sp!, {lr| 00006120 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |} | 00006130 20 20 20 20 20 20 20 20 3b 20 6f 74 68 65 72 77 | ; otherw| 00006140 69 73 65 20 64 72 6f 70 20 74 68 72 6f 75 67 68 |ise drop through| 00006150 20 74 6f 20 53 57 49 20 68 61 6e 64 6c 65 72 0a | to SWI handler.| 00006160 66 69 72 73 74 5f 62 72 61 6e 63 68 0a 20 20 20 |first_branch. | 00006170 20 20 20 20 20 44 43 44 20 20 20 20 20 30 0a 0a | DCD 0..| 00006180 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 | CMP | 00006190 6c 72 2c 20 23 26 43 39 20 20 20 20 20 20 20 20 |lr, #&C9 | 000061a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000061b0 3b 20 69 66 20 69 74 27 73 20 75 70 64 61 74 65 |; if it's update| 000061c0 2c 20 63 6f 70 79 20 6f 75 74 20 77 69 6e 64 6f |, copy out windo| 000061d0 77 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |w handle. | 000061e0 20 4c 44 52 45 51 20 20 20 6c 72 2c 20 5b 72 31 | LDREQ lr, [r1| 000061f0 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 00006200 20 20 20 20 20 20 20 20 20 3b 20 74 68 65 6e 20 | ; then | 00006210 70 61 73 73 20 63 61 6c 6c 20 6f 6e 0a 20 20 20 |pass call on. | 00006220 20 20 20 20 20 53 54 52 45 51 20 20 20 6c 72 2c | STREQ lr,| 00006230 20 77 69 6e 64 6f 77 68 61 6e 64 6c 65 0a 20 20 | windowhandle. | 00006240 20 20 20 20 20 20 42 45 51 20 20 20 20 20 63 6f | BEQ co| 00006250 6e 74 69 6e 75 65 0a 0a 20 20 20 20 20 20 20 20 |ntinue.. | 00006260 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 26 32 34 |CMP lr, #&24| 00006270 30 30 0a 20 20 20 20 20 20 20 20 42 45 51 20 20 |00. BEQ | 00006280 20 20 20 69 73 5f 64 72 61 67 61 73 70 72 69 74 | is_dragasprit| 00006290 65 73 74 61 72 74 0a 0a 20 20 20 20 20 20 20 20 |estart.. | 000062a0 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 26 45 32 |CMP lr, #&E2| 000062b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000062c0 20 20 20 20 20 20 20 20 3b 20 69 66 20 70 6c 6f | ; if plo| 000062d0 74 20 69 63 6f 6e 2c 20 6a 75 6d 70 20 74 6f 20 |t icon, jump to | 000062e0 63 6f 64 65 20 74 6f 20 64 65 61 6c 20 77 69 74 |code to deal wit| 000062f0 68 20 74 68 69 73 0a 20 20 20 20 20 20 20 20 42 |h this. B| 00006300 45 51 20 20 20 20 20 69 73 5f 70 6c 6f 74 69 63 |EQ is_plotic| 00006310 6f 6e 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |on.. CMP | 00006320 20 20 20 20 6c 72 2c 20 23 26 43 33 20 20 20 20 | lr, #&C3 | 00006330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006340 20 20 20 20 3b 20 69 66 20 64 65 6c 65 74 65 20 | ; if delete | 00006350 77 69 6e 64 6f 77 2c 20 6a 75 6d 70 20 74 6f 20 |window, jump to | 00006360 63 6f 64 65 20 74 6f 20 68 61 6e 64 6c 65 20 74 |code to handle t| 00006370 68 69 73 0a 20 20 20 20 20 20 20 20 42 45 51 20 |his. BEQ | 00006380 20 20 20 20 69 73 5f 64 65 6c 65 74 65 77 69 6e | is_deletewin| 00006390 64 6f 77 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 |dow.. CMP| 000063a0 20 20 20 20 20 6c 72 2c 20 23 26 43 32 20 20 20 | lr, #&C2 | 000063b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000063c0 20 20 20 20 20 3b 20 69 66 20 63 72 65 61 74 65 | ; if create| 000063d0 20 69 63 6f 6e 2c 20 6a 75 6d 70 20 74 6f 20 63 | icon, jump to c| 000063e0 6f 64 65 20 74 6f 20 68 61 6e 64 6c 65 20 74 68 |ode to handle th| 000063f0 69 73 0a 20 20 20 20 20 20 20 20 42 45 51 20 20 |is. BEQ | 00006400 20 20 20 69 73 5f 63 72 65 61 74 65 69 63 6f 6e | is_createicon| 00006410 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006420 20 20 20 3b 20 65 6c 73 65 20 64 72 6f 70 20 74 | ; else drop t| 00006430 68 72 6f 75 67 68 20 74 6f 20 64 72 61 67 20 62 |hrough to drag b| 00006440 6f 78 20 63 6f 64 65 0a 0a 20 20 20 20 20 20 20 |ox code.. | 00006450 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 31 | LDR lr, [r1| 00006460 2c 23 34 5d 20 20 20 20 20 20 20 20 20 20 20 20 |,#4] | 00006470 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 64 | ; get d| 00006480 72 61 67 20 74 79 70 65 0a 20 20 20 20 20 20 20 |rag type. | 00006490 20 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 35 0a | CMP lr, #5.| 000064a0 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 | BNE | 000064b0 63 6f 6e 74 69 6e 75 65 0a 20 20 20 20 20 20 20 |continue. | 000064c0 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 64 72 61 | LDR lr, dra| 000064d0 67 67 69 6e 67 5f 66 6c 61 67 0a 20 20 20 20 20 |gging_flag. | 000064e0 20 20 20 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 | CMP lr, #| 000064f0 30 0a 20 20 20 20 20 20 20 20 42 45 51 20 20 20 |0. BEQ | 00006500 20 20 63 61 6c 6c 62 61 63 6b 5f 63 6f 64 65 0a | callback_code.| 00006510 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00006520 6c 72 2c 20 23 30 20 20 20 20 20 20 20 20 20 20 |lr, #0 | 00006530 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006540 3b 20 4d 61 6b 65 20 63 6f 64 65 20 65 6e 64 20 |; Make code end | 00006550 61 20 63 75 72 72 65 6e 74 20 64 72 61 67 20 69 |a current drag i| 00006560 66 20 61 6e 6f 74 68 65 72 20 72 65 71 75 65 73 |f another reques| 00006570 74 65 64 0a 20 20 20 20 20 20 20 20 53 54 52 20 |ted. STR | 00006580 20 20 20 20 6c 72 2c 20 64 72 61 67 67 69 6e 67 | lr, dragging| 00006590 5f 66 6c 61 67 20 20 20 20 20 20 20 20 20 20 20 |_flag | 000065a0 20 20 20 20 3b 20 54 68 69 73 20 69 73 20 63 6f | ; This is co| 000065b0 6e 73 69 73 74 65 6e 74 20 77 69 74 68 20 44 72 |nsistent with Dr| 000065c0 61 67 41 53 70 72 69 74 65 20 77 68 69 63 68 20 |agASprite which | 000065d0 64 6f 65 73 20 74 68 69 73 20 26 0a 20 20 20 20 |does this &. | 000065e0 20 20 20 20 53 57 49 20 20 20 20 20 58 44 72 61 | SWI XDra| 000065f0 67 41 53 70 72 69 74 65 5f 53 74 6f 70 20 20 20 |gASprite_Stop | 00006600 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 61 76 | ; av| 00006610 6f 69 64 73 20 62 75 67 20 69 66 20 74 68 69 73 |oids bug if this| 00006620 20 63 6f 64 65 20 74 68 69 6e 6b 73 20 69 74 27 | code thinks it'| 00006630 73 20 64 72 61 67 67 69 6e 67 2c 20 65 76 65 6e |s dragging, even| 00006640 20 77 68 65 6e 0a 20 20 20 20 20 20 20 20 42 56 | when. BV| 00006650 43 20 20 20 20 20 63 61 6c 6c 62 61 63 6b 5f 63 |C callback_c| 00006660 6f 64 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |ode | 00006670 20 20 20 20 20 20 3b 20 69 74 20 6e 65 76 65 72 | ; it never| 00006680 20 67 6f 74 20 73 74 61 72 74 65 64 2e 0a 20 20 | got started.. | 00006690 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 | LDMFD sp| 000066a0 21 2c 20 7b 70 63 7d 5e 20 20 20 20 20 20 20 20 |!, {pc}^ | 000066b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000066c0 49 66 20 61 6e 20 65 72 72 6f 72 2c 20 62 65 68 |If an error, beh| 000066d0 61 76 65 20 61 73 20 62 65 66 6f 72 65 20 28 69 |ave as before (i| 000066e0 65 20 69 67 6e 6f 72 65 20 72 65 71 75 65 73 74 |e ignore request| 000066f0 29 2e 0a 0a 6e 6f 74 5f 73 70 72 69 74 65 0a 20 |)...not_sprite. | 00006700 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 00006710 70 21 2c 7b 72 30 2d 72 34 2c 6c 72 7d 0a 63 6f |p!,{r0-r4,lr}.co| 00006720 6e 74 69 6e 75 65 0a 20 20 20 20 20 20 20 20 4c |ntinue. L| 00006730 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 6c 72 7d |DMFD sp!, {lr}| 00006740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006750 20 20 20 20 20 20 20 3b 20 63 61 6c 6c 20 57 69 | ; call Wi| 00006760 6d 70 5f 44 72 61 67 42 6f 78 20 61 73 20 75 73 |mp_DragBox as us| 00006770 75 61 6c 0a 73 65 63 6f 6e 64 5f 62 72 61 6e 63 |ual.second_branc| 00006780 68 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 |h. DCD | 00006790 20 20 30 0a 0a 77 6f 72 6b 73 70 61 63 65 0a 20 | 0..workspace. | 000067a0 20 20 20 20 20 20 20 25 20 20 20 20 20 20 20 35 | % 5| 000067b0 32 0a 0a 62 64 69 6e 67 62 6f 78 0a 20 20 20 20 |2..bdingbox. | 000067c0 20 20 20 20 25 20 20 20 20 20 20 20 31 36 0a 69 | % 16.i| 000067d0 6e 69 74 62 6f 78 0a 20 20 20 20 20 20 20 20 25 |nitbox. %| 000067e0 20 20 20 20 20 20 20 31 36 0a 0a 63 61 6c 6c 62 | 16..callb| 000067f0 61 63 6b 5f 63 6f 64 65 0a 20 20 20 20 20 20 20 |ack_code. | 00006800 20 53 54 4d 46 44 20 20 20 73 70 21 2c 7b 72 30 | STMFD sp!,{r0| 00006810 2d 72 34 2c 6c 72 7d 0a 20 20 20 20 20 20 20 20 |-r4,lr}. | 00006820 4d 4f 56 20 20 20 20 20 72 34 2c 20 72 31 0a 20 |MOV r4, r1. | 00006830 20 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 | ADR r| 00006840 31 2c 20 77 6f 72 6b 73 70 61 63 65 0a 20 20 20 |1, workspace. | 00006850 20 20 20 20 20 53 57 49 20 20 20 20 20 58 57 69 | SWI XWi| 00006860 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 |mp_GetPointerInf| 00006870 6f 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 |o. LDR | 00006880 20 20 72 30 2c 20 5b 72 31 2c 20 23 31 36 5d 0a | r0, [r1, #16].| 00006890 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 | CMP | 000068a0 72 30 2c 20 23 30 20 20 20 20 20 20 20 20 20 20 |r0, #0 | 000068b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000068c0 3b 20 69 66 20 74 68 65 72 65 27 73 20 6e 6f 20 |; if there's no | 000068d0 69 63 6f 6e 20 75 6e 64 65 72 20 74 68 65 20 70 |icon under the p| 000068e0 6f 69 6e 74 65 72 20 74 68 65 6e 0a 20 20 20 20 |ointer then. | 000068f0 20 20 20 20 42 4c 54 20 20 20 20 20 69 73 5f 66 | BLT is_f| 00006900 69 6c 65 72 20 20 20 20 20 20 20 20 20 20 20 20 |iler | 00006910 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 65 | ; se| 00006920 65 20 69 66 20 62 65 6c 6f 6e 67 73 20 74 6f 20 |e if belongs to | 00006930 66 69 6c 65 72 0a 0a 20 20 20 20 20 20 20 20 4c |filer.. L| 00006940 44 52 20 20 20 20 20 6c 72 2c 20 6f 70 74 69 6f |DR lr, optio| 00006950 6e 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ns | 00006960 20 20 20 20 20 20 20 3b 69 67 6e 6f 72 65 20 61 | ;ignore a| 00006970 70 70 6c 69 63 61 74 69 6f 6e 20 73 6f 6c 69 64 |pplication solid| 00006980 20 64 72 61 67 20 6f 70 74 69 6f 6e 2c 20 69 66 | drag option, if| 00006990 20 6f 70 74 69 6f 6e 20 6e 6f 74 0a 20 20 20 20 | option not. | 000069a0 20 20 20 20 54 53 54 20 20 20 20 20 6c 72 2c 20 | TST lr, | 000069b0 23 31 3c 3c 30 20 20 20 20 20 20 20 20 20 20 20 |#1<<0 | 000069c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 61 63 74 | ;act| 000069d0 69 76 61 74 65 64 0a 20 20 20 20 20 20 20 20 42 |ivated. B| 000069e0 45 51 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 |EQ not_sprit| 000069f0 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e. | 00006a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006a20 20 20 3b 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 64 | ;following cod| 00006a30 65 20 6d 6f 64 69 66 69 65 73 20 62 64 69 6e 67 |e modifies bding| 00006a40 20 62 6f 78 20 73 74 20 6e 6f 77 20 63 61 6e 20 | box st now can | 00006a50 75 73 65 20 27 63 6f 6e 73 74 72 61 69 6e 0a 20 |use 'constrain. | 00006a60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00006a90 20 70 74 72 20 74 6f 20 70 61 72 65 6e 74 20 62 | ptr to parent b| 00006aa0 6f 78 27 2c 20 72 61 74 68 65 72 20 74 68 61 6e |ox', rather than| 00006ab0 20 27 63 6f 6e 73 74 72 61 69 6e 20 62 6f 78 20 | 'constrain box | 00006ac0 74 6f 20 70 61 72 65 6e 74 27 0a 20 20 20 20 20 |to parent'. | 00006ad0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006af0 20 20 20 20 20 20 20 20 20 20 20 3b 74 68 69 73 | ;this| 00006b00 20 73 68 6f 75 6c 64 6e 27 74 20 62 65 20 6e 65 | shouldn't be ne| 00006b10 63 65 73 73 61 72 79 20 61 73 20 44 72 61 67 41 |cessary as DragA| 00006b20 53 70 72 69 74 65 20 63 61 6e 20 61 63 63 65 70 |Sprite can accep| 00006b30 74 20 62 6f 74 68 0a 20 20 20 20 20 20 20 20 20 |t both. | 00006b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006b60 20 20 20 20 20 20 20 3b 66 6f 72 6d 73 2c 20 68 | ;forms, h| 00006b70 6f 77 65 76 65 72 20 74 68 65 20 6c 61 74 74 65 |owever the latte| 00006b80 72 20 64 6f 65 73 6e 27 74 20 77 6f 72 6b 20 63 |r doesn't work c| 00006b90 6f 72 72 65 63 74 6c 79 0a 20 20 20 20 20 20 20 |orrectly. | 00006ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006bc0 20 20 20 20 20 20 20 20 20 3b 69 6e 73 74 65 61 | ;instea| 00006bd0 64 2c 20 69 74 20 63 61 6c 63 75 6c 61 74 65 73 |d, it calculates| 00006be0 20 70 6f 73 20 6f 66 20 73 70 72 69 74 65 20 77 | pos of sprite w| 00006bf0 69 74 68 69 6e 20 69 6e 69 74 69 61 6c 20 62 6f |ithin initial bo| 00006c00 78 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |x. | 00006c10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006c30 20 20 3b 26 20 74 68 65 6e 20 70 61 73 73 65 73 | ;& then passes| 00006c40 20 74 68 65 20 6d 69 6e 69 6d 61 6c 20 62 64 69 | the minimal bdi| 00006c50 6e 67 20 62 6f 78 20 66 6f 72 20 74 68 65 20 73 |ng box for the s| 00006c60 70 72 69 74 65 20 74 6f 20 61 6e 0a 20 20 20 20 |prite to an. | 00006c70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006c90 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 6e 76 | ;inv| 00006ca0 69 73 69 62 6c 65 20 77 69 6d 70 5f 64 72 61 67 |isible wimp_drag| 00006cb0 62 6f 78 2c 20 74 68 75 73 20 69 66 20 69 6e 69 |box, thus if ini| 00006cc0 74 69 61 6c 20 62 6f 78 20 67 69 76 65 6e 20 74 |tial box given t| 00006cd0 6f 20 74 68 69 73 0a 20 20 20 20 20 20 20 20 20 |o this. | 00006ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006d00 20 20 20 20 20 20 20 3b 63 6f 64 65 20 64 6f 65 | ;code doe| 00006d10 73 6e 27 74 20 65 78 61 63 74 6c 79 20 6d 61 74 |sn't exactly mat| 00006d20 63 68 20 74 68 65 20 73 70 72 69 74 65 20 73 69 |ch the sprite si| 00006d30 7a 65 2c 20 62 65 68 61 76 69 6f 75 72 20 77 69 |ze, behaviour wi| 00006d40 6c 6c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |ll. | 00006d50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00006d70 20 20 20 3b 62 65 20 69 6e 63 6f 72 72 65 63 74 | ;be incorrect| 00006d80 2e 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 |.. ADD | 00006d90 20 20 6c 72 2c 20 72 34 2c 20 23 38 0a 20 20 20 | lr, r4, #8. | 00006da0 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 | STMFD sp!| 00006db0 2c 20 7b 72 34 2d 72 37 7d 0a 20 20 20 20 20 20 |, {r4-r7}. | 00006dc0 20 20 4c 44 4d 49 41 20 20 20 6c 72 2c 20 7b 72 | LDMIA lr, {r| 00006dd0 30 2d 72 37 7d 20 20 20 20 20 20 20 20 20 20 20 |0-r7} | 00006de0 20 20 20 20 20 20 20 20 20 20 3b 72 30 2d 72 33 | ;r0-r3| 00006df0 20 69 6e 69 74 20 64 72 61 67 20 62 6f 78 20 70 | init drag box p| 00006e00 6f 73 2c 20 72 34 2d 72 37 20 70 61 72 65 6e 74 |os, r4-r7 parent| 00006e10 20 62 6f 78 0a 20 20 20 20 20 20 20 20 41 44 52 | box. ADR| 00006e20 20 20 20 20 20 6c 72 2c 20 69 6e 69 74 62 6f 78 | lr, initbox| 00006e30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006e40 20 20 20 20 20 3b 6d 61 6b 65 20 61 20 63 6f 70 | ;make a cop| 00006e50 79 20 6f 66 20 69 6e 69 74 20 62 6f 78 0a 20 20 |y of init box. | 00006e60 20 20 20 20 20 20 53 54 4d 49 41 20 20 20 6c 72 | STMIA lr| 00006e70 2c 20 7b 72 30 2d 72 33 7d 0a 20 20 20 20 20 20 |, {r0-r3}. | 00006e80 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 77 6f | LDR lr, wo| 00006e90 72 6b 73 70 61 63 65 20 20 20 20 20 20 20 20 20 |rkspace | 00006ea0 20 20 20 20 20 20 20 20 20 20 3b 6d 6f 75 73 65 | ;mouse| 00006eb0 20 78 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 | x. SUB | 00006ec0 20 20 20 72 30 2c 20 6c 72 2c 20 72 30 0a 20 20 | r0, lr, r0. | 00006ed0 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 | SUB r2| 00006ee0 2c 20 6c 72 2c 20 72 32 0a 20 20 20 20 20 20 20 |, lr, r2. | 00006ef0 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 77 6f 72 | LDR lr, wor| 00006f00 6b 73 70 61 63 65 2b 34 20 20 20 20 20 20 20 20 |kspace+4 | 00006f10 20 20 20 20 20 20 20 20 20 3b 6d 6f 75 73 65 20 | ;mouse | 00006f20 79 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 20 |y. SUB | 00006f30 20 20 72 31 2c 20 6c 72 2c 20 72 31 0a 20 20 20 | r1, lr, r1. | 00006f40 20 20 20 20 20 53 55 42 20 20 20 20 20 72 33 2c | SUB r3,| 00006f50 20 6c 72 2c 20 72 33 0a 20 20 20 20 20 20 20 20 | lr, r3. | 00006f60 41 44 44 20 20 20 20 20 72 34 2c 20 72 34 2c 20 |ADD r4, r4, | 00006f70 72 30 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 |r0. ADD | 00006f80 20 20 20 72 36 2c 20 72 36 2c 20 72 32 0a 20 20 | r6, r6, r2. | 00006f90 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 35 | ADD r5| 00006fa0 2c 20 72 35 2c 20 72 31 0a 20 20 20 20 20 20 20 |, r5, r1. | 00006fb0 20 41 44 44 20 20 20 20 20 72 37 2c 20 72 37 2c | ADD r7, r7,| 00006fc0 20 72 33 0a 20 20 20 20 20 20 20 20 41 44 44 20 | r3. ADD | 00006fd0 20 20 20 20 72 36 2c 20 72 36 2c 20 23 31 0a 20 | r6, r6, #1. | 00006fe0 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 | ADD r| 00006ff0 37 2c 20 72 37 2c 20 23 31 0a 20 20 20 20 20 20 |7, r7, #1. | 00007000 20 20 41 44 52 20 20 20 20 20 6c 72 2c 20 62 64 | ADR lr, bd| 00007010 69 6e 67 62 6f 78 0a 20 20 20 20 20 20 20 20 53 |ingbox. S| 00007020 54 4d 49 41 20 20 20 6c 72 2c 20 7b 72 34 2d 72 |TMIA lr, {r4-r| 00007030 37 7d 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 44 |7}. LDMFD| 00007040 20 20 20 73 70 21 2c 20 7b 72 34 2d 72 37 7d 0a | sp!, {r4-r7}.| 00007050 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 |. ADR | 00007060 20 72 31 2c 20 77 6f 72 6b 73 70 61 63 65 2b 31 | r1, workspace+1| 00007070 32 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |2. SWI | 00007080 20 20 58 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 | XWimp_GetIconS| 00007090 74 61 74 65 20 20 20 20 20 20 20 20 20 20 20 20 |tate | 000070a0 20 20 3b 20 67 65 74 20 64 61 74 61 20 62 6c 6f | ; get data blo| 000070b0 63 6b 20 66 6f 72 20 69 63 6f 6e 20 75 6e 64 65 |ck for icon unde| 000070c0 72 20 74 68 65 20 70 6f 69 6e 74 65 72 0a 0a 20 |r the pointer.. | 000070d0 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 000070e0 33 2c 20 5b 72 31 2c 20 23 32 34 5d 0a 20 20 20 |3, [r1, #24]. | 000070f0 20 20 20 20 20 54 53 54 20 20 20 20 20 72 33 2c | TST r3,| 00007100 20 23 32 20 20 20 20 20 20 20 20 20 20 20 20 20 | #2 | 00007110 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i| 00007120 66 20 69 74 27 73 20 6e 6f 74 20 61 20 73 70 72 |f it's not a spr| 00007130 69 74 65 20 74 68 65 6e 20 64 6f 20 6e 6f 74 68 |ite then do noth| 00007140 69 6e 67 0a 20 20 20 20 20 20 20 20 42 45 51 20 |ing. BEQ | 00007150 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a 0a | not_sprite..| 00007160 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00007170 72 30 2c 20 5b 72 31 2c 20 23 31 36 5d 20 20 20 |r0, [r1, #16] | 00007180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007190 3b 20 67 65 74 20 69 63 6f 6e 20 77 69 64 74 68 |; get icon width| 000071a0 20 69 6e 20 72 33 0a 20 20 20 20 20 20 20 20 4c | in r3. L| 000071b0 44 52 20 20 20 20 20 72 32 2c 20 5b 72 31 2c 20 |DR r2, [r1, | 000071c0 23 38 5d 0a 20 20 20 20 20 20 20 20 53 55 42 20 |#8]. SUB | 000071d0 20 20 20 20 72 32 2c 20 72 30 2c 20 72 32 0a 0a | r2, r0, r2..| 000071e0 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 000071f0 72 30 2c 20 5b 72 34 2c 20 23 31 36 5d 0a 20 20 |r0, [r4, #16]. | 00007200 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 | SUB r2| 00007210 2c 20 72 32 2c 20 72 30 0a 20 20 20 20 20 20 20 |, r2, r0. | 00007220 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b 72 34 | LDR r0, [r4| 00007230 2c 20 23 38 5d 0a 20 20 20 20 20 20 20 20 41 44 |, #8]. AD| 00007240 44 53 20 20 20 20 72 32 2c 20 72 32 2c 20 72 30 |DS r2, r2, r0| 00007250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007260 20 20 20 20 20 20 3b 20 67 65 74 20 64 72 61 67 | ; get drag| 00007270 20 62 6f 78 20 77 69 64 74 68 20 69 6e 20 72 32 | box width in r2| 00007280 0a 0a 20 20 20 20 20 20 20 20 52 53 42 4c 54 20 |.. RSBLT | 00007290 20 20 72 32 2c 20 72 32 2c 20 23 30 20 20 20 20 | r2, r2, #0 | 000072a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000072b0 20 20 3b 20 69 66 20 77 69 64 74 68 73 20 61 72 | ; if widths ar| 000072c0 65 20 77 72 6f 6e 67 20 74 68 65 6e 20 64 6f 20 |e wrong then do | 000072d0 61 20 6e 6f 72 6d 61 6c 20 64 72 61 67 2c 20 69 |a normal drag, i| 000072e0 65 20 67 75 65 73 73 20 77 65 20 68 61 76 65 20 |e guess we have | 000072f0 61 20 6d 75 6c 74 69 70 6c 65 20 66 69 6c 65 20 |a multiple file | 00007300 64 72 61 67 0a 20 20 20 20 20 20 20 20 43 4d 50 |drag. CMP| 00007310 20 20 20 20 20 72 32 2c 20 23 31 32 30 20 20 20 | r2, #120 | 00007320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007330 20 20 20 20 20 3b 20 6f 6c 64 20 76 61 6c 75 65 | ; old value| 00007340 20 6f 66 20 37 30 20 72 65 6a 65 63 74 73 20 73 | of 70 rejects s| 00007350 6f 6d 65 20 66 69 6c 65 20 69 63 6f 6e 73 20 70 |ome file icons p| 00007360 6c 61 63 65 64 20 6f 6e 20 70 69 6e 62 6f 61 72 |laced on pinboar| 00007370 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |d. | 00007380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000073a0 20 20 3b 20 6e 62 20 74 68 69 73 20 76 61 6c 75 | ; nb this valu| 000073b0 65 20 69 73 20 61 20 63 72 69 74 69 63 61 6c 20 |e is a critical | 000073c0 62 6f 75 6e 64 20 66 6f 72 20 61 62 73 28 69 63 |bound for abs(ic| 000073d0 6f 6e 20 75 6e 64 65 72 20 70 74 72 27 73 20 77 |on under ptr's w| 000073e0 69 64 74 68 20 2d 20 64 72 61 67 20 62 6f 78 20 |idth - drag box | 000073f0 77 69 64 74 68 29 0a 20 20 20 20 20 20 20 20 20 |width). | 00007400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00007420 20 20 20 20 20 20 20 3b 20 69 66 20 61 63 74 75 | ; if actu| 00007430 61 6c 20 76 61 6c 75 65 20 69 73 20 67 72 65 61 |al value is grea| 00007440 74 65 72 20 74 68 61 6e 20 74 68 69 73 2c 20 61 |ter than this, a| 00007450 73 73 75 6d 65 20 77 65 20 68 61 76 65 20 61 20 |ssume we have a | 00007460 6d 75 6c 74 69 70 6c 65 20 64 72 61 67 0a 20 20 |multiple drag. | 00007470 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00007490 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000074a0 74 68 69 73 20 6d 65 74 68 6f 64 20 69 73 20 75 |this method is u| 000074b0 73 65 64 20 73 6f 20 74 68 61 74 20 69 74 20 77 |sed so that it w| 000074c0 69 6c 6c 20 64 65 61 6c 20 77 69 74 68 20 67 65 |ill deal with ge| 000074d0 6e 65 72 61 6c 20 6d 75 6c 74 69 70 6c 65 20 69 |neral multiple i| 000074e0 63 6f 6e 20 64 72 61 67 73 20 61 6e 79 20 61 70 |con drags any ap| 000074f0 70 0a 20 20 20 20 20 20 20 20 42 47 54 20 20 20 |p. BGT | 00007500 20 20 69 73 69 74 5f 6d 75 6c 74 69 70 69 6e 0a | isit_multipin.| 00007510 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 00007520 20 72 30 2c 20 5b 72 31 2c 20 23 32 30 5d 0a 20 | r0, [r1, #20]. | 00007530 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 00007540 32 2c 20 5b 72 31 2c 20 23 31 32 5d 0a 20 20 20 |2, [r1, #12]. | 00007550 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 2c | SUB r2,| 00007560 20 72 30 2c 20 72 32 0a 0a 20 20 20 20 20 20 20 | r0, r2.. | 00007570 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b 72 34 | LDR r0, [r4| 00007580 2c 20 23 32 30 5d 0a 20 20 20 20 20 20 20 20 53 |, #20]. S| 00007590 55 42 20 20 20 20 20 72 32 2c 20 72 32 2c 20 72 |UB r2, r2, r| 000075a0 30 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 |0. LDR | 000075b0 20 20 72 30 2c 20 5b 72 34 2c 20 23 31 32 5d 0a | r0, [r4, #12].| 000075c0 20 20 20 20 20 20 20 20 41 44 44 53 20 20 20 20 | ADDS | 000075d0 72 32 2c 20 72 32 2c 20 72 30 20 20 20 20 20 20 |r2, r2, r0 | 000075e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000075f0 3b 20 67 65 74 20 64 72 61 67 20 62 6f 78 20 68 |; get drag box h| 00007600 65 69 67 68 74 20 69 6e 20 72 32 0a 0a 20 20 20 |eight in r2.. | 00007610 20 20 20 20 20 52 53 42 4c 54 20 20 20 72 32 2c | RSBLT r2,| 00007620 20 72 32 2c 20 23 30 20 20 20 20 20 20 20 20 20 | r2, #0 | 00007630 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i| 00007640 66 20 68 65 69 67 68 74 73 20 61 72 65 20 77 72 |f heights are wr| 00007650 6f 6e 67 20 74 68 65 6e 20 64 6f 20 61 20 6e 6f |ong then do a no| 00007660 72 6d 61 6c 20 64 72 61 67 2c 20 69 65 20 67 75 |rmal drag, ie gu| 00007670 65 73 73 20 77 65 20 68 61 76 65 20 61 20 6d 75 |ess we have a mu| 00007680 6c 74 69 70 6c 65 20 66 69 6c 65 20 64 72 61 67 |ltiple file drag| 00007690 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 000076a0 20 72 32 2c 20 23 34 30 20 20 20 20 20 20 20 20 | r2, #40 | 000076b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000076c0 20 3b 20 63 72 69 74 69 63 61 6c 20 62 6f 75 6e | ; critical boun| 000076d0 64 20 66 6f 72 20 61 62 73 28 69 63 6f 6e 20 75 |d for abs(icon u| 000076e0 6e 64 65 72 20 70 74 72 27 73 20 68 65 69 67 68 |nder ptr's heigh| 000076f0 74 20 2d 20 64 72 61 67 20 62 6f 78 20 68 65 69 |t - drag box hei| 00007700 67 68 74 29 0a 20 20 20 20 20 20 20 20 42 47 54 |ght). BGT| 00007710 20 20 20 20 20 69 73 69 74 5f 6d 75 6c 74 69 70 | isit_multip| 00007720 69 6e 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 |in. TST | 00007730 20 20 20 72 33 2c 20 23 32 35 36 20 20 20 20 20 | r3, #256 | 00007740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007750 20 20 20 3b 20 69 73 20 69 74 20 69 6e 64 69 72 | ; is it indir| 00007760 65 63 74 65 64 20 3f 0a 20 20 20 20 20 20 20 20 |ected ?. | 00007770 42 4e 45 20 20 20 20 20 69 6e 64 69 72 65 63 74 |BNE indirect| 00007780 65 64 0a 0a 20 20 20 20 20 20 20 20 41 44 44 20 |ed.. ADD | 00007790 20 20 20 20 72 32 2c 20 72 31 2c 20 23 32 38 20 | r2, r1, #28 | 000077a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000077b0 20 20 20 20 3b 20 73 70 72 69 74 65 20 6e 61 6d | ; sprite nam| 000077c0 65 20 64 69 72 65 63 74 6c 79 20 73 70 65 63 69 |e directly speci| 000077d0 66 69 65 64 0a 20 20 20 20 20 20 20 20 42 20 20 |fied. B | 000077e0 20 20 20 20 20 66 6f 75 6e 64 5f 73 74 61 72 74 | found_start| 000077f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007800 20 20 20 20 20 3b 20 74 68 69 73 20 77 69 6c 6c | ; this will| 00007810 20 66 69 6e 64 20 73 70 72 69 74 65 20 61 72 65 | find sprite are| 00007820 61 20 62 65 66 6f 72 65 20 64 6f 5f 64 72 61 67 |a before do_drag| 00007830 0a 0a 69 6e 64 69 72 65 63 74 65 64 0a 20 20 20 |..indirected. | 00007840 20 20 20 20 20 54 53 54 20 20 20 20 20 72 33 2c | TST r3,| 00007850 20 23 31 0a 20 20 20 20 20 20 20 20 42 4e 45 20 | #1. BNE | 00007860 20 20 20 20 74 65 78 74 5f 61 6e 64 5f 73 70 72 | text_and_spr| 00007870 69 74 65 0a 20 20 20 20 20 20 20 20 4c 44 52 20 |ite. LDR | 00007880 20 20 20 20 72 33 2c 20 5b 72 31 2c 20 23 33 36 | r3, [r1, #36| 00007890 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 000078a0 20 20 20 20 3b 20 67 65 74 20 69 6e 64 69 72 65 | ; get indire| 000078b0 63 74 65 64 20 73 70 72 69 74 65 20 6e 61 6d 65 |cted sprite name| 000078c0 20 6c 65 6e 67 74 68 0a 20 20 20 20 20 20 20 20 | length. | 000078d0 4c 44 52 20 20 20 20 20 72 32 2c 20 5b 72 31 2c |LDR r2, [r1,| 000078e0 20 23 32 38 5d 0a 20 20 20 20 20 20 20 20 4c 44 | #28]. LD| 000078f0 52 20 20 20 20 20 72 31 2c 20 5b 72 31 2c 20 23 |R r1, [r1, #| 00007900 33 32 5d 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 |32].. CMP| 00007910 20 20 20 20 20 72 33 2c 20 23 30 20 20 20 20 20 | r3, #0 | 00007920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007930 20 20 20 20 20 3b 20 69 66 20 6c 65 6e 67 74 68 | ; if length| 00007940 20 3d 20 30 20 74 68 65 6e 20 72 32 20 70 6f 69 | = 0 then r2 poi| 00007950 6e 74 73 20 74 6f 20 73 74 61 72 74 20 6f 66 20 |nts to start of | 00007960 73 70 72 69 74 65 0a 20 20 20 20 20 20 20 20 41 |sprite. A| 00007970 44 44 45 51 20 20 20 72 32 2c 20 72 32 2c 20 23 |DDEQ r2, r2, #| 00007980 34 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 |4.. CMP | 00007990 20 20 20 72 31 2c 20 23 2d 31 0a 20 20 20 20 20 | r1, #-1. | 000079a0 20 20 20 4d 4f 56 45 51 20 20 20 72 31 2c 20 23 | MOVEQ r1, #| 000079b0 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |1 | 000079c0 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 | ; if | 000079d0 61 72 65 61 20 69 73 20 2d 31 2c 20 74 72 65 61 |area is -1, trea| 000079e0 74 20 69 74 20 61 73 20 77 69 6d 70 20 61 72 65 |t it as wimp are| 000079f0 61 20 28 69 65 20 2b 31 29 20 2d 20 74 68 69 73 |a (ie +1) - this| 00007a00 20 73 65 65 6d 73 20 74 6f 20 62 65 20 6e 65 65 | seems to be nee| 00007a10 64 65 64 20 69 6e 20 46 6f 72 6d 45 64 0a 0a 20 |ded in FormEd.. | 00007a20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 20 64 | B d| 00007a30 6f 5f 64 72 61 67 0a 0a 74 65 78 74 5f 61 6e 64 |o_drag..text_and| 00007a40 5f 73 70 72 69 74 65 0a 20 20 20 20 20 20 20 20 |_sprite. | 00007a50 4c 44 52 20 20 20 20 20 72 32 2c 20 5b 72 31 2c |LDR r2, [r1,| 00007a60 20 23 33 32 5d 0a 20 20 20 20 20 20 20 20 43 4d | #32]. CM| 00007a70 50 20 20 20 20 20 72 32 2c 20 23 30 0a 20 20 20 |P r2, #0. | 00007a80 20 20 20 20 20 42 4c 45 20 20 20 20 20 6e 6f 74 | BLE not| 00007a90 5f 73 70 72 69 74 65 0a 20 20 20 20 20 20 20 20 |_sprite. | 00007aa0 0a 66 69 6e 64 5f 73 74 61 72 74 0a 20 20 20 20 |.find_start. | 00007ab0 20 20 20 20 4c 44 52 42 20 20 20 20 72 33 2c 20 | LDRB r3, | 00007ac0 5b 72 32 5d 2c 20 23 31 20 20 20 20 20 20 20 20 |[r2], #1 | 00007ad0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 65 78 | ; ex| 00007ae0 74 72 61 63 74 20 73 70 72 69 74 65 20 6e 61 6d |tract sprite nam| 00007af0 65 20 66 72 6f 6d 20 76 61 6c 69 64 61 74 69 6f |e from validatio| 00007b00 6e 20 73 74 72 69 6e 67 0a 20 20 20 20 20 20 20 |n string. | 00007b10 20 43 4d 50 20 20 20 20 20 72 33 2c 20 23 27 53 | CMP r3, #'S| 00007b20 27 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 20 |'. CMPNE | 00007b30 20 20 72 33 2c 20 23 27 73 27 0a 20 20 20 20 20 | r3, #'s'. | 00007b40 20 20 20 42 45 51 20 20 20 20 20 66 6f 75 6e 64 | BEQ found| 00007b50 5f 73 74 61 72 74 0a 20 20 20 20 20 20 20 20 20 |_start. | 00007b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00007b80 20 20 20 20 20 20 20 3b 20 66 6f 75 6e 64 20 61 | ; found a| 00007b90 20 63 6f 6d 6d 61 6e 64 2c 20 6e 6f 77 20 6c 6f | command, now lo| 00007ba0 6f 6b 20 66 6f 72 20 6e 65 78 74 20 73 65 6d 69 |ok for next semi| 00007bb0 63 6f 6c 6f 6e 0a 63 6f 6d 6d 61 6e 64 5f 65 6e |colon.command_en| 00007bc0 64 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |d. CMP | 00007bd0 20 20 72 33 2c 20 23 27 5c 27 20 20 20 20 20 20 | r3, #'\' | 00007be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007bf0 20 20 3b 20 27 5c 27 20 6d 65 61 6e 73 20 6e 65 | ; '\' means ne| 00007c00 78 74 20 63 68 61 72 61 63 74 65 72 20 69 73 20 |xt character is | 00007c10 6c 69 74 65 72 61 6c 2c 20 6e 6f 74 20 61 20 63 |literal, not a c| 00007c20 6f 6d 6d 61 6e 64 0a 20 20 20 20 20 20 20 20 41 |ommand. A| 00007c30 44 44 45 51 20 20 20 72 32 2c 20 72 32 2c 20 23 |DDEQ r2, r2, #| 00007c40 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |1. CMP | 00007c50 20 20 72 33 2c 20 23 27 3b 27 0a 20 20 20 20 20 | r3, #';'. | 00007c60 20 20 20 42 45 51 20 20 20 20 20 66 69 6e 64 5f | BEQ find_| 00007c70 73 74 61 72 74 0a 20 20 20 20 20 20 20 20 43 4d |start. CM| 00007c80 50 20 20 20 20 20 72 33 2c 20 23 27 20 27 0a 20 |P r3, #' '. | 00007c90 20 20 20 20 20 20 20 4c 44 52 47 45 42 20 20 72 | LDRGEB r| 00007ca0 33 2c 20 5b 72 32 5d 2c 20 23 31 0a 20 20 20 20 |3, [r2], #1. | 00007cb0 20 20 20 20 42 47 45 20 20 20 20 20 63 6f 6d 6d | BGE comm| 00007cc0 61 6e 64 5f 65 6e 64 0a 20 20 20 20 20 20 20 20 |and_end. | 00007cd0 42 20 20 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |B not_spri| 00007ce0 74 65 0a 0a 66 6f 75 6e 64 5f 73 74 61 72 74 0a |te..found_start.| 00007cf0 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00007d00 72 30 2c 20 5b 72 31 5d 20 20 20 20 20 20 20 20 |r0, [r1] | 00007d10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007d20 3b 20 67 65 74 20 69 63 6f 6e 27 73 20 70 61 72 |; get icon's par| 00007d30 65 6e 74 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c |ent window handl| 00007d40 65 0a 20 20 20 20 20 20 20 20 41 44 52 4c 20 20 |e. ADRL | 00007d50 20 20 72 31 2c 20 77 6f 72 6b 73 70 61 63 65 32 | r1, workspace2| 00007d60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007d70 20 20 3b 20 63 61 6e 27 74 20 75 73 65 20 6f 6c | ; can't use ol| 00007d80 64 20 73 70 61 63 65 2c 20 61 73 20 63 6f 64 65 |d space, as code| 00007d90 20 73 74 69 6c 6c 20 6e 65 65 64 73 20 64 61 74 | still needs dat| 00007da0 61 20 69 6e 20 69 74 0a 20 20 20 20 20 20 20 20 |a in it. | 00007db0 53 54 52 20 20 20 20 20 72 30 2c 20 5b 72 31 5d |STR r0, [r1]| 00007dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007dd0 20 20 20 20 20 20 20 20 3b 20 73 6f 20 63 6f 70 | ; so cop| 00007de0 79 20 68 61 6e 64 6c 65 20 69 6e 74 6f 20 6e 65 |y handle into ne| 00007df0 77 20 62 6c 6f 63 6b 20 26 20 67 65 74 20 77 69 |w block & get wi| 00007e00 6e 64 6f 77 20 69 6e 66 6f 0a 20 20 20 20 20 20 |ndow info. | 00007e10 20 20 4f 52 52 20 20 20 20 20 72 31 2c 20 72 31 | ORR r1, r1| 00007e20 2c 20 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |, #1 | 00007e30 20 20 20 20 20 20 20 20 20 20 3b 20 6e 65 65 64 | ; need| 00007e40 20 74 6f 20 6d 6f 64 69 66 79 20 70 74 72 20 74 | to modify ptr t| 00007e50 6f 20 62 6c 6f 63 6b 2c 20 73 6f 20 74 68 61 74 |o block, so that| 00007e60 20 77 69 6d 70 20 77 69 6c 6c 20 72 65 74 75 72 | wimp will retur| 00007e70 6e 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |n. SWI | 00007e80 20 20 58 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f | XWimp_GetWindo| 00007e90 77 49 6e 66 6f 20 20 20 20 20 20 20 20 20 20 20 |wInfo | 00007ea0 20 20 3b 20 6f 6e 6c 79 20 68 65 61 64 65 72 20 | ; only header | 00007eb0 6f 66 20 74 68 69 73 20 64 61 74 61 0a 20 20 20 |of this data. | 00007ec0 20 20 20 20 20 42 49 43 20 20 20 20 20 72 31 2c | BIC r1,| 00007ed0 20 72 31 2c 20 23 33 0a 20 20 20 20 20 20 20 20 | r1, #3. | 00007ee0 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |BVS not_spri| 00007ef0 74 65 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 |te. LDR | 00007f00 20 20 20 72 31 2c 20 5b 72 31 2c 20 23 36 38 5d | r1, [r1, #68]| 00007f10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007f20 20 20 20 3b 20 65 78 74 72 61 63 74 20 77 69 6e | ; extract win| 00007f30 64 6f 77 27 73 20 73 70 72 69 74 65 20 61 72 65 |dow's sprite are| 00007f40 61 20 70 74 72 0a 0a 64 6f 5f 64 72 61 67 0a 20 |a ptr..do_drag. | 00007f50 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00007f60 31 2c 20 23 31 20 20 20 20 20 20 20 20 20 20 20 |1, #1 | 00007f70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00007f80 20 69 66 20 77 65 20 63 61 6e 27 74 20 66 69 6e | if we can't fin| 00007f90 64 20 74 68 65 20 73 70 72 69 74 65 20 74 68 65 |d the sprite the| 00007fa0 6e 20 70 72 6f 63 65 65 64 20 61 73 20 6e 6f 72 |n proceed as nor| 00007fb0 6d 61 6c 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |mal. MOV | 00007fc0 20 20 20 20 72 30 2c 20 23 26 31 31 38 0a 20 20 | r0, #&118. | 00007fd0 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 | STMFD sp| 00007fe0 21 2c 20 7b 72 32 7d 20 20 20 20 20 20 20 20 20 |!, {r2} | 00007ff0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00008000 6e 65 65 64 20 74 6f 20 70 72 65 73 65 72 76 65 |need to preserve| 00008010 20 74 68 65 20 73 70 72 69 74 65 27 73 20 6e 61 | the sprite's na| 00008020 6d 65 20 69 6e 20 72 32 0a 20 20 20 20 20 20 20 |me in r2. | 00008030 20 53 57 49 45 51 20 20 20 58 57 69 6d 70 5f 53 | SWIEQ XWimp_S| 00008040 70 72 69 74 65 4f 70 0a 20 20 20 20 20 20 20 20 |priteOp. | 00008050 53 57 49 4e 45 20 20 20 58 4f 53 5f 53 70 72 69 |SWINE XOS_Spri| 00008060 74 65 4f 70 0a 20 20 20 20 20 20 20 20 4c 44 4d |teOp. LDM| 00008070 46 44 20 20 20 73 70 21 2c 20 7b 72 32 7d 0a 20 |FD sp!, {r2}. | 00008080 20 20 20 20 20 20 20 42 56 43 20 20 20 20 20 67 | BVC g| 00008090 6f 74 5f 73 70 72 69 74 65 0a 20 20 20 20 20 20 |ot_sprite. | 000080a0 20 20 43 4d 50 20 20 20 20 20 72 31 2c 20 23 31 | CMP r1, #1| 000080b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000080c0 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 63 | ; if c| 000080d0 6f 75 6c 64 6e 27 74 20 66 69 6e 64 20 73 70 72 |ouldn't find spr| 000080e0 69 74 65 20 69 6e 20 67 69 76 65 6e 20 61 72 65 |ite in given are| 000080f0 61 2c 20 26 20 74 68 61 74 20 61 72 65 61 20 69 |a, & that area i| 00008100 73 20 6e 6f 74 0a 20 20 20 20 20 20 20 20 42 45 |s not. BE| 00008110 51 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 |Q not_sprite| 00008120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008130 20 20 20 20 20 20 3b 20 77 69 6d 70 2c 20 74 68 | ; wimp, th| 00008140 65 6e 20 6c 6f 6f 6b 20 61 67 61 69 6e 2c 20 69 |en look again, i| 00008150 6e 20 77 69 6d 70 20 61 72 65 61 20 74 68 69 73 |n wimp area this| 00008160 20 74 69 6d 65 3b 0a 20 20 20 20 20 20 20 20 4d | time;. M| 00008170 4f 56 20 20 20 20 20 72 31 2c 20 23 31 20 20 20 |OV r1, #1 | 00008180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008190 20 20 20 20 20 20 20 3b 20 74 68 69 73 20 6c 69 | ; this li| 000081a0 6e 65 20 69 73 6e 27 74 20 6e 65 65 64 65 64 20 |ne isn't needed | 000081b0 62 79 20 77 69 6d 70 5f 73 70 72 69 74 65 6f 70 |by wimp_spriteop| 000081c0 2c 20 62 75 74 20 69 73 20 6e 65 65 64 65 64 20 |, but is needed | 000081d0 62 79 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |by. MOV | 000081e0 20 20 20 72 30 2c 20 23 26 31 31 38 20 20 20 20 | r0, #&118 | 000081f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008200 20 20 20 3b 20 73 75 62 73 65 71 75 65 6e 74 20 | ; subsequent | 00008210 63 6f 64 65 2c 20 69 66 20 73 70 72 69 74 65 20 |code, if sprite | 00008220 69 73 20 66 6f 75 6e 64 20 69 6e 20 77 69 6d 70 |is found in wimp| 00008230 20 61 72 65 61 0a 20 20 20 20 20 20 20 20 53 57 | area. SW| 00008240 49 20 20 20 20 20 58 57 69 6d 70 5f 53 70 72 69 |I XWimp_Spri| 00008250 74 65 4f 70 0a 20 20 20 20 20 20 20 20 42 56 53 |teOp. BVS| 00008260 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a | not_sprite.| 00008270 67 6f 74 5f 73 70 72 69 74 65 0a 20 20 20 20 20 |got_sprite. | 00008280 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 2c 20 | STMFD sp!, | 00008290 7b 72 31 2c 72 32 2c 72 34 2c 72 35 2c 72 36 7d |{r1,r2,r4,r5,r6}| 000082a0 20 20 20 20 20 20 20 20 20 20 20 3b 20 74 72 61 | ; tra| 000082b0 70 20 44 72 61 67 41 53 70 72 69 74 65 20 62 75 |p DragASprite bu| 000082c0 67 20 72 65 20 64 72 61 67 20 66 61 69 6c 75 72 |g re drag failur| 000082d0 65 20 69 66 20 73 70 72 69 74 65 20 69 73 0a 20 |e if sprite is. | 000082e0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 000082f0 30 2c 20 23 26 31 32 38 20 20 20 20 20 20 20 20 |0, #&128 | 00008300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00008310 20 32 35 36 20 63 6f 6c 6f 75 72 0a 20 20 20 20 | 256 colour. | 00008320 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c 20 | CMP r1, | 00008330 23 31 0a 20 20 20 20 20 20 20 20 53 57 49 45 51 |#1. SWIEQ| 00008340 20 20 20 58 57 69 6d 70 5f 53 70 72 69 74 65 4f | XWimp_SpriteO| 00008350 70 0a 20 20 20 20 20 20 20 20 53 57 49 4e 45 20 |p. SWINE | 00008360 20 20 58 4f 53 5f 53 70 72 69 74 65 4f 70 20 20 | XOS_SpriteOp | 00008370 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008380 20 20 3b 20 67 65 74 20 73 70 72 69 74 65 20 69 | ; get sprite i| 00008390 6e 66 6f 20 28 6d 6f 64 65 20 69 6e 20 72 36 29 |nfo (mode in r6)| 000083a0 0a 20 20 20 20 20 20 20 20 4c 44 4d 56 53 46 44 |. LDMVSFD| 000083b0 20 73 70 21 2c 20 7b 72 31 2c 72 32 2c 72 34 2c | sp!, {r1,r2,r4,| 000083c0 72 35 2c 72 36 7d 0a 20 20 20 20 20 20 20 20 42 |r5,r6}. B| 000083d0 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 |VS not_sprit| 000083e0 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |e. MOV | 000083f0 20 20 72 30 2c 20 72 36 0a 20 20 20 20 20 20 20 | r0, r6. | 00008400 20 4d 4f 56 20 20 20 20 20 72 31 2c 20 23 39 0a | MOV r1, #9.| 00008410 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 00008420 58 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 |XOS_ReadModeVari| 00008430 61 62 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 |able | 00008440 3b 20 67 65 74 20 6c 6f 67 20 62 61 73 65 20 32 |; get log base 2| 00008450 20 62 69 74 73 20 70 65 72 20 70 69 78 65 6c 0a | bits per pixel.| 00008460 20 20 20 20 20 20 20 20 4c 44 4d 43 53 46 44 20 | LDMCSFD | 00008470 73 70 21 2c 20 7b 72 31 2c 72 32 2c 72 34 2c 72 |sp!, {r1,r2,r4,r| 00008480 35 2c 72 36 7d 0a 20 20 20 20 20 20 20 20 42 43 |5,r6}. BC| 00008490 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 |S not_sprite| 000084a0 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 000084b0 20 72 32 2c 20 23 33 0a 20 20 20 20 20 20 20 20 | r2, #3. | 000084c0 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 31 |LDMFD sp!, {r1| 000084d0 2c 72 32 2c 72 34 2c 72 35 2c 72 36 7d 0a 20 20 |,r2,r4,r5,r6}. | 000084e0 20 20 20 20 20 20 42 45 51 20 20 20 20 20 6e 6f | BEQ no| 000084f0 74 5f 73 70 72 69 74 65 20 20 20 20 20 20 20 20 |t_sprite | 00008500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00008510 69 66 20 32 35 36 20 63 6f 6c 6f 75 72 2c 20 64 |if 256 colour, d| 00008520 6f 20 61 6e 20 6f 75 74 6c 69 6e 65 20 64 72 61 |o an outline dra| 00008530 67 0a 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 |g.. ADR | 00008540 20 20 20 72 30 2c 20 77 6f 72 6b 73 70 61 63 65 | r0, workspace| 00008550 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 00008560 20 72 30 2c 20 5b 72 30 2c 20 23 33 36 5d 20 20 | r0, [r0, #36] | 00008570 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008580 20 3b 20 67 65 74 20 66 6c 61 67 73 20 77 6f 72 | ; get flags wor| 00008590 64 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 20 |d. TST | 000085a0 20 20 72 30 2c 20 23 26 32 30 30 0a 20 20 20 20 | r0, #&200. | 000085b0 20 20 20 20 4f 52 52 4e 45 20 20 20 72 30 2c 20 | ORRNE r0, | 000085c0 72 30 2c 20 23 32 5f 31 30 30 30 30 30 20 20 20 |r0, #2_100000 | 000085d0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 65 | ; se| 000085e0 74 20 6f 72 20 63 6c 65 61 72 20 62 69 74 20 35 |t or clear bit 5| 000085f0 0a 20 20 20 20 20 20 20 20 42 49 43 45 51 20 20 |. BICEQ | 00008600 20 72 30 2c 20 72 30 2c 20 23 32 5f 31 30 30 30 | r0, r0, #2_1000| 00008610 30 30 0a 20 20 20 20 20 20 20 20 41 4e 44 20 20 |00. AND | 00008620 20 20 20 72 30 2c 20 72 30 2c 20 23 32 5f 31 31 | r0, r0, #2_11| 00008630 31 30 30 31 0a 20 20 20 20 20 20 20 20 54 53 54 |1001. TST| 00008640 20 20 20 20 20 72 30 2c 20 23 31 0a 20 20 20 20 | r0, #1. | 00008650 20 20 20 20 41 44 52 45 51 20 20 20 72 33 2c 20 | ADREQ r3, | 00008660 66 6c 61 67 73 5f 74 61 62 6c 65 0a 20 20 20 20 |flags_table. | 00008670 20 20 20 20 41 44 52 4e 45 20 20 20 72 33 2c 20 | ADRNE r3, | 00008680 62 6f 74 68 5f 74 61 62 6c 65 0a 20 20 20 20 20 |both_table. | 00008690 20 20 20 4c 44 52 42 20 20 20 20 72 30 2c 20 5b | LDRB r0, [| 000086a0 72 33 2c 20 72 30 2c 20 4c 53 52 20 23 33 5d 20 |r3, r0, LSR #3] | 000086b0 20 20 20 20 20 20 20 20 20 20 20 3b 20 6c 6f 6f | ; loo| 000086c0 6b 20 75 70 20 66 6c 61 67 73 20 69 6e 20 74 61 |k up flags in ta| 000086d0 62 6c 65 0a 0a 20 20 20 20 20 20 20 20 41 44 44 |ble.. ADD| 000086e0 20 20 20 20 20 72 30 2c 20 72 30 2c 20 23 31 32 | r0, r0, #12| 000086f0 38 2b 36 34 2b 33 32 0a 20 20 20 20 20 20 20 20 |8+64+32. | 00008700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00008720 20 20 20 20 20 20 20 20 3b 6e 65 63 65 73 73 61 | ;necessa| 00008730 72 79 20 74 6f 20 62 65 20 63 6f 6e 73 69 73 74 |ry to be consist| 00008740 65 6e 74 20 77 69 74 68 20 57 69 6d 70 5f 44 72 |ent with Wimp_Dr| 00008750 61 67 42 6f 78 2e 0a 20 20 20 20 20 20 20 20 41 |agBox.. A| 00008760 44 52 20 20 20 20 20 72 33 2c 20 69 6e 69 74 62 |DR r3, initb| 00008770 6f 78 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 |ox. ADR | 00008780 20 20 20 72 34 2c 20 62 64 69 6e 67 62 6f 78 0a | r4, bdingbox.| 00008790 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 000087a0 58 44 72 61 67 41 53 70 72 69 74 65 5f 53 74 61 |XDragASprite_Sta| 000087b0 72 74 0a 20 20 20 20 20 20 20 20 53 54 52 56 43 |rt. STRVC| 000087c0 20 20 20 72 30 2c 20 64 72 61 67 67 69 6e 67 5f | r0, dragging_| 000087d0 66 6c 61 67 0a 0a 20 3b 20 7b 54 68 65 20 66 6f |flag.. ; {The fo| 000087e0 6c 6c 6f 77 69 6e 67 20 69 73 20 73 70 65 63 75 |llowing is specu| 000087f0 6c 61 74 69 76 65 3b 20 69 65 20 49 20 61 6d 20 |lative; ie I am | 00008800 75 6e 73 75 72 65 20 61 73 20 74 6f 20 74 68 65 |unsure as to the| 00008810 20 74 72 75 74 68 20 6f 66 20 76 61 72 69 6f 75 | truth of variou| 00008820 73 20 62 69 74 73 20 6f 66 20 69 74 2c 20 74 6f |s bits of it, to| 00008830 20 76 61 72 79 69 6e 67 20 64 65 67 72 65 65 73 | varying degrees| 00008840 7d 0a 20 3b 0a 20 3b 20 54 68 65 20 66 6f 6c 6c |}. ;. ; The foll| 00008850 6f 77 69 6e 67 20 63 6f 6d 6d 65 6e 74 65 64 20 |owing commented | 00008860 6f 75 74 20 63 6f 64 65 20 69 73 20 77 72 6f 6e |out code is wron| 00008870 67 3a 20 74 68 69 73 20 63 6f 64 65 20 69 73 20 |g: this code is | 00008880 6e 6f 74 20 70 61 72 74 20 6f 66 20 61 20 6d 6f |not part of a mo| 00008890 64 75 6c 65 20 73 77 69 20 68 61 6e 64 6c 65 72 |dule swi handler| 000088a0 3b 20 69 74 20 63 61 6e 6e 6f 74 0a 20 3b 20 61 |; it cannot. ; a| 000088b0 73 73 75 6d 65 20 58 20 62 69 74 20 73 65 74 20 |ssume X bit set | 000088c0 73 74 61 74 75 73 20 6f 72 20 74 68 61 74 20 56 |status or that V| 000088d0 20 62 69 74 20 69 73 20 63 6c 65 61 72 20 6f 6e | bit is clear on| 000088e0 20 65 6e 74 72 79 2c 20 73 69 6e 63 65 20 69 74 | entry, since it| 000088f0 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 63 61 | has not been ca| 00008900 6c 6c 65 64 20 62 79 20 6e 69 63 65 20 52 49 53 |lled by nice RIS| 00008910 43 20 4f 53 20 73 77 69 0a 20 3b 20 64 65 63 6f |C OS swi. ; deco| 00008920 64 65 72 2c 20 62 75 74 20 64 69 72 65 63 74 6c |der, but directl| 00008930 79 20 62 79 20 68 61 72 64 77 61 72 65 20 76 65 |y by hardware ve| 00008940 63 74 6f 72 20 28 73 65 65 20 65 67 20 50 52 4d |ctor (see eg PRM| 00008950 20 52 49 53 43 20 4f 53 20 33 2c 20 31 2d 32 38 | RISC OS 3, 1-28| 00008960 29 2e 0a 20 3b 20 49 6e 20 6d 79 20 66 69 78 20 |).. ; In my fix | 00008970 6f 66 20 50 61 75 6c 27 73 20 63 6f 64 65 2c 20 |of Paul's code, | 00008980 65 78 70 6c 69 63 69 74 6c 79 20 63 6c 65 61 72 |explicitly clear| 00008990 20 76 20 62 69 74 20 69 66 20 6e 6f 20 65 72 72 | v bit if no err| 000089a0 6f 72 2c 20 26 20 61 76 6f 69 64 20 65 72 72 6f |or, & avoid erro| 000089b0 72 20 68 61 6e 64 6c 69 6e 67 20 69 66 20 65 72 |r handling if er| 000089c0 72 6f 72 20 28 77 68 69 63 68 20 69 73 0a 20 3b |ror (which is. ;| 000089d0 20 64 65 70 65 6e 64 65 6e 74 20 6f 6e 20 58 20 | dependent on X | 000089e0 62 69 74 20 6f 66 20 53 57 49 20 69 6e 73 74 72 |bit of SWI instr| 000089f0 75 63 74 69 6f 6e 29 2c 20 62 79 20 70 61 73 73 |uction), by pass| 00008a00 69 6e 67 20 63 61 6c 6c 20 6f 6e 20 74 6f 20 70 |ing call on to p| 00008a10 72 65 76 69 6f 75 73 20 53 57 49 20 68 61 6e 64 |revious SWI hand| 00008a20 6c 65 72 2c 20 72 61 74 68 65 72 20 74 68 61 6e |ler, rather than| 00008a30 20 67 69 76 69 6e 67 20 75 70 0a 20 3b 20 77 69 | giving up. ; wi| 00008a40 74 68 20 61 6e 20 65 72 72 6f 72 20 28 72 65 67 |th an error (reg| 00008a50 61 72 64 6c 65 73 73 20 6f 66 20 77 68 65 74 68 |ardless of wheth| 00008a60 65 72 20 74 68 61 74 20 77 6f 75 6c 64 20 62 65 |er that would be| 00008a70 20 76 20 62 69 74 20 73 65 74 20 72 65 74 75 72 | v bit set retur| 00008a80 6e 2c 20 6f 72 20 65 72 72 6f 72 20 67 65 6e 65 |n, or error gene| 00008a90 72 61 74 69 6f 6e 29 2e 0a 20 3b 20 46 6f 72 20 |ration).. ; For | 00008aa0 6d 79 20 72 65 63 6f 72 64 2c 20 69 66 20 77 61 |my record, if wa| 00008ab0 6e 74 65 64 20 74 6f 20 72 65 74 75 72 6e 20 65 |nted to return e| 00008ac0 72 72 6f 72 2c 20 49 20 74 68 69 6e 6b 20 77 6f |rror, I think wo| 00008ad0 75 6c 64 20 6e 65 65 64 20 74 6f 20 64 6f 3a 0a |uld need to do:.| 00008ae0 20 3b 20 73 74 6f 72 65 20 78 20 62 69 74 20 61 | ; store x bit a| 00008af0 74 20 69 6e 69 74 69 61 6c 20 53 57 49 20 64 65 |t initial SWI de| 00008b00 63 6f 64 65 3b 0a 20 3b 20 72 65 61 64 20 74 68 |code;. ; read th| 00008b10 69 73 20 77 68 65 6e 20 65 72 72 6f 72 20 6f 63 |is when error oc| 00008b20 63 75 72 73 2c 20 26 20 69 66 20 73 65 74 2c 20 |curs, & if set, | 00008b30 72 65 74 75 72 6e 20 77 69 74 68 20 76 20 62 69 |return with v bi| 00008b40 74 20 73 65 74 20 26 20 65 72 72 6f 72 20 62 6c |t set & error bl| 00008b50 6f 63 6b 20 70 74 72 20 69 6e 20 72 30 2c 20 42 |ock ptr in r0, B| 00008b60 55 54 0a 20 3b 20 69 66 20 63 6c 65 61 72 2c 20 |UT. ; if clear, | 00008b70 74 68 65 6e 20 28 49 27 6d 20 6e 6f 74 20 73 75 |then (I'm not su| 00008b80 72 65 20 61 62 6f 75 74 20 74 68 69 73 29 3a 0a |re about this):.| 00008b90 20 3b 20 63 61 6c 6c 20 4f 53 5f 53 65 72 76 69 | ; call OS_Servi| 00008ba0 63 65 43 61 6c 6c 2c 20 72 65 61 73 6f 6e 20 63 |ceCall, reason c| 00008bb0 6f 64 65 20 36 2c 0a 20 3b 20 74 68 65 6e 20 63 |ode 6,. ; then c| 00008bc0 61 6c 6c 20 4f 53 5f 47 65 6e 65 72 61 74 65 45 |all OS_GenerateE| 00008bd0 72 72 6f 72 2c 20 77 69 74 68 20 65 72 72 6f 72 |rror, with error| 00008be0 20 62 6c 6f 63 6b 20 28 77 6f 6e 27 74 20 72 65 | block (won't re| 00008bf0 74 75 72 6e 29 0a 20 3b 0a 20 3b 20 51 55 45 53 |turn). ;. ; QUES| 00008c00 54 49 4f 4e 3a 0a 20 3b 20 20 20 20 20 20 20 20 |TION:. ; | 00008c10 20 20 20 20 20 43 61 6e 20 61 6e 79 6f 6e 65 20 | Can anyone | 00008c20 72 65 61 64 69 6e 67 20 74 68 69 73 2c 20 63 6f |reading this, co| 00008c30 6e 66 69 72 6d 20 74 68 69 73 20 61 73 73 75 6d |nfirm this assum| 00008c40 70 74 69 6f 6e 20 6f 72 20 6f 74 68 65 72 77 69 |ption or otherwi| 00008c50 73 65 3f 0a 20 3b 20 20 20 20 20 20 20 20 20 20 |se?. ; | 00008c60 20 20 20 41 6e 79 20 63 6c 61 72 69 66 69 63 61 | Any clarifica| 00008c70 74 69 6f 6e 20 77 6f 75 6c 64 20 62 65 20 61 70 |tion would be ap| 00008c80 70 72 65 63 69 61 74 65 64 2e 0a 20 3b 20 20 20 |preciated.. ; | 00008c90 20 20 20 20 20 20 20 20 20 20 49 20 28 4d 69 63 | I (Mic| 00008ca0 68 61 65 6c 20 52 6f 7a 64 6f 62 61 29 20 63 61 |hael Rozdoba) ca| 00008cb0 6e 20 62 65 20 72 65 61 63 68 65 64 20 61 74 3a |n be reached at:| 00008cc0 0a 20 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 |. ; | 00008cd0 31 30 20 4f 63 74 61 76 69 61 20 43 6c 6f 73 65 |10 Octavia Close| 00008ce0 2c 20 42 65 64 6c 69 6e 67 74 6f 6e 2c 20 4e 6f |, Bedlington, No| 00008cf0 72 74 68 75 6d 62 65 72 6c 61 6e 64 2c 20 4e 45 |rthumberland, NE| 00008d00 32 32 20 36 4c 47 2e 0a 20 3b 0a 20 3b 20 20 20 |22 6LG.. ;. ; | 00008d10 20 20 20 20 20 4c 44 4d 56 43 46 44 20 73 70 21 | LDMVCFD sp!| 00008d20 2c 7b 72 30 2d 72 34 2c 6c 72 2c 70 63 7d 5e 20 |,{r0-r4,lr,pc}^ | 00008d30 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 72 | ; r| 00008d40 65 74 75 72 6e 20 69 6d 6d 65 64 69 61 74 65 6c |eturn immediatel| 00008d50 79 20 69 66 20 74 68 65 72 65 27 73 20 6e 6f 20 |y if there's no | 00008d60 65 72 72 6f 72 0a 20 3b 20 20 20 20 20 20 20 20 |error. ; | 00008d70 41 44 44 20 20 20 20 20 73 70 2c 20 73 70 2c 20 |ADD sp, sp, | 00008d80 23 34 0a 20 3b 20 20 20 20 20 20 20 20 4c 44 4d |#4. ; LDM| 00008d90 46 44 20 20 20 73 70 21 2c 7b 72 31 2d 72 34 2c |FD sp!,{r1-r4,| 00008da0 6c 72 7d 0a 20 3b 20 20 20 20 20 20 20 20 4c 44 |lr}. ; LD| 00008db0 4d 46 44 20 20 20 73 70 21 2c 7b 6c 72 7d 20 20 |MFD sp!,{lr} | 00008dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008dd0 20 20 20 20 20 20 3b 20 6f 74 68 65 72 77 69 73 | ; otherwis| 00008de0 65 20 72 65 74 75 72 6e 20 77 69 74 68 20 56 20 |e return with V | 00008df0 73 65 74 20 61 6e 64 20 65 72 72 6f 72 20 70 6f |set and error po| 00008e00 69 6e 74 65 72 20 69 6e 20 72 30 0a 20 3b 20 20 |inter in r0. ; | 00008e10 20 20 20 20 20 20 4f 52 52 53 20 20 20 20 70 63 | ORRS pc| 00008e20 2c 20 6c 72 2c 20 23 56 5f 46 4c 41 47 0a 20 3b |, lr, #V_FLAG. ;| 00008e30 0a 20 3b 20 4d 79 20 6d 6f 64 69 66 69 65 64 20 |. ; My modified | 00008e40 63 6f 64 65 20 64 65 73 63 72 69 62 65 64 20 61 |code described a| 00008e50 62 6f 76 65 20 69 73 3a 0a 0a 20 20 20 20 20 20 |bove is:.. | 00008e60 20 20 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 | BVS not_sp| 00008e70 72 69 74 65 0a 20 20 20 20 20 20 20 20 4c 44 4d |rite. LDM| 00008e80 46 44 20 20 20 73 70 21 2c 20 7b 72 30 2d 72 34 |FD sp!, {r0-r4| 00008e90 2c 6c 72 7d 0a 20 20 20 20 20 20 20 20 4c 44 4d |,lr}. LDM| 00008ea0 46 44 20 20 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 |FD sp!, {lr}. | 00008eb0 20 20 20 20 20 20 20 42 49 43 53 20 20 20 20 70 | BICS p| 00008ec0 63 2c 20 6c 72 2c 20 23 56 5f 46 4c 41 47 20 20 |c, lr, #V_FLAG | 00008ed0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00008ee0 66 6f 72 63 65 20 76 62 69 74 20 63 6c 65 61 72 |force vbit clear| 00008ef0 2c 20 62 75 74 20 70 72 65 73 65 72 76 65 20 61 |, but preserve a| 00008f00 6c 6c 20 6f 74 68 65 72 20 66 6c 61 67 73 0a 0a |ll other flags..| 00008f10 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |; --------------| 00008f20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00008f70 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 4c 45 46 |-----------..LEF| 00008f80 54 20 20 20 20 45 51 55 20 20 20 20 20 30 0a 48 |T EQU 0.H| 00008f90 43 45 4e 54 52 45 20 45 51 55 20 20 20 20 20 31 |CENTRE EQU 1| 00008fa0 0a 52 49 47 48 54 20 20 20 45 51 55 20 20 20 20 |.RIGHT EQU | 00008fb0 20 32 0a 0a 42 4f 54 54 4f 4d 20 20 45 51 55 20 | 2..BOTTOM EQU | 00008fc0 20 20 20 20 30 0a 56 43 45 4e 54 52 45 20 45 51 | 0.VCENTRE EQ| 00008fd0 55 20 20 20 20 20 34 0a 54 4f 50 20 20 20 20 20 |U 4.TOP | 00008fe0 45 51 55 20 20 20 20 20 38 0a 0a 62 6f 74 68 5f |EQU 8..both_| 00008ff0 74 61 62 6c 65 0a 20 20 20 20 20 20 20 20 20 20 |table. | 00009000 20 20 20 20 20 20 44 43 42 20 20 20 20 20 54 4f | DCB TO| 00009010 50 20 2b 20 4c 45 46 54 0a 20 20 20 20 20 20 20 |P + LEFT. | 00009020 20 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 | DCB | 00009030 20 54 4f 50 20 2b 20 48 43 45 4e 54 52 45 0a 20 | TOP + HCENTRE. | 00009040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 | D| 00009050 43 42 20 20 20 20 20 56 43 45 4e 54 52 45 20 2b |CB VCENTRE +| 00009060 20 4c 45 46 54 0a 20 20 20 20 20 20 20 20 20 20 | LEFT. | 00009070 20 20 20 20 20 20 44 43 42 20 20 20 20 20 56 43 | DCB VC| 00009080 45 4e 54 52 45 20 2b 20 48 43 45 4e 54 52 45 0a |ENTRE + HCENTRE.| 00009090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000090a0 44 43 42 20 20 20 20 20 54 4f 50 20 2b 20 52 49 |DCB TOP + RI| 000090b0 47 48 54 0a 20 20 20 20 20 20 20 20 20 20 20 20 |GHT. | 000090c0 20 20 20 20 44 43 42 20 20 20 20 20 42 4f 54 54 | DCB BOTT| 000090d0 4f 4d 20 2b 20 48 43 45 4e 54 52 45 0a 20 20 20 |OM + HCENTRE. | 000090e0 20 20 20 20 20 20 20 20 20 20 20 20 20 44 43 42 | DCB| 000090f0 20 20 20 20 20 56 43 45 4e 54 52 45 20 2b 20 52 | VCENTRE + R| 00009100 49 47 48 54 0a 20 20 20 20 20 20 20 20 20 20 20 |IGHT. | 00009110 20 20 20 20 20 44 43 42 20 20 20 20 20 56 43 45 | DCB VCE| 00009120 4e 54 52 45 20 2b 20 4c 45 46 54 0a 0a 66 6c 61 |NTRE + LEFT..fla| 00009130 67 73 5f 74 61 62 6c 65 0a 20 20 20 20 20 20 20 |gs_table. | 00009140 20 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 | DCB | 00009150 20 42 4f 54 54 4f 4d 20 2b 20 4c 45 46 54 0a 20 | BOTTOM + LEFT. | 00009160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 | D| 00009170 43 42 20 20 20 20 20 42 4f 54 54 4f 4d 20 2b 20 |CB BOTTOM + | 00009180 48 43 45 4e 54 52 45 0a 20 20 20 20 20 20 20 20 |HCENTRE. | 00009190 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 000091a0 56 43 45 4e 54 52 45 20 2b 20 4c 45 46 54 0a 20 |VCENTRE + LEFT. | 000091b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 | D| 000091c0 43 42 20 20 20 20 20 56 43 45 4e 54 52 45 20 2b |CB VCENTRE +| 000091d0 20 48 43 45 4e 54 52 45 0a 20 20 20 20 20 20 20 | HCENTRE. | 000091e0 20 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 | DCB | 000091f0 20 42 4f 54 54 4f 4d 20 2b 20 52 49 47 48 54 0a | BOTTOM + RIGHT.| 00009200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009210 44 43 42 20 20 20 20 20 42 4f 54 54 4f 4d 20 2b |DCB BOTTOM +| 00009220 20 48 43 45 4e 54 52 45 0a 20 20 20 20 20 20 20 | HCENTRE. | 00009230 20 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 | DCB | 00009240 20 56 43 45 4e 54 52 45 20 2b 20 52 49 47 48 54 | VCENTRE + RIGHT| 00009250 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00009260 20 44 43 42 20 20 20 20 20 56 43 45 4e 54 52 45 | DCB VCENTRE| 00009270 20 2b 20 48 43 45 4e 54 52 45 0a 0a 6f 6c 64 5f | + HCENTRE..old_| 00009280 62 72 61 6e 63 68 20 20 20 20 20 20 44 43 44 20 |branch DCD | 00009290 20 20 20 20 30 20 20 20 20 20 20 20 20 20 20 20 | 0 | 000092a0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 62 72 | ; br| 000092b0 61 6e 63 68 20 74 6f 20 6f 72 69 67 69 6e 61 6c |anch to original| 000092c0 20 53 57 49 20 64 65 63 6f 64 65 72 0a 6e 65 77 | SWI decoder.new| 000092d0 5f 62 72 61 6e 63 68 20 20 20 20 20 20 44 43 44 |_branch DCD| 000092e0 20 20 20 20 20 30 20 20 20 20 20 20 20 20 20 20 | 0 | 000092f0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 62 | ; b| 00009300 72 61 6e 63 68 20 74 6f 20 6f 75 72 20 6e 65 77 |ranch to our new| 00009310 20 53 57 49 20 64 65 63 6f 64 65 72 20 20 20 20 | SWI decoder | 00009320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009330 20 20 20 20 20 20 20 20 20 20 20 0a 64 72 61 67 | .drag| 00009340 67 69 6e 67 5f 66 6c 61 67 20 20 20 44 43 44 20 |ging_flag DCD | 00009350 20 20 20 20 30 20 20 20 20 20 20 20 20 20 20 20 | 0 | 00009360 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 65 | ; se| 00009370 74 20 77 68 65 6e 20 74 68 65 72 65 27 73 20 61 |t when there's a| 00009380 20 73 70 72 69 74 65 20 64 72 61 67 20 69 6e 20 | sprite drag in | 00009390 70 72 6f 67 72 65 73 73 0a 0a 3b 20 2d 2d 2d 2d |progress..; ----| 000093a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00009400 2d 2d 2d 2d 2d 0a 0a 66 69 6c 74 65 72 5f 63 6f |-----..filter_co| 00009410 64 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |de | 00009420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009430 20 20 20 20 20 20 20 3b 20 53 74 6f 70 20 74 68 | ; Stop th| 00009440 65 20 73 70 72 69 74 65 20 64 72 61 67 67 69 6e |e sprite draggin| 00009450 67 20 6f 70 65 72 61 74 69 6f 6e 2e 20 53 6f 6d |g operation. Som| 00009460 65 20 6d 61 6a 6f 72 20 6d 6f 64 73 20 74 6f 0a |e major mods to.| 00009470 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 | STMFD | 00009480 73 70 21 2c 20 7b 6c 72 7d 20 20 20 20 20 20 20 |sp!, {lr} | 00009490 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000094a0 3b 20 66 69 6c 74 65 72 2c 20 6d 61 64 65 20 62 |; filter, made b| 000094b0 65 6c 6f 77 2c 20 74 6f 20 61 6c 6c 6f 77 20 74 |elow, to allow t| 000094c0 72 61 63 6b 69 6e 67 20 6f 66 20 27 73 61 66 65 |racking of 'safe| 000094d0 27 20 70 6c 6f 74 73 0a 0a 20 20 20 20 20 20 20 |' plots.. | 000094e0 20 43 4d 50 20 20 20 20 20 72 30 2c 20 23 37 0a | CMP r0, #7.| 000094f0 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 | BNE | 00009500 66 63 5f 6e 65 78 74 63 68 65 63 6b 31 0a 20 20 |fc_nextcheck1. | 00009510 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 6c 72 | LDR lr| 00009520 2c 20 64 72 61 67 67 69 6e 67 5f 66 6c 61 67 0a |, dragging_flag.| 00009530 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 | CMP | 00009540 6c 72 2c 20 23 30 0a 20 20 20 20 20 20 20 20 4d |lr, #0. M| 00009550 4f 56 4e 45 20 20 20 6c 72 2c 20 23 30 0a 20 20 |OVNE lr, #0. | 00009560 20 20 20 20 20 20 53 54 52 4e 45 20 20 20 6c 72 | STRNE lr| 00009570 2c 20 64 72 61 67 67 69 6e 67 5f 66 6c 61 67 0a |, dragging_flag.| 00009580 20 20 20 20 20 20 20 20 53 57 49 4e 45 20 20 20 | SWINE | 00009590 58 44 72 61 67 41 53 70 72 69 74 65 5f 53 74 6f |XDragASprite_Sto| 000095a0 70 0a 0a 66 63 5f 6e 65 78 74 63 68 65 63 6b 31 |p..fc_nextcheck1| 000095b0 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 000095c0 20 6c 72 2c 20 66 69 6c 65 72 74 61 73 6b 68 61 | lr, filertaskha| 000095d0 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 43 4d 50 |ndle. CMP| 000095e0 20 20 20 20 20 6c 72 2c 20 23 2d 31 20 20 20 20 | lr, #-1 | 000095f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009600 20 20 20 20 20 3b 20 6e 65 65 64 20 73 6f 6d 65 | ; need some| 00009610 74 68 69 6e 67 20 6c 69 6b 65 20 74 68 69 73 20 |thing like this | 00009620 74 6f 20 68 61 6e 64 6c 65 20 63 61 73 65 20 77 |to handle case w| 00009630 68 65 72 65 20 6d 6f 64 75 6c 65 0a 20 20 20 20 |here module. | 00009640 20 20 20 20 42 45 51 20 20 20 20 20 6e 65 65 64 | BEQ need| 00009650 72 65 61 64 66 74 68 20 20 20 20 20 20 20 20 20 |readfth | 00009660 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 77 61 | ; wa| 00009670 73 20 73 61 79 20 6c 6f 61 64 65 64 20 61 74 20 |s say loaded at | 00009680 62 6f 6f 74 2c 20 26 20 74 68 65 6e 20 77 61 73 |boot, & then was| 00009690 6e 27 74 20 61 62 6c 65 20 74 6f 20 72 65 61 64 |n't able to read| 000096a0 0a 72 65 73 75 6d 65 77 69 74 68 66 74 68 20 20 |.resumewithfth | 000096b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000096d0 20 3b 20 66 69 6c 65 72 20 74 61 73 6b 20 68 61 | ; filer task ha| 000096e0 6e 64 6c 65 20 2d 20 62 75 74 20 69 73 20 74 68 |ndle - but is th| 000096f0 65 72 65 20 61 20 62 65 74 74 65 72 20 77 61 79 |ere a better way| 00009700 3f 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |?. CMP | 00009710 20 20 6c 72 2c 20 72 32 0a 20 20 20 20 20 20 20 | lr, r2. | 00009720 20 4d 4f 56 45 51 20 20 20 6c 72 2c 20 23 31 0a | MOVEQ lr, #1.| 00009730 20 20 20 20 20 20 20 20 4d 4f 56 4e 45 20 20 20 | MOVNE | 00009740 6c 72 2c 20 23 30 0a 20 20 20 20 20 20 20 20 53 |lr, #0. S| 00009750 54 52 20 20 20 20 20 6c 72 2c 20 66 69 6c 65 72 |TR lr, filer| 00009760 66 6c 61 67 20 20 20 20 20 20 20 20 20 20 20 20 |flag | 00009770 20 20 20 20 20 20 20 3b 20 72 65 63 6f 72 64 20 | ; record | 00009780 77 68 65 74 68 65 72 20 63 75 72 72 65 6e 74 20 |whether current | 00009790 74 61 73 6b 20 69 73 20 66 69 6c 65 72 20 6f 72 |task is filer or| 000097a0 20 6e 6f 74 20 28 75 73 65 64 20 65 67 20 62 79 | not (used eg by| 000097b0 20 66 61 6e 63 79 20 66 6f 6e 74 20 73 75 70 70 | fancy font supp| 000097c0 6f 72 74 29 0a 20 20 20 20 20 20 20 20 43 4d 50 |ort). CMP| 000097d0 20 20 20 20 20 72 30 2c 20 23 31 0a 20 20 20 20 | r0, #1. | 000097e0 20 20 20 20 4d 4f 56 45 51 20 20 20 6c 72 2c 20 | MOVEQ lr, | 000097f0 23 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#0 | 00009800 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 | ; if| 00009810 66 20 74 61 73 6b 20 69 73 20 66 69 6c 65 72 20 |f task is filer | 00009820 26 20 65 76 65 6e 74 20 69 73 20 6e 6f 74 20 72 |& event is not r| 00009830 65 64 72 61 77 2c 20 6d 61 72 6b 20 70 6c 6f 74 |edraw, mark plot| 00009840 66 6c 61 67 20 6f 6b 0a 20 20 20 20 20 20 20 20 |flag ok. | 00009850 53 54 52 20 20 20 20 20 6c 72 2c 20 70 6c 6f 74 |STR lr, plot| 00009860 66 6c 61 67 20 20 20 20 20 20 20 20 20 20 20 20 |flag | 00009870 20 20 20 20 20 20 20 20 3b 20 74 6f 20 73 74 6f | ; to sto| 00009880 72 65 20 73 70 72 69 74 65 20 66 72 6f 6d 20 61 |re sprite from a| 00009890 6e 79 20 73 75 62 73 65 71 75 65 6e 74 20 50 6c |ny subsequent Pl| 000098a0 6f 74 49 63 6f 6e 0a 20 20 20 20 20 20 20 20 4c |otIcon. L| 000098b0 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 70 63 7d |DMFD sp!, {pc}| 000098c0 5e 0a 0a 6e 65 65 64 72 65 61 64 66 74 68 0a 20 |^..needreadfth. | 000098d0 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 | STMFD s| 000098e0 70 21 2c 20 7b 72 30 2d 72 36 7d 0a 20 20 20 20 |p!, {r0-r6}. | 000098f0 20 20 20 20 42 4c 20 20 20 20 20 20 67 65 74 66 | BL getf| 00009900 69 6c 65 72 74 61 73 6b 68 61 6e 64 6c 65 0a 20 |ilertaskhandle. | 00009910 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 00009920 70 21 2c 20 7b 72 30 2d 72 36 7d 0a 20 20 20 20 |p!, {r0-r6}. | 00009930 20 20 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 | LDR lr, | 00009940 66 69 6c 65 72 74 61 73 6b 68 61 6e 64 6c 65 0a |filertaskhandle.| 00009950 20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 20 | B | 00009960 72 65 73 75 6d 65 77 69 74 68 66 74 68 0a 0a 3b |resumewithfth..;| 00009970 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ---------------| 00009980 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000099d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 73 69 74 |----------..isit| 000099e0 5f 6d 75 6c 74 69 70 69 6e 20 20 20 20 20 20 20 |_multipin | 000099f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009a00 20 20 20 20 20 20 20 20 20 20 20 20 3b 6e 62 20 | ;nb | 00009a10 77 65 20 68 61 76 65 20 61 6c 72 65 61 64 79 20 |we have already | 00009a20 64 65 63 69 64 65 64 20 69 74 20 69 73 20 61 20 |decided it is a | 00009a30 6d 75 6c 74 69 2d 69 63 6f 6e 20 64 72 61 67 0a |multi-icon drag.| 00009a40 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00009a50 72 32 2c 20 77 6f 72 6b 73 70 61 63 65 2b 31 32 |r2, workspace+12| 00009a60 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00009a70 20 72 30 2c 20 23 31 39 0a 20 20 20 20 20 20 20 | r0, #19. | 00009a80 20 41 44 52 4c 20 20 20 20 72 31 2c 20 6d 65 73 | ADRL r1, mes| 00009a90 73 61 67 65 0a 20 20 20 20 20 20 20 20 53 57 49 |sage. SWI| 00009aa0 20 20 20 20 20 58 57 69 6d 70 5f 53 65 6e 64 4d | XWimp_SendM| 00009ab0 65 73 73 61 67 65 20 20 20 20 20 20 20 20 20 20 |essage | 00009ac0 20 20 20 20 20 3b 20 72 32 20 3d 20 74 61 73 6b | ; r2 = task| 00009ad0 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 | handle. | 00009ae0 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |BVS not_spri| 00009af0 74 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |te. MOV | 00009b00 20 20 20 72 30 2c 20 72 32 0a 20 20 20 20 20 20 | r0, r2. | 00009b10 20 20 53 57 49 20 20 20 20 20 58 54 61 73 6b 4d | SWI XTaskM| 00009b20 61 6e 61 67 65 72 5f 54 61 73 6b 4e 61 6d 65 46 |anager_TaskNameF| 00009b30 72 6f 6d 48 61 6e 64 6c 65 0a 20 20 20 20 20 20 |romHandle. | 00009b40 20 20 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 | BVS not_sp| 00009b50 72 69 74 65 0a 20 20 20 20 20 20 20 20 54 53 54 |rite. TST| 00009b60 20 20 20 20 20 72 30 2c 20 23 33 0a 20 20 20 20 | r0, #3. | 00009b70 20 20 20 20 42 4e 45 20 20 20 20 20 6e 6f 74 5f | BNE not_| 00009b80 73 70 72 69 74 65 20 20 20 20 20 20 20 20 20 20 |sprite | 00009b90 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 66 20 | ;if | 00009ba0 6e 6f 74 20 77 6f 72 64 20 61 6c 69 67 6e 65 64 |not word aligned| 00009bb0 2c 20 27 6e 6f 74 5f 73 70 72 69 74 65 27 20 28 |, 'not_sprite' (| 00009bc0 61 6d 20 61 73 73 75 6d 69 6e 67 20 69 74 20 77 |am assuming it w| 00009bd0 69 6c 6c 20 62 65 29 0a 20 20 20 20 20 20 20 20 |ill be). | 00009be0 4c 44 4d 49 41 20 20 20 72 30 2c 20 7b 72 30 2c |LDMIA r0, {r0,| 00009bf0 72 31 2c 72 32 7d 20 20 20 20 20 20 20 20 20 20 |r1,r2} | 00009c00 20 20 20 20 20 20 20 20 3b 61 67 61 69 6e 2c 20 | ;again, | 00009c10 70 6f 73 73 20 70 72 6f 62 20 69 66 20 6e 61 6d |poss prob if nam| 00009c20 65 20 6c 65 6e 20 3c 20 31 32 20 2d 20 73 6f 64 |e len < 12 - sod| 00009c30 20 69 74 20 2d 20 63 61 6e 27 74 20 62 65 0a 20 | it - can't be. | 00009c40 20 20 20 20 20 20 20 41 4e 44 20 20 20 20 20 72 | AND r| 00009c50 32 2c 20 72 32 2c 20 23 26 46 46 20 20 20 20 20 |2, r2, #&FF | 00009c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00009c70 62 6f 74 68 65 72 65 64 20 74 6f 20 63 68 65 63 |bothered to chec| 00009c80 6b 20 6e 61 6d 65 20 63 68 61 72 20 62 79 20 63 |k name char by c| 00009c90 68 61 72 0a 20 20 20 20 20 20 20 20 4c 44 52 20 |har. LDR | 00009ca0 20 20 20 20 72 33 2c 20 69 63 69 5f 70 69 6e 0a | r3, ici_pin.| 00009cb0 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 | CMP | 00009cc0 72 30 2c 20 72 33 0a 20 20 20 20 20 20 20 20 4c |r0, r3. L| 00009cd0 44 52 45 51 20 20 20 72 33 2c 20 69 63 69 5f 70 |DREQ r3, ici_p| 00009ce0 69 6e 2b 34 0a 20 20 20 20 20 20 20 20 43 4d 50 |in+4. CMP| 00009cf0 45 51 20 20 20 72 31 2c 20 72 33 0a 20 20 20 20 |EQ r1, r3. | 00009d00 20 20 20 20 4c 44 52 45 51 20 20 20 72 33 2c 20 | LDREQ r3, | 00009d10 69 63 69 5f 70 69 6e 2b 38 0a 20 20 20 20 20 20 |ici_pin+8. | 00009d20 20 20 43 4d 50 45 51 20 20 20 72 32 2c 20 72 33 | CMPEQ r2, r3| 00009d30 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 00009d40 20 6e 6f 74 5f 73 70 72 69 74 65 20 20 20 20 20 | not_sprite | 00009d50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009d60 20 3b 69 66 20 6e 6f 74 20 70 69 6e 62 6f 61 72 | ;if not pinboar| 00009d70 64 2c 20 64 6f 20 6e 6f 74 5f 73 70 72 69 74 65 |d, do not_sprite| 00009d80 20 63 6f 64 65 20 28 69 65 20 6f 75 74 6c 69 6e | code (ie outlin| 00009d90 65 20 64 72 61 67 29 0a 0a 20 20 20 20 20 20 20 |e drag).. | 00009da0 20 53 54 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 | STMFD sp!, {r| 00009db0 34 2c 72 35 7d 20 20 20 20 20 20 20 20 20 20 20 |4,r5} | 00009dc0 20 20 20 20 20 20 20 20 20 3b 28 a4 a4 a4 a4 29 | ;(....)| 00009dd0 20 74 68 65 73 65 20 31 36 20 6c 69 6e 65 73 20 | these 16 lines | 00009de0 65 6e 73 75 72 65 20 6d 75 6c 74 69 20 69 63 6f |ensure multi ico| 00009df0 6e 20 69 73 20 63 65 6e 74 72 65 64 20 6f 6e 20 |n is centred on | 00009e00 70 74 72 0a 20 20 20 20 20 20 20 20 41 44 52 20 |ptr. ADR | 00009e10 20 20 20 20 6c 72 2c 20 69 6e 69 74 62 6f 78 20 | lr, initbox | 00009e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009e30 20 20 20 20 3b 20 20 20 20 20 20 20 61 6e 64 20 | ; and | 00009e40 6e 6f 74 20 6f 76 65 72 20 74 68 65 20 67 72 6f |not over the gro| 00009e50 75 70 20 6f 66 20 70 69 6e 62 6f 61 72 64 20 69 |up of pinboard i| 00009e60 63 6f 6e 73 0a 20 20 20 20 20 20 20 20 4c 44 4d |cons. LDM| 00009e70 49 41 20 20 20 6c 72 2c 20 7b 72 30 2d 72 33 7d |IA lr, {r0-r3}| 00009e80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009e90 20 20 20 20 20 3b 0a 20 20 20 20 20 20 20 20 41 | ;. A| 00009ea0 44 44 20 20 20 20 20 72 34 2c 20 72 30 2c 20 72 |DD r4, r0, r| 00009eb0 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |2 | 00009ec0 20 20 20 20 20 20 20 3b 0a 20 20 20 20 20 20 20 | ;. | 00009ed0 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 77 6f 72 | LDR lr, wor| 00009ee0 6b 73 70 61 63 65 20 20 20 20 20 20 20 20 20 20 |kspace | 00009ef0 20 20 20 20 20 20 20 20 20 3b 0a 20 20 20 20 20 | ;. | 00009f00 20 20 20 53 55 42 20 20 20 20 20 72 34 2c 20 6c | SUB r4, l| 00009f10 72 2c 20 72 34 2c 20 41 53 52 20 23 31 20 20 20 |r, r4, ASR #1 | 00009f20 20 20 20 20 20 20 20 20 20 20 20 3b 0a 20 20 20 | ;. | 00009f30 20 20 20 20 20 41 44 44 20 20 20 20 20 72 35 2c | ADD r5,| 00009f40 20 72 31 2c 20 72 33 20 20 20 20 20 20 20 20 20 | r1, r3 | 00009f50 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 0a 20 | ;. | 00009f60 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 6c | LDR l| 00009f70 72 2c 20 77 6f 72 6b 73 70 61 63 65 2b 34 20 20 |r, workspace+4 | 00009f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00009f90 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 20 20 |. SUB | 00009fa0 20 72 35 2c 20 6c 72 2c 20 72 35 2c 20 41 53 52 | r5, lr, r5, ASR| 00009fb0 20 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 | #1 | 00009fc0 20 3b 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 | ;. ADD | 00009fd0 20 20 20 72 30 2c 20 72 30 2c 20 72 34 20 20 20 | r0, r0, r4 | 00009fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00009ff0 20 20 20 3b 0a 20 20 20 20 20 20 20 20 41 44 44 | ;. ADD| 0000a000 20 20 20 20 20 72 31 2c 20 72 31 2c 20 72 35 20 | r1, r1, r5 | 0000a010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a020 20 20 20 20 20 3b 0a 20 20 20 20 20 20 20 20 41 | ;. A| 0000a030 44 44 20 20 20 20 20 72 32 2c 20 72 32 2c 20 72 |DD r2, r2, r| 0000a040 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |4 | 0000a050 20 20 20 20 20 20 20 3b 0a 20 20 20 20 20 20 20 | ;. | 0000a060 20 41 44 44 20 20 20 20 20 72 33 2c 20 72 33 2c | ADD r3, r3,| 0000a070 20 72 35 20 20 20 20 20 20 20 20 20 20 20 20 20 | r5 | 0000a080 20 20 20 20 20 20 20 20 20 3b 0a 20 20 20 20 20 | ;. | 0000a090 20 20 20 41 44 52 20 20 20 20 20 6c 72 2c 20 69 | ADR lr, i| 0000a0a0 6e 69 74 62 6f 78 20 20 20 20 20 20 20 20 20 20 |nitbox | 0000a0b0 20 20 20 20 20 20 20 20 20 20 20 3b 0a 20 20 20 | ;. | 0000a0c0 20 20 20 20 20 53 54 4d 49 41 20 20 20 6c 72 2c | STMIA lr,| 0000a0d0 20 7b 72 30 2d 72 33 7d 20 20 20 20 20 20 20 20 | {r0-r3} | 0000a0e0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 0a 20 | ;. | 0000a0f0 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 0000a100 70 21 2c 20 7b 72 34 2c 72 35 7d 20 20 20 20 20 |p!, {r4,r5} | 0000a110 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000a120 0a 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |.. MOV | 0000a130 20 20 72 31 2c 20 23 31 20 20 20 20 20 20 20 20 | r1, #1 | 0000a140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a150 20 20 3b 65 6c 73 65 20 6a 6d 70 20 74 6f 20 64 | ;else jmp to d| 0000a160 6f 5f 64 72 61 67 20 77 69 74 68 20 73 70 72 69 |o_drag with spri| 0000a170 74 65 20 6e 61 6d 65 20 66 72 6f 6d 20 6d 75 6c |te name from mul| 0000a180 74 69 6e 61 6d 65 20 62 65 6c 6f 77 0a 20 20 20 |tiname below. | 0000a190 20 20 20 20 20 41 44 52 20 20 20 20 20 72 32 2c | ADR r2,| 0000a1a0 20 6d 75 6c 74 69 6e 61 6d 65 0a 20 20 20 20 20 | multiname. | 0000a1b0 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 77 | LDR r0, w| 0000a1c0 6f 72 6b 73 70 61 63 65 2b 33 36 20 20 20 20 20 |orkspace+36 | 0000a1d0 20 20 20 20 20 20 20 20 20 20 20 3b 6d 61 6b 65 | ;make| 0000a1e0 20 64 6f 5f 64 72 61 67 20 63 6f 64 65 20 74 68 | do_drag code th| 0000a1f0 69 6e 6b 20 74 68 65 20 69 63 6f 6e 20 75 6e 64 |ink the icon und| 0000a200 65 72 20 70 74 72 20 69 73 20 76 65 72 74 69 63 |er ptr is vertic| 0000a210 61 6c 6c 79 0a 20 20 20 20 20 20 20 20 4f 52 52 |ally. ORR| 0000a220 20 20 20 20 20 72 30 2c 20 72 30 2c 20 23 31 36 | r0, r0, #16| 0000a230 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a240 20 20 20 20 20 3b 63 65 6e 74 72 65 64 2c 20 61 | ;centred, a| 0000a250 73 20 74 68 69 73 20 77 69 6c 6c 20 66 6f 72 63 |s this will forc| 0000a260 65 20 69 74 20 74 6f 20 76 65 72 74 69 63 61 6c |e it to vertical| 0000a270 6c 79 20 63 65 6e 74 72 65 20 73 70 72 69 74 65 |ly centre sprite| 0000a280 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 20 20 |. STR | 0000a290 20 72 30 2c 20 77 6f 72 6b 73 70 61 63 65 2b 33 | r0, workspace+3| 0000a2a0 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |6 | 0000a2b0 20 3b 77 69 74 68 69 6e 20 64 72 61 67 20 62 6f | ;within drag bo| 0000a2c0 78 0a 20 20 20 20 20 20 20 20 42 20 20 20 20 20 |x. B | 0000a2d0 20 20 64 6f 5f 64 72 61 67 0a 0a 3b 20 2d 2d 2d | do_drag..; ---| 0000a2e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 0000a340 2d 2d 2d 2d 2d 2d 0a 0a 6d 75 6c 74 69 6e 61 6d |------..multinam| 0000a350 65 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 |e DCB | 0000a360 22 6d 75 6c 74 69 66 69 6c 65 22 2c 20 30 0a 20 |"multifile", 0. | 0000a370 20 20 20 20 20 20 20 41 4c 49 47 4e 0a 0a 69 73 | ALIGN..is| 0000a380 5f 66 69 6c 65 72 20 20 20 20 20 20 20 20 20 20 |_filer | 0000a390 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a3a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 0000a3b0 61 6c 6c 20 6f 66 20 74 68 69 73 20 73 65 63 74 |all of this sect| 0000a3c0 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 64 64 |ion has been add| 0000a3d0 65 64 20 62 79 20 6d 65 0a 0a 20 20 20 20 20 20 |ed by me.. | 0000a3e0 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 6f 70 | LDR lr, op| 0000a3f0 74 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20 |tions | 0000a400 20 20 20 20 20 20 20 20 20 20 3b 69 66 20 66 69 | ;if fi| 0000a410 6c 65 72 20 73 6f 6c 69 64 20 64 72 61 67 20 6f |ler solid drag o| 0000a420 70 74 69 6f 6e 20 6e 6f 74 20 65 6e 61 62 6c 65 |ption not enable| 0000a430 64 2c 20 64 6f 20 6f 75 74 6c 69 6e 65 0a 20 20 |d, do outline. | 0000a440 20 20 20 20 20 20 54 53 54 20 20 20 20 20 6c 72 | TST lr| 0000a450 2c 20 23 31 3c 3c 31 0a 20 20 20 20 20 20 20 20 |, #1<<1. | 0000a460 42 45 51 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |BEQ not_spri| 0000a470 74 65 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 20 |te.. LDR | 0000a480 20 20 20 20 72 32 2c 20 5b 72 31 2c 20 23 31 32 | r2, [r1, #12| 0000a490 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 0000a4a0 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 68 61 6e | ; window han| 0000a4b0 64 6c 65 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |dle. CMP | 0000a4c0 20 20 20 20 72 32 2c 20 23 30 0a 20 20 20 20 20 | r2, #0. | 0000a4d0 20 20 20 42 4c 54 20 20 20 20 20 6e 6f 74 5f 73 | BLT not_s| 0000a4e0 70 72 69 74 65 0a 20 20 20 20 20 20 20 20 53 54 |prite. ST| 0000a4f0 52 20 20 20 20 20 72 32 2c 20 64 72 61 67 77 69 |R r2, dragwi| 0000a500 6e 64 6f 77 68 61 6e 64 6c 65 20 20 20 20 20 20 |ndowhandle | 0000a510 20 20 20 20 20 20 3b 20 66 6f 72 20 75 73 65 20 | ; for use | 0000a520 77 68 65 6e 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 |when looking for| 0000a530 20 73 70 72 69 74 65 20 6e 61 6d 65 20 74 6f 20 | sprite name to | 0000a540 6d 61 74 63 68 20 74 68 6f 73 65 20 72 65 63 6f |match those reco| 0000a550 72 64 65 64 20 62 79 20 50 6c 6f 74 49 63 6f 6e |rded by PlotIcon| 0000a560 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 0000a570 20 72 30 2c 20 23 31 39 0a 20 20 20 20 20 20 20 | r0, #19. | 0000a580 20 41 44 52 4c 20 20 20 20 72 31 2c 20 6d 65 73 | ADRL r1, mes| 0000a590 73 61 67 65 0a 20 20 20 20 20 20 20 20 53 57 49 |sage. SWI| 0000a5a0 20 20 20 20 20 58 57 69 6d 70 5f 53 65 6e 64 4d | XWimp_SendM| 0000a5b0 65 73 73 61 67 65 20 20 20 20 20 20 20 20 20 20 |essage | 0000a5c0 20 20 20 20 20 3b 20 72 32 20 3d 20 74 61 73 6b | ; r2 = task| 0000a5d0 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 | handle. | 0000a5e0 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |BVS not_spri| 0000a5f0 74 65 0a 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |te.. MOV | 0000a600 20 20 20 20 72 32 2c 20 72 32 2c 20 4c 53 4c 20 | r2, r2, LSL | 0000a610 23 31 36 20 20 20 20 20 20 20 20 20 20 20 20 20 |#16 | 0000a620 20 20 20 20 3b 20 6e 62 20 6e 6f 74 20 73 75 72 | ; nb not sur| 0000a630 65 20 68 6f 77 20 6d 61 6e 79 20 62 69 74 73 20 |e how many bits | 0000a640 6f 66 20 68 61 6e 64 6c 65 20 73 69 67 6e 69 66 |of handle signif| 0000a650 69 63 61 6e 74 2c 20 68 6f 77 65 76 65 72 20 69 |icant, however i| 0000a660 74 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |t. MOV | 0000a670 20 20 72 32 2c 20 72 32 2c 20 4c 53 52 20 23 31 | r2, r2, LSR #1| 0000a680 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |6 | 0000a690 20 20 3b 20 69 73 20 74 68 65 20 63 61 73 65 20 | ; is the case | 0000a6a0 74 68 61 74 20 72 32 20 26 20 68 61 6e 64 6c 65 |that r2 & handle| 0000a6b0 20 70 61 73 73 65 64 20 74 6f 20 66 69 6c 74 65 | passed to filte| 0000a6c0 72 20 61 72 65 20 6f 6e 6c 79 0a 20 20 20 20 20 |r are only. | 0000a6d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000a6f0 20 20 20 20 20 20 20 20 20 20 20 3b 20 63 6f 6d | ; com| 0000a700 6d 6f 6e 20 69 6e 20 61 74 20 6d 6f 73 74 20 62 |mon in at most b| 0000a710 6f 74 74 6f 6d 20 31 36 20 62 69 74 73 2c 20 66 |ottom 16 bits, f| 0000a720 6f 72 20 73 61 6d 65 20 74 61 73 6b 0a 20 20 20 |or same task. | 0000a730 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c | LDR r0,| 0000a740 20 66 69 6c 65 72 74 61 73 6b 68 61 6e 64 6c 65 | filertaskhandle| 0000a750 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 0000a760 20 72 30 2c 20 72 32 0a 20 20 20 20 20 20 20 20 | r0, r2. | 0000a770 42 4e 45 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |BNE not_spri| 0000a780 74 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |te | 0000a790 20 20 20 20 20 20 20 20 3b 20 6e 6f 74 20 6f 76 | ; not ov| 0000a7a0 65 72 20 66 69 6c 65 72 20 28 6f 72 20 72 65 67 |er filer (or reg| 0000a7b0 69 73 74 65 72 65 64 20 69 63 6f 6e 29 2c 20 73 |istered icon), s| 0000a7c0 6f 20 72 65 76 65 72 74 20 74 6f 20 6f 75 74 6c |o revert to outl| 0000a7d0 69 6e 65 0a 20 20 20 20 20 20 20 20 53 54 4d 46 |ine. STMF| 0000a7e0 44 20 20 20 73 70 21 2c 20 7b 72 34 2d 72 37 7d |D sp!, {r4-r7}| 0000a7f0 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 |. ADD | 0000a800 20 72 34 2c 20 72 34 2c 20 23 38 0a 20 20 20 20 | r4, r4, #8. | 0000a810 20 20 20 20 4c 44 4d 49 41 20 20 20 72 34 2c 20 | LDMIA r4, | 0000a820 7b 72 30 2c 72 31 2c 72 32 2c 72 33 7d 20 20 20 |{r0,r1,r2,r3} | 0000a830 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 6e | ; in| 0000a840 69 74 69 61 6c 20 62 6f 78 20 70 6f 73 69 74 69 |itial box positi| 0000a850 6f 6e 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 |on. SUB | 0000a860 20 20 20 72 36 2c 20 72 32 2c 20 72 30 20 20 20 | r6, r2, r0 | 0000a870 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a880 20 20 20 3b 20 77 69 64 74 68 0a 20 20 20 20 20 | ; width. | 0000a890 20 20 20 53 55 42 20 20 20 20 20 72 37 2c 20 72 | SUB r7, r| 0000a8a0 33 2c 20 72 31 20 20 20 20 20 20 20 20 20 20 20 |3, r1 | 0000a8b0 20 20 20 20 20 20 20 20 20 20 20 3b 20 68 65 69 | ; hei| 0000a8c0 67 68 74 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |ght. CMP | 0000a8d0 20 20 20 20 72 37 2c 20 23 34 34 20 20 20 20 20 | r7, #44 | 0000a8e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a8f0 20 20 20 20 3b 20 6e 62 20 74 68 65 73 65 20 66 | ; nb these f| 0000a900 69 67 75 72 65 73 20 61 72 65 20 74 68 65 20 65 |igures are the e| 0000a910 78 61 63 74 20 68 65 69 67 68 74 73 20 6f 66 20 |xact heights of | 0000a920 66 69 6c 65 72 20 74 65 6d 70 6c 61 74 65 20 69 |filer template i| 0000a930 63 6f 6e 73 20 28 2a 2a 2a 2a 29 0a 20 20 20 20 |cons (****). | 0000a940 20 20 20 20 43 4d 50 4e 45 20 20 20 72 37 2c 20 | CMPNE r7, | 0000a950 23 31 31 36 20 20 20 20 20 20 20 20 20 20 20 20 |#116 | 0000a960 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 66 6f | ; fo| 0000a970 72 20 73 6d 61 6c 6c 2f 66 75 6c 6c 2d 69 6e 66 |r small/full-inf| 0000a980 6f 20 26 20 6c 61 72 67 65 20 69 63 6f 6e 73 20 |o & large icons | 0000a990 66 69 6c 65 72 20 64 69 73 70 6c 61 79 20 6f 70 |filer display op| 0000a9a0 74 69 6f 6e 73 20 20 20 20 20 20 20 20 28 2a 2a |tions (**| 0000a9b0 2a 2a 29 0a 20 20 20 20 20 20 20 20 42 4e 45 20 |**). BNE | 0000a9c0 20 20 20 20 69 73 66 5f 67 6f 74 6d 75 6c 74 69 | isf_gotmulti| 0000a9d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000a9e0 20 20 20 20 3b 20 67 75 65 73 73 20 77 65 20 68 | ; guess we h| 0000a9f0 61 76 65 20 61 20 6d 75 6c 74 69 70 6c 65 20 66 |ave a multiple f| 0000aa00 69 6c 65 20 64 72 61 67 0a 20 20 20 20 20 20 20 |ile drag. | 0000aa10 20 43 4d 50 20 20 20 20 20 72 36 2c 20 23 32 32 | CMP r6, #22| 0000aa20 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |4 | 0000aa30 20 20 20 20 20 20 20 20 20 3b 20 6e 62 20 74 68 | ; nb th| 0000aa40 65 73 65 20 66 69 67 75 72 65 73 20 61 72 65 20 |ese figures are | 0000aa50 74 68 65 20 65 78 61 63 74 20 77 69 64 74 68 73 |the exact widths| 0000aa60 20 6f 66 20 66 69 6c 65 72 20 74 65 6d 70 6c 61 | of filer templa| 0000aa70 74 65 20 69 63 6f 6e 73 20 20 28 2a 2a 2a 2a 29 |te icons (****)| 0000aa80 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 20 20 |. CMPNE | 0000aa90 20 72 36 2c 20 23 39 37 36 20 20 20 20 20 20 20 | r6, #976 | 0000aaa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000aab0 20 3b 20 66 6f 72 20 73 6d 61 6c 6c 20 69 63 6f | ; for small ico| 0000aac0 6e 73 2c 20 66 75 6c 6c 20 69 6e 66 6f 20 26 20 |ns, full info & | 0000aad0 6c 61 72 67 65 20 69 63 6f 6e 73 20 66 69 6c 65 |large icons file| 0000aae0 72 20 64 69 73 70 6c 61 79 20 6f 70 74 69 6f 6e |r display option| 0000aaf0 73 20 28 2a 2a 2a 2a 29 0a 20 20 20 20 20 20 20 |s (****). | 0000ab00 20 43 4d 50 4e 45 20 20 20 72 36 2c 20 23 31 38 | CMPNE r6, #18| 0000ab10 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 0000ab20 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 20 20 | ; | 0000ab30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000ab60 20 20 20 20 20 20 20 20 20 20 28 2a 2a 2a 2a 29 | (****)| 0000ab70 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 0000ab80 20 69 73 66 5f 67 6f 74 6d 75 6c 74 69 20 20 20 | isf_gotmulti | 0000ab90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000aba0 20 3b 20 67 75 65 73 73 20 77 65 20 68 61 76 65 | ; guess we have| 0000abb0 20 61 20 6d 75 6c 74 69 70 6c 65 20 66 69 6c 65 | a multiple file| 0000abc0 20 64 72 61 67 0a 20 20 20 20 20 20 20 20 43 4d | drag. CM| 0000abd0 50 20 20 20 20 20 72 37 2c 20 23 34 34 0a 20 20 |P r7, #44. | 0000abe0 20 20 20 20 20 20 41 44 44 45 51 20 20 20 72 34 | ADDEQ r4| 0000abf0 2c 20 72 30 2c 20 23 34 0a 20 20 20 20 20 20 20 |, r0, #4. | 0000ac00 20 41 44 44 45 51 20 20 20 72 35 2c 20 72 31 2c | ADDEQ r5, r1,| 0000ac10 20 23 34 0a 20 20 20 20 20 20 20 20 41 44 44 45 | #4. ADDE| 0000ac20 51 20 20 20 72 36 2c 20 72 34 2c 20 23 33 36 0a |Q r6, r4, #36.| 0000ac30 20 20 20 20 20 20 20 20 41 44 44 45 51 20 20 20 | ADDEQ | 0000ac40 72 37 2c 20 72 35 2c 20 23 33 36 0a 20 20 20 20 |r7, r5, #36. | 0000ac50 20 20 20 20 42 4c 45 51 20 20 20 20 69 73 66 5f | BLEQ isf_| 0000ac60 67 6f 74 73 6d 61 6c 6c 20 20 20 20 20 20 20 20 |gotsmall | 0000ac70 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 28 a4 | ; (.| 0000ac80 a4 a4 a4 29 20 74 68 69 73 20 63 6f 64 65 20 65 |...) this code e| 0000ac90 6e 73 75 72 65 73 20 73 70 72 69 74 65 20 69 73 |nsures sprite is| 0000aca0 20 63 65 6e 74 72 65 64 20 6f 6e 20 70 74 72 20 | centred on ptr | 0000acb0 26 20 6e 6f 74 20 6f 76 65 72 20 66 69 6c 65 72 |& not over filer| 0000acc0 20 69 63 6f 6e 0a 20 20 20 20 20 20 20 20 41 44 | icon. AD| 0000acd0 44 4e 45 20 20 20 72 34 2c 20 72 30 2c 20 23 35 |DNE r4, r0, #5| 0000ace0 36 0a 20 20 20 20 20 20 20 20 41 44 44 4e 45 20 |6. ADDNE | 0000acf0 20 20 72 35 2c 20 72 31 2c 20 23 34 34 0a 20 20 | r5, r1, #44. | 0000ad00 20 20 20 20 20 20 41 44 44 4e 45 20 20 20 72 36 | ADDNE r6| 0000ad10 2c 20 72 34 2c 20 23 36 38 0a 20 20 20 20 20 20 |, r4, #68. | 0000ad20 20 20 41 44 44 4e 45 20 20 20 72 37 2c 20 72 35 | ADDNE r7, r5| 0000ad30 2c 20 23 36 38 0a 20 20 20 20 20 20 20 20 41 44 |, #68. AD| 0000ad40 52 4c 20 20 20 20 72 30 2c 20 77 6f 72 6b 73 70 |RL r0, worksp| 0000ad50 61 63 65 32 0a 20 20 20 20 20 20 20 20 53 54 4d |ace2. STM| 0000ad60 49 41 20 20 20 72 30 2c 20 7b 72 34 2d 72 37 7d |IA r0, {r4-r7}| 0000ad70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000ad80 20 20 20 20 20 3b 20 74 68 69 73 20 67 69 76 65 | ; this give| 0000ad90 73 20 61 6e 20 69 6e 69 74 69 61 6c 20 62 6f 78 |s an initial box| 0000ada0 20 6f 76 65 72 20 74 68 65 20 66 69 6c 65 20 73 | over the file s| 0000adb0 70 72 69 74 65 20 2d 20 69 6d 70 6f 72 74 61 6e |prite - importan| 0000adc0 74 20 74 6f 20 72 65 63 61 6c 63 20 74 68 69 73 |t to recalc this| 0000add0 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |,. | 0000ade0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000ae00 20 20 3b 20 65 73 70 65 63 69 61 6c 6c 79 20 69 | ; especially i| 0000ae10 66 20 64 69 73 70 6c 61 79 20 69 73 20 66 75 6c |f display is ful| 0000ae20 6c 20 69 6e 66 6f 20 65 6c 73 65 20 73 70 72 69 |l info else spri| 0000ae30 74 65 20 61 70 70 65 61 72 73 20 6f 76 65 72 20 |te appears over | 0000ae40 6d 69 64 64 6c 65 20 6f 66 20 74 65 78 74 0a 20 |middle of text. | 0000ae50 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 | LDMFD s| 0000ae60 70 21 2c 20 7b 72 34 2d 72 37 7d 20 20 20 20 20 |p!, {r4-r7} | 0000ae70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000ae80 20 72 61 74 68 65 72 20 74 68 61 6e 20 6f 76 65 | rather than ove| 0000ae90 72 20 66 69 6c 65 20 73 70 72 69 74 65 20 6f 6e |r file sprite on| 0000aea0 20 6c 65 66 74 0a 0a 20 20 20 20 20 20 20 20 4c | left.. L| 0000aeb0 44 52 20 20 20 20 20 72 30 2c 20 64 72 61 67 77 |DR r0, dragw| 0000aec0 69 6e 64 6f 77 68 61 6e 64 6c 65 0a 20 20 20 20 |indowhandle. | 0000aed0 20 20 20 20 41 44 52 20 20 20 20 20 72 31 2c 20 | ADR r1, | 0000aee0 6e 61 6d 65 6c 69 73 74 0a 20 20 20 20 20 20 20 |namelist. | 0000aef0 20 41 44 52 20 20 20 20 20 72 33 2c 20 6e 61 6d | ADR r3, nam| 0000af00 65 6c 69 73 74 65 6e 64 0a 64 72 61 67 6e 61 6d |elistend.dragnam| 0000af10 65 73 63 61 6e 0a 20 20 20 20 20 20 20 20 4c 44 |escan. LD| 0000af20 52 20 20 20 20 20 72 32 2c 20 5b 72 31 5d 2c 20 |R r2, [r1], | 0000af30 23 32 30 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |#20. CMP | 0000af40 20 20 20 20 72 32 2c 20 72 30 0a 20 20 20 20 20 | r2, r0. | 0000af50 20 20 20 42 45 51 20 20 20 20 20 64 72 61 67 67 | BEQ dragg| 0000af60 6f 74 6e 61 6d 65 20 20 20 20 20 20 20 20 20 20 |otname | 0000af70 20 20 20 20 20 20 20 20 20 20 20 3b 69 66 20 77 | ;if w| 0000af80 65 20 68 61 76 65 20 61 20 6d 61 74 63 68 20 6f |e have a match o| 0000af90 66 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 73 |f window handles| 0000afa0 2c 20 65 78 69 74 20 73 65 61 72 63 68 0a 20 20 |, exit search. | 0000afb0 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 | CMP r1| 0000afc0 2c 20 72 33 0a 20 20 20 20 20 20 20 20 42 4c 54 |, r3. BLT| 0000afd0 20 20 20 20 20 64 72 61 67 6e 61 6d 65 73 63 61 | dragnamesca| 0000afe0 6e 0a 20 20 20 20 20 20 20 20 42 20 20 20 20 20 |n. B | 0000aff0 20 20 6e 6f 74 5f 73 70 72 69 74 65 20 20 20 20 | not_sprite | 0000b000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b010 20 20 3b 63 6f 75 6c 64 6e 27 74 20 66 69 6e 64 | ;couldn't find| 0000b020 20 61 20 6e 61 6d 65 20 66 6f 72 20 74 68 69 73 | a name for this| 0000b030 20 77 69 6e 64 6f 77 2c 20 73 6f 20 75 73 65 20 | window, so use | 0000b040 6e 6f 74 5f 73 70 72 69 74 65 20 28 69 65 20 6f |not_sprite (ie o| 0000b050 75 74 6c 69 6e 65 20 64 72 61 67 29 0a 64 72 61 |utline drag).dra| 0000b060 67 67 6f 74 6e 61 6d 65 0a 20 20 20 20 20 20 20 |ggotname. | 0000b070 20 53 55 42 20 20 20 20 20 72 32 2c 20 72 31 2c | SUB r2, r1,| 0000b080 20 23 31 36 20 20 20 20 20 20 20 20 20 20 20 20 | #16 | 0000b090 20 20 20 20 20 20 20 20 20 3b 63 61 6c 63 20 6e | ;calc n| 0000b0a0 61 6d 65 20 70 74 72 20 69 6e 20 6e 61 6d 65 6c |ame ptr in namel| 0000b0b0 69 73 74 20 62 61 73 65 64 20 6f 6e 20 72 31 20 |ist based on r1 | 0000b0c0 66 72 6f 6d 20 61 62 6f 76 65 20 73 63 61 6e 0a |from above scan.| 0000b0d0 0a 64 72 61 67 67 6f 74 6e 61 6d 65 70 74 72 0a |.draggotnameptr.| 0000b0e0 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 0000b0f0 72 30 2c 20 23 26 31 38 0a 20 20 20 20 20 20 20 |r0, #&18. | 0000b100 20 53 57 49 20 20 20 20 20 58 57 69 6d 70 5f 53 | SWI XWimp_S| 0000b110 70 72 69 74 65 4f 70 0a 20 20 20 20 20 20 20 20 |priteOp. | 0000b120 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 |BVS not_spri| 0000b130 74 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |te | 0000b140 20 20 20 20 20 20 20 20 3b 63 6f 75 6c 64 6e 27 | ;couldn'| 0000b150 74 20 66 69 6e 64 20 73 70 72 69 74 65 20 69 6e |t find sprite in| 0000b160 20 77 69 6d 70 20 61 72 65 61 2c 20 73 6f 20 64 | wimp area, so d| 0000b170 6f 20 6f 75 74 6c 69 6e 65 0a 0a 20 20 20 20 20 |o outline.. | 0000b180 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 23 | MOV r0, #| 0000b190 26 32 38 0a 20 20 20 20 20 20 20 20 53 54 4d 46 |&28. STMF| 0000b1a0 44 20 20 20 73 70 21 2c 20 7b 72 35 2c 72 36 7d |D sp!, {r5,r6}| 0000b1b0 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 0000b1c0 20 58 57 69 6d 70 5f 53 70 72 69 74 65 4f 70 20 | XWimp_SpriteOp | 0000b1d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b1e0 20 3b 67 65 74 20 73 70 72 69 74 65 20 6d 6f 64 | ;get sprite mod| 0000b1f0 65 20 69 6e 20 72 36 0a 20 20 20 20 20 20 20 20 |e in r6. | 0000b200 4c 44 4d 56 53 46 44 20 73 70 21 2c 20 7b 72 35 |LDMVSFD sp!, {r5| 0000b210 2c 72 36 7d 0a 20 20 20 20 20 20 20 20 42 56 53 |,r6}. BVS| 0000b220 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a | not_sprite.| 0000b230 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 0000b240 72 35 2c 20 72 32 20 20 20 20 20 20 20 20 20 20 |r5, r2 | 0000b250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b260 3b 70 72 65 73 65 72 76 65 20 73 70 72 69 74 65 |;preserve sprite| 0000b270 20 6e 61 6d 65 20 70 74 72 2c 20 66 6f 72 20 75 | name ptr, for u| 0000b280 73 65 20 62 79 20 44 72 61 67 41 53 70 72 69 74 |se by DragASprit| 0000b290 65 5f 53 74 61 72 74 0a 0a 20 20 20 20 20 20 20 |e_Start.. | 0000b2a0 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 72 36 0a | MOV r0, r6.| 0000b2b0 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 0000b2c0 72 31 2c 20 23 39 0a 20 20 20 20 20 20 20 20 53 |r1, #9. S| 0000b2d0 57 49 20 20 20 20 20 58 4f 53 5f 52 65 61 64 4d |WI XOS_ReadM| 0000b2e0 6f 64 65 56 61 72 69 61 62 6c 65 20 20 20 20 20 |odeVariable | 0000b2f0 20 20 20 20 20 20 20 3b 20 67 65 74 20 6c 6f 67 | ; get log| 0000b300 20 62 61 73 65 20 32 20 62 69 74 73 20 70 65 72 | base 2 bits per| 0000b310 20 70 69 78 65 6c 0a 20 20 20 20 20 20 20 20 4c | pixel. L| 0000b320 44 4d 43 53 46 44 20 73 70 21 2c 20 7b 72 35 2c |DMCSFD sp!, {r5,| 0000b330 72 36 7d 0a 20 20 20 20 20 20 20 20 42 43 53 20 |r6}. BCS | 0000b340 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a 20 | not_sprite. | 0000b350 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 0000b360 32 2c 20 23 33 0a 20 20 20 20 20 20 20 20 4d 4f |2, #3. MO| 0000b370 56 20 20 20 20 20 72 32 2c 20 72 35 0a 20 20 20 |V r2, r5. | 0000b380 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 | LDMFD sp!| 0000b390 2c 20 7b 72 35 2c 72 36 7d 0a 20 20 20 20 20 20 |, {r5,r6}. | 0000b3a0 20 20 42 45 51 20 20 20 20 20 6e 6f 74 5f 73 70 | BEQ not_sp| 0000b3b0 72 69 74 65 20 20 20 20 20 20 20 20 20 20 20 20 |rite | 0000b3c0 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 32 | ; if 2| 0000b3d0 35 36 20 63 6f 6c 6f 75 72 2c 20 64 6f 20 61 6e |56 colour, do an| 0000b3e0 20 6f 75 74 6c 69 6e 65 20 64 72 61 67 0a 0a 20 | outline drag.. | 0000b3f0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 0000b400 30 2c 20 23 32 5f 31 31 30 30 30 31 30 31 0a 20 |0, #2_11000101. | 0000b410 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 0000b420 31 2c 20 23 31 0a 20 20 20 20 20 20 20 20 41 44 |1, #1. AD| 0000b430 52 4c 20 20 20 20 72 33 2c 20 77 6f 72 6b 73 70 |RL r3, worksp| 0000b440 61 63 65 32 0a 0a 20 20 20 20 20 20 20 20 53 57 |ace2.. SW| 0000b450 49 20 20 20 20 20 58 44 72 61 67 41 53 70 72 69 |I XDragASpri| 0000b460 74 65 5f 53 74 61 72 74 0a 20 20 20 20 20 20 20 |te_Start. | 0000b470 20 42 56 53 20 20 20 20 20 6e 6f 74 5f 73 70 72 | BVS not_spr| 0000b480 69 74 65 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |ite. LDMF| 0000b490 44 20 20 20 73 70 21 2c 20 7b 72 30 2d 72 34 2c |D sp!, {r0-r4,| 0000b4a0 6c 72 7d 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |lr}. LDMF| 0000b4b0 44 20 20 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 20 |D sp!, {lr}. | 0000b4c0 20 20 20 20 20 20 42 49 43 53 20 20 20 20 70 63 | BICS pc| 0000b4d0 2c 20 6c 72 2c 20 23 56 5f 46 4c 41 47 20 20 20 |, lr, #V_FLAG | 0000b4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 66 | ;f| 0000b4f0 6f 72 63 65 20 76 62 69 74 20 63 6c 65 61 72 2c |orce vbit clear,| 0000b500 20 62 75 74 20 70 72 65 73 65 72 76 65 20 61 6c | but preserve al| 0000b510 6c 20 6f 74 68 65 72 20 66 6c 61 67 73 0a 0a 64 |l other flags..d| 0000b520 72 61 67 77 69 6e 64 6f 77 68 61 6e 64 6c 65 0a |ragwindowhandle.| 0000b530 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 20 | DCD | 0000b540 30 0a 0a 69 73 66 5f 67 6f 74 6d 75 6c 74 69 0a |0..isf_gotmulti.| 0000b550 20 20 20 20 20 20 20 20 41 44 52 4c 20 20 20 20 | ADRL | 0000b560 72 34 2c 20 77 6f 72 6b 73 70 61 63 65 32 0a 20 |r4, workspace2. | 0000b570 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 | ADD r| 0000b580 35 2c 20 72 30 2c 20 72 32 20 20 20 20 20 20 20 |5, r0, r2 | 0000b590 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000b5a0 20 28 a4 a4 a4 a4 29 20 74 68 65 73 65 20 31 30 | (....) these 10| 0000b5b0 20 6c 69 6e 65 73 20 65 6e 73 75 72 65 20 6d 75 | lines ensure mu| 0000b5c0 6c 74 69 69 63 6f 6e 20 69 73 20 63 65 6e 74 72 |ltiicon is centr| 0000b5d0 65 64 20 6f 6e 20 70 74 72 0a 20 20 20 20 20 20 |ed on ptr. | 0000b5e0 20 20 4c 44 52 20 20 20 20 20 72 37 2c 20 77 6f | LDR r7, wo| 0000b5f0 72 6b 73 70 61 63 65 20 20 20 20 20 20 20 20 20 |rkspace | 0000b600 20 20 20 20 20 20 20 20 20 20 3b 20 26 20 6e 6f | ; & no| 0000b610 74 20 6f 76 65 72 20 66 69 6c 65 72 20 69 63 6f |t over filer ico| 0000b620 6e 20 67 72 6f 75 70 0a 20 20 20 20 20 20 20 20 |n group. | 0000b630 53 55 42 20 20 20 20 20 72 35 2c 20 72 37 2c 20 |SUB r5, r7, | 0000b640 72 35 2c 20 41 53 52 20 23 31 20 20 20 20 20 20 |r5, ASR #1 | 0000b650 20 20 20 20 20 20 20 20 3b 0a 20 20 20 20 20 20 | ;. | 0000b660 20 20 41 44 44 20 20 20 20 20 72 36 2c 20 72 31 | ADD r6, r1| 0000b670 2c 20 72 33 20 20 20 20 20 20 20 20 20 20 20 20 |, r3 | 0000b680 20 20 20 20 20 20 20 20 20 20 3b 0a 20 20 20 20 | ;. | 0000b690 20 20 20 20 4c 44 52 20 20 20 20 20 72 37 2c 20 | LDR r7, | 0000b6a0 77 6f 72 6b 73 70 61 63 65 2b 34 20 20 20 20 20 |workspace+4 | 0000b6b0 20 20 20 20 20 20 20 20 20 20 20 20 3b 0a 20 20 | ;. | 0000b6c0 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 36 | SUB r6| 0000b6d0 2c 20 72 37 2c 20 72 36 2c 20 41 53 52 20 23 31 |, r7, r6, ASR #1| 0000b6e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 0a | ;.| 0000b6f0 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 | ADD | 0000b700 72 30 2c 20 72 30 2c 20 72 35 20 20 20 20 20 20 |r0, r0, r5 | 0000b710 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b720 3b 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 |;. ADD | 0000b730 20 20 72 31 2c 20 72 31 2c 20 72 36 20 20 20 20 | r1, r1, r6 | 0000b740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b750 20 20 3b 0a 20 20 20 20 20 20 20 20 41 44 44 20 | ;. ADD | 0000b760 20 20 20 20 72 32 2c 20 72 32 2c 20 72 35 20 20 | r2, r2, r5 | 0000b770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b780 20 20 20 20 3b 0a 20 20 20 20 20 20 20 20 41 44 | ;. AD| 0000b790 44 20 20 20 20 20 72 33 2c 20 72 33 2c 20 72 36 |D r3, r3, r6| 0000b7a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b7b0 20 20 20 20 20 20 3b 0a 20 20 20 20 20 20 20 20 | ;. | 0000b7c0 53 54 4d 49 41 20 20 20 72 34 2c 20 7b 72 30 2d |STMIA r4, {r0-| 0000b7d0 72 33 7d 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |r3}. LDMF| 0000b7e0 44 20 20 20 73 70 21 2c 20 7b 72 34 2d 72 37 7d |D sp!, {r4-r7}| 0000b7f0 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 |. ADR | 0000b800 20 72 32 2c 20 6d 75 6c 74 69 6e 61 6d 65 0a 20 | r2, multiname. | 0000b810 20 20 20 20 20 20 20 42 20 20 20 20 20 20 20 64 | B d| 0000b820 72 61 67 67 6f 74 6e 61 6d 65 70 74 72 0a 0a 69 |raggotnameptr..i| 0000b830 73 66 5f 67 6f 74 73 6d 61 6c 6c 20 20 20 20 20 |sf_gotsmall | 0000b840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000b850 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000b860 20 28 a4 a4 a4 a4 29 20 74 68 69 73 20 63 6f 64 | (....) this cod| 0000b870 65 20 65 6e 73 75 72 65 73 20 73 6d 61 6c 6c 20 |e ensures small | 0000b880 73 70 72 69 74 65 20 69 73 20 63 65 6e 74 72 65 |sprite is centre| 0000b890 64 20 6f 6e 20 70 74 72 20 26 20 6e 6f 74 20 6f |d on ptr & not o| 0000b8a0 76 65 72 20 66 69 6c 65 72 20 69 63 6f 6e 0a 20 |ver filer icon. | 0000b8b0 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 | ADD r| 0000b8c0 30 2c 20 72 34 2c 20 72 36 0a 20 20 20 20 20 20 |0, r4, r6. | 0000b8d0 20 20 4c 44 52 20 20 20 20 20 72 32 2c 20 77 6f | LDR r2, wo| 0000b8e0 72 6b 73 70 61 63 65 0a 20 20 20 20 20 20 20 20 |rkspace. | 0000b8f0 53 55 42 20 20 20 20 20 72 30 2c 20 72 32 2c 20 |SUB r0, r2, | 0000b900 72 30 2c 20 41 53 52 20 23 31 0a 20 20 20 20 20 |r0, ASR #1. | 0000b910 20 20 20 41 44 44 20 20 20 20 20 72 31 2c 20 72 | ADD r1, r| 0000b920 35 2c 20 72 37 0a 20 20 20 20 20 20 20 20 4c 44 |5, r7. LD| 0000b930 52 20 20 20 20 20 72 32 2c 20 77 6f 72 6b 73 70 |R r2, worksp| 0000b940 61 63 65 2b 34 0a 20 20 20 20 20 20 20 20 53 55 |ace+4. SU| 0000b950 42 20 20 20 20 20 72 31 2c 20 72 32 2c 20 72 31 |B r1, r2, r1| 0000b960 2c 20 41 53 52 20 23 31 0a 20 20 20 20 20 20 20 |, ASR #1. | 0000b970 20 41 44 44 20 20 20 20 20 72 34 2c 20 72 34 2c | ADD r4, r4,| 0000b980 20 72 30 0a 20 20 20 20 20 20 20 20 41 44 44 20 | r0. ADD | 0000b990 20 20 20 20 72 35 2c 20 72 35 2c 20 72 31 0a 20 | r5, r5, r1. | 0000b9a0 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 | ADD r| 0000b9b0 36 2c 20 72 36 2c 20 72 30 0a 20 20 20 20 20 20 |6, r6, r0. | 0000b9c0 20 20 41 44 44 20 20 20 20 20 72 37 2c 20 72 37 | ADD r7, r7| 0000b9d0 2c 20 72 31 0a 20 20 20 20 20 20 20 20 4d 4f 56 |, r1. MOV| 0000b9e0 20 20 20 20 20 70 63 2c 20 6c 72 0a 0a 3b 20 2d | pc, lr..; -| 0000b9f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 0000ba50 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 6f 70 74 69 6f 6e |--------..option| 0000ba60 73 20 44 43 44 20 20 20 20 20 32 5f 30 30 30 30 |s DCD 2_0000| 0000ba70 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000| 0000ba80 30 30 30 30 30 30 30 31 30 30 30 31 0a 0a 70 6c |000000010001..pl| 0000ba90 6f 74 66 6c 61 67 20 20 20 20 20 20 20 20 20 20 |otflag | 0000baa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000bab0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 0000bac0 61 6c 6c 20 6f 66 20 74 68 69 73 20 73 65 63 74 |all of this sect| 0000bad0 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 61 64 64 |ion has been add| 0000bae0 65 64 20 62 79 20 6d 65 0a 20 20 20 20 20 20 20 |ed by me. | 0000baf0 20 44 43 44 20 20 20 20 20 30 0a 66 69 6c 65 72 | DCD 0.filer| 0000bb00 66 6c 61 67 0a 20 20 20 20 20 20 20 20 44 43 44 |flag. DCD| 0000bb10 20 20 20 20 20 30 0a 77 69 6e 64 6f 77 68 61 6e | 0.windowhan| 0000bb20 64 6c 65 0a 20 20 20 20 20 20 20 20 44 43 44 20 |dle. DCD | 0000bb30 20 20 20 20 30 20 20 20 20 20 20 20 20 20 20 20 | 0 | 0000bb40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000bb50 20 20 20 20 3b 20 61 73 20 75 73 65 64 20 62 79 | ; as used by| 0000bb60 20 6c 61 73 74 20 5f 55 70 64 61 74 65 57 69 6e | last _UpdateWin| 0000bb70 64 6f 77 20 28 6e 65 65 64 65 64 20 62 79 0a 20 |dow (needed by. | 0000bb80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000bba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000bbb0 20 50 6c 6f 74 49 63 6f 6e 20 69 6e 74 65 72 63 | PlotIcon interc| 0000bbc0 65 70 74 2c 20 77 68 65 6e 20 6c 6f 67 67 69 6e |ept, when loggin| 0000bbd0 67 20 73 70 72 69 74 65 20 6e 61 6d 65 2f 77 69 |g sprite name/wi| 0000bbe0 6e 64 6f 77 20 68 61 6e 64 6c 65 29 0a 6e 61 6d |ndow handle).nam| 0000bbf0 65 6c 69 73 74 0a 20 20 20 20 20 20 20 20 44 43 |elist. DC| 0000bc00 44 20 20 20 20 20 2d 31 2c 20 30 2c 20 30 2c 20 |D -1, 0, 0, | 0000bc10 30 2c 20 30 20 20 20 20 20 20 20 20 20 20 20 20 |0, 0 | 0000bc20 20 20 20 20 20 20 3b 20 65 6e 74 72 79 20 30 20 | ; entry 0 | 0000bc30 28 68 61 6e 64 6c 65 20 2d 31 2c 20 26 20 31 36 |(handle -1, & 16| 0000bc40 20 62 79 74 65 73 20 7a 65 72 6f 65 64 20 66 6f | bytes zeroed fo| 0000bc50 72 20 6e 61 6d 65 29 0a 20 20 20 20 20 20 20 20 |r name). | 0000bc60 44 43 44 20 20 20 20 20 2d 31 2c 20 30 2c 20 30 |DCD -1, 0, 0| 0000bc70 2c 20 30 2c 20 30 20 20 20 20 20 20 20 20 20 20 |, 0, 0 | 0000bc80 20 20 20 20 20 20 20 20 3b 20 61 6c 6c 6f 77 20 | ; allow | 0000bc90 75 70 74 6f 20 34 20 74 6f 20 62 65 20 73 74 6f |upto 4 to be sto| 0000bca0 72 65 64 0a 20 20 20 20 20 20 20 20 44 43 44 20 |red. DCD | 0000bcb0 20 20 20 20 2d 31 2c 20 30 2c 20 30 2c 20 30 2c | -1, 0, 0, 0,| 0000bcc0 20 30 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 | 0. DCD | 0000bcd0 20 20 20 2d 31 2c 20 30 2c 20 30 2c 20 30 2c 20 | -1, 0, 0, 0, | 0000bce0 30 0a 6e 61 6d 65 6c 69 73 74 65 6e 64 0a 6c 61 |0.namelistend.la| 0000bcf0 73 74 6e 61 6d 65 20 20 20 20 20 20 20 20 25 20 |stname % | 0000bd00 20 20 20 20 20 20 31 36 0a 0a 66 69 6c 65 72 74 | 16..filert| 0000bd10 61 73 6b 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 |askhandle. | 0000bd20 20 20 44 43 44 20 20 20 20 20 2d 31 0a 0a 69 73 | DCD -1..is| 0000bd30 5f 70 6c 6f 74 69 63 6f 6e 0a 20 20 20 20 20 20 |_ploticon. | 0000bd40 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 66 69 | LDR lr, fi| 0000bd50 6c 65 72 66 6c 61 67 0a 20 20 20 20 20 20 20 20 |lerflag. | 0000bd60 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 31 0a 20 |CMP lr, #1. | 0000bd70 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 63 | BNE c| 0000bd80 6f 6e 74 69 6e 75 65 0a 20 20 20 20 20 20 20 20 |ontinue. | 0000bd90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000bdb0 20 20 20 20 20 20 20 20 3b 65 6c 73 65 2c 20 77 | ;else, w| 0000bdc0 65 20 68 61 76 65 20 61 20 66 69 6c 65 72 20 50 |e have a filer P| 0000bdd0 6c 6f 74 49 63 6f 6e 20 63 61 6c 6c 0a 20 20 20 |lotIcon call. | 0000bde0 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 | STMFD sp!| 0000bdf0 2c 20 7b 72 30 2c 72 32 2d 72 37 7d 0a 20 20 20 |, {r0,r2-r7}. | 0000be00 20 20 20 20 20 4c 44 4d 49 41 20 20 20 72 31 2c | LDMIA r1,| 0000be10 20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 | {r0-r7}. | 0000be20 20 41 44 52 4c 20 20 20 20 6c 72 2c 20 69 63 6f | ADRL lr, ico| 0000be30 6e 0a 20 20 20 20 20 20 20 20 53 54 4d 49 41 20 |n. STMIA | 0000be40 20 20 6c 72 2c 20 7b 72 30 2d 72 37 7d 20 20 20 | lr, {r0-r7} | 0000be50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000be60 20 20 3b 69 63 6f 6e 20 64 61 74 61 20 63 6f 70 | ;icon data cop| 0000be70 69 65 64 20 66 6f 72 20 70 72 6f 63 65 73 73 69 |ied for processi| 0000be80 6e 67 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 |ng. TST | 0000be90 20 20 20 72 34 2c 20 23 32 5f 30 30 30 30 30 30 | r4, #2_000000| 0000bea0 30 30 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |001 | 0000beb0 20 20 20 3b 20 74 65 78 74 3f 0a 20 20 20 20 20 | ; text?. | 0000bec0 20 20 20 54 53 54 4e 45 20 20 20 72 34 2c 20 23 | TSTNE r4, #| 0000bed0 32 5f 30 30 30 30 30 30 30 31 30 20 20 20 20 20 |2_000000010 | 0000bee0 20 20 20 20 20 20 20 20 20 20 20 3b 20 26 20 73 | ; & s| 0000bef0 70 72 69 74 65 3f 0a 20 20 20 20 20 20 20 20 54 |prite?. T| 0000bf00 53 54 4e 45 20 20 20 72 34 2c 20 23 32 5f 31 30 |STNE r4, #2_10| 0000bf10 30 30 30 30 30 30 30 20 20 20 20 20 20 20 20 20 |0000000 | 0000bf20 20 20 20 20 20 20 20 3b 20 26 20 69 6e 64 69 72 | ; & indir| 0000bf30 65 63 74 65 64 3f 20 4e 42 20 65 78 70 65 63 74 |ected? NB expect| 0000bf40 20 74 68 65 73 65 20 63 6f 6e 64 69 74 69 6f 6e | these condition| 0000bf50 73 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 62 65 |s will always be| 0000bf60 20 6d 65 74 0a 20 20 20 20 20 20 20 20 4c 44 4d | met. LDM| 0000bf70 45 51 46 44 20 73 70 21 2c 20 7b 72 30 2c 72 32 |EQFD sp!, {r0,r2| 0000bf80 2d 72 37 7d 0a 20 20 20 20 20 20 20 20 41 44 52 |-r7}. ADR| 0000bf90 45 51 4c 20 20 72 31 2c 20 69 63 6f 6e 0a 20 20 |EQL r1, icon. | 0000bfa0 20 20 20 20 20 20 42 45 51 20 20 20 20 20 63 6f | BEQ co| 0000bfb0 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 20 20 |ntinue | 0000bfc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 61 | ;a| 0000bfd0 6c 6c 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 65 |ll following ope| 0000bfe0 72 61 74 69 6f 6e 73 20 6f 6e 6c 79 20 61 63 74 |rations only act| 0000bff0 20 69 66 20 61 62 6f 76 65 20 63 6f 6e 64 69 74 | if above condit| 0000c000 69 6f 6e 73 20 6d 65 74 0a 0a 0a 20 20 20 20 20 |ions met... | 0000c010 20 20 20 41 44 52 4c 20 20 20 20 72 30 2c 20 77 | ADRL r0, w| 0000c020 6f 72 6b 73 70 61 63 65 32 0a 20 20 20 20 20 20 |orkspace2. | 0000c030 20 20 41 44 44 20 20 20 20 20 72 31 2c 20 72 30 | ADD r1, r0| 0000c040 2c 20 23 77 73 70 32 5f 73 69 7a 65 2d 34 2d 33 |, #wsp2_size-4-3| 0000c050 20 20 20 20 20 20 20 20 20 20 3b 4e 6f 77 20 63 | ;Now c| 0000c060 6f 70 79 20 76 61 6c 69 64 61 74 69 6f 6e 20 73 |opy validation s| 0000c070 74 72 69 6e 67 20 66 72 6f 6d 20 72 36 20 74 6f |tring from r6 to| 0000c080 20 77 6f 72 6b 73 70 61 63 65 32 0a 69 73 70 69 | workspace2.ispi| 0000c090 70 6c 31 20 4c 44 52 42 20 20 20 20 72 32 2c 20 |pl1 LDRB r2, | 0000c0a0 5b 72 36 5d 2c 20 23 31 20 20 20 20 20 20 20 20 |[r6], #1 | 0000c0b0 20 20 20 20 20 20 20 20 20 20 20 20 3b 2d 34 20 | ;-4 | 0000c0c0 74 6f 20 6c 65 61 76 65 20 73 70 61 63 65 20 66 |to leave space f| 0000c0d0 6f 72 20 27 3b 46 61 62 27 2c 20 26 20 2d 33 20 |or ';Fab', & -3 | 0000c0e0 74 6f 20 61 6c 6c 6f 77 20 66 6f 72 20 6e 61 6d |to allow for nam| 0000c0f0 65 0a 20 20 20 20 20 20 20 20 53 54 52 42 20 20 |e. STRB | 0000c100 20 20 72 32 2c 20 5b 72 30 5d 2c 20 23 31 20 20 | r2, [r0], #1 | 0000c110 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c120 20 20 3b 65 78 74 65 6e 73 69 6f 6e 20 62 79 20 | ;extension by | 0000c130 64 69 72 65 63 74 6f 72 79 20 72 65 70 6c 61 63 |directory replac| 0000c140 65 6d 65 6e 74 20 63 6f 64 65 0a 20 20 20 20 20 |ement code. | 0000c150 20 20 20 43 4d 50 20 20 20 20 20 72 32 2c 20 23 | CMP r2, #| 0000c160 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 0000c170 20 20 20 20 20 20 20 20 20 20 20 3b 41 73 73 75 | ;Assu| 0000c180 6d 65 20 74 65 72 6d 69 6e 61 74 6f 72 20 69 73 |me terminator is| 0000c190 20 30 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 | 0. CMPNE| 0000c1a0 20 20 20 72 30 2c 20 72 31 0a 20 20 20 20 20 20 | r0, r1. | 0000c1b0 20 20 42 4e 45 20 20 20 20 20 69 73 70 69 70 6c | BNE ispipl| 0000c1c0 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |1. CMP | 0000c1d0 20 20 72 30 2c 20 72 31 0a 20 20 20 20 20 20 20 | r0, r1. | 0000c1e0 20 42 45 51 20 20 20 20 20 64 6f 6e 65 5f 69 73 | BEQ done_is| 0000c1f0 70 69 70 72 6f 63 65 73 73 20 20 20 20 20 20 20 |piprocess | 0000c200 20 20 20 20 20 20 20 20 20 3b 69 66 20 63 6f 75 | ;if cou| 0000c210 6c 64 6e 27 74 20 63 6f 70 79 20 76 61 6c 69 64 |ldn't copy valid| 0000c220 61 74 69 6f 6e 20 73 74 72 69 6e 67 20 6f 75 74 |ation string out| 0000c230 2c 20 75 73 65 20 6f 72 69 67 69 6e 61 6c 20 69 |, use original i| 0000c240 63 6f 6e 0a 20 20 20 20 20 20 20 20 41 44 52 4c |con. ADRL| 0000c250 20 20 20 20 72 31 2c 20 77 6f 72 6b 73 70 61 63 | r1, workspac| 0000c260 65 32 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 |e2. STR | 0000c270 20 20 20 72 31 2c 20 69 63 6f 6e 2b 32 34 20 20 | r1, icon+24 | 0000c280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c290 20 20 20 3b 61 6c 74 65 72 20 69 63 6f 6e 20 74 | ;alter icon t| 0000c2a0 6f 20 75 73 65 20 74 68 69 73 20 63 6f 70 69 65 |o use this copie| 0000c2b0 64 20 76 61 6c 69 64 61 74 69 6f 6e 20 73 74 72 |d validation str| 0000c2c0 69 6e 67 0a 0a 64 69 72 63 68 61 6e 67 65 0a 0a |ing..dirchange..| 0000c2d0 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 0000c2e0 6c 72 2c 20 6f 70 74 69 6f 6e 73 20 20 20 20 20 |lr, options | 0000c2f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c300 3b 69 66 20 73 70 72 69 74 65 20 64 69 72 65 63 |;if sprite direc| 0000c310 74 6f 72 79 20 6f 70 74 69 6f 6e 20 6e 6f 74 20 |tory option not | 0000c320 65 6e 61 62 6c 65 64 2c 20 73 6b 69 70 0a 20 20 |enabled, skip. | 0000c330 20 20 20 20 20 20 54 53 54 20 20 20 20 20 6c 72 | TST lr| 0000c340 2c 20 23 31 3c 3c 34 0a 20 20 20 20 20 20 20 20 |, #1<<4. | 0000c350 42 45 51 20 20 20 20 20 64 69 72 63 68 61 6e 67 |BEQ dirchang| 0000c360 65 64 6f 6e 65 0a 20 20 20 20 20 20 20 20 20 20 |edone. | 0000c370 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000c390 20 20 20 20 20 20 3b 6e 62 20 68 61 76 65 20 72 | ;nb have r| 0000c3a0 31 20 70 74 72 20 74 6f 20 6d 6f 64 69 66 69 61 |1 ptr to modifia| 0000c3b0 62 6c 65 20 76 61 6c 69 64 61 74 69 6f 6e 20 73 |ble validation s| 0000c3c0 74 72 69 6e 67 2c 20 26 0a 20 20 20 20 20 20 20 |tring, &. | 0000c3d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000c3f0 20 20 20 20 20 20 20 20 20 3b 66 6c 61 67 73 20 | ;flags | 0000c400 69 6e 20 72 34 2c 20 26 20 72 30 20 70 74 73 20 |in r4, & r0 pts | 0000c410 74 6f 20 76 20 73 74 72 69 6e 67 20 74 65 72 6d |to v string term| 0000c420 20 2b 20 31 0a 20 20 20 20 20 20 20 20 4c 44 4d | + 1. LDM| 0000c430 49 41 20 20 20 72 31 2c 20 7b 72 32 2d 72 34 7d |IA r1, {r2-r4}| 0000c440 0a 20 20 20 20 20 20 20 20 42 49 43 20 20 20 20 |. BIC | 0000c450 20 72 34 2c 20 72 34 2c 20 23 32 35 35 3c 3c 32 | r4, r4, #255<<2| 0000c460 34 0a 20 20 20 20 20 20 20 20 42 49 43 20 20 20 |4. BIC | 0000c470 20 20 72 34 2c 20 72 34 2c 20 23 32 35 35 3c 3c | r4, r4, #255<<| 0000c480 31 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |16 | 0000c490 20 20 3b 74 68 69 73 20 66 6f 72 63 65 73 20 6e | ;this forces n| 0000c4a0 61 6d 65 73 20 64 69 72 65 63 74 6f 72 79 6f 20 |ames directoryo | 0000c4b0 26 20 73 6d 61 6c 6c 5f 64 69 72 6f 20 74 6f 20 |& small_diro to | 0000c4c0 62 65 20 74 72 65 61 74 65 64 0a 20 20 20 20 20 |be treated. | 0000c4d0 20 20 20 41 44 52 20 20 20 20 20 6c 72 2c 20 64 | ADR lr, d| 0000c4e0 74 78 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |txt | 0000c4f0 20 20 20 20 20 20 20 20 20 20 20 3b 61 73 20 66 | ;as f| 0000c500 6f 72 20 64 69 72 65 63 74 6f 72 79 20 26 20 73 |or directory & s| 0000c510 6d 61 6c 6c 5f 64 69 72 20 28 74 68 65 79 20 61 |mall_dir (they a| 0000c520 72 65 20 75 73 65 64 20 62 79 20 6e 65 77 20 66 |re used by new f| 0000c530 69 6c 65 72 29 0a 20 20 20 20 20 20 20 20 4c 44 |iler). LD| 0000c540 4d 49 41 20 20 20 6c 72 2c 20 7b 72 35 2d 72 37 |MIA lr, {r5-r7| 0000c550 7d 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |}. CMP | 0000c560 20 20 72 32 2c 20 72 35 0a 20 20 20 20 20 20 20 | r2, r5. | 0000c570 20 43 4d 50 45 51 20 20 20 72 33 2c 20 72 36 0a | CMPEQ r3, r6.| 0000c580 20 20 20 20 20 20 20 20 43 4d 50 45 51 20 20 20 | CMPEQ | 0000c590 72 34 2c 20 72 37 0a 20 20 20 20 20 20 20 20 41 |r4, r7. A| 0000c5a0 44 52 45 51 20 20 20 6c 72 2c 20 6c 61 73 74 6e |DREQ lr, lastn| 0000c5b0 61 6d 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |ame | 0000c5c0 20 20 20 20 20 20 20 3b 6c 61 73 74 6e 61 6d 65 | ;lastname| 0000c5d0 20 69 73 20 75 73 65 64 20 61 73 20 77 6f 72 6b | is used as work| 0000c5e0 73 70 61 63 65 20 74 6f 20 62 75 69 6c 64 20 6e |space to build n| 0000c5f0 65 77 20 73 70 72 69 74 65 20 6e 61 6d 65 0a 20 |ew sprite name. | 0000c600 20 20 20 20 20 20 20 4d 4f 56 45 51 20 20 20 72 | MOVEQ r| 0000c610 35 2c 20 23 30 20 20 20 20 20 20 20 20 20 20 20 |5, #0 | 0000c620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000c630 74 68 69 73 20 66 6c 61 67 73 20 77 69 6c 6c 20 |this flags will | 0000c640 6f 6e 6c 79 20 61 63 63 65 70 74 20 62 69 67 20 |only accept big | 0000c650 73 70 72 69 74 65 20 28 6f 72 69 67 69 6e 61 6c |sprite (original| 0000c660 20 62 65 69 6e 67 20 27 64 69 72 65 63 74 6f 72 | being 'director| 0000c670 79 27 29 0a 20 20 20 20 20 20 20 20 42 45 51 20 |y'). BEQ | 0000c680 20 20 20 20 64 63 5f 67 6f 74 64 69 72 0a 20 20 | dc_gotdir. | 0000c690 20 20 20 20 20 20 41 44 52 20 20 20 20 20 6c 72 | ADR lr| 0000c6a0 2c 20 73 64 74 78 74 0a 20 20 20 20 20 20 20 20 |, sdtxt. | 0000c6b0 4c 44 4d 49 41 20 20 20 6c 72 2c 20 7b 72 35 2d |LDMIA lr, {r5-| 0000c6c0 72 37 7d 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |r7}. CMP | 0000c6d0 20 20 20 20 72 32 2c 20 72 35 0a 20 20 20 20 20 | r2, r5. | 0000c6e0 20 20 20 43 4d 50 45 51 20 20 20 72 33 2c 20 72 | CMPEQ r3, r| 0000c6f0 36 0a 20 20 20 20 20 20 20 20 43 4d 50 45 51 20 |6. CMPEQ | 0000c700 20 20 72 34 2c 20 72 37 0a 20 20 20 20 20 20 20 | r4, r7. | 0000c710 20 4c 44 52 4e 45 20 20 20 72 34 2c 20 69 63 6f | LDRNE r4, ico| 0000c720 6e 2b 31 36 0a 20 20 20 20 20 20 20 20 42 4e 45 |n+16. BNE| 0000c730 20 20 20 20 20 64 63 5f 63 68 61 6e 67 65 66 69 | dc_changefi| 0000c740 6c 65 73 70 72 69 74 65 6e 61 6d 65 20 20 20 20 |lespritename | 0000c750 20 20 20 20 20 3b 65 6c 73 65 20 67 6f 74 73 64 | ;else gotsd| 0000c760 69 72 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 |ir. ADR | 0000c770 20 20 20 6c 72 2c 20 6c 61 73 74 6e 61 6d 65 2b | lr, lastname+| 0000c780 32 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |2. MOV | 0000c790 20 20 72 35 2c 20 23 31 20 20 20 20 20 20 20 20 | r5, #1 | 0000c7a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c7b0 20 20 3b 74 68 69 73 20 66 6c 61 67 73 20 6c 6f | ;this flags lo| 0000c7c0 6f 6b 20 66 6f 72 20 73 6d 61 6c 6c 2c 20 62 75 |ok for small, bu| 0000c7d0 74 20 69 66 20 6e 6f 74 20 66 6f 75 6e 64 2c 20 |t if not found, | 0000c7e0 74 72 79 20 62 69 67 0a 20 20 20 20 20 20 20 20 |try big. | 0000c7f0 4d 4f 56 20 20 20 20 20 72 32 2c 20 23 27 73 27 |MOV r2, #'s'| 0000c800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c810 20 20 20 20 20 20 20 20 3b 28 61 73 20 6f 72 69 | ;(as ori| 0000c820 67 69 6e 61 6c 20 69 73 20 27 73 6d 61 6c 6c 5f |ginal is 'small_| 0000c830 64 69 72 27 29 0a 20 20 20 20 20 20 20 20 4f 52 |dir'). OR| 0000c840 52 20 20 20 20 20 72 32 2c 20 72 32 2c 20 23 27 |R r2, r2, #'| 0000c850 6d 27 3c 3c 38 0a 20 20 20 20 20 20 20 20 53 54 |m'<<8. ST| 0000c860 52 20 20 20 20 20 72 32 2c 20 6c 61 73 74 6e 61 |R r2, lastna| 0000c870 6d 65 0a 64 63 5f 67 6f 74 64 69 72 0a 20 20 20 |me.dc_gotdir. | 0000c880 20 20 20 20 20 41 44 52 20 20 20 20 20 72 33 2c | ADR r3,| 0000c890 20 6c 61 73 74 6e 61 6d 65 2b 31 32 0a 20 20 20 | lastname+12. | 0000c8a0 20 20 20 20 20 41 44 52 20 20 20 20 20 72 32 2c | ADR r2,| 0000c8b0 20 69 63 6f 6e 2b 31 36 0a 20 20 20 20 20 20 20 | icon+16. | 0000c8c0 20 4c 44 4d 49 41 20 20 20 72 32 2c 20 7b 72 34 | LDMIA r2, {r4| 0000c8d0 2c 20 72 37 7d 20 20 20 20 20 20 20 20 20 20 20 |, r7} | 0000c8e0 20 20 20 20 20 20 20 20 20 3b 72 34 3d 66 6c 61 | ;r4=fla| 0000c8f0 67 73 2c 20 72 37 3d 74 65 78 74 20 62 75 66 66 |gs, r7=text buff| 0000c900 65 72 20 70 74 72 0a 20 20 20 20 20 20 20 20 54 |er ptr. T| 0000c910 53 54 20 20 20 20 20 72 34 2c 20 23 31 3c 3c 32 |ST r4, #1<<2| 0000c920 31 0a 20 20 20 20 20 20 20 20 4d 4f 56 4e 45 20 |1. MOVNE | 0000c930 20 20 72 32 2c 20 23 27 24 27 20 20 20 20 20 20 | r2, #'$' | 0000c940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c950 20 20 3b 69 66 20 69 63 6f 6e 20 73 65 6c 65 63 | ;if icon selec| 0000c960 74 65 64 2c 20 70 75 74 20 61 20 27 24 27 20 69 |ted, put a '$' i| 0000c970 6e 74 6f 20 6e 65 77 20 6e 61 6d 65 0a 20 20 20 |nto new name. | 0000c980 20 20 20 20 20 4d 4f 56 45 51 20 20 20 72 32 2c | MOVEQ r2,| 0000c990 20 23 27 23 27 20 20 20 20 20 20 20 20 20 20 20 | #'#' | 0000c9a0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 65 6c | ;el| 0000c9b0 73 65 20 69 6e 73 65 72 74 20 61 20 27 23 27 0a |se insert a '#'.| 0000c9c0 20 20 20 20 20 20 20 20 4f 52 52 4e 45 20 20 20 | ORRNE | 0000c9d0 72 35 2c 20 72 35 2c 20 23 32 20 20 20 20 20 20 |r5, r5, #2 | 0000c9e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000c9f0 3b 62 69 74 20 31 20 73 65 74 20 69 66 66 20 69 |;bit 1 set iff i| 0000ca00 73 20 73 65 6c 65 63 74 65 64 20 28 74 6f 20 61 |s selected (to a| 0000ca10 6c 6c 6f 77 20 6c 6f 6f 6b 20 66 6f 72 20 23 20 |llow look for # | 0000ca20 69 66 20 6e 6f 20 24 29 0a 20 20 20 20 20 20 20 |if no $). | 0000ca30 20 53 54 52 42 20 20 20 20 72 32 2c 20 5b 6c 72 | STRB r2, [lr| 0000ca40 5d 2c 20 23 31 0a 64 63 6c 31 0a 20 20 20 20 20 |], #1.dcl1. | 0000ca50 20 20 20 4c 44 52 42 20 20 20 20 72 32 2c 20 5b | LDRB r2, [| 0000ca60 72 37 5d 2c 20 23 31 0a 20 20 20 20 20 20 20 20 |r7], #1. | 0000ca70 43 4d 50 20 20 20 20 20 72 32 2c 20 23 33 32 20 |CMP r2, #32 | 0000ca80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000ca90 20 20 20 20 20 20 20 20 3b 6e 65 65 64 20 74 68 | ;need th| 0000caa0 69 73 20 61 73 20 73 65 65 6d 73 20 66 69 6c 65 |is as seems file| 0000cab0 72 20 6d 61 79 20 70 75 74 20 73 70 61 63 65 73 |r may put spaces| 0000cac0 20 61 66 74 65 72 20 74 65 78 74 20 69 6e 20 74 | after text in t| 0000cad0 65 78 74 0a 20 20 20 20 20 20 20 20 4d 4f 56 4c |ext. MOVL| 0000cae0 45 20 20 20 72 32 2c 20 23 30 20 20 20 20 20 20 |E r2, #0 | 0000caf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000cb00 20 20 20 20 3b 62 75 66 66 65 72 2c 20 26 2f 6f | ;buffer, &/o| 0000cb10 72 20 75 73 65 20 74 65 72 6d 69 6e 61 74 6f 72 |r use terminator| 0000cb20 73 20 6f 74 68 65 72 20 74 68 61 6e 20 30 0a 20 |s other than 0. | 0000cb30 20 20 20 20 20 20 20 53 54 52 42 20 20 20 20 72 | STRB r| 0000cb40 32 2c 20 5b 6c 72 5d 2c 20 23 31 0a 20 20 20 20 |2, [lr], #1. | 0000cb50 20 20 20 20 43 4d 50 20 20 20 20 20 72 32 2c 20 | CMP r2, | 0000cb60 23 30 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 |#0. CMPNE| 0000cb70 20 20 20 6c 72 2c 20 72 33 0a 20 20 20 20 20 20 | lr, r3. | 0000cb80 20 20 42 4e 45 20 20 20 20 20 64 63 6c 31 20 20 | BNE dcl1 | 0000cb90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000cba0 20 20 20 20 20 20 20 20 20 20 3b 67 6f 74 20 6e | ;got n| 0000cbb0 65 77 20 6e 61 6d 65 20 74 6f 20 6c 6f 6f 6b 20 |ew name to look | 0000cbc0 66 6f 72 0a 20 20 20 20 20 20 20 20 53 54 4d 46 |for. STMF| 0000cbd0 44 20 20 20 73 70 21 2c 20 7b 72 30 7d 0a 64 63 |D sp!, {r0}.dc| 0000cbe0 5f 74 6f 6d 5f 72 65 65 6e 74 72 79 0a 20 20 20 |_tom_reentry. | 0000cbf0 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c | MOV r0,| 0000cc00 20 23 32 34 0a 20 20 20 20 20 20 20 20 41 44 52 | #24. ADR| 0000cc10 20 20 20 20 20 72 32 2c 20 6c 61 73 74 6e 61 6d | r2, lastnam| 0000cc20 65 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |e. SWI | 0000cc30 20 20 58 57 69 6d 70 5f 53 70 72 69 74 65 4f 70 | XWimp_SpriteOp| 0000cc40 0a 20 20 20 20 20 20 20 20 42 56 43 20 20 20 20 |. BVC | 0000cc50 20 64 63 5f 67 6f 74 6e 61 6d 65 20 20 20 20 20 | dc_gotname | 0000cc60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000cc70 20 3b 70 74 72 20 69 6e 20 72 32 0a 0a 20 20 20 | ;ptr in r2.. | 0000cc80 20 20 20 20 20 54 53 54 20 20 20 20 20 72 35 2c | TST r5,| 0000cc90 20 23 31 0a 20 20 20 20 20 20 20 20 42 45 51 20 | #1. BEQ | 0000cca0 20 20 20 20 64 63 5f 74 72 79 6f 6e 63 65 6d 6f | dc_tryoncemo| 0000ccb0 72 65 0a 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |re.. MOV | 0000ccc0 20 20 20 20 72 30 2c 20 23 32 34 0a 20 20 20 20 | r0, #24. | 0000ccd0 20 20 20 20 41 44 52 4c 20 20 20 20 72 32 2c 20 | ADRL r2, | 0000cce0 6c 61 73 74 6e 61 6d 65 2b 32 20 20 20 20 20 20 |lastname+2 | 0000ccf0 20 20 20 20 20 20 20 20 20 20 20 20 3b 70 74 72 | ;ptr| 0000cd00 20 69 6e 20 72 32 0a 20 20 20 20 20 20 20 20 53 | in r2. S| 0000cd10 57 49 20 20 20 20 20 58 57 69 6d 70 5f 53 70 72 |WI XWimp_Spr| 0000cd20 69 74 65 4f 70 0a 20 20 20 20 20 20 20 20 4f 52 |iteOp. OR| 0000cd30 52 56 43 20 20 20 72 34 2c 20 72 34 2c 20 23 31 |RVC r4, r4, #1| 0000cd40 3c 3c 31 31 20 20 20 20 20 20 20 20 20 20 20 20 |<<11 | 0000cd50 20 20 20 20 20 20 3b 69 66 20 68 61 64 20 74 6f | ;if had to| 0000cd60 20 73 65 74 74 6c 65 20 66 6f 72 20 61 20 62 69 | settle for a bi| 0000cd70 67 20 73 70 72 69 74 65 20 77 68 65 6e 20 77 61 |g sprite when wa| 0000cd80 6e 74 65 64 20 73 6d 61 6c 6c 2c 0a 20 20 20 20 |nted small,. | 0000cd90 20 20 20 20 42 56 43 20 20 20 20 20 64 63 5f 67 | BVC dc_g| 0000cda0 6f 74 6e 61 6d 65 20 20 20 20 20 20 20 20 20 20 |otname | 0000cdb0 20 20 20 20 20 20 20 20 20 20 20 20 3b 73 65 74 | ;set| 0000cdc0 20 66 6c 61 67 20 62 69 74 20 74 6f 20 72 65 6e | flag bit to ren| 0000cdd0 64 65 72 20 69 74 20 61 74 20 68 61 6c 66 20 73 |der it at half s| 0000cde0 69 7a 65 0a 64 63 5f 74 72 79 6f 6e 63 65 6d 6f |ize.dc_tryoncemo| 0000cdf0 72 65 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 |re. TST | 0000ce00 20 20 20 72 35 2c 20 23 32 0a 20 20 20 20 20 20 | r5, #2. | 0000ce10 20 20 4c 44 4d 45 51 46 44 20 73 70 21 2c 20 7b | LDMEQFD sp!, {| 0000ce20 72 30 7d 0a 20 20 20 20 20 20 20 20 42 45 51 20 |r0}. BEQ | 0000ce30 20 20 20 20 64 69 72 63 68 61 6e 67 65 64 6f 6e | dirchangedon| 0000ce40 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 0000ce50 20 20 20 20 3b 69 66 20 69 73 20 23 20 74 79 70 | ;if is # typ| 0000ce60 65 20 26 20 6e 6f 74 20 66 6f 75 6e 64 20 61 62 |e & not found ab| 0000ce70 6f 76 65 2c 20 74 68 65 6e 20 75 73 65 20 6f 6c |ove, then use ol| 0000ce80 64 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |d. MOV | 0000ce90 20 20 72 30 2c 20 23 27 23 27 0a 20 20 20 20 20 | r0, #'#'. | 0000cea0 20 20 20 54 53 54 20 20 20 20 20 72 35 2c 20 23 | TST r5, #| 0000ceb0 31 0a 20 20 20 20 20 20 20 20 53 54 52 45 51 42 |1. STREQB| 0000cec0 20 20 72 30 2c 20 6c 61 73 74 6e 61 6d 65 0a 20 | r0, lastname. | 0000ced0 20 20 20 20 20 20 20 53 54 52 4e 45 42 20 20 72 | STRNEB r| 0000cee0 30 2c 20 6c 61 73 74 6e 61 6d 65 2b 32 0a 20 20 |0, lastname+2. | 0000cef0 20 20 20 20 20 20 42 49 43 20 20 20 20 20 72 35 | BIC r5| 0000cf00 2c 20 72 35 2c 20 23 32 20 20 20 20 20 20 20 20 |, r5, #2 | 0000cf10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 63 | ;c| 0000cf20 6c 65 61 72 20 62 69 74 20 31 2c 20 73 6f 20 69 |lear bit 1, so i| 0000cf30 66 20 6e 6f 74 20 66 6f 75 6e 64 20 74 68 69 73 |f not found this| 0000cf40 20 63 6f 64 65 20 77 6f 6e 27 74 20 6b 65 65 70 | code won't keep| 0000cf50 20 6c 6f 6f 70 69 6e 67 0a 20 20 20 20 20 20 20 | looping. | 0000cf60 20 4f 52 52 20 20 20 20 20 72 35 2c 20 72 35 2c | ORR r5, r5,| 0000cf70 20 23 34 20 20 20 20 20 20 20 20 20 20 20 20 20 | #4 | 0000cf80 20 20 20 20 20 20 20 20 20 3b 73 65 74 20 61 6e | ;set an| 0000cf90 6f 74 68 65 72 20 62 69 74 2c 20 73 6f 20 69 66 |other bit, so if| 0000cfa0 20 66 6f 75 6e 64 2c 20 63 61 6e 20 61 76 6f 69 | found, can avoi| 0000cfb0 64 20 6d 61 6e 75 61 6c 20 69 6e 76 65 72 73 69 |d manual inversi| 0000cfc0 6f 6e 0a 20 20 20 20 20 20 20 20 42 20 20 20 20 |on. B | 0000cfd0 20 20 20 64 63 5f 74 6f 6d 5f 72 65 65 6e 74 72 | dc_tom_reentr| 0000cfe0 79 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |y | 0000cff0 20 20 20 3b 69 65 20 69 66 20 6e 6f 20 24 20 73 | ;ie if no $ s| 0000d000 70 72 69 74 65 73 2c 20 75 73 65 20 23 20 73 70 |prites, use # sp| 0000d010 72 69 74 65 73 20 61 67 61 69 6e 2c 20 62 75 74 |rites again, but| 0000d020 20 77 69 74 68 20 73 65 6c 65 63 74 65 64 0a 20 | with selected. | 0000d030 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000d050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000d060 20 20 20 62 69 74 20 73 65 74 20 61 73 20 66 6f | bit set as fo| 0000d070 72 20 6e 6f 72 6d 61 6c 20 66 69 6c 65 20 69 63 |r normal file ic| 0000d080 6f 6e 73 0a 64 63 5f 67 6f 74 6e 61 6d 65 0a 20 |ons.dc_gotname. | 0000d090 20 20 20 20 20 20 20 54 53 54 20 20 20 20 20 72 | TST r| 0000d0a0 35 2c 20 23 34 0a 20 20 20 20 20 20 20 20 42 4e |5, #4. BN| 0000d0b0 45 20 20 20 20 20 64 63 5f 69 6e 76 64 6f 6e 65 |E dc_invdone| 0000d0c0 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 20 20 |. TST | 0000d0d0 20 72 34 2c 20 23 31 3c 3c 32 31 20 20 20 20 20 | r4, #1<<21 | 0000d0e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d0f0 20 3b 69 66 20 69 63 6f 6e 20 73 65 6c 65 63 74 | ;if icon select| 0000d100 65 64 20 73 77 61 70 20 66 6f 72 65 2f 62 61 63 |ed swap fore/bac| 0000d110 6b 20 63 6f 6c 6f 75 72 73 2c 20 73 6f 20 74 65 |k colours, so te| 0000d120 78 74 20 70 61 72 74 20 73 74 69 6c 6c 0a 20 20 |xt part still. | 0000d130 20 20 20 20 20 20 42 45 51 20 20 20 20 20 64 63 | BEQ dc| 0000d140 5f 63 6f 6c 73 73 77 61 70 70 65 64 20 20 20 20 |_colsswapped | 0000d150 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 6c | ;l| 0000d160 6f 6f 6b 73 20 69 6e 76 65 72 74 65 64 20 65 76 |ooks inverted ev| 0000d170 65 6e 20 74 68 6f 75 67 68 20 61 6d 20 67 6f 69 |en though am goi| 0000d180 6e 67 20 74 6f 20 74 75 72 6e 20 73 65 6c 65 63 |ng to turn selec| 0000d190 74 65 64 20 62 69 74 20 6f 66 66 0a 20 20 20 20 |ted bit off. | 0000d1a0 20 20 20 20 54 53 54 20 20 20 20 20 72 34 2c 20 | TST r4, | 0000d1b0 23 32 5f 30 30 31 30 30 30 30 30 30 20 20 20 20 |#2_001000000 | 0000d1c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 28 74 6f | ;(to| 0000d1d0 20 73 74 6f 70 20 73 70 72 69 74 65 20 70 61 72 | stop sprite par| 0000d1e0 74 20 62 65 69 6e 67 20 69 6e 76 65 72 74 65 64 |t being inverted| 0000d1f0 20 61 73 20 77 65 6c 6c 29 0a 20 20 20 20 20 20 | as well). | 0000d200 20 20 41 4e 44 45 51 20 20 20 72 30 2c 20 72 34 | ANDEQ r0, r4| 0000d210 2c 20 23 31 35 2a 28 31 3c 3c 32 38 29 20 20 20 |, #15*(1<<28) | 0000d220 20 20 20 20 20 20 20 20 20 20 3b 69 66 20 61 6c | ;if al| 0000d230 72 65 61 64 79 20 61 6e 74 69 61 6c 69 61 73 65 |ready antialiase| 0000d240 64 2c 20 63 61 6e 27 74 20 73 77 61 70 20 63 6f |d, can't swap co| 0000d250 6c 6f 75 72 73 20 74 68 69 73 20 77 61 79 20 2d |lours this way -| 0000d260 20 73 68 6f 75 6c 64 0a 20 20 20 20 20 20 20 20 | should. | 0000d270 41 4e 44 45 51 20 20 20 72 36 2c 20 72 34 2c 20 |ANDEQ r6, r4, | 0000d280 23 31 35 2a 28 31 3c 3c 32 34 29 20 20 20 20 20 |#15*(1<<24) | 0000d290 20 20 20 20 20 20 20 20 3b 64 6f 20 73 6f 20 76 | ;do so v| 0000d2a0 69 61 20 76 61 6c 20 73 74 72 2c 20 62 75 74 20 |ia val str, but | 0000d2b0 6e 6f 74 20 6c 69 6b 65 6c 79 20 74 6f 20 6f 63 |not likely to oc| 0000d2c0 63 75 72 2c 20 73 6f 20 6a 75 73 74 20 69 67 6e |cur, so just ign| 0000d2d0 6f 72 65 0a 20 20 20 20 20 20 20 20 42 49 43 45 |ore. BICE| 0000d2e0 51 20 20 20 72 34 2c 20 72 34 2c 20 23 32 35 35 |Q r4, r4, #255| 0000d2f0 2a 28 31 3c 3c 32 34 29 0a 20 20 20 20 20 20 20 |*(1<<24). | 0000d300 20 4f 52 52 45 51 20 20 20 72 34 2c 20 72 34 2c | ORREQ r4, r4,| 0000d310 20 72 30 2c 20 4c 53 52 20 23 34 0a 20 20 20 20 | r0, LSR #4. | 0000d320 20 20 20 20 4f 52 52 45 51 20 20 20 72 34 2c 20 | ORREQ r4, | 0000d330 72 34 2c 20 72 36 2c 20 4c 53 4c 20 23 34 0a 64 |r4, r6, LSL #4.d| 0000d340 63 5f 63 6f 6c 73 73 77 61 70 70 65 64 0a 20 20 |c_colsswapped. | 0000d350 20 20 20 20 20 20 42 49 43 20 20 20 20 20 72 34 | BIC r4| 0000d360 2c 20 72 34 2c 20 23 31 3c 3c 32 31 20 20 20 20 |, r4, #1<<21 | 0000d370 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 63 | ;c| 0000d380 6c 65 61 72 20 73 65 6c 65 63 74 65 64 20 62 69 |lear selected bi| 0000d390 74 20 69 6e 63 61 73 65 20 69 73 20 73 65 6c 65 |t incase is sele| 0000d3a0 63 74 65 64 20 28 61 6d 20 6e 6f 77 20 75 73 69 |cted (am now usi| 0000d3b0 6e 67 20 74 77 6f 0a 64 63 5f 69 6e 76 64 6f 6e |ng two.dc_invdon| 0000d3c0 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 0000d3d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d3e0 20 20 20 20 20 20 20 3b 20 64 69 66 66 65 72 65 | ; differe| 0000d3f0 6e 74 20 73 70 72 69 74 65 73 20 74 6f 20 69 6e |nt sprites to in| 0000d400 64 69 63 61 74 65 20 77 68 65 74 68 65 72 20 73 |dicate whether s| 0000d410 65 6c 65 63 74 65 64 20 6f 72 20 6e 6f 74 29 0a |elected or not).| 0000d420 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 | ADD | 0000d430 73 70 2c 20 73 70 2c 20 23 34 20 20 20 20 20 20 |sp, sp, #4 | 0000d440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d450 3b 64 6f 6e 27 74 20 6e 65 65 64 20 6f 6c 64 20 |;don't need old | 0000d460 76 20 73 74 72 69 6e 67 20 74 61 69 6c 20 70 74 |v string tail pt| 0000d470 72 2c 20 73 6f 20 64 72 6f 70 20 6f 66 66 20 73 |r, so drop off s| 0000d480 74 61 63 6b 0a 20 20 20 20 20 20 20 20 4c 44 52 |tack. LDR| 0000d490 20 20 20 20 20 72 30 2c 20 69 63 6f 6e 2b 32 34 | r0, icon+24| 0000d4a0 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 |. ADD | 0000d4b0 20 72 30 2c 20 72 30 2c 20 23 31 0a 64 63 6c 32 | r0, r0, #1.dcl2| 0000d4c0 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 |. LDRB | 0000d4d0 20 72 31 2c 20 5b 72 32 5d 2c 20 23 31 20 20 20 | r1, [r2], #1 | 0000d4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d4f0 20 3b 63 6f 70 79 20 6e 65 77 20 6e 61 6d 65 20 | ;copy new name | 0000d500 69 6e 74 6f 20 76 61 6c 69 64 61 74 69 6f 6e 20 |into validation | 0000d510 73 74 72 69 6e 67 0a 20 20 20 20 20 20 20 20 53 |string. S| 0000d520 54 52 42 20 20 20 20 72 31 2c 20 5b 72 30 5d 2c |TRB r1, [r0],| 0000d530 20 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 | #1. CMP | 0000d540 20 20 20 20 72 31 2c 20 23 30 0a 20 20 20 20 20 | r1, #0. | 0000d550 20 20 20 42 4e 45 20 20 20 20 20 64 63 6c 32 0a | BNE dcl2.| 0000d560 20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 20 | B | 0000d570 64 69 72 63 68 61 6e 67 65 64 6f 6e 65 0a 0a 64 |dirchangedone..d| 0000d580 63 5f 63 68 61 6e 67 65 66 69 6c 65 73 70 72 69 |c_changefilespri| 0000d590 74 65 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 4c |tename. L| 0000d5a0 44 52 20 20 20 20 20 72 31 2c 20 69 63 6f 6e 2b |DR r1, icon+| 0000d5b0 32 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |20 | 0000d5c0 20 20 20 20 20 20 20 3b 74 65 78 74 20 70 74 72 | ;text ptr| 0000d5d0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 0000d5e0 20 72 32 2c 20 72 31 0a 64 63 6c 33 20 20 20 20 | r2, r1.dcl3 | 0000d5f0 4c 44 52 42 20 20 20 20 72 33 2c 20 5b 72 32 5d |LDRB r3, [r2]| 0000d600 2c 20 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 |, #1. CMP| 0000d610 20 20 20 20 20 72 33 2c 20 23 33 32 0a 20 20 20 | r3, #32. | 0000d620 20 20 20 20 20 42 47 54 20 20 20 20 20 64 63 6c | BGT dcl| 0000d630 33 0a 20 20 20 20 20 20 20 20 53 55 42 20 20 20 |3. SUB | 0000d640 20 20 72 32 2c 20 72 32 2c 20 23 31 20 20 20 20 | r2, r2, #1 | 0000d650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d660 20 20 3b 72 32 20 70 74 73 20 74 6f 20 74 65 78 | ;r2 pts to tex| 0000d670 74 20 74 65 72 6d 69 6e 61 74 6f 72 0a 20 20 20 |t terminator. | 0000d680 20 20 20 20 20 53 55 42 20 20 20 20 20 72 35 2c | SUB r5,| 0000d690 20 72 32 2c 20 72 31 20 20 20 20 20 20 20 20 20 | r2, r1 | 0000d6a0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 23 20 | ;# | 0000d6b0 63 68 61 72 73 20 69 6e 20 74 65 78 74 0a 20 20 |chars in text. | 0000d6c0 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 35 | CMP r5| 0000d6d0 2c 20 23 34 0a 20 20 20 20 20 20 20 20 42 4c 54 |, #4. BLT| 0000d6e0 20 20 20 20 20 64 69 72 63 68 61 6e 67 65 64 6f | dirchangedo| 0000d6f0 6e 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ne | 0000d700 20 20 20 20 20 3b 69 66 20 6c 65 73 73 20 74 68 | ;if less th| 0000d710 61 6e 20 34 20 63 68 61 72 73 2c 20 63 61 6e 27 |an 4 chars, can'| 0000d720 74 20 65 6e 64 20 69 6e 20 6f 75 72 20 61 66 66 |t end in our aff| 0000d730 69 78 20 2f 3c 61 62 63 3e 0a 20 20 20 20 20 20 |ix /<abc>. | 0000d740 20 20 4c 44 52 42 20 20 20 20 72 33 2c 20 5b 72 | LDRB r3, [r| 0000d750 32 2c 20 23 2d 34 5d 0a 20 20 20 20 20 20 20 20 |2, #-4]. | 0000d760 43 4d 50 20 20 20 20 20 72 33 2c 20 23 27 2f 27 |CMP r3, #'/'| 0000d770 0a 3b 20 20 20 20 20 20 20 43 4d 50 4e 45 20 20 |.; CMPNE | 0000d780 20 72 33 2c 20 23 27 5c 27 20 20 20 20 20 20 20 | r3, #'\' | 0000d790 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d7a0 20 3b 72 65 6d 6f 76 65 64 20 69 6e 20 76 20 31 | ;removed in v 1| 0000d7b0 2e 35 34 20 2d 20 73 65 65 20 48 69 73 74 6f 72 |.54 - see Histor| 0000d7c0 79 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 |y. BNE | 0000d7d0 20 20 64 69 72 63 68 61 6e 67 65 64 6f 6e 65 20 | dirchangedone | 0000d7e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d7f0 20 20 3b 6e 6f 74 20 6f 75 72 20 61 66 66 69 78 | ;not our affix| 0000d800 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 0000d810 20 72 35 2c 20 69 63 6f 6e 2b 32 34 20 20 20 20 | r5, icon+24 | 0000d820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000d830 20 3b 76 61 6c 69 64 20 73 74 72 20 70 74 72 0a | ;valid str ptr.| 0000d840 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 | LDRB | 0000d850 72 33 2c 20 5b 72 35 5d 2c 20 23 31 0a 20 20 20 |r3, [r5], #1. | 0000d860 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 33 2c | CMP r3,| 0000d870 20 23 27 73 27 0a 20 20 20 20 20 20 20 20 42 4e | #'s'. BN| 0000d880 45 20 20 20 20 20 64 69 72 63 68 61 6e 67 65 64 |E dirchanged| 0000d890 6f 6e 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |one | 0000d8a0 20 20 20 20 20 20 3b 69 6e 20 63 61 73 65 20 64 | ;in case d| 0000d8b0 6f 65 73 6e 27 74 20 73 74 61 72 74 20 77 69 74 |oesn't start wit| 0000d8c0 68 20 73 70 72 69 74 65 20 6e 61 6d 65 2c 20 67 |h sprite name, g| 0000d8d0 65 74 20 6f 75 74 20 6e 6f 77 0a 20 20 20 20 20 |et out now. | 0000d8e0 20 20 20 41 44 52 20 20 20 20 20 72 31 2c 20 6c | ADR r1, l| 0000d8f0 61 73 74 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 |astname. | 0000d900 41 44 52 20 20 20 20 20 72 36 2c 20 6c 61 73 74 |ADR r6, last| 0000d910 6e 61 6d 65 2b 31 32 0a 64 63 6c 34 0a 20 20 20 |name+12.dcl4. | 0000d920 20 20 20 20 20 4c 44 52 42 20 20 20 20 72 33 2c | LDRB r3,| 0000d930 20 5b 72 35 5d 2c 20 23 31 0a 20 20 20 20 20 20 | [r5], #1. | 0000d940 20 20 43 4d 50 20 20 20 20 20 72 33 2c 20 23 27 | CMP r3, #'| 0000d950 3b 27 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 |;'. CMPNE| 0000d960 20 20 20 72 33 2c 20 23 33 31 0a 20 20 20 20 20 | r3, #31. | 0000d970 20 20 20 4d 4f 56 4c 45 20 20 20 72 33 2c 20 23 | MOVLE r3, #| 0000d980 30 0a 20 20 20 20 20 20 20 20 53 55 42 4c 45 20 |0. SUBLE | 0000d990 20 20 72 35 2c 20 72 35 2c 20 23 31 0a 20 20 20 | r5, r5, #1. | 0000d9a0 20 20 20 20 20 53 54 52 42 20 20 20 20 72 33 2c | STRB r3,| 0000d9b0 20 5b 72 31 5d 2c 20 23 31 0a 20 20 20 20 20 20 | [r1], #1. | 0000d9c0 20 20 53 55 42 4c 45 20 20 20 72 31 2c 20 72 31 | SUBLE r1, r1| 0000d9d0 2c 20 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 |, #1. CMP| 0000d9e0 47 54 20 20 20 72 36 2c 20 72 31 0a 20 20 20 20 |GT r6, r1. | 0000d9f0 20 20 20 20 42 47 54 20 20 20 20 20 64 63 6c 34 | BGT dcl4| 0000da00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000da10 20 20 20 20 20 20 20 20 20 20 20 20 3b 65 6c 73 | ;els| 0000da20 65 20 72 35 20 70 74 73 20 74 6f 20 74 65 72 6d |e r5 pts to term| 0000da30 20 6f 66 20 73 70 72 20 6e 61 6d 65 20 69 6e 20 | of spr name in | 0000da40 76 61 6c 20 73 74 72 20 26 20 72 31 20 70 74 73 |val str & r1 pts| 0000da50 20 74 6f 20 74 65 72 6d 20 69 6e 20 62 75 66 66 | to term in buff| 0000da60 65 72 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 |er. LDRB | 0000da70 20 20 20 72 33 2c 20 5b 72 32 2c 20 23 2d 34 5d | r3, [r2, #-4]| 0000da80 0a 20 20 20 20 20 20 20 20 53 54 52 42 20 20 20 |. STRB | 0000da90 20 72 33 2c 20 5b 72 31 2c 20 23 2d 34 5d 0a 20 | r3, [r1, #-4]. | 0000daa0 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 72 | LDRB r| 0000dab0 33 2c 20 5b 72 32 2c 20 23 2d 33 5d 0a 20 20 20 |3, [r2, #-3]. | 0000dac0 20 20 20 20 20 53 54 52 42 20 20 20 20 72 33 2c | STRB r3,| 0000dad0 20 5b 72 31 2c 20 23 2d 33 5d 0a 20 20 20 20 20 | [r1, #-3]. | 0000dae0 20 20 20 4c 44 52 42 20 20 20 20 72 33 2c 20 5b | LDRB r3, [| 0000daf0 72 32 2c 20 23 2d 32 5d 0a 20 20 20 20 20 20 20 |r2, #-2]. | 0000db00 20 53 54 52 42 20 20 20 20 72 33 2c 20 5b 72 31 | STRB r3, [r1| 0000db10 2c 20 23 2d 32 5d 0a 20 20 20 20 20 20 20 20 4c |, #-2]. L| 0000db20 44 52 42 20 20 20 20 72 33 2c 20 5b 72 32 2c 20 |DRB r3, [r2, | 0000db30 23 2d 31 5d 0a 20 20 20 20 20 20 20 20 53 54 52 |#-1]. STR| 0000db40 42 20 20 20 20 72 33 2c 20 5b 72 31 2c 20 23 2d |B r3, [r1, #-| 0000db50 31 5d 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |1]. MOV | 0000db60 20 20 20 72 36 2c 20 72 30 20 20 20 20 20 20 20 | r6, r0 | 0000db70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000db80 20 20 20 3b 6d 75 73 74 20 72 65 73 74 6f 72 65 | ;must restore| 0000db90 20 74 68 69 73 20 61 66 74 65 72 20 53 57 49 0a | this after SWI.| 0000dba0 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 0000dbb0 72 37 2c 20 72 32 0a 20 20 20 20 20 20 20 20 4d |r7, r2. M| 0000dbc0 4f 56 20 20 20 20 20 72 30 2c 20 23 32 34 0a 20 |OV r0, #24. | 0000dbd0 20 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 | ADR r| 0000dbe0 32 2c 20 6c 61 73 74 6e 61 6d 65 0a 20 20 20 20 |2, lastname. | 0000dbf0 20 20 20 20 53 57 49 20 20 20 20 20 58 57 69 6d | SWI XWim| 0000dc00 70 5f 53 70 72 69 74 65 4f 70 0a 20 20 20 20 20 |p_SpriteOp. | 0000dc10 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 72 | MOV r0, r| 0000dc20 36 0a 20 20 20 20 20 20 20 20 42 56 53 20 20 20 |6. BVS | 0000dc30 20 20 64 69 72 63 68 61 6e 67 65 64 6f 6e 65 20 | dirchangedone | 0000dc40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000dc50 20 20 3b 63 6f 75 6c 64 6e 27 74 20 66 69 6e 64 | ;couldn't find| 0000dc60 20 73 70 72 69 74 65 2c 20 73 6f 20 67 65 74 20 | sprite, so get | 0000dc70 6f 75 74 0a 20 20 20 20 20 20 20 20 4c 44 52 42 |out. LDRB| 0000dc80 20 20 20 20 72 33 2c 20 5b 72 37 2c 20 23 2d 34 | r3, [r7, #-4| 0000dc90 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 0000dca0 20 20 20 20 3b 65 6c 73 65 20 63 6f 70 79 20 61 | ;else copy a| 0000dcb0 66 66 69 78 20 69 6e 74 6f 20 76 61 6c 20 73 74 |ffix into val st| 0000dcc0 72 69 6e 67 2c 20 6f 76 65 72 77 72 69 74 69 6e |ring, overwritin| 0000dcd0 67 20 65 6e 64 20 6f 66 20 73 70 72 69 74 65 20 |g end of sprite | 0000dce0 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 53 54 52 |name. STR| 0000dcf0 42 20 20 20 20 72 33 2c 20 5b 72 35 2c 20 23 2d |B r3, [r5, #-| 0000dd00 34 5d 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 |4]. LDRB | 0000dd10 20 20 20 72 33 2c 20 5b 72 37 2c 20 23 2d 33 5d | r3, [r7, #-3]| 0000dd20 0a 20 20 20 20 20 20 20 20 53 54 52 42 20 20 20 |. STRB | 0000dd30 20 72 33 2c 20 5b 72 35 2c 20 23 2d 33 5d 0a 20 | r3, [r5, #-3]. | 0000dd40 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 72 | LDRB r| 0000dd50 33 2c 20 5b 72 37 2c 20 23 2d 32 5d 0a 20 20 20 |3, [r7, #-2]. | 0000dd60 20 20 20 20 20 53 54 52 42 20 20 20 20 72 33 2c | STRB r3,| 0000dd70 20 5b 72 35 2c 20 23 2d 32 5d 0a 20 20 20 20 20 | [r5, #-2]. | 0000dd80 20 20 20 4c 44 52 42 20 20 20 20 72 33 2c 20 5b | LDRB r3, [| 0000dd90 72 37 2c 20 23 2d 31 5d 0a 20 20 20 20 20 20 20 |r7, #-1]. | 0000dda0 20 53 54 52 42 20 20 20 20 72 33 2c 20 5b 72 35 | STRB r3, [r5| 0000ddb0 2c 20 23 2d 31 5d 0a 0a 64 69 72 63 68 61 6e 67 |, #-1]..dirchang| 0000ddc0 65 64 6f 6e 65 20 20 20 20 20 20 20 20 20 20 20 |edone | 0000ddd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000dde0 20 20 20 20 20 20 20 20 3b 6d 75 73 74 20 68 61 | ;must ha| 0000ddf0 76 65 20 70 72 65 73 65 72 76 65 64 20 72 34 2c |ve preserved r4,| 0000de00 20 26 20 72 30 20 6d 75 73 74 20 70 74 20 74 6f | & r0 must pt to| 0000de10 20 76 20 73 74 72 69 6e 67 20 74 65 72 6d 20 2b | v string term +| 0000de20 20 31 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 | 1. STR | 0000de30 20 20 20 72 34 2c 20 69 63 6f 6e 2b 31 36 20 20 | r4, icon+16 | 0000de40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000de50 20 20 20 3b 6e 65 65 64 65 64 20 69 66 20 66 61 | ;needed if fa| 0000de60 6e 63 79 20 74 65 78 74 20 6f 70 74 69 6f 6e 20 |ncy text option | 0000de70 6e 6f 74 20 73 65 6c 65 63 74 65 64 0a 0a 20 20 |not selected.. | 0000de80 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 6c 72 | LDR lr| 0000de90 2c 20 6f 70 74 69 6f 6e 73 20 20 20 20 20 20 20 |, options | 0000dea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 | ;i| 0000deb0 66 20 66 61 6e 63 79 20 66 69 6c 65 72 20 69 63 |f fancy filer ic| 0000dec0 6f 6e 20 74 65 78 74 20 6e 6f 74 20 65 6e 61 62 |on text not enab| 0000ded0 6c 65 64 2c 20 64 6f 6e 27 74 20 63 6f 6e 76 65 |led, don't conve| 0000dee0 72 74 20 74 6f 20 69 74 0a 20 20 20 20 20 20 20 |rt to it. | 0000def0 20 54 53 54 20 20 20 20 20 6c 72 2c 20 23 31 3c | TST lr, #1<| 0000df00 3c 33 0a 20 20 20 20 20 20 20 20 42 45 51 20 20 |<3. BEQ | 0000df10 20 20 20 64 6f 6e 65 5f 69 73 70 69 70 72 6f 63 | done_ispiproc| 0000df20 65 73 73 0a 0a 20 20 20 20 20 20 20 20 54 53 54 |ess.. TST| 0000df30 20 20 20 20 20 72 34 2c 20 23 32 5f 30 30 31 30 | r4, #2_0010| 0000df40 30 30 30 30 30 20 20 20 20 20 20 20 20 20 20 20 |00000 | 0000df50 20 20 20 20 20 3b 20 6e 6f 74 20 61 6c 72 65 61 | ; not alrea| 0000df60 64 79 20 61 6e 74 69 61 6c 69 61 73 65 64 3f 0a |dy antialiased?.| 0000df70 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 | BNE | 0000df80 64 6f 6e 65 5f 69 73 70 69 70 72 6f 63 65 73 73 |done_ispiprocess| 0000df90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000dfa0 3b 20 69 66 20 61 6c 72 65 61 64 79 20 61 6e 74 |; if already ant| 0000dfb0 69 61 6c 69 61 73 65 64 2c 20 73 6b 69 70 20 6d |ialiased, skip m| 0000dfc0 61 6b 65 20 66 61 6e 63 79 0a 0a 20 20 20 20 20 |ake fancy.. | 0000dfd0 20 20 20 53 55 42 20 20 20 20 20 72 30 2c 20 72 | SUB r0, r| 0000dfe0 30 2c 20 23 31 0a 20 20 20 20 20 20 20 20 4d 4f |0, #1. MO| 0000dff0 56 20 20 20 20 20 72 31 2c 20 23 27 3b 27 0a 20 |V r1, #';'. | 0000e000 20 20 20 20 20 20 20 53 54 52 42 20 20 20 20 72 | STRB r| 0000e010 31 2c 20 5b 72 30 5d 2c 20 23 31 0a 20 20 20 20 |1, [r0], #1. | 0000e020 20 20 20 20 4d 4f 56 20 20 20 20 20 72 31 2c 20 | MOV r1, | 0000e030 23 27 46 27 0a 20 20 20 20 20 20 20 20 53 54 52 |#'F'. STR| 0000e040 42 20 20 20 20 72 31 2c 20 5b 72 30 5d 2c 20 23 |B r1, [r0], #| 0000e050 31 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |1. MOV | 0000e060 20 20 72 31 2c 20 72 34 2c 20 4c 53 52 20 23 32 | r1, r4, LSR #2| 0000e070 38 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |8 | 0000e080 20 20 3b 65 78 74 72 61 63 74 20 62 61 63 6b 67 | ;extract backg| 0000e090 72 6f 75 6e 64 20 63 6f 6c 6f 75 72 0a 20 20 20 |round colour. | 0000e0a0 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c | CMP r1,| 0000e0b0 20 23 39 0a 20 20 20 20 20 20 20 20 41 44 44 47 | #9. ADDG| 0000e0c0 54 20 20 20 72 31 2c 20 72 31 2c 20 23 27 61 27 |T r1, r1, #'a'| 0000e0d0 2d 27 39 27 2d 31 0a 20 20 20 20 20 20 20 20 41 |-'9'-1. A| 0000e0e0 44 44 20 20 20 20 20 72 31 2c 20 72 31 2c 20 23 |DD r1, r1, #| 0000e0f0 27 30 27 0a 20 20 20 20 20 20 20 20 53 54 52 42 |'0'. STRB| 0000e100 20 20 20 20 72 31 2c 20 5b 72 30 5d 2c 20 23 31 | r1, [r0], #1| 0000e110 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 0000e120 20 72 31 2c 20 72 34 2c 20 4c 53 52 20 23 32 34 | r1, r4, LSR #24| 0000e130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000e140 20 3b 65 78 74 72 61 63 74 20 66 6f 72 65 67 72 | ;extract foregr| 0000e150 6f 75 6e 64 20 63 6f 6c 6f 75 72 0a 20 20 20 20 |ound colour. | 0000e160 20 20 20 20 41 4e 44 20 20 20 20 20 72 31 2c 20 | AND r1, | 0000e170 72 31 2c 20 23 31 35 0a 20 20 20 20 20 20 20 20 |r1, #15. | 0000e180 43 4d 50 20 20 20 20 20 72 31 2c 20 23 39 0a 20 |CMP r1, #9. | 0000e190 20 20 20 20 20 20 20 41 44 44 47 54 20 20 20 72 | ADDGT r| 0000e1a0 31 2c 20 72 31 2c 20 23 27 61 27 2d 27 39 27 2d |1, r1, #'a'-'9'-| 0000e1b0 31 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 |1. ADD | 0000e1c0 20 20 72 31 2c 20 72 31 2c 20 23 27 30 27 0a 20 | r1, r1, #'0'. | 0000e1d0 20 20 20 20 20 20 20 53 54 52 42 20 20 20 20 72 | STRB r| 0000e1e0 31 2c 20 5b 72 30 5d 2c 20 23 31 0a 20 20 20 20 |1, [r0], #1. | 0000e1f0 20 20 20 20 4d 4f 56 20 20 20 20 20 72 31 2c 20 | MOV r1, | 0000e200 23 30 0a 20 20 20 20 20 20 20 20 53 54 52 42 20 |#0. STRB | 0000e210 20 20 20 72 31 2c 20 5b 72 30 5d 20 20 20 20 20 | r1, [r0] | 0000e220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000e230 20 20 20 3b 6e 65 77 20 76 61 6c 69 64 61 74 69 | ;new validati| 0000e240 6f 6e 20 73 74 72 69 6e 67 20 77 72 69 74 74 65 |on string writte| 0000e250 6e 2c 20 6e 6f 77 20 73 65 74 74 69 6e 67 20 66 |n, now setting f| 0000e260 6f 6e 74 20 63 6f 6c 6f 75 72 73 0a 0a 20 20 20 |ont colours.. | 0000e270 20 20 20 20 20 42 49 43 20 20 20 20 20 72 34 2c | BIC r4,| 0000e280 20 72 34 2c 20 23 32 35 35 3c 3c 32 34 0a 20 20 | r4, #255<<24. | 0000e290 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 31 | LDR r1| 0000e2a0 2c 20 66 6f 6e 74 68 61 6e 64 6c 65 0a 20 20 20 |, fonthandle. | 0000e2b0 20 20 20 20 20 4f 52 52 20 20 20 20 20 72 34 2c | ORR r4,| 0000e2c0 20 72 34 2c 20 72 31 2c 20 4c 53 4c 20 23 32 34 | r4, r1, LSL #24| 0000e2d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 70 75 | ;pu| 0000e2e0 74 20 66 6f 6e 74 20 68 61 6e 64 6c 65 20 69 6e |t font handle in| 0000e2f0 74 6f 20 66 6c 61 67 73 0a 20 20 20 20 20 20 20 |to flags. | 0000e300 20 4f 52 52 20 20 20 20 20 72 34 2c 20 72 34 2c | ORR r4, r4,| 0000e310 20 23 31 3c 3c 36 20 20 20 20 20 20 20 20 20 20 | #1<<6 | 0000e320 20 20 20 20 20 20 20 20 20 3b 73 65 74 20 66 61 | ;set fa| 0000e330 6e 63 79 20 66 6f 6e 74 20 62 69 74 0a 20 20 20 |ncy font bit. | 0000e340 20 20 20 20 20 54 53 54 20 20 20 20 20 72 34 2c | TST r4,| 0000e350 20 23 31 3c 3c 34 20 20 20 20 20 20 20 20 20 20 | #1<<4 | 0000e360 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 66 | ;if| 0000e370 20 76 65 72 74 69 63 61 6c 6c 79 20 63 65 6e 74 | vertically cent| 0000e380 72 65 64 2c 20 74 68 65 6e 20 69 73 20 73 6d 61 |red, then is sma| 0000e390 6c 6c 20 64 69 73 70 6c 61 79 2c 20 73 6f 20 6e |ll display, so n| 0000e3a0 65 65 64 20 74 6f 0a 20 20 20 20 20 20 20 20 42 |eed to. B| 0000e3b0 49 43 4e 45 20 20 20 72 34 2c 20 72 34 2c 20 23 |ICNE r4, r4, #| 0000e3c0 28 31 3c 3c 39 29 2b 28 31 3c 3c 33 29 20 20 20 |(1<<9)+(1<<3) | 0000e3d0 20 20 20 20 20 20 20 3b 74 75 72 6e 20 72 69 67 | ;turn rig| 0000e3e0 68 74 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e |ht justification| 0000e3f0 20 26 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 63 65 | & horizontal ce| 0000e400 6e 74 72 69 6e 67 20 6f 66 66 0a 20 20 20 20 20 |ntring off. | 0000e410 20 20 20 53 54 52 20 20 20 20 20 72 34 2c 20 69 | STR r4, i| 0000e420 63 6f 6e 2b 31 36 0a 0a 64 6f 6e 65 5f 69 73 70 |con+16..done_isp| 0000e430 69 70 72 6f 63 65 73 73 0a 20 20 20 20 20 20 20 |iprocess. | 0000e440 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 | LDMFD sp!, {r| 0000e450 30 2c 72 32 2d 72 37 7d 0a 20 20 20 20 20 20 20 |0,r2-r7}. | 0000e460 20 41 44 52 20 20 20 20 20 72 31 2c 20 69 63 6f | ADR r1, ico| 0000e470 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |n | 0000e480 20 20 20 20 20 20 20 20 20 3b 6d 61 6b 65 20 73 | ;make s| 0000e490 75 62 73 65 71 75 65 6e 74 20 63 6f 64 65 20 28 |ubsequent code (| 0000e4a0 26 20 57 69 6d 70 29 20 61 63 74 20 6f 6e 20 6d |& Wimp) act on m| 0000e4b0 6f 64 69 66 69 65 64 20 69 63 6f 6e 0a 0a 0a 20 |odified icon... | 0000e4c0 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 6c | LDR l| 0000e4d0 72 2c 20 70 6c 6f 74 66 6c 61 67 20 20 20 20 20 |r, plotflag | 0000e4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000e4f0 20 66 69 6c 65 72 20 70 6c 6f 74 69 63 6f 6e 20 | filer ploticon | 0000e500 73 70 72 69 74 65 20 6e 61 6d 65 20 65 78 74 72 |sprite name extr| 0000e510 61 63 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 43 |action. C| 0000e520 4d 50 20 20 20 20 20 6c 72 2c 20 23 31 0a 20 20 |MP lr, #1. | 0000e530 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 63 6f | BNE co| 0000e540 6e 74 69 6e 75 65 0a 0a 20 20 20 20 20 20 20 20 |ntinue.. | 0000e550 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 31 2c |LDR lr, [r1,| 0000e560 20 23 31 36 5d 0a 20 20 20 20 20 20 20 20 53 54 | #16]. ST| 0000e570 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 2d 72 |MFD sp!, {r0-r| 0000e580 38 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |8} | 0000e590 20 20 20 20 20 20 3b 20 67 65 74 20 70 74 72 20 | ; get ptr | 0000e5a0 74 6f 20 76 61 6c 69 64 61 74 69 6f 6e 20 73 74 |to validation st| 0000e5b0 72 69 6e 67 0a 20 20 20 20 20 20 20 20 4c 44 52 |ring. LDR| 0000e5c0 20 20 20 20 20 72 33 2c 20 5b 72 31 2c 20 23 32 | r3, [r1, #2| 0000e5d0 34 5d 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 42 |4].. LDRB| 0000e5e0 20 20 20 20 72 30 2c 20 5b 72 33 5d 2c 20 23 31 | r0, [r3], #1| 0000e5f0 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 0000e600 20 72 30 2c 20 23 27 73 27 0a 20 20 20 20 20 20 | r0, #'s'. | 0000e610 20 20 43 4d 50 4e 45 20 20 20 72 30 2c 20 23 27 | CMPNE r0, #'| 0000e620 53 27 0a 20 20 20 20 20 20 20 20 4c 44 4d 4e 45 |S'. LDMNE| 0000e630 46 44 20 73 70 21 2c 20 7b 72 30 2d 72 38 7d 0a |FD sp!, {r0-r8}.| 0000e640 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 20 | BNE | 0000e650 63 6f 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 |continue | 0000e660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000e670 3b 20 69 66 20 66 69 72 73 74 20 63 68 61 72 20 |; if first char | 0000e680 69 73 6e 27 74 20 61 6e 20 53 20 63 6f 6d 6d 61 |isn't an S comma| 0000e690 6e 64 2c 20 69 67 6e 6f 72 65 0a 0a 20 20 20 20 |nd, ignore.. | 0000e6a0 20 20 20 20 41 44 52 20 20 20 20 20 72 31 2c 20 | ADR r1, | 0000e6b0 6c 61 73 74 6e 61 6d 65 0a 20 20 20 20 20 20 20 |lastname. | 0000e6c0 20 4d 4f 56 20 20 20 20 20 72 32 2c 20 23 31 32 | MOV r2, #12| 0000e6d0 0a 69 73 70 69 6c 31 20 20 20 20 20 20 20 20 20 |.ispil1 | 0000e6e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000e700 20 3b 20 65 78 74 72 61 63 74 20 6e 61 6d 65 0a | ; extract name.| 0000e710 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 | LDRB | 0000e720 72 30 2c 20 5b 72 33 5d 2c 20 23 31 0a 20 20 20 |r0, [r3], #1. | 0000e730 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 30 2c | CMP r0,| 0000e740 20 23 27 3b 27 0a 20 20 20 20 20 20 20 20 4d 4f | #';'. MO| 0000e750 56 45 51 20 20 20 72 30 2c 20 23 30 0a 20 20 20 |VEQ r0, #0. | 0000e760 20 20 20 20 20 53 54 52 42 20 20 20 20 72 30 2c | STRB r0,| 0000e770 20 5b 72 31 5d 2c 20 23 31 0a 20 20 20 20 20 20 | [r1], #1. | 0000e780 20 20 53 55 42 53 20 20 20 20 72 32 2c 20 72 32 | SUBS r2, r2| 0000e790 2c 20 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 |, #1. CMP| 0000e7a0 4e 45 20 20 20 72 30 2c 20 23 30 0a 20 20 20 20 |NE r0, #0. | 0000e7b0 20 20 20 20 42 4e 45 20 20 20 20 20 69 73 70 69 | BNE ispi| 0000e7c0 6c 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 |l1. CMP | 0000e7d0 20 20 20 72 32 2c 20 23 30 0a 20 20 20 20 20 20 | r2, #0. | 0000e7e0 20 20 42 45 51 20 20 20 20 20 69 73 70 69 6c 32 | BEQ ispil2| 0000e7f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000e800 20 20 20 20 20 20 20 20 20 20 3b 61 6c 6c 20 31 | ;all 1| 0000e810 32 20 63 68 61 72 73 20 66 69 6c 6c 65 64 2c 20 |2 chars filled, | 0000e820 73 6f 20 67 6f 74 20 6e 61 6d 65 20 70 61 64 64 |so got name padd| 0000e830 65 64 20 77 69 74 68 20 30 27 73 20 28 6e 6f 20 |ed with 0's (no | 0000e840 30 27 73 20 6e 65 65 64 65 64 29 0a 69 73 70 69 |0's needed).ispi| 0000e850 6c 33 20 20 53 54 52 42 20 20 20 20 72 30 2c 20 |l3 STRB r0, | 0000e860 5b 72 31 5d 2c 20 23 31 20 20 20 20 20 20 20 20 |[r1], #1 | 0000e870 20 20 20 20 20 20 20 20 20 20 20 20 3b 65 6c 73 | ;els| 0000e880 65 20 70 61 64 20 6f 75 74 20 74 6f 20 31 32 20 |e pad out to 12 | 0000e890 63 68 61 72 73 20 77 69 74 68 20 30 27 73 0a 20 |chars with 0's. | 0000e8a0 20 20 20 20 20 20 20 53 55 42 53 20 20 20 20 72 | SUBS r| 0000e8b0 32 2c 20 72 32 2c 20 23 31 0a 20 20 20 20 20 20 |2, r2, #1. | 0000e8c0 20 20 42 4e 45 20 20 20 20 20 69 73 70 69 6c 33 | BNE ispil3| 0000e8d0 0a 69 73 70 69 6c 32 0a 20 20 20 20 20 20 20 20 |.ispil2. | 0000e8e0 4d 4f 56 20 20 20 20 20 72 35 2c 20 23 27 23 27 |MOV r5, #'#'| 0000e8f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000e900 20 20 20 20 20 20 20 20 3b 68 61 6e 64 6c 65 20 | ;handle | 0000e910 6f 64 64 20 63 61 73 65 20 77 68 65 72 65 20 64 |odd case where d| 0000e920 65 61 6c 69 6e 67 20 77 69 74 68 20 61 62 6f 76 |ealing with abov| 0000e930 65 20 23 20 3c 2d 3e 20 24 20 6e 61 6d 65 64 20 |e # <-> $ named | 0000e940 64 69 72 73 0a 20 20 20 20 20 20 20 20 4c 44 52 |dirs. LDR| 0000e950 20 20 20 20 20 72 33 2c 20 6c 61 73 74 6e 61 6d | r3, lastnam| 0000e960 65 0a 20 20 20 20 20 20 20 20 41 4e 44 20 20 20 |e. AND | 0000e970 20 20 72 34 2c 20 72 33 2c 20 23 32 35 35 0a 20 | r4, r3, #255. | 0000e980 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 0000e990 34 2c 20 23 27 24 27 0a 20 20 20 20 20 20 20 20 |4, #'$'. | 0000e9a0 53 54 52 45 51 42 20 20 72 35 2c 20 6c 61 73 74 |STREQB r5, last| 0000e9b0 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 42 45 51 |name. BEQ| 0000e9c0 20 20 20 20 20 69 73 70 69 5f 73 65 6c 65 63 74 | ispi_select| 0000e9d0 65 64 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |ed. MOV | 0000e9e0 20 20 20 72 33 2c 20 72 33 2c 20 4c 53 52 20 23 | r3, r3, LSR #| 0000e9f0 31 36 0a 20 20 20 20 20 20 20 20 41 4e 44 20 20 |16. AND | 0000ea00 20 20 20 72 33 2c 20 72 33 2c 20 23 32 35 35 0a | r3, r3, #255.| 0000ea10 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 | CMP | 0000ea20 72 33 2c 20 23 27 24 27 0a 20 20 20 20 20 20 20 |r3, #'$'. | 0000ea30 20 53 54 52 45 51 42 20 20 72 35 2c 20 6c 61 73 | STREQB r5, las| 0000ea40 74 6e 61 6d 65 2b 32 0a 20 20 20 20 20 20 20 20 |tname+2. | 0000ea50 42 45 51 20 20 20 20 20 69 73 70 69 5f 73 65 6c |BEQ ispi_sel| 0000ea60 65 63 74 65 64 0a 0a 20 20 20 20 20 20 20 20 54 |ected.. T| 0000ea70 53 54 20 20 20 20 20 6c 72 2c 20 23 28 31 3c 3c |ST lr, #(1<<| 0000ea80 32 31 29 0a 20 20 20 20 20 20 20 20 42 45 51 20 |21). BEQ | 0000ea90 20 20 20 20 69 73 70 69 5f 6e 6f 74 73 65 6c 65 | ispi_notsele| 0000eaa0 63 74 65 64 20 20 20 20 20 20 20 20 20 20 20 20 |cted | 0000eab0 20 20 20 20 3b 69 66 20 70 6c 6f 74 20 69 73 20 | ;if plot is | 0000eac0 75 6e 73 65 6c 65 63 74 69 6e 67 20 69 63 6f 6e |unselecting icon| 0000ead0 2c 20 74 72 79 20 74 6f 20 72 65 6d 6f 76 65 20 |, try to remove | 0000eae0 66 72 6f 6d 20 6f 75 72 20 6c 69 73 74 0a 20 20 |from our list. | 0000eaf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000eb10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 0000eb20 65 6c 73 65 20 69 73 20 73 65 6c 65 63 74 65 64 |else is selected| 0000eb30 2c 20 73 6f 20 74 72 79 20 74 6f 20 61 64 64 0a |, so try to add.| 0000eb40 69 73 70 69 5f 73 65 6c 65 63 74 65 64 0a 20 20 |ispi_selected. | 0000eb50 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 30 | LDR r0| 0000eb60 2c 20 77 69 6e 64 6f 77 68 61 6e 64 6c 65 0a 20 |, windowhandle. | 0000eb70 20 20 20 20 20 20 20 41 44 52 4c 20 20 20 20 6c | ADRL l| 0000eb80 72 2c 20 6e 61 6d 65 6c 69 73 74 0a 20 20 20 20 |r, namelist. | 0000eb90 20 20 20 20 41 44 52 20 20 20 20 20 72 31 2c 20 | ADR r1, | 0000eba0 6e 61 6d 65 6c 69 73 74 65 6e 64 0a 20 20 20 20 |namelistend. | 0000ebb0 20 20 20 20 0a 69 73 70 69 6c 34 0a 20 20 20 20 | .ispil4. | 0000ebc0 20 20 20 20 4c 44 52 20 20 20 20 20 72 32 2c 20 | LDR r2, | 0000ebd0 5b 6c 72 5d 2c 20 23 32 30 0a 20 20 20 20 20 20 |[lr], #20. | 0000ebe0 20 20 43 4d 50 20 20 20 20 20 72 32 2c 20 72 30 | CMP r2, r0| 0000ebf0 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 20 20 |. CMPNE | 0000ec00 20 72 32 2c 20 23 2d 31 0a 20 20 20 20 20 20 20 | r2, #-1. | 0000ec10 20 41 44 44 45 51 20 20 20 6c 72 2c 20 6c 72 2c | ADDEQ lr, lr,| 0000ec20 20 23 2d 32 30 0a 20 20 20 20 20 20 20 20 41 44 | #-20. AD| 0000ec30 52 45 51 20 20 20 72 31 2c 20 6c 61 73 74 6e 61 |REQ r1, lastna| 0000ec40 6d 65 0a 20 20 20 20 20 20 20 20 4c 44 4d 45 51 |me. LDMEQ| 0000ec50 49 41 20 72 31 2c 20 7b 72 31 2d 72 33 7d 0a 20 |IA r1, {r1-r3}. | 0000ec60 20 20 20 20 20 20 20 53 54 4d 45 51 49 41 20 6c | STMEQIA l| 0000ec70 72 2c 20 7b 72 30 2d 72 33 7d 0a 20 20 20 20 20 |r, {r0-r3}. | 0000ec80 20 20 20 4c 44 4d 45 51 46 44 20 73 70 21 2c 20 | LDMEQFD sp!, | 0000ec90 7b 72 30 2d 72 38 7d 0a 20 20 20 20 20 20 20 20 |{r0-r8}. | 0000eca0 42 45 51 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 |BEQ continue| 0000ecb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000ecc0 20 20 20 20 20 20 20 20 3b 68 61 6e 64 6c 65 20 | ;handle | 0000ecd0 26 20 6e 61 6d 65 20 73 74 6f 72 65 64 2c 20 73 |& name stored, s| 0000ece0 6f 20 67 65 74 20 6f 75 74 20 6f 66 20 68 65 72 |o get out of her| 0000ecf0 65 20 28 70 61 73 73 20 63 61 6c 6c 20 6f 6e 29 |e (pass call on)| 0000ed00 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 0000ed10 20 6c 72 2c 20 72 31 0a 20 20 20 20 20 20 20 20 | lr, r1. | 0000ed20 42 4c 54 20 20 20 20 20 69 73 70 69 6c 34 20 20 |BLT ispil4 | 0000ed30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000ed40 20 20 20 20 20 20 20 20 3b 63 61 6e 27 74 20 66 | ;can't f| 0000ed50 69 6e 64 20 73 70 61 63 65 20 73 6f 20 67 69 76 |ind space so giv| 0000ed60 65 20 75 70 20 26 20 70 61 73 73 20 63 61 6c 6c |e up & pass call| 0000ed70 20 6f 6e 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 | on. LDMF| 0000ed80 44 20 20 20 73 70 21 2c 20 7b 72 30 2d 72 38 7d |D sp!, {r0-r8}| 0000ed90 0a 20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 |. B | 0000eda0 20 63 6f 6e 74 69 6e 75 65 0a 0a 69 73 70 69 5f | continue..ispi_| 0000edb0 6e 6f 74 73 65 6c 65 63 74 65 64 0a 20 20 20 20 |notselected. | 0000edc0 20 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 | LDR r0, | 0000edd0 77 69 6e 64 6f 77 68 61 6e 64 6c 65 0a 20 20 20 |windowhandle. | 0000ede0 20 20 20 20 20 41 44 52 4c 20 20 20 20 6c 72 2c | ADRL lr,| 0000edf0 20 6e 61 6d 65 6c 69 73 74 0a 20 20 20 20 20 20 | namelist. | 0000ee00 20 20 41 44 52 4c 20 20 20 20 72 31 2c 20 6e 61 | ADRL r1, na| 0000ee10 6d 65 6c 69 73 74 65 6e 64 0a 20 20 20 20 20 20 |melistend. | 0000ee20 20 20 41 44 52 4c 20 20 20 20 72 32 2c 20 6c 61 | ADRL r2, la| 0000ee30 73 74 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 4c |stname. L| 0000ee40 44 4d 49 41 20 20 20 72 32 2c 20 7b 72 32 2d 72 |DMIA r2, {r2-r| 0000ee50 34 7d 0a 69 73 70 69 6c 35 0a 20 20 20 20 20 20 |4}.ispil5. | 0000ee60 20 20 4c 44 4d 49 41 20 20 20 6c 72 2c 20 7b 72 | LDMIA lr, {r| 0000ee70 35 2d 72 38 7d 0a 20 20 20 20 20 20 20 20 43 4d |5-r8}. CM| 0000ee80 50 20 20 20 20 20 72 30 2c 20 72 35 0a 20 20 20 |P r0, r5. | 0000ee90 20 20 20 20 20 43 4d 50 45 51 20 20 20 72 32 2c | CMPEQ r2,| 0000eea0 20 72 36 0a 20 20 20 20 20 20 20 20 43 4d 50 45 | r6. CMPE| 0000eeb0 51 20 20 20 72 33 2c 20 72 37 0a 20 20 20 20 20 |Q r3, r7. | 0000eec0 20 20 20 43 4d 50 45 51 20 20 20 72 34 2c 20 72 | CMPEQ r4, r| 0000eed0 38 0a 20 20 20 20 20 20 20 20 4d 4f 56 45 51 20 |8. MOVEQ | 0000eee0 20 20 72 30 2c 20 23 2d 31 0a 20 20 20 20 20 20 | r0, #-1. | 0000eef0 20 20 53 54 52 45 51 20 20 20 72 30 2c 20 5b 6c | STREQ r0, [l| 0000ef00 72 5d 0a 20 20 20 20 20 20 20 20 4c 44 4d 45 51 |r]. LDMEQ| 0000ef10 46 44 20 73 70 21 2c 20 7b 72 30 2d 72 38 7d 0a |FD sp!, {r0-r8}.| 0000ef20 20 20 20 20 20 20 20 20 42 45 51 20 20 20 20 20 | BEQ | 0000ef30 63 6f 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 |continue | 0000ef40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000ef50 3b 68 61 6e 64 6c 65 20 65 72 61 73 65 64 20 77 |;handle erased w| 0000ef60 69 74 68 20 2d 31 2c 20 73 6f 20 67 65 74 20 6f |ith -1, so get o| 0000ef70 75 74 20 6f 66 20 68 65 72 65 20 28 70 61 73 73 |ut of here (pass| 0000ef80 20 63 61 6c 6c 20 6f 6e 29 0a 20 20 20 20 20 20 | call on). | 0000ef90 20 20 41 44 44 20 20 20 20 20 6c 72 2c 20 6c 72 | ADD lr, lr| 0000efa0 2c 20 23 32 30 0a 20 20 20 20 20 20 20 20 43 4d |, #20. CM| 0000efb0 50 20 20 20 20 20 6c 72 2c 20 72 31 0a 20 20 20 |P lr, r1. | 0000efc0 20 20 20 20 20 42 4c 54 20 20 20 20 20 69 73 70 | BLT isp| 0000efd0 69 6c 35 20 20 20 20 20 20 20 20 20 20 20 20 20 |il5 | 0000efe0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 63 61 | ;ca| 0000eff0 6e 27 74 20 66 69 6e 64 20 6d 61 74 63 68 20 73 |n't find match s| 0000f000 6f 20 67 69 76 65 20 75 70 20 26 20 70 61 73 73 |o give up & pass| 0000f010 20 63 61 6c 6c 20 6f 6e 20 28 69 65 20 69 74 20 | call on (ie it | 0000f020 6d 61 79 20 68 61 76 65 20 62 65 65 6e 20 6f 76 |may have been ov| 0000f030 65 72 77 72 69 74 74 65 6e 29 0a 20 20 20 20 20 |erwritten). | 0000f040 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 | LDMFD sp!, | 0000f050 7b 72 30 2d 72 38 7d 0a 20 20 20 20 20 20 20 20 |{r0-r8}. | 0000f060 42 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 |B continue| 0000f070 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..; ------------| 0000f080 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 0000f0d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 64 |-------------..d| 0000f0e0 74 78 74 20 20 20 20 44 43 42 20 20 20 20 20 22 |txt DCB "| 0000f0f0 73 64 69 72 65 63 74 6f 72 79 22 2c 30 2c 30 0a |sdirectory",0,0.| 0000f100 20 20 20 20 20 20 20 20 41 4c 49 47 4e 0a 73 64 | ALIGN.sd| 0000f110 74 78 74 20 20 20 44 43 42 20 20 20 20 20 22 73 |txt DCB "s| 0000f120 73 6d 61 6c 6c 5f 64 69 72 22 2c 30 2c 30 0a 20 |small_dir",0,0. | 0000f130 20 20 20 20 20 20 20 41 4c 49 47 4e 0a 0a 3b 20 | ALIGN..; | 0000f140 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 0000f1a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 63 6f 6e 20 |---------..icon | 0000f1b0 20 20 20 25 20 20 20 20 20 20 20 33 32 20 20 20 | % 32 | 0000f1c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f1d0 20 20 20 20 20 20 20 20 20 20 20 3b 20 75 73 65 | ; use| 0000f1e0 64 20 62 79 20 50 6c 6f 74 49 63 6f 6e 20 69 6e |d by PlotIcon in| 0000f1f0 74 65 72 63 65 70 74 20 28 77 68 69 63 68 20 61 |tercept (which a| 0000f200 6c 73 6f 20 75 73 65 73 20 77 6f 72 6b 73 70 61 |lso uses workspa| 0000f210 63 65 32 20 62 65 6c 6f 77 29 0a 0a 77 6f 72 6b |ce2 below)..work| 0000f220 73 70 61 63 65 32 20 20 20 20 20 20 20 20 20 20 |space2 | 0000f230 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f240 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 66 6f | ; fo| 0000f250 72 20 77 69 6e 64 6f 77 20 69 6e 66 6f 20 28 61 |r window info (a| 0000f260 6c 73 6f 20 75 73 65 64 20 66 6f 72 20 67 65 74 |lso used for get| 0000f270 74 69 6e 67 20 66 69 6c 65 72 0a 20 20 20 20 20 |ting filer. | 0000f280 20 20 20 25 20 20 20 20 20 20 20 77 73 70 32 5f | % wsp2_| 0000f290 73 69 7a 65 20 20 20 20 20 20 20 20 20 20 20 20 |size | 0000f2a0 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 | ; | 0000f2b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 61 | ta| 0000f2c0 73 6b 20 68 61 6e 64 6c 65 29 0a 6d 65 73 73 61 |sk handle).messa| 0000f2d0 67 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ge | 0000f2e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f2f0 20 20 20 20 20 20 20 20 20 20 20 3b 20 66 6f 72 | ; for| 0000f300 20 67 65 74 74 69 6e 67 20 77 69 6e 64 6f 77 27 | getting window'| 0000f310 73 20 74 61 73 6b 20 68 61 6e 64 6c 65 0a 20 20 |s task handle. | 0000f320 20 20 20 20 20 20 44 43 44 20 20 20 20 20 32 30 | DCD 20| 0000f330 2c 20 30 2c 20 30 2c 20 30 2c 20 30 0a 0a 3b 20 |, 0, 0, 0, 0..; | 0000f340 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 0000f3a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 73 5f 64 65 |---------..is_de| 0000f3b0 6c 65 74 65 77 69 6e 64 6f 77 20 20 20 20 20 20 |letewindow | 0000f3c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f3d0 20 20 20 20 20 20 20 20 20 20 20 3b 74 68 69 73 | ;this| 0000f3e0 20 63 6f 64 65 20 69 73 20 6e 65 65 64 65 64 20 | code is needed | 0000f3f0 74 6f 20 66 6f 72 67 65 74 20 73 65 6c 65 63 74 |to forget select| 0000f400 65 64 20 69 63 6f 6e 73 2c 20 69 66 20 74 68 65 |ed icons, if the| 0000f410 69 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |ir. | 0000f420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000f440 20 20 20 3b 70 61 72 65 6e 74 20 66 69 6c 65 72 | ;parent filer| 0000f450 20 77 69 6e 64 6f 77 20 69 73 20 64 65 6c 65 74 | window is delet| 0000f460 65 64 20 77 68 69 6c 65 20 74 68 65 79 20 61 72 |ed while they ar| 0000f470 65 20 73 74 69 6c 6c 0a 20 20 20 20 20 20 20 20 |e still. | 0000f480 53 54 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 |STMFD sp!, {r0| 0000f490 2d 72 33 7d 20 20 20 20 20 20 20 20 20 20 20 20 |-r3} | 0000f4a0 20 20 20 20 20 20 20 20 3b 73 65 6c 65 63 74 65 | ;selecte| 0000f4b0 64 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 |d.. LDR | 0000f4c0 20 20 20 72 31 2c 20 5b 72 31 5d 20 20 20 20 20 | r1, [r1] | 0000f4d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f4e0 20 20 20 3b 68 61 6e 64 6c 65 20 6f 66 20 77 69 | ;handle of wi| 0000f4f0 6e 64 6f 77 20 62 65 69 6e 67 20 63 6c 6f 73 65 |ndow being close| 0000f500 64 20 26 20 64 65 6c 65 74 65 64 0a 20 20 20 20 |d & deleted. | 0000f510 20 20 20 20 41 44 52 4c 20 20 20 20 72 30 2c 20 | ADRL r0, | 0000f520 6e 61 6d 65 6c 69 73 74 0a 20 20 20 20 20 20 20 |namelist. | 0000f530 20 41 44 52 4c 20 20 20 20 72 32 2c 20 6e 61 6d | ADRL r2, nam| 0000f540 65 6c 69 73 74 65 6e 64 0a 20 20 20 20 20 20 20 |elistend. | 0000f550 20 4d 4f 56 20 20 20 20 20 72 33 2c 20 23 2d 31 | MOV r3, #-1| 0000f560 0a 69 73 64 77 6c 31 20 20 4c 44 52 20 20 20 20 |.isdwl1 LDR | 0000f570 20 6c 72 2c 20 5b 72 30 5d 2c 20 23 32 30 0a 20 | lr, [r0], #20. | 0000f580 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 0000f590 31 2c 20 6c 72 20 20 20 20 20 20 20 20 20 20 20 |1, lr | 0000f5a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000f5b0 69 66 20 77 69 6e 64 6f 77 20 62 65 69 6e 67 20 |if window being | 0000f5c0 64 65 6c 65 74 65 64 20 6d 61 74 63 68 65 73 20 |deleted matches | 0000f5d0 6f 6e 65 20 6f 66 20 74 68 6f 73 65 20 69 6e 20 |one of those in | 0000f5e0 6e 61 6d 65 6c 69 73 74 0a 20 20 20 20 20 20 20 |namelist. | 0000f5f0 20 53 54 52 45 51 20 20 20 72 33 2c 20 5b 72 30 | STREQ r3, [r0| 0000f600 2c 20 23 2d 32 30 5d 20 20 20 20 20 20 20 20 20 |, #-20] | 0000f610 20 20 20 20 20 20 20 20 20 3b 20 74 68 65 6e 20 | ; then | 0000f620 65 72 61 73 65 20 69 74 20 66 72 6f 6d 20 6e 61 |erase it from na| 0000f630 6d 65 6c 69 73 74 20 28 61 73 20 64 65 6c 65 74 |melist (as delet| 0000f640 69 6e 67 20 74 68 61 74 20 77 69 6e 64 6f 77 20 |ing that window | 0000f650 77 69 6c 6c 0a 20 20 20 20 20 20 20 20 43 4d 50 |will. CMP| 0000f660 20 20 20 20 20 72 30 2c 20 72 32 20 20 20 20 20 | r0, r2 | 0000f670 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f680 20 20 20 20 20 3b 20 65 66 66 65 63 74 69 76 65 | ; effective| 0000f690 6c 79 20 64 65 73 65 6c 65 63 74 20 74 68 61 74 |ly deselect that| 0000f6a0 20 69 63 6f 6e 29 0a 20 20 20 20 20 20 20 20 42 | icon). B| 0000f6b0 4c 54 20 20 20 20 20 69 73 64 77 6c 31 20 20 20 |LT isdwl1 | 0000f6c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f6d0 20 20 20 20 20 20 20 3b 6c 6f 6f 70 20 62 61 63 | ;loop bac| 0000f6e0 6b 20 75 6e 74 69 6c 20 61 6c 6c 20 69 6e 20 6c |k until all in l| 0000f6f0 69 73 74 20 68 61 76 65 20 62 65 65 6e 20 63 68 |ist have been ch| 0000f700 65 63 6b 65 64 0a 0a 20 20 20 20 20 20 20 20 4c |ecked.. L| 0000f710 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 2d |DMFD sp!, {r0-| 0000f720 72 33 7d 0a 20 20 20 20 20 20 20 20 42 20 20 20 |r3}. B | 0000f730 20 20 20 20 63 6f 6e 74 69 6e 75 65 0a 0a 3b 20 | continue..; | 0000f740 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 0000f7a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 73 5f 63 72 |---------..is_cr| 0000f7b0 65 61 74 65 69 63 6f 6e 20 20 20 20 20 20 20 20 |eateicon | 0000f7c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f7d0 20 20 20 20 20 20 20 20 20 20 20 3b 4e 42 20 66 | ;NB f| 0000f7e0 6f 6c 6c 6f 77 69 6e 67 20 69 6d 70 6f 73 65 73 |ollowing imposes| 0000f7f0 20 6c 6f 74 73 20 6f 66 20 73 6d 61 6c 6c 20 63 | lots of small c| 0000f800 6f 6e 64 69 74 69 6f 6e 73 20 6f 6e 20 64 61 74 |onditions on dat| 0000f810 61 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |a. | 0000f820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000f840 20 20 3b 74 68 65 73 65 20 6d 61 6b 65 20 63 6f | ;these make co| 0000f850 64 65 20 73 69 6d 70 6c 65 72 2c 20 62 75 74 20 |de simpler, but | 0000f860 6d 61 6b 65 20 63 6f 6d 70 61 74 69 62 69 6c 69 |make compatibili| 0000f870 74 79 20 77 69 74 68 20 6e 65 77 20 70 69 6e 62 |ty with new pinb| 0000f880 6f 61 72 64 20 6c 65 73 73 20 6c 69 6b 65 6c 79 |oard less likely| 0000f890 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 0000f8a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 0000f8c0 20 3b 68 6f 70 65 66 75 6c 6c 79 20 74 68 69 73 | ;hopefully this| 0000f8d0 20 77 6f 6e 27 74 20 62 65 20 61 20 70 72 6f 62 | won't be a prob| 0000f8e0 6c 65 6d 2c 20 61 73 20 44 2b 20 77 6f 6e 27 74 |lem, as D+ won't| 0000f8f0 20 74 68 65 6e 20 62 65 20 6e 65 65 64 65 64 0a | then be needed.| 0000f900 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 0000f910 20 6c 72 2c 20 6f 70 74 69 6f 6e 73 20 20 20 20 | lr, options | 0000f920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000f930 20 3b 69 66 20 73 70 72 69 74 65 20 64 69 72 65 | ;if sprite dire| 0000f940 63 74 6f 72 79 20 6f 70 74 69 6f 6e 20 6e 6f 74 |ctory option not| 0000f950 20 65 6e 61 62 6c 65 64 2c 20 27 63 6f 6e 74 69 | enabled, 'conti| 0000f960 6e 75 65 27 0a 20 20 20 20 20 20 20 20 54 53 54 |nue'. TST| 0000f970 20 20 20 20 20 6c 72 2c 20 23 31 3c 3c 34 0a 20 | lr, #1<<4. | 0000f980 20 20 20 20 20 20 20 42 45 51 20 20 20 20 20 63 | BEQ c| 0000f990 6f 6e 74 69 6e 75 65 0a 0a 20 20 20 20 20 20 20 |ontinue.. | 0000f9a0 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 31 | LDR lr, [r1| 0000f9b0 2c 20 23 32 30 5d 20 20 20 20 20 20 20 20 20 20 |, #20] | 0000f9c0 20 20 20 20 20 20 20 20 20 3b 66 6c 61 67 73 0a | ;flags.| 0000f9d0 20 20 20 20 20 20 20 20 54 53 54 20 20 20 20 20 | TST | 0000f9e0 6c 72 2c 20 23 31 3c 3c 30 0a 20 20 20 20 20 20 |lr, #1<<0. | 0000f9f0 20 20 54 53 54 4e 45 20 20 20 6c 72 2c 20 23 31 | TSTNE lr, #1| 0000fa00 3c 3c 31 0a 20 20 20 20 20 20 20 20 54 53 54 4e |<<1. TSTN| 0000fa10 45 20 20 20 6c 72 2c 20 23 31 3c 3c 38 0a 20 20 |E lr, #1<<8. | 0000fa20 20 20 20 20 20 20 42 45 51 20 20 20 20 20 63 6f | BEQ co| 0000fa30 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 20 20 |ntinue | 0000fa40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 27 | ;'| 0000fa50 63 6f 6e 74 69 6e 75 65 27 20 75 6e 6c 65 73 73 |continue' unless| 0000fa60 20 69 73 20 69 6e 64 69 72 65 63 74 65 64 20 74 | is indirected t| 0000fa70 65 78 74 20 26 20 73 70 72 69 74 65 20 69 63 6f |ext & sprite ico| 0000fa80 6e 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 |n.. LDR | 0000fa90 20 20 20 6c 72 2c 20 5b 72 31 2c 20 23 32 38 5d | lr, [r1, #28]| 0000faa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000fab0 20 20 20 3b 76 61 6c 20 73 74 72 20 70 74 72 0a | ;val str ptr.| 0000fac0 20 20 20 20 20 20 20 20 54 53 54 20 20 20 20 20 | TST | 0000fad0 6c 72 2c 20 23 33 0a 20 20 20 20 20 20 20 20 42 |lr, #3. B| 0000fae0 4e 45 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 20 |NE continue | 0000faf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000fb00 20 20 20 20 20 20 20 3b 69 66 20 76 61 6c 20 73 | ;if val s| 0000fb10 74 72 20 6e 6f 74 20 77 6f 72 64 20 61 6c 69 67 |tr not word alig| 0000fb20 6e 65 64 2c 20 27 63 6f 6e 74 69 6e 75 65 27 0a |ned, 'continue'.| 0000fb30 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 |. STMFD | 0000fb40 20 73 70 21 2c 20 7b 72 32 2d 72 37 7d 0a 0a 3b | sp!, {r2-r7}..;| 0000fb50 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 20 | ADR | 0000fb60 72 32 2c 20 69 63 69 5f 73 64 69 72 0a 3b 20 20 |r2, ici_sdir.; | 0000fb70 20 20 20 20 20 20 4c 44 4d 49 41 20 20 20 72 32 | LDMIA r2| 0000fb80 2c 20 7b 72 32 2c 72 33 2c 72 34 7d 0a 3b 20 20 |, {r2,r3,r4}.; | 0000fb90 20 20 20 20 20 20 4c 44 4d 49 41 20 20 20 6c 72 | LDMIA lr| 0000fba0 2c 20 7b 72 35 2c 72 36 2c 72 37 7d 20 20 20 20 |, {r5,r6,r7} | 0000fbb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 6e | ;n| 0000fbc0 62 20 73 74 72 69 63 74 6c 79 2c 20 73 68 6f 75 |b strictly, shou| 0000fbd0 6c 64 6e 27 74 20 64 6f 20 74 68 69 73 20 2d 20 |ldn't do this - | 0000fbe0 70 6f 73 73 20 70 72 6f 62 20 69 66 20 6c 65 6e |poss prob if len| 0000fbf0 20 3c 20 31 32 0a 3b 20 20 20 20 20 20 20 20 42 | < 12.; B| 0000fc00 49 43 20 20 20 20 20 72 37 2c 20 72 37 2c 20 23 |IC r7, r7, #| 0000fc10 26 46 46 30 30 30 30 30 30 0a 3b 20 20 20 20 20 |&FF000000.; | 0000fc20 20 20 20 43 4d 50 20 20 20 20 20 72 32 2c 20 72 | CMP r2, r| 0000fc30 35 0a 3b 20 20 20 20 20 20 20 20 43 4d 50 45 51 |5.; CMPEQ| 0000fc40 20 20 20 72 33 2c 20 72 36 0a 3b 20 20 20 20 20 | r3, r6.; | 0000fc50 20 20 20 43 4d 50 45 51 20 20 20 72 34 2c 20 72 | CMPEQ r4, r| 0000fc60 37 0a 3b 20 20 20 20 20 20 20 20 4c 44 4d 4e 45 |7.; LDMNE| 0000fc70 46 44 20 73 70 21 2c 20 7b 72 32 2d 72 37 7d 0a |FD sp!, {r2-r7}.| 0000fc80 3b 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |; BNE | 0000fc90 20 63 6f 6e 74 69 6e 75 65 20 20 20 20 20 20 20 | continue | 0000fca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000fcb0 20 3b 27 63 6f 6e 74 69 6e 75 65 27 20 75 6e 6c | ;'continue' unl| 0000fcc0 65 73 73 20 76 61 6c 69 64 61 74 69 6f 6e 20 73 |ess validation s| 0000fcd0 74 72 69 6e 67 20 6d 61 74 63 68 65 73 20 69 63 |tring matches ic| 0000fce0 69 5f 73 64 69 72 20 28 75 70 74 6f 20 26 20 69 |i_sdir (upto & i| 0000fcf0 6e 63 6c 75 64 69 6e 67 20 31 73 74 20 30 29 0a |ncluding 1st 0).| 0000fd00 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 |.. LDR | 0000fd10 20 20 6c 72 2c 20 5b 72 31 2c 20 23 33 32 5d 20 | lr, [r1, #32] | 0000fd20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000fd30 20 20 3b 74 65 78 74 20 62 75 66 66 65 72 20 6c | ;text buffer l| 0000fd40 65 6e 67 74 68 0a 20 20 20 20 20 20 20 20 43 4d |ength. CM| 0000fd50 50 20 20 20 20 20 6c 72 2c 20 23 31 34 0a 20 20 |P lr, #14. | 0000fd60 20 20 20 20 20 20 4c 44 4d 4e 45 46 44 20 73 70 | LDMNEFD sp| 0000fd70 21 2c 20 7b 72 32 2d 72 37 7d 0a 20 20 20 20 20 |!, {r2-r7}. | 0000fd80 20 20 20 42 4e 45 20 20 20 20 20 63 6f 6e 74 69 | BNE conti| 0000fd90 6e 75 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |nue | 0000fda0 20 20 20 20 20 20 20 20 20 20 20 3b 63 6f 6e 74 | ;cont| 0000fdb0 69 6e 75 65 20 75 6e 6c 65 73 73 20 74 65 78 74 |inue unless text| 0000fdc0 20 62 75 66 66 65 72 20 69 73 20 31 34 20 62 79 | buffer is 14 by| 0000fdd0 74 65 73 20 6c 6f 6e 67 0a 0a 20 20 20 20 20 20 |tes long.. | 0000fde0 20 20 53 54 4d 46 44 20 20 20 73 70 21 2c 20 7b | STMFD sp!, {| 0000fdf0 72 30 2d 72 31 7d 0a 0a 20 20 20 20 20 20 20 20 |r0-r1}.. | 0000fe00 4d 4f 56 20 20 20 20 20 72 30 2c 20 23 35 0a 20 |MOV r0, #5. | 0000fe10 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 58 | SWI X| 0000fe20 57 69 6d 70 5f 52 65 61 64 53 79 73 49 6e 66 6f |Wimp_ReadSysInfo| 0000fe30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 0000fe40 67 65 74 20 63 75 72 72 65 6e 74 20 74 61 73 6b |get current task| 0000fe50 27 73 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 |'s handle. | 0000fe60 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c 20 7b | LDMVSFD sp!, {| 0000fe70 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 20 42 |r0-r7}. B| 0000fe80 56 53 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 0a |VS continue.| 0000fe90 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 | CMP | 0000fea0 72 30 2c 20 23 30 0a 20 20 20 20 20 20 20 20 4c |r0, #0. L| 0000feb0 44 4d 45 51 46 44 20 73 70 21 2c 20 7b 72 30 2d |DMEQFD sp!, {r0-| 0000fec0 72 37 7d 0a 20 20 20 20 20 20 20 20 42 45 51 20 |r7}. BEQ | 0000fed0 20 20 20 20 63 6f 6e 74 69 6e 75 65 20 20 20 20 | continue | 0000fee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000fef0 20 20 20 20 3b 69 66 20 6e 6f 20 74 61 73 6b 73 | ;if no tasks| 0000ff00 20 61 72 65 20 61 63 74 69 76 65 2c 20 27 63 6f | are active, 'co| 0000ff10 6e 74 69 6e 75 65 27 0a 20 20 20 20 20 20 20 20 |ntinue'. | 0000ff20 53 57 49 20 20 20 20 20 58 54 61 73 6b 4d 61 6e |SWI XTaskMan| 0000ff30 61 67 65 72 5f 54 61 73 6b 4e 61 6d 65 46 72 6f |ager_TaskNameFro| 0000ff40 6d 48 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 |mHandle. | 0000ff50 4c 44 4d 56 53 46 44 20 73 70 21 2c 20 7b 72 30 |LDMVSFD sp!, {r0| 0000ff60 2d 72 37 7d 0a 20 20 20 20 20 20 20 20 42 56 53 |-r7}. BVS| 0000ff70 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 0a 20 20 | continue. | 0000ff80 20 20 20 20 20 20 54 53 54 20 20 20 20 20 72 30 | TST r0| 0000ff90 2c 20 23 33 0a 20 20 20 20 20 20 20 20 4c 44 4d |, #3. LDM| 0000ffa0 4e 45 46 44 20 73 70 21 2c 20 7b 72 30 2d 72 37 |NEFD sp!, {r0-r7| 0000ffb0 7d 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 |}. BNE | 0000ffc0 20 20 63 6f 6e 74 69 6e 75 65 20 20 20 20 20 20 | continue | 0000ffd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 0000ffe0 20 20 3b 69 66 20 6e 6f 74 20 77 6f 72 64 20 61 | ;if not word a| 0000fff0 6c 69 67 6e 65 64 2c 20 27 63 6f 6e 74 69 6e 75 |ligned, 'continu| 00010000 65 27 20 28 61 6d 20 61 73 73 75 6d 69 6e 67 20 |e' (am assuming | 00010010 69 74 20 77 69 6c 6c 20 62 65 29 0a 20 20 20 20 |it will be). | 00010020 20 20 20 20 4c 44 4d 49 41 20 20 20 72 30 2c 20 | LDMIA r0, | 00010030 7b 72 30 2c 72 31 2c 72 32 7d 20 20 20 20 20 20 |{r0,r1,r2} | 00010040 20 20 20 20 20 20 20 20 20 20 20 20 3b 61 67 61 | ;aga| 00010050 69 6e 2c 20 70 6f 73 73 20 70 72 6f 62 20 69 66 |in, poss prob if| 00010060 20 6e 61 6d 65 20 6c 65 6e 20 3c 20 31 32 20 2d | name len < 12 -| 00010070 20 73 6f 64 20 69 74 20 2d 20 63 61 6e 27 74 20 | sod it - can't | 00010080 62 65 0a 20 20 20 20 20 20 20 20 41 4e 44 20 20 |be. AND | 00010090 20 20 20 72 32 2c 20 72 32 2c 20 23 26 46 46 20 | r2, r2, #&FF | 000100a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000100b0 20 20 20 3b 62 6f 74 68 65 72 65 64 20 74 6f 20 | ;bothered to | 000100c0 63 68 65 63 6b 20 6e 61 6d 65 20 63 68 61 72 20 |check name char | 000100d0 62 79 20 63 68 61 72 0a 20 20 20 20 20 20 20 20 |by char. | 000100e0 41 44 52 20 20 20 20 20 72 33 2c 20 69 63 69 5f |ADR r3, ici_| 000100f0 70 69 6e 0a 20 20 20 20 20 20 20 20 4c 44 4d 49 |pin. LDMI| 00010100 41 20 20 20 72 33 2c 20 7b 72 33 2c 72 34 2c 72 |A r3, {r3,r4,r| 00010110 35 7d 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 |5}. CMP | 00010120 20 20 20 72 30 2c 20 72 33 0a 20 20 20 20 20 20 | r0, r3. | 00010130 20 20 43 4d 50 45 51 20 20 20 72 31 2c 20 72 34 | CMPEQ r1, r4| 00010140 0a 20 20 20 20 20 20 20 20 43 4d 50 45 51 20 20 |. CMPEQ | 00010150 20 72 32 2c 20 72 35 0a 20 20 20 20 20 20 20 20 | r2, r5. | 00010160 4c 44 4d 4e 45 46 44 20 73 70 21 2c 20 7b 72 30 |LDMNEFD sp!, {r0| 00010170 2d 72 37 7d 0a 20 20 20 20 20 20 20 20 42 4e 45 |-r7}. BNE| 00010180 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 20 20 20 | continue | 00010190 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000101a0 20 20 20 20 20 3b 69 66 20 6e 61 6d 65 20 69 73 | ;if name is| 000101b0 6e 27 74 20 27 50 69 6e 62 6f 61 72 64 27 2c 20 |n't 'Pinboard', | 000101c0 27 63 6f 6e 74 69 6e 75 65 27 0a 0a 20 20 20 20 |'continue'.. | 000101d0 20 20 20 20 4c 44 52 20 20 20 20 20 72 31 2c 20 | LDR r1, | 000101e0 5b 73 70 2c 20 23 34 5d 20 20 20 20 20 20 20 20 |[sp, #4] | 000101f0 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 31 20 | ;r1 | 00010200 73 61 76 65 64 20 61 62 6f 76 65 2c 20 6d 75 73 |saved above, mus| 00010210 74 20 62 65 20 61 74 20 74 68 69 73 20 6c 6f 63 |t be at this loc| 00010220 61 74 69 6f 6e 0a 0a 20 20 20 20 20 20 20 20 4c |ation.. L| 00010230 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 31 2c 20 |DR lr, [r1, | 00010240 23 32 38 5d 0a 20 20 20 20 20 20 20 20 41 44 52 |#28]. ADR| 00010250 20 20 20 20 20 72 32 2c 20 69 63 69 5f 73 64 69 | r2, ici_sdi| 00010260 72 0a 20 20 20 20 20 20 20 20 4c 44 4d 49 41 20 |r. LDMIA | 00010270 20 20 72 32 2c 20 7b 72 32 2c 72 33 2c 72 34 7d | r2, {r2,r3,r4}| 00010280 0a 20 20 20 20 20 20 20 20 4c 44 4d 49 41 20 20 |. LDMIA | 00010290 20 6c 72 2c 20 7b 72 35 2c 72 36 2c 72 37 7d 20 | lr, {r5,r6,r7} | 000102a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000102b0 20 3b 6e 62 20 73 74 72 69 63 74 6c 79 2c 20 73 | ;nb strictly, s| 000102c0 68 6f 75 6c 64 6e 27 74 20 64 6f 20 74 68 69 73 |houldn't do this| 000102d0 20 2d 20 70 6f 73 73 20 70 72 6f 62 20 69 66 20 | - poss prob if | 000102e0 6c 65 6e 20 3c 20 31 32 0a 20 20 20 20 20 20 20 |len < 12. | 000102f0 20 42 49 43 20 20 20 20 20 72 37 2c 20 72 37 2c | BIC r7, r7,| 00010300 20 23 26 46 46 30 30 30 30 30 30 0a 20 20 20 20 | #&FF000000. | 00010310 20 20 20 20 43 4d 50 20 20 20 20 20 72 32 2c 20 | CMP r2, | 00010320 72 35 0a 20 20 20 20 20 20 20 20 43 4d 50 45 51 |r5. CMPEQ| 00010330 20 20 20 72 33 2c 20 72 36 0a 20 20 20 20 20 20 | r3, r6. | 00010340 20 20 43 4d 50 45 51 20 20 20 72 34 2c 20 72 37 | CMPEQ r4, r7| 00010350 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 00010360 20 69 63 69 5f 63 68 61 6e 67 65 66 69 6c 65 73 | ici_changefiles| 00010370 70 72 69 74 65 6e 61 6d 65 20 20 20 20 20 20 20 |pritename | 00010380 20 3b 75 6e 6c 65 73 73 20 76 61 6c 69 64 61 74 | ;unless validat| 00010390 69 6f 6e 20 73 74 72 69 6e 67 20 6d 61 74 63 68 |ion string match| 000103a0 65 73 20 69 63 69 5f 73 64 69 72 20 28 75 70 74 |es ici_sdir (upt| 000103b0 6f 20 26 20 69 6e 63 6c 75 64 69 6e 67 20 31 73 |o & including 1s| 000103c0 74 20 30 29 0a 0a 20 20 20 20 20 20 20 20 4c 44 |t 0).. LD| 000103d0 52 20 20 20 20 20 6c 72 2c 20 5b 72 31 2c 20 23 |R lr, [r1, #| 000103e0 32 34 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 |24] | 000103f0 20 20 20 20 20 20 3b 74 65 78 74 20 62 75 66 66 | ;text buff| 00010400 65 72 20 70 74 72 0a 20 20 20 20 20 20 20 20 41 |er ptr. A| 00010410 44 52 20 20 20 20 20 72 32 2c 20 69 63 69 5f 73 |DR r2, ici_s| 00010420 70 72 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |pr. MOV | 00010430 20 20 20 72 33 2c 20 23 27 23 27 0a 20 20 20 20 | r3, #'#'. | 00010440 20 20 20 20 53 54 52 42 20 20 20 20 72 33 2c 20 | STRB r3, | 00010450 5b 72 32 5d 2c 20 23 31 0a 20 20 20 20 20 20 20 |[r2], #1. | 00010460 20 4d 4f 56 20 20 20 20 20 72 33 2c 20 23 31 34 | MOV r3, #14| 00010470 0a 69 63 69 5f 6c 31 20 20 4c 44 52 42 20 20 20 |.ici_l1 LDRB | 00010480 20 72 34 2c 20 5b 6c 72 5d 2c 20 23 31 0a 20 20 | r4, [lr], #1. | 00010490 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 34 | CMP r4| 000104a0 2c 20 23 33 32 0a 20 20 20 20 20 20 20 20 4d 4f |, #32. MO| 000104b0 56 4c 54 20 20 20 72 34 2c 20 23 30 0a 20 20 20 |VLT r4, #0. | 000104c0 20 20 20 20 20 53 54 52 42 20 20 20 20 72 34 2c | STRB r4,| 000104d0 20 5b 72 32 5d 2c 20 23 31 0a 20 20 20 20 20 20 | [r2], #1. | 000104e0 20 20 53 55 42 53 20 20 20 20 72 33 2c 20 72 33 | SUBS r3, r3| 000104f0 2c 20 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 |, #1. CMP| 00010500 4e 45 20 20 20 72 34 2c 20 23 30 0a 20 20 20 20 |NE r4, #0. | 00010510 20 20 20 20 42 4e 45 20 20 20 20 20 69 63 69 5f | BNE ici_| 00010520 6c 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |l1 | 00010530 20 20 20 20 20 20 20 20 20 20 20 20 3b 6e 6f 77 | ;now| 00010540 20 68 61 76 65 20 6e 65 77 20 73 70 72 20 6e 61 | have new spr na| 00010550 6d 65 20 69 6e 20 69 63 69 5f 73 70 72 0a 69 63 |me in ici_spr.ic| 00010560 69 5f 67 6f 74 6e 65 77 73 70 72 69 74 65 0a 20 |i_gotnewsprite. | 00010570 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00010580 30 2c 20 23 32 34 0a 20 20 20 20 20 20 20 20 41 |0, #24. A| 00010590 44 52 20 20 20 20 20 72 32 2c 20 69 63 69 5f 73 |DR r2, ici_s| 000105a0 70 72 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 |pr. SWI | 000105b0 20 20 20 58 57 69 6d 70 5f 53 70 72 69 74 65 4f | XWimp_SpriteO| 000105c0 70 0a 20 20 20 20 20 20 20 20 4c 44 4d 56 53 46 |p. LDMVSF| 000105d0 44 20 73 70 21 2c 20 7b 72 30 2d 72 37 7d 0a 20 |D sp!, {r0-r7}. | 000105e0 20 20 20 20 20 20 20 42 56 53 20 20 20 20 20 63 | BVS c| 000105f0 6f 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 20 |ontinue | 00010600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00010610 69 66 20 6e 6f 20 73 75 63 68 20 73 70 72 69 74 |if no such sprit| 00010620 65 2c 20 27 63 6f 6e 74 69 6e 75 65 27 0a 0a 20 |e, 'continue'.. | 00010630 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 00010640 31 2c 20 5b 73 70 2c 20 23 34 5d 20 20 20 20 20 |1, [sp, #4] | 00010650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00010660 72 31 20 73 61 76 65 64 20 61 62 6f 76 65 2c 20 |r1 saved above, | 00010670 6d 75 73 74 20 62 65 20 61 74 20 74 68 69 73 20 |must be at this | 00010680 6c 6f 63 61 74 69 6f 6e 0a 0a 20 20 20 20 20 20 |location.. | 00010690 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 | LDR lr, [r| 000106a0 31 2c 20 23 32 38 5d 0a 20 20 20 20 20 20 20 20 |1, #28]. | 000106b0 41 44 44 20 20 20 20 20 6c 72 2c 20 6c 72 2c 20 |ADD lr, lr, | 000106c0 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#1 | 000106d0 20 20 20 20 20 20 20 20 3b 70 74 72 20 74 6f 20 | ;ptr to | 000106e0 63 68 61 72 20 61 66 74 65 72 20 27 53 27 20 69 |char after 'S' i| 000106f0 6e 20 76 61 6c 69 64 61 74 69 6f 6e 20 73 74 72 |n validation str| 00010700 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00010710 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00010730 20 3b 4e 42 20 4e 65 78 74 20 62 69 74 20 69 73 | ;NB Next bit is| 00010740 20 76 65 72 79 20 64 6f 64 67 79 20 2d 20 73 68 | very dodgy - sh| 00010750 6f 75 6c 64 6e 27 74 20 62 65 20 77 72 69 74 69 |ouldn't be writi| 00010760 6e 67 20 74 6f 20 74 68 69 73 20 6d 65 6d 6f 72 |ng to this memor| 00010770 79 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |y. | 00010780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000107a0 20 20 3b 69 65 20 74 6f 20 70 69 6e 62 6f 61 72 | ;ie to pinboar| 000107b0 64 27 73 20 6f 77 6e 20 6d 65 6d 6f 72 79 20 75 |d's own memory u| 000107c0 73 65 64 20 74 6f 20 73 74 6f 72 65 20 76 61 6c |sed to store val| 000107d0 20 73 74 72 20 64 61 74 61 0a 20 20 20 20 20 20 | str data. | 000107e0 20 20 41 44 52 20 20 20 20 20 72 30 2c 20 69 63 | ADR r0, ic| 000107f0 69 5f 73 70 72 20 20 20 20 20 20 20 20 20 20 20 |i_spr | 00010800 20 20 20 20 20 20 20 20 20 20 3b 68 6f 77 65 76 | ;howev| 00010810 65 72 2c 20 69 66 20 69 74 20 77 6f 72 6b 73 20 |er, if it works | 00010820 6f 6e 63 65 2c 20 74 68 65 6e 20 61 73 20 77 65 |once, then as we| 00010830 20 61 72 65 20 6f 6e 6c 79 20 77 6f 72 6b 69 6e | are only workin| 00010840 67 20 77 69 74 68 20 6b 6e 6f 77 6e 20 63 6f 64 |g with known cod| 00010850 65 0a 69 63 69 5f 6c 32 20 20 4c 44 52 42 20 20 |e.ici_l2 LDRB | 00010860 20 20 72 31 2c 20 5b 72 30 5d 2c 20 23 31 20 20 | r1, [r0], #1 | 00010870 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00010880 20 20 3b 28 69 65 20 63 75 72 72 65 6e 74 20 70 | ;(ie current p| 00010890 69 6e 62 6f 61 72 64 29 2c 20 63 61 6e 20 73 61 |inboard), can sa| 000108a0 66 65 6c 79 20 65 78 70 65 63 74 20 74 6f 20 67 |fely expect to g| 000108b0 65 74 20 61 77 61 79 20 77 69 74 68 20 69 74 0a |et away with it.| 000108c0 20 20 20 20 20 20 20 20 53 54 52 42 20 20 20 20 | STRB | 000108d0 72 31 2c 20 5b 6c 72 5d 2c 20 23 31 0a 20 20 20 |r1, [lr], #1. | 000108e0 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c | CMP r1,| 000108f0 20 23 30 0a 20 20 20 20 20 20 20 20 42 4e 45 20 | #0. BNE | 00010900 20 20 20 20 69 63 69 5f 6c 32 0a 0a 20 20 20 20 | ici_l2.. | 00010910 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c | LDMFD sp!,| 00010920 20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 | {r0-r7}. | 00010930 20 42 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 | B continu| 00010940 65 0a 0a 69 63 69 5f 63 68 61 6e 67 65 66 69 6c |e..ici_changefil| 00010950 65 73 70 72 69 74 65 6e 61 6d 65 20 20 20 20 20 |espritename | 00010960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00010970 20 20 20 3b 62 75 69 6c 64 20 6e 65 77 20 6e 61 | ;build new na| 00010980 6d 65 20 69 6e 20 69 63 69 5f 73 70 72 20 26 20 |me in ici_spr & | 00010990 42 20 69 63 69 5f 67 6f 74 6e 65 77 73 70 72 69 |B ici_gotnewspri| 000109a0 74 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |te. MOV | 000109b0 20 20 20 6c 72 2c 20 72 31 0a 20 20 20 20 20 20 | lr, r1. | 000109c0 20 20 4c 44 52 20 20 20 20 20 72 31 2c 20 5b 6c | LDR r1, [l| 000109d0 72 2c 20 23 32 34 5d 20 20 20 20 20 20 20 20 20 |r, #24] | 000109e0 20 20 20 20 20 20 20 20 20 20 3b 74 65 78 74 20 | ;text | 000109f0 70 74 72 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |ptr. MOV | 00010a00 20 20 20 20 72 32 2c 20 72 31 0a 69 63 69 5f 6c | r2, r1.ici_l| 00010a10 33 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 |3. LDRB | 00010a20 20 20 72 33 2c 20 5b 72 32 5d 2c 20 23 31 0a 20 | r3, [r2], #1. | 00010a30 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00010a40 33 2c 20 23 33 32 0a 20 20 20 20 20 20 20 20 42 |3, #32. B| 00010a50 47 54 20 20 20 20 20 69 63 69 5f 6c 33 0a 20 20 |GT ici_l3. | 00010a60 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 | SUB r2| 00010a70 2c 20 72 32 2c 20 23 31 20 20 20 20 20 20 20 20 |, r2, #1 | 00010a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 | ;r| 00010a90 32 20 70 74 73 20 74 6f 20 74 65 78 74 20 74 65 |2 pts to text te| 00010aa0 72 6d 69 6e 61 74 6f 72 0a 20 20 20 20 20 20 20 |rminator. | 00010ab0 20 53 55 42 20 20 20 20 20 72 35 2c 20 72 32 2c | SUB r5, r2,| 00010ac0 20 72 31 20 20 20 20 20 20 20 20 20 20 20 20 20 | r1 | 00010ad0 20 20 20 20 20 20 20 20 20 3b 23 20 63 68 61 72 | ;# char| 00010ae0 73 20 69 6e 20 74 65 78 74 0a 20 20 20 20 20 20 |s in text. | 00010af0 20 20 43 4d 50 20 20 20 20 20 72 35 2c 20 23 34 | CMP r5, #4| 00010b00 0a 20 20 20 20 20 20 20 20 4c 44 4d 4c 54 46 44 |. LDMLTFD| 00010b10 20 73 70 21 2c 20 7b 72 30 2d 72 37 7d 0a 20 20 | sp!, {r0-r7}. | 00010b20 20 20 20 20 20 20 42 4c 54 20 20 20 20 20 63 6f | BLT co| 00010b30 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 20 20 |ntinue | 00010b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 | ;i| 00010b50 66 20 6c 65 73 73 20 74 68 61 6e 20 34 20 63 68 |f less than 4 ch| 00010b60 61 72 73 2c 20 63 61 6e 27 74 20 65 6e 64 20 69 |ars, can't end i| 00010b70 6e 20 6f 75 72 20 61 66 66 69 78 20 2f 3c 61 62 |n our affix /<ab| 00010b80 63 3e 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 |c>. LDRB | 00010b90 20 20 20 72 33 2c 20 5b 72 32 2c 20 23 2d 34 5d | r3, [r2, #-4]| 00010ba0 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 00010bb0 20 72 33 2c 20 23 27 2f 27 0a 3b 20 20 20 20 20 | r3, #'/'.; | 00010bc0 20 20 43 4d 50 4e 45 20 20 20 72 33 2c 20 23 27 | CMPNE r3, #'| 00010bd0 5c 27 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |\' | 00010be0 20 20 20 20 20 20 20 20 20 20 3b 72 65 6d 6f 76 | ;remov| 00010bf0 65 64 20 69 6e 20 76 20 31 2e 35 34 20 2d 20 73 |ed in v 1.54 - s| 00010c00 65 65 20 48 69 73 74 6f 72 79 0a 20 20 20 20 20 |ee History. | 00010c10 20 20 20 4c 44 4d 4e 45 46 44 20 73 70 21 2c 20 | LDMNEFD sp!, | 00010c20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 20 |{r0-r7}. | 00010c30 42 4e 45 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 |BNE continue| 00010c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00010c50 20 20 20 20 20 20 20 20 3b 6e 6f 74 20 6f 75 72 | ;not our| 00010c60 20 61 66 66 69 78 0a 20 20 20 20 20 20 20 20 4c | affix. L| 00010c70 44 52 20 20 20 20 20 72 35 2c 20 5b 6c 72 2c 20 |DR r5, [lr, | 00010c80 23 32 38 5d 20 20 20 20 20 20 20 20 20 20 20 20 |#28] | 00010c90 20 20 20 20 20 20 20 3b 76 61 6c 69 64 20 73 74 | ;valid st| 00010ca0 72 20 70 74 72 0a 20 20 20 20 20 20 20 20 4c 44 |r ptr. LD| 00010cb0 52 42 20 20 20 20 72 33 2c 20 5b 72 35 5d 2c 20 |RB r3, [r5], | 00010cc0 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 |#1. CMP | 00010cd0 20 20 20 72 33 2c 20 23 27 53 27 0a 20 20 20 20 | r3, #'S'. | 00010ce0 20 20 20 20 4c 44 4d 4e 45 46 44 20 73 70 21 2c | LDMNEFD sp!,| 00010cf0 20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 | {r0-r7}. | 00010d00 20 42 4e 45 20 20 20 20 20 63 6f 6e 74 69 6e 75 | BNE continu| 00010d10 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 00010d20 20 20 20 20 20 20 20 20 20 3b 69 6e 20 63 61 73 | ;in cas| 00010d30 65 20 64 6f 65 73 6e 27 74 20 73 74 61 72 74 20 |e doesn't start | 00010d40 77 69 74 68 20 73 70 72 69 74 65 20 6e 61 6d 65 |with sprite name| 00010d50 2c 20 67 65 74 20 6f 75 74 20 6e 6f 77 0a 20 20 |, get out now. | 00010d60 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 31 | ADR r1| 00010d70 2c 20 69 63 69 5f 73 70 72 0a 20 20 20 20 20 20 |, ici_spr. | 00010d80 20 20 41 44 52 20 20 20 20 20 72 36 2c 20 69 63 | ADR r6, ic| 00010d90 69 5f 73 70 72 2b 31 35 0a 69 63 69 5f 6c 34 0a |i_spr+15.ici_l4.| 00010da0 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 | LDRB | 00010db0 72 33 2c 20 5b 72 35 5d 2c 20 23 31 0a 20 20 20 |r3, [r5], #1. | 00010dc0 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 33 2c | CMP r3,| 00010dd0 20 23 27 3b 27 0a 20 20 20 20 20 20 20 20 43 4d | #';'. CM| 00010de0 50 4e 45 20 20 20 72 33 2c 20 23 33 31 0a 20 20 |PNE r3, #31. | 00010df0 20 20 20 20 20 20 4d 4f 56 4c 45 20 20 20 72 33 | MOVLE r3| 00010e00 2c 20 23 30 0a 20 20 20 20 20 20 20 20 53 55 42 |, #0. SUB| 00010e10 4c 45 20 20 20 72 35 2c 20 72 35 2c 20 23 31 0a |LE r5, r5, #1.| 00010e20 20 20 20 20 20 20 20 20 53 54 52 42 20 20 20 20 | STRB | 00010e30 72 33 2c 20 5b 72 31 5d 2c 20 23 31 0a 20 20 20 |r3, [r1], #1. | 00010e40 20 20 20 20 20 53 55 42 4c 45 20 20 20 72 31 2c | SUBLE r1,| 00010e50 20 72 31 2c 20 23 31 0a 20 20 20 20 20 20 20 20 | r1, #1. | 00010e60 43 4d 50 47 54 20 20 20 72 36 2c 20 72 31 0a 20 |CMPGT r6, r1. | 00010e70 20 20 20 20 20 20 20 42 47 54 20 20 20 20 20 69 | BGT i| 00010e80 63 69 5f 6c 34 20 20 20 20 20 20 20 20 20 20 20 |ci_l4 | 00010e90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00010ea0 65 6c 73 65 20 72 35 20 70 74 73 20 74 6f 20 74 |else r5 pts to t| 00010eb0 65 72 6d 20 6f 66 20 73 70 72 20 6e 61 6d 65 20 |erm of spr name | 00010ec0 69 6e 20 76 61 6c 20 73 74 72 20 26 20 72 31 20 |in val str & r1 | 00010ed0 70 74 73 20 74 6f 20 74 65 72 6d 20 69 6e 20 62 |pts to term in b| 00010ee0 75 66 66 65 72 0a 20 20 20 20 20 20 20 20 4c 44 |uffer. LD| 00010ef0 52 42 20 20 20 20 72 33 2c 20 5b 72 32 2c 20 23 |RB r3, [r2, #| 00010f00 2d 34 5d 0a 20 20 20 20 20 20 20 20 53 54 52 42 |-4]. STRB| 00010f10 20 20 20 20 72 33 2c 20 5b 72 31 2c 20 23 2d 34 | r3, [r1, #-4| 00010f20 5d 0a 20 20 20 20 20 20 20 20 4c 44 52 42 20 20 |]. LDRB | 00010f30 20 20 72 33 2c 20 5b 72 32 2c 20 23 2d 33 5d 0a | r3, [r2, #-3].| 00010f40 20 20 20 20 20 20 20 20 53 54 52 42 20 20 20 20 | STRB | 00010f50 72 33 2c 20 5b 72 31 2c 20 23 2d 33 5d 0a 20 20 |r3, [r1, #-3]. | 00010f60 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 72 33 | LDRB r3| 00010f70 2c 20 5b 72 32 2c 20 23 2d 32 5d 0a 20 20 20 20 |, [r2, #-2]. | 00010f80 20 20 20 20 53 54 52 42 20 20 20 20 72 33 2c 20 | STRB r3, | 00010f90 5b 72 31 2c 20 23 2d 32 5d 0a 20 20 20 20 20 20 |[r1, #-2]. | 00010fa0 20 20 4c 44 52 42 20 20 20 20 72 33 2c 20 5b 72 | LDRB r3, [r| 00010fb0 32 2c 20 23 2d 31 5d 0a 20 20 20 20 20 20 20 20 |2, #-1]. | 00010fc0 53 54 52 42 20 20 20 20 72 33 2c 20 5b 72 31 2c |STRB r3, [r1,| 00010fd0 20 23 2d 31 5d 0a 20 20 20 20 20 20 20 20 42 20 | #-1]. B | 00010fe0 20 20 20 20 20 20 69 63 69 5f 67 6f 74 6e 65 77 | ici_gotnew| 00010ff0 73 70 72 69 74 65 0a 0a 69 63 69 5f 73 64 69 72 |sprite..ici_sdir| 00011000 0a 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 |. DCB | 00011010 20 22 53 44 69 72 65 63 74 6f 72 79 22 2c 30 2c | "SDirectory",0,| 00011020 30 0a 20 20 20 20 20 20 20 20 41 4c 49 47 4e 0a |0. ALIGN.| 00011030 69 63 69 5f 73 70 72 20 44 43 42 20 20 20 20 20 |ici_spr DCB | 00011040 30 0a 20 20 20 20 20 20 20 20 25 20 20 20 20 20 |0. % | 00011050 20 20 31 36 0a 20 20 20 20 20 20 20 20 41 4c 49 | 16. ALI| 00011060 47 4e 0a 69 63 69 5f 70 69 6e 20 44 43 42 20 20 |GN.ici_pin DCB | 00011070 20 20 20 22 50 69 6e 62 6f 61 72 64 22 2c 30 2c | "Pinboard",0,| 00011080 30 2c 30 2c 30 0a 20 20 20 20 20 20 20 20 41 4c |0,0,0. AL| 00011090 49 47 4e 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d |IGN..; ---------| 000110a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00011100 0a 0a 77 6f 72 6b 73 70 61 63 65 33 20 20 20 20 |..workspace3 | 00011110 20 20 25 20 20 20 20 20 20 20 32 30 20 20 20 20 | % 20 | 00011120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00011130 20 20 3b 73 70 61 63 65 20 75 73 65 64 20 62 65 | ;space used be| 00011140 6c 6f 77 20 74 6f 20 67 65 74 20 70 74 72 20 69 |low to get ptr i| 00011150 6e 66 6f 20 28 69 6e 20 31 2e 35 32 20 75 73 65 |nfo (in 1.52 use| 00011160 64 20 77 6f 72 6b 73 70 61 63 65 32 2c 20 77 68 |d workspace2, wh| 00011170 69 63 68 20 63 6f 72 72 75 70 74 65 64 0a 20 20 |ich corrupted. | 00011180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000111a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000111b0 20 64 72 61 67 20 62 6f 78 20 64 61 74 61 20 69 | drag box data i| 000111c0 66 20 64 72 61 67 20 63 61 6c 6c 20 63 61 6d 65 |f drag call came| 000111d0 20 66 72 6f 6d 20 44 2b 27 73 20 66 69 6c 65 72 | from D+'s filer| 000111e0 20 73 6f 6c 69 64 20 64 72 61 67 20 70 61 74 63 | solid drag patc| 000111f0 68 20 2d 20 6e 62 20 69 6e 20 74 68 61 74 0a 20 |h - nb in that. | 00011200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00011230 20 20 63 61 73 65 20 63 6f 64 65 20 62 65 6c 6f | case code belo| 00011240 77 20 74 68 69 6e 6b 73 20 69 74 20 6d 61 79 20 |w thinks it may | 00011250 68 61 76 65 20 63 6f 6d 65 20 66 72 6f 6d 20 28 |have come from (| 00011260 6e 65 77 29 20 66 69 6c 65 72 2c 20 73 6f 20 68 |new) filer, so h| 00011270 61 73 20 74 6f 20 74 72 79 20 63 68 61 6e 67 69 |as to try changi| 00011280 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |ng. | 00011290 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000112b0 20 20 20 3b 20 20 73 70 72 69 74 65 20 6e 61 6d | ; sprite nam| 000112c0 65 20 69 66 20 73 70 72 69 74 65 20 64 69 72 20 |e if sprite dir | 000112d0 6f 70 74 69 6f 6e 20 6f 6e 3b 20 74 68 69 73 20 |option on; this | 000112e0 69 73 20 6f 6b 2c 20 65 76 65 6e 20 69 66 20 63 |is ok, even if c| 000112f0 61 6c 6c 20 69 73 20 66 72 6f 6d 20 44 2b 0a 20 |all is from D+. | 00011300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00011330 20 20 28 6e 6f 20 6e 61 6d 65 20 63 68 61 6e 67 | (no name chang| 00011340 65 20 77 69 6c 6c 20 6f 63 63 75 72 2c 20 61 73 |e will occur, as| 00011350 20 69 66 20 70 6f 73 73 69 62 6c 65 2c 20 69 74 | if possible, it| 00011360 20 77 69 6c 6c 20 68 61 76 65 20 62 65 65 6e 20 | will have been | 00011370 64 6f 6e 65 20 61 6c 72 65 61 64 79 0a 20 20 20 |done already. | 00011380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000113a0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 | ; | 000113b0 20 6f 72 20 72 61 74 68 65 72 2c 20 69 74 20 77 | or rather, it w| 000113c0 69 6c 6c 20 62 65 20 72 65 73 65 74 20 68 65 72 |ill be reset her| 000113d0 65 20 74 6f 20 74 68 65 20 76 61 6c 75 65 20 69 |e to the value i| 000113e0 74 20 61 6c 72 65 61 64 79 20 68 61 73 29 0a 20 |t already has). | 000113f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011410 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00011420 20 20 6e 6f 77 20 74 68 61 74 20 74 68 69 73 20 | now that this | 00011430 64 61 74 61 20 63 6f 72 72 75 70 74 69 6f 6e 20 |data corruption | 00011440 70 72 6f 62 6c 65 6d 20 68 61 73 20 62 65 65 6e |problem has been| 00011450 20 66 69 78 65 64 2e 0a 69 64 61 73 73 5f 70 61 | fixed..idass_pa| 00011460 63 6b 20 20 20 20 20 20 44 43 42 20 20 20 20 20 |ck DCB | 00011470 22 70 61 63 6b 22 0a 69 64 61 73 73 5f 6d 75 6c |"pack".idass_mul| 00011480 74 20 20 20 20 20 20 44 43 42 20 20 20 20 20 22 |t DCB "| 00011490 6d 75 6c 74 22 0a 0a 69 73 5f 64 72 61 67 61 73 |mult"..is_dragas| 000114a0 70 72 69 74 65 73 74 61 72 74 0a 0a 20 20 20 20 |pritestart.. | 000114b0 20 20 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 | LDR lr, | 000114c0 6f 70 74 69 6f 6e 73 20 20 20 20 20 20 20 20 20 |options | 000114d0 20 20 20 20 20 20 20 20 20 20 20 20 3b 43 6f 64 | ;Cod| 000114e0 65 20 62 65 74 77 65 65 6e 20 68 65 72 65 20 26 |e between here &| 000114f0 20 69 64 61 73 73 5f 6c 31 20 64 65 61 6c 73 20 | idass_l1 deals | 00011500 77 69 74 68 20 63 61 73 65 20 77 68 65 72 65 20 |with case where | 00011510 61 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 20 |a. TST | 00011520 20 20 6c 72 2c 20 23 31 3c 3c 34 20 20 20 20 20 | lr, #1<<4 | 00011530 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00011540 20 20 3b 73 6f 6c 69 64 20 64 72 61 67 20 72 65 | ;solid drag re| 00011550 71 75 65 73 74 20 63 6f 6d 65 73 20 64 69 72 65 |quest comes dire| 00011560 63 74 20 66 72 6f 6d 20 66 69 6c 65 72 20 6d 6f |ct from filer mo| 00011570 64 75 6c 65 20 2d 0a 20 20 20 20 20 20 20 20 42 |dule -. B| 00011580 45 51 20 20 20 20 20 69 64 61 73 73 5f 6c 31 20 |EQ idass_l1 | 00011590 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000115a0 20 20 20 20 20 20 20 3b 57 65 20 6e 65 65 64 20 | ;We need | 000115b0 74 6f 20 6d 61 6b 65 20 61 20 6d 6f 64 20 73 74 |to make a mod st| 000115c0 20 73 70 72 69 74 65 20 64 69 72 65 63 74 6f 72 | sprite director| 000115d0 69 65 73 2f 66 69 6c 65 73 20 64 72 61 67 20 61 |ies/files drag a| 000115e0 73 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 |s. LDR | 000115f0 20 20 6c 72 2c 20 66 69 6c 65 72 66 6c 61 67 20 | lr, filerflag | 00011600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00011610 20 20 3b 74 68 65 69 72 20 6e 65 77 20 73 70 72 | ;their new spr| 00011620 69 74 65 73 2c 20 26 20 6e 6f 74 20 61 73 20 74 |ites, & not as t| 00011630 68 65 20 66 69 6c 65 72 20 73 70 65 63 69 66 69 |he filer specifi| 00011640 65 64 20 73 70 72 69 74 65 2e 0a 20 20 20 20 20 |ed sprite.. | 00011650 20 20 20 54 53 54 20 20 20 20 20 6c 72 2c 20 23 | TST lr, #| 00011660 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |1 | 00011670 20 20 20 20 20 20 20 20 20 20 20 3b 43 6f 64 65 | ;Code| 00011680 20 77 6f 72 6b 73 20 74 68 75 73 3a 20 69 66 20 | works thus: if | 00011690 73 70 72 69 74 65 20 64 69 72 20 6f 70 74 69 6f |sprite dir optio| 000116a0 6e 20 65 6e 61 62 6c 65 64 20 26 20 66 6c 61 67 |n enabled & flag| 000116b0 20 73 65 74 20 69 6e 0a 20 20 20 20 20 20 20 20 | set in. | 000116c0 42 45 51 20 20 20 20 20 69 64 61 73 73 5f 6c 32 |BEQ idass_l2| 000116d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000116e0 20 20 20 20 20 20 20 20 3b 66 69 6c 74 65 72 20 | ;filter | 000116f0 69 6d 70 6c 69 65 73 20 63 61 6c 6c 20 69 73 20 |implies call is | 00011700 66 72 6f 6d 20 66 69 6c 65 72 2c 20 74 68 65 6e |from filer, then| 00011710 20 67 65 74 20 77 69 6e 64 6f 77 0a 20 20 20 20 | get window. | 00011720 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 2c | STMFD sp!,| 00011730 20 7b 72 30 2d 72 35 7d 20 20 20 20 20 20 20 20 | {r0-r5} | 00011740 20 20 20 20 20 20 20 20 20 20 20 20 3b 68 61 6e | ;han| 00011750 64 6c 65 20 75 6e 64 65 72 20 70 74 72 20 26 20 |dle under ptr & | 00011760 63 6f 6d 70 61 72 65 20 77 69 74 68 20 68 61 6e |compare with han| 00011770 64 6c 65 73 20 73 74 6f 72 65 64 20 69 6e 20 74 |dles stored in t| 00011780 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |he. | 00011790 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000117b0 20 20 20 3b 70 6c 6f 74 5f 69 63 6f 6e 20 6c 69 | ;plot_icon li| 000117c0 73 74 20 28 66 6f 72 6d 65 72 6c 79 20 75 73 65 |st (formerly use| 000117d0 64 20 77 68 65 6e 20 73 6f 6c 69 64 20 64 72 61 |d when solid dra| 000117e0 67 73 20 77 65 72 65 20 64 75 65 20 74 6f 0a 20 |gs were due to. | 000117f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011810 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00011820 74 68 69 73 20 6d 6f 64 75 6c 65 27 73 20 63 6f |this module's co| 00011830 64 65 20 70 61 74 63 68 69 6e 67 20 74 68 65 20 |de patching the | 00011840 77 69 6d 70 5f 64 72 61 67 62 6f 78 20 63 61 6c |wimp_dragbox cal| 00011850 6c 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 |l);. | 00011860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011880 20 20 20 20 3b 61 20 6d 61 74 63 68 20 73 68 6f | ;a match sho| 00011890 75 6c 64 20 62 65 20 66 6f 75 6e 64 2c 20 79 69 |uld be found, yi| 000118a0 65 6c 64 69 6e 67 20 74 68 65 20 64 65 73 69 72 |elding the desir| 000118b0 65 64 20 73 70 72 69 74 65 20 6e 61 6d 65 0a 20 |ed sprite name. | 000118c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000118e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000118f0 74 6f 20 62 65 20 75 73 65 64 20 69 6e 20 74 68 |to be used in th| 00011900 65 20 70 6c 6f 74 5f 69 63 6f 6e 20 69 6e 74 65 |e plot_icon inte| 00011910 72 63 65 70 74 69 6f 6e 20 26 20 74 68 65 20 73 |rception & the s| 00011920 6f 6c 69 64 20 64 72 61 67 2e 0a 20 20 20 20 20 |olid drag.. | 00011930 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011950 20 20 20 20 20 20 20 20 20 20 20 3b 4e 42 20 77 | ;NB w| 00011960 68 65 6e 20 75 73 65 64 20 77 69 74 68 20 6e 65 |hen used with ne| 00011970 77 20 66 69 6c 65 72 20 65 74 63 2c 20 73 68 6f |w filer etc, sho| 00011980 75 6c 64 20 74 75 72 6e 20 6f 66 66 20 44 2b 20 |uld turn off D+ | 00011990 6f 70 74 69 6f 6e 73 0a 20 20 20 20 20 20 20 20 |options. | 000119a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000119c0 20 20 20 20 20 20 20 20 3b 66 69 6c 65 72 20 73 | ;filer s| 000119d0 6f 6c 69 64 20 64 72 61 67 73 2c 20 73 65 65 2d |olid drags, see-| 000119e0 74 68 72 6f 20 64 72 61 67 73 20 26 20 66 61 6e |thro drags & fan| 000119f0 63 79 20 66 69 6c 65 72 20 74 65 78 74 20 2d 0a |cy filer text -.| 00011a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011a30 3b 74 68 65 20 61 70 70 20 73 6f 6c 69 64 20 64 |;the app solid d| 00011a40 72 61 67 73 20 26 20 73 70 72 69 74 65 20 64 69 |rags & sprite di| 00011a50 72 65 63 74 6f 72 69 65 73 20 6f 70 74 69 6f 6e |rectories option| 00011a60 73 20 61 72 65 20 73 74 69 6c 6c 0a 20 20 20 20 |s are still. | 00011a70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00011a90 20 20 20 20 20 20 20 20 20 20 20 20 3b 75 73 65 | ;use| 00011aa0 61 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 4c 44 |able.. LD| 00011ab0 52 20 20 20 20 20 72 32 2c 20 5b 72 32 5d 20 20 |R r2, [r2] | 00011ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00011ad0 20 20 20 20 20 20 3b 66 69 72 73 74 20 34 20 63 | ;first 4 c| 00011ae0 68 61 72 73 20 69 6e 20 64 72 61 67 20 73 70 72 |hars in drag spr| 00011af0 20 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 41 44 | name. AD| 00011b00 52 20 20 20 20 20 72 33 2c 20 69 64 61 73 73 5f |R r3, idass_| 00011b10 70 61 63 6b 20 20 20 20 20 20 20 20 20 20 20 20 |pack | 00011b20 20 20 20 20 20 20 3b 4e 42 20 6e 65 65 64 20 74 | ;NB need t| 00011b30 6f 20 69 67 6e 6f 72 65 20 61 62 6f 76 65 20 63 |o ignore above c| 00011b40 68 61 6e 67 65 20 69 66 20 73 70 72 20 6e 61 6d |hange if spr nam| 00011b50 65 20 73 74 61 72 74 73 20 27 70 61 63 6b 27 20 |e starts 'pack' | 00011b60 6f 72 0a 20 20 20 20 20 20 20 20 41 53 53 45 52 |or. ASSER| 00011b70 54 20 20 69 64 61 73 73 5f 6d 75 6c 74 20 3d 20 |T idass_mult = | 00011b80 69 64 61 73 73 5f 70 61 63 6b 2b 34 20 20 20 20 |idass_pack+4 | 00011b90 20 20 20 3b 20 20 20 27 6d 75 6c 74 27 2c 20 61 | ; 'mult', a| 00011ba0 73 20 73 70 72 69 74 65 20 6d 61 79 20 74 68 65 |s sprite may the| 00011bb0 6e 20 6e 6f 74 20 62 65 20 61 20 73 69 6e 67 6c |n not be a singl| 00011bc0 65 20 66 69 6c 65 20 73 70 72 20 61 73 0a 20 20 |e file spr as. | 00011bd0 20 20 20 20 20 20 4c 44 4d 49 41 20 20 20 72 33 | LDMIA r3| 00011be0 2c 20 7b 72 33 2c 72 34 7d 20 20 20 20 20 20 20 |, {r3,r4} | 00011bf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00011c00 20 20 73 74 6f 72 65 64 20 69 6e 20 6c 69 73 74 | stored in list| 00011c10 2c 20 62 75 74 20 62 65 20 61 20 6d 75 6c 74 69 |, but be a multi| 00011c20 66 69 6c 65 20 74 79 70 65 20 73 70 72 69 74 65 |file type sprite| 00011c30 2e 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |.. CMP | 00011c40 20 20 72 32 2c 20 72 33 0a 20 20 20 20 20 20 20 | r2, r3. | 00011c50 20 43 4d 50 4e 45 20 20 20 72 32 2c 20 72 34 0a | CMPNE r2, r4.| 00011c60 20 20 20 20 20 20 20 20 42 45 51 20 20 20 20 20 | BEQ | 00011c70 69 64 61 73 73 5f 6c 34 0a 69 64 61 73 73 5f 6c |idass_l4.idass_l| 00011c80 33 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 |3. ADR | 00011c90 20 20 72 31 2c 20 77 6f 72 6b 73 70 61 63 65 33 | r1, workspace3| 00011ca0 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 00011cb0 20 58 57 69 6d 70 5f 47 65 74 50 6f 69 6e 74 65 | XWimp_GetPointe| 00011cc0 72 49 6e 66 6f 0a 20 20 20 20 20 20 20 20 42 56 |rInfo. BV| 00011cd0 53 20 20 20 20 20 69 64 61 73 73 5f 6c 34 0a 20 |S idass_l4. | 00011ce0 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 00011cf0 30 2c 20 5b 72 31 2c 20 23 31 32 5d 20 20 20 20 |0, [r1, #12] | 00011d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00011d10 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a 20 20 |window handle. | 00011d20 20 20 20 20 20 20 41 44 52 4c 20 20 20 20 72 31 | ADRL r1| 00011d30 2c 20 6e 61 6d 65 6c 69 73 74 0a 20 20 20 20 20 |, namelist. | 00011d40 20 20 20 41 44 52 4c 20 20 20 20 72 33 2c 20 6e | ADRL r3, n| 00011d50 61 6d 65 6c 69 73 74 65 6e 64 0a 69 64 61 73 73 |amelistend.idass| 00011d60 5f 6c 35 0a 20 20 20 20 20 20 20 20 4c 44 52 20 |_l5. LDR | 00011d70 20 20 20 20 72 32 2c 20 5b 72 31 5d 2c 20 23 32 | r2, [r1], #2| 00011d80 30 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |0. CMP | 00011d90 20 20 72 32 2c 20 72 30 0a 20 20 20 20 20 20 20 | r2, r0. | 00011da0 20 42 45 51 20 20 20 20 20 69 64 61 73 73 5f 6c | BEQ idass_l| 00011db0 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |6 | 00011dc0 20 20 20 20 20 20 20 20 20 3b 69 66 20 77 65 20 | ;if we | 00011dd0 68 61 76 65 20 61 20 6d 61 74 63 68 20 6f 66 20 |have a match of | 00011de0 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 73 2c 20 |window handles, | 00011df0 65 78 69 74 20 73 65 61 72 63 68 0a 20 20 20 20 |exit search. | 00011e00 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c 20 | CMP r1, | 00011e10 72 33 0a 20 20 20 20 20 20 20 20 42 4c 54 20 20 |r3. BLT | 00011e20 20 20 20 69 64 61 73 73 5f 6c 35 0a 20 20 20 20 | idass_l5. | 00011e30 20 20 20 20 42 20 20 20 20 20 20 20 69 64 61 73 | B idas| 00011e40 73 5f 6c 34 20 20 20 20 20 20 20 20 20 20 20 20 |s_l4 | 00011e50 20 20 20 20 20 20 20 20 20 20 20 20 3b 63 6f 75 | ;cou| 00011e60 6c 64 6e 27 74 20 66 69 6e 64 20 61 20 6e 61 6d |ldn't find a nam| 00011e70 65 20 66 6f 72 20 74 68 69 73 20 77 69 6e 64 6f |e for this windo| 00011e80 77 0a 69 64 61 73 73 5f 6c 36 0a 20 20 20 20 20 |w.idass_l6. | 00011e90 20 20 20 53 55 42 20 20 20 20 20 72 32 2c 20 72 | SUB r2, r| 00011ea0 31 2c 20 23 31 36 20 20 20 20 20 20 20 20 20 20 |1, #16 | 00011eb0 20 20 20 20 20 20 20 20 20 20 20 3b 63 61 6c 63 | ;calc| 00011ec0 20 6e 61 6d 65 20 70 74 72 20 69 6e 20 6e 61 6d | name ptr in nam| 00011ed0 65 6c 69 73 74 20 62 61 73 65 64 20 6f 6e 20 72 |elist based on r| 00011ee0 31 20 66 72 6f 6d 20 61 62 6f 76 65 20 73 63 61 |1 from above sca| 00011ef0 6e 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 20 |n. STR | 00011f00 20 20 72 32 2c 20 5b 73 70 2c 20 23 38 5d 0a 69 | r2, [sp, #8].i| 00011f10 64 61 73 73 5f 6c 34 0a 20 20 20 20 20 20 20 20 |dass_l4. | 00011f20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 |LDMFD sp!, {r0| 00011f30 2d 72 35 7d 0a 69 64 61 73 73 5f 6c 32 0a 20 20 |-r5}.idass_l2. | 00011f40 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 6c 72 | LDR lr| 00011f50 2c 20 6f 70 74 69 6f 6e 73 0a 69 64 61 73 73 5f |, options.idass_| 00011f60 6c 31 0a 20 20 20 20 20 20 20 20 54 53 54 20 20 |l1. TST | 00011f70 20 20 20 6c 72 2c 20 23 31 3c 3c 32 20 20 20 20 | lr, #1<<2 | 00011f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00011f90 20 20 20 3b 69 66 20 73 65 6d 69 2d 74 72 61 6e | ;if semi-tran| 00011fa0 73 70 61 72 65 6e 74 20 73 6f 6c 69 64 20 64 72 |sparent solid dr| 00011fb0 61 67 73 20 6e 6f 74 20 65 6e 61 62 6c 65 64 2c |ags not enabled,| 00011fc0 20 70 61 73 73 20 6f 6e 2e 0a 20 20 20 20 20 20 | pass on.. | 00011fd0 20 20 42 45 51 20 20 20 20 20 63 6f 6e 74 69 6e | BEQ contin| 00011fe0 75 65 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |ue.. CMP | 00011ff0 20 20 20 20 72 31 2c 20 23 30 0a 20 20 20 20 20 | r1, #0. | 00012000 20 20 20 42 45 51 20 20 20 20 20 63 6f 6e 74 69 | BEQ conti| 00012010 6e 75 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |nue | 00012020 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 | ; if | 00012030 73 79 73 74 65 6d 20 73 70 72 69 74 65 20 61 72 |system sprite ar| 00012040 65 61 20 28 75 6e 6c 69 6b 65 6c 79 29 2c 20 64 |ea (unlikely), d| 00012050 6f 6e 27 74 20 62 6f 74 68 65 72 20 64 6f 69 6e |on't bother doin| 00012060 67 20 6d 6f 64 73 0a 20 20 20 20 20 20 20 20 20 |g mods. | 00012070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00012090 20 20 20 20 20 20 20 3b 20 28 63 61 6e 27 74 20 | ; (can't | 000120a0 62 65 20 62 6f 74 68 65 72 65 64 20 74 6f 20 66 |be bothered to f| 000120b0 69 6e 64 20 73 70 72 69 74 65 20 70 74 72 29 0a |ind sprite ptr).| 000120c0 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 20 | STMFD | 000120d0 73 70 21 2c 20 7b 72 30 2d 72 37 7d 0a 20 20 20 |sp!, {r0-r7}. | 000120e0 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c | CMP r1,| 000120f0 20 23 31 0a 20 20 20 20 20 20 20 20 42 4e 45 20 | #1. BNE | 00012100 20 20 20 20 64 61 73 5f 66 69 6e 64 70 74 72 20 | das_findptr | 00012110 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012120 20 20 20 20 3b 69 66 20 6e 6f 74 20 77 69 6d 70 | ;if not wimp| 00012130 20 61 72 65 61 2c 20 6c 6f 6f 6b 20 69 6e 20 67 | area, look in g| 00012140 69 76 65 6e 20 61 72 65 61 0a 20 20 20 20 20 20 |iven area. | 00012150 20 20 53 57 49 20 20 20 20 20 58 57 69 6d 70 5f | SWI XWimp_| 00012160 42 61 73 65 4f 66 53 70 72 69 74 65 73 20 20 20 |BaseOfSprites | 00012170 20 20 20 20 20 20 20 20 20 20 3b 7b 71 75 69 63 | ;{quic| 00012180 6b 65 73 74 20 77 61 79 20 74 6f 20 63 6f 70 79 |kest way to copy| 00012190 20 73 70 72 69 74 65 20 74 6f 20 61 6e 6f 74 68 | sprite to anoth| 000121a0 65 72 20 61 72 65 61 20 28 63 61 6e 27 74 20 75 |er area (can't u| 000121b0 73 65 0a 20 20 20 20 20 20 20 20 4c 44 4d 56 53 |se. LDMVS| 000121c0 46 44 20 73 70 21 2c 20 7b 72 30 2d 72 37 7d 20 |FD sp!, {r0-r7} | 000121d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000121e0 20 20 20 3b 20 73 65 6c 65 63 74 20 64 69 72 65 | ; select dire| 000121f0 63 74 6c 79 20 61 73 20 69 74 20 6f 6e 6c 79 20 |ctly as it only | 00012200 72 65 74 75 72 6e 73 20 70 74 72 20 69 66 20 69 |returns ptr if i| 00012210 6e 20 75 73 65 72 20 61 72 65 61 29 7d 0a 20 20 |n user area)}. | 00012220 20 20 20 20 20 20 42 56 53 20 20 20 20 20 63 6f | BVS co| 00012230 6e 74 69 6e 75 65 0a 20 20 20 20 20 20 20 20 53 |ntinue. S| 00012240 54 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 7d |TMFD sp!, {r0}| 00012250 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00012260 20 72 30 2c 20 23 26 31 31 38 0a 20 20 20 20 20 | r0, #&118. | 00012270 20 20 20 53 57 49 20 20 20 20 20 58 4f 53 5f 53 | SWI XOS_S| 00012280 70 72 69 74 65 4f 70 20 20 20 20 20 20 20 20 20 |priteOp | 00012290 20 20 20 20 20 20 20 20 20 20 20 3b 6c 6f 6f 6b | ;look| 000122a0 20 69 6e 20 52 4d 41 20 61 72 65 61 0a 20 20 20 | in RMA area. | 000122b0 20 20 20 20 20 41 44 44 56 43 20 20 20 73 70 2c | ADDVC sp,| 000122c0 20 73 70 2c 20 23 34 20 20 20 20 20 20 20 20 20 | sp, #4 | 000122d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 66 6f | ;fo| 000122e0 72 67 65 74 20 61 62 6f 75 74 20 72 30 20 28 52 |rget about r0 (R| 000122f0 4f 4d 20 73 70 72 20 61 72 65 61 29 20 6f 6e 20 |OM spr area) on | 00012300 73 74 61 63 6b 2c 20 69 66 20 6e 6f 77 20 67 6f |stack, if now go| 00012310 74 20 70 74 72 0a 20 20 20 20 20 20 20 20 42 56 |t ptr. BV| 00012320 43 20 20 20 20 20 64 61 73 5f 67 6f 74 70 74 72 |C das_gotptr| 00012330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012340 20 20 20 20 20 20 3b 61 73 73 75 6d 65 20 69 66 | ;assume if| 00012350 20 63 61 6e 27 74 20 66 69 6e 64 20 73 70 72 69 | can't find spri| 00012360 74 65 2c 20 74 68 65 6e 20 72 32 20 70 72 65 73 |te, then r2 pres| 00012370 65 72 76 65 64 20 28 76 61 6c 69 64 20 3f 29 0a |erved (valid ?).| 00012380 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 | LDMFD | 00012390 73 70 21 2c 20 7b 72 31 7d 20 20 20 20 20 20 20 |sp!, {r1} | 000123a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000123b0 3b 26 20 66 61 6c 6c 20 74 68 72 6f 75 67 68 20 |;& fall through | 000123c0 74 6f 20 63 6f 64 65 20 74 6f 20 6c 6f 6f 6b 20 |to code to look | 000123d0 6e 6f 77 20 69 6e 20 52 4f 4d 20 61 72 65 61 0a |now in ROM area.| 000123e0 64 61 73 5f 66 69 6e 64 70 74 72 0a 20 20 20 20 |das_findptr. | 000123f0 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 | MOV r0, | 00012400 23 26 31 31 38 0a 20 20 20 20 20 20 20 20 53 57 |#&118. SW| 00012410 49 20 20 20 20 20 58 4f 53 5f 53 70 72 69 74 65 |I XOS_Sprite| 00012420 4f 70 0a 20 20 20 20 20 20 20 20 4c 44 4d 56 53 |Op. LDMVS| 00012430 46 44 20 73 70 21 2c 20 7b 72 30 2d 72 37 7d 0a |FD sp!, {r0-r7}.| 00012440 20 20 20 20 20 20 20 20 42 56 53 20 20 20 20 20 | BVS | 00012450 63 6f 6e 74 69 6e 75 65 0a 64 61 73 5f 67 6f 74 |continue.das_got| 00012460 70 74 72 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 |ptr. MOV | 00012470 20 20 20 20 72 34 2c 20 72 32 20 20 20 20 20 20 | r4, r2 | 00012480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012490 20 20 20 20 3b 69 6e 20 72 34 0a 20 20 20 20 20 | ;in r4. | 000124a0 20 20 20 4c 44 52 20 20 20 20 20 72 35 2c 20 5b | LDR r5, [| 000124b0 72 34 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 |r4] | 000124c0 20 20 20 20 20 20 20 20 20 20 20 3b 6f 66 66 73 | ;offs| 000124d0 65 74 20 74 6f 20 6e 65 78 74 20 73 70 72 69 74 |et to next sprit| 000124e0 65 20 28 69 65 20 73 69 7a 65 20 6f 66 20 73 70 |e (ie size of sp| 000124f0 72 69 74 65 29 20 69 6e 20 72 35 0a 20 20 20 20 |rite) in r5. | 00012500 20 20 20 20 41 44 44 20 20 20 20 20 6c 72 2c 20 | ADD lr, | 00012510 72 34 2c 20 23 33 32 0a 20 20 20 20 20 20 20 20 |r4, #32. | 00012520 4c 44 4d 49 41 20 20 20 6c 72 2c 20 7b 72 31 2c |LDMIA lr, {r1,| 00012530 20 72 33 7d 0a 20 20 20 20 20 20 20 20 43 4d 50 | r3}. CMP| 00012540 20 20 20 20 20 72 31 2c 20 72 33 0a 20 20 20 20 | r1, r3. | 00012550 20 20 20 20 53 55 42 45 51 20 20 20 6c 72 2c 20 | SUBEQ lr, | 00012560 72 35 2c 20 72 31 20 20 20 20 20 20 20 20 20 20 |r5, r1 | 00012570 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 66 20 | ;if | 00012580 6e 6f 20 6d 61 73 6b 2c 20 61 64 64 20 73 70 61 |no mask, add spa| 00012590 63 65 20 66 6f 72 20 6f 6e 65 20 28 73 70 72 69 |ce for one (spri| 000125a0 74 65 20 73 69 7a 65 2d 69 6d 61 67 65 20 6f 66 |te size-image of| 000125b0 66 73 65 74 29 0a 20 20 20 20 20 20 20 20 41 44 |fset). AD| 000125c0 44 45 51 20 20 20 72 36 2c 20 72 35 2c 20 6c 72 |DEQ r6, r5, lr| 000125d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000125e0 20 20 20 20 20 20 3b 70 74 72 20 69 6e 20 72 34 | ;ptr in r4| 000125f0 2c 20 26 20 73 69 7a 65 20 6e 65 77 20 73 70 72 |, & size new spr| 00012600 69 74 65 20 6e 6f 77 20 69 6e 20 72 36 0a 20 20 |ite now in r6. | 00012610 20 20 20 20 20 20 4d 4f 56 4e 45 20 20 20 72 36 | MOVNE r6| 00012620 2c 20 72 35 0a 20 20 20 20 20 20 20 20 41 44 44 |, r5. ADD| 00012630 20 20 20 20 20 72 36 2c 20 72 36 2c 20 23 31 36 | r6, r6, #16| 00012640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012650 20 20 20 20 20 3b 61 64 64 20 6f 6e 20 73 69 7a | ;add on siz| 00012660 65 20 66 6f 72 20 61 72 65 61 20 68 65 61 64 65 |e for area heade| 00012670 72 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |r. MOV | 00012680 20 20 72 30 2c 20 23 36 0a 20 20 20 20 20 20 20 | r0, #6. | 00012690 20 4d 4f 56 20 20 20 20 20 72 33 2c 20 72 36 0a | MOV r3, r6.| 000126a0 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 20 | SWI | 000126b0 58 4f 53 5f 4d 6f 64 75 6c 65 20 20 20 20 20 20 |XOS_Module | 000126c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000126d0 3b 74 72 79 20 74 6f 20 67 65 74 20 73 70 61 63 |;try to get spac| 000126e0 65 20 66 6f 72 20 6e 65 77 20 73 70 72 69 74 65 |e for new sprite| 000126f0 0a 20 20 20 20 20 20 20 20 4c 44 4d 56 53 46 44 |. LDMVSFD| 00012700 20 73 70 21 2c 20 7b 72 30 2d 72 37 7d 0a 20 20 | sp!, {r0-r7}. | 00012710 20 20 20 20 20 20 42 56 53 20 20 20 20 20 63 6f | BVS co| 00012720 6e 74 69 6e 75 65 20 20 20 20 20 20 20 20 20 20 |ntinue | 00012730 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 | ;i| 00012740 66 20 63 61 6e 27 74 20 67 65 74 20 6d 65 6d 6f |f can't get memo| 00012750 72 79 2c 20 70 61 73 73 20 73 70 72 69 74 65 20 |ry, pass sprite | 00012760 6f 6e 20 75 6e 6d 6f 64 69 66 69 65 64 0a 20 20 |on unmodified. | 00012770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00012790 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000127a0 65 6c 73 65 20 67 6f 74 20 70 74 72 20 74 6f 20 |else got ptr to | 000127b0 62 6c 6f 63 6b 20 69 6e 20 72 32 0a 20 20 20 20 |block in r2. | 000127c0 20 20 20 20 4d 4f 56 20 20 20 20 20 72 37 2c 20 | MOV r7, | 000127d0 72 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |r2 | 000127e0 20 20 20 20 20 20 20 20 20 20 20 20 3b 6b 65 65 | ;kee| 000127f0 70 20 61 20 63 6f 70 79 20 6f 66 20 62 6c 6f 63 |p a copy of bloc| 00012800 6b 20 70 74 72 20 69 6e 20 72 37 0a 20 20 20 20 |k ptr in r7. | 00012810 20 20 20 20 41 44 44 20 20 20 20 20 72 30 2c 20 | ADD r0, | 00012820 72 34 2c 20 72 35 20 20 20 20 20 20 20 20 20 20 |r4, r5 | 00012830 20 20 20 20 20 20 20 20 20 20 20 20 3b 65 6e 64 | ;end| 00012840 20 73 6f 75 72 63 65 20 73 70 72 69 74 65 0a 20 | source sprite. | 00012850 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00012860 31 2c 20 72 37 0a 20 20 20 20 20 20 20 20 53 54 |1, r7. ST| 00012870 52 20 20 20 20 20 72 36 2c 20 5b 72 31 5d 2c 20 |R r6, [r1], | 00012880 23 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#4 | 00012890 20 20 20 20 20 20 3b 73 65 74 20 73 69 7a 65 20 | ;set size | 000128a0 6e 65 77 20 73 70 72 69 74 65 20 61 72 65 61 0a |new sprite area.| 000128b0 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 000128c0 6c 72 2c 20 23 31 0a 20 20 20 20 20 20 20 20 53 |lr, #1. S| 000128d0 54 52 20 20 20 20 20 6c 72 2c 20 5b 72 31 5d 2c |TR lr, [r1],| 000128e0 20 23 34 20 20 20 20 20 20 20 20 20 20 20 20 20 | #4 | 000128f0 20 20 20 20 20 20 20 3b 6f 6e 65 20 73 70 72 69 | ;one spri| 00012900 74 65 20 69 6e 20 61 72 65 61 0a 20 20 20 20 20 |te in area. | 00012910 20 20 20 4d 4f 56 20 20 20 20 20 6c 72 2c 20 23 | MOV lr, #| 00012920 31 36 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 |16. STR | 00012930 20 20 20 6c 72 2c 20 5b 72 31 5d 2c 20 23 34 20 | lr, [r1], #4 | 00012940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012950 20 20 20 3b 73 70 72 69 74 65 20 6f 66 66 73 65 | ;sprite offse| 00012960 74 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 |t. ADD | 00012970 20 20 6c 72 2c 20 72 35 2c 20 23 31 36 0a 20 20 | lr, r5, #16. | 00012980 20 20 20 20 20 20 53 54 52 20 20 20 20 20 6c 72 | STR lr| 00012990 2c 20 5b 72 31 5d 2c 20 23 34 20 20 20 20 20 20 |, [r1], #4 | 000129a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 66 | ;f| 000129b0 72 65 65 20 6f 66 66 73 65 74 20 28 74 68 65 72 |ree offset (ther| 000129c0 65 20 69 73 20 6e 6f 20 66 72 65 65 20 61 66 74 |e is no free aft| 000129d0 65 72 20 74 68 69 73 20 73 70 72 69 74 65 20 69 |er this sprite i| 000129e0 73 20 61 64 64 65 64 29 0a 64 61 73 5f 73 70 72 |s added).das_spr| 000129f0 69 74 65 63 6f 70 79 0a 20 20 20 20 20 20 20 20 |itecopy. | 00012a00 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 34 5d |LDR lr, [r4]| 00012a10 2c 20 23 34 20 20 20 20 20 20 20 20 20 20 20 20 |, #4 | 00012a20 20 20 20 20 20 20 20 20 3b 63 61 6e 20 61 73 73 | ;can ass| 00012a30 75 6d 65 20 73 70 72 69 74 65 20 73 69 7a 65 20 |ume sprite size | 00012a40 69 73 20 69 6e 74 65 67 65 72 20 6e 75 6d 62 65 |is integer numbe| 00012a50 72 20 6f 66 20 77 6f 72 64 73 0a 20 20 20 20 20 |r of words. | 00012a60 20 20 20 53 54 52 20 20 20 20 20 6c 72 2c 20 5b | STR lr, [| 00012a70 72 31 5d 2c 20 23 34 0a 20 20 20 20 20 20 20 20 |r1], #4. | 00012a80 43 4d 50 20 20 20 20 20 72 34 2c 20 72 30 0a 20 |CMP r4, r0. | 00012a90 20 20 20 20 20 20 20 42 4c 54 20 20 20 20 20 64 | BLT d| 00012aa0 61 73 5f 73 70 72 69 74 65 63 6f 70 79 20 20 20 |as_spritecopy | 00012ab0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00012ac0 6e 6f 77 20 68 61 76 65 20 73 70 72 69 74 65 20 |now have sprite | 00012ad0 63 6f 70 69 65 64 20 74 6f 20 6e 65 77 20 61 72 |copied to new ar| 00012ae0 65 61 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |ea. | 00012af0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00012b10 20 20 20 3b 72 37 20 69 73 20 61 72 65 61 20 70 | ;r7 is area p| 00012b20 74 72 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 |tr. ADD | 00012b30 20 20 20 72 30 2c 20 72 37 2c 20 23 31 36 2b 33 | r0, r7, #16+3| 00012b40 32 0a 20 20 20 20 20 20 20 20 4c 44 4d 49 41 20 |2. LDMIA | 00012b50 20 20 72 30 2c 20 7b 72 30 2c 20 72 31 7d 0a 20 | r0, {r0, r1}. | 00012b60 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00012b70 30 2c 20 72 31 0a 20 20 20 20 20 20 20 20 20 20 |0, r1. | 00012b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00012ba0 20 20 20 20 20 20 3b 69 66 20 65 71 2c 20 63 72 | ;if eq, cr| 00012bb0 65 61 74 65 20 6d 61 73 6b 0a 20 20 20 20 20 20 |eate mask. | 00012bc0 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 23 26 | MOV r0, #&| 00012bd0 32 30 30 0a 20 20 20 20 20 20 20 20 4f 52 52 20 |200. ORR | 00012be0 20 20 20 20 72 30 2c 20 72 30 2c 20 23 26 31 44 | r0, r0, #&1D| 00012bf0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00012c00 20 72 31 2c 20 72 37 0a 20 20 20 20 20 20 20 20 | r1, r7. | 00012c10 41 44 44 20 20 20 20 20 72 32 2c 20 72 37 2c 20 |ADD r2, r7, | 00012c20 23 31 36 0a 20 20 20 20 20 20 20 20 53 57 49 45 |#16. SWIE| 00012c30 51 20 20 20 58 4f 53 5f 53 70 72 69 74 65 4f 70 |Q XOS_SpriteOp| 00012c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012c50 20 20 20 20 3b 69 66 20 6e 6f 20 6d 61 73 6b 2c | ;if no mask,| 00012c60 20 63 72 65 61 74 65 20 6f 6e 65 0a 20 20 20 20 | create one. | 00012c70 20 20 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c | LDMVSFD sp!,| 00012c80 20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 | {r0-r7}. | 00012c90 20 42 56 53 20 20 20 20 20 63 6f 6e 74 69 6e 75 | BVS continu| 00012ca0 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 00012cb0 20 20 20 20 20 20 20 20 20 3b 74 68 69 73 20 73 | ;this s| 00012cc0 68 6f 75 6c 64 6e 27 74 20 68 61 70 70 65 6e 0a |houldn't happen.| 00012cd0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00012ce0 20 72 30 2c 20 23 26 32 32 38 0a 20 20 20 20 20 | r0, #&228. | 00012cf0 20 20 20 53 57 49 20 20 20 20 20 58 4f 53 5f 53 | SWI XOS_S| 00012d00 70 72 69 74 65 4f 70 20 20 20 20 20 20 20 20 20 |priteOp | 00012d10 20 20 20 20 20 20 20 20 20 20 20 3b 72 65 61 64 | ;read| 00012d20 20 69 6e 66 6f 20 2d 20 68 61 76 65 20 77 69 64 | info - have wid| 00012d30 74 68 2f 68 65 69 67 68 74 20 28 70 69 78 65 6c |th/height (pixel| 00012d40 73 29 20 69 6e 20 72 33 2f 72 34 0a 20 20 20 20 |s) in r3/r4. | 00012d50 20 20 20 20 4c 44 4d 56 53 46 44 20 73 70 21 2c | LDMVSFD sp!,| 00012d60 20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 20 20 20 | {r0-r7}. | 00012d70 20 42 56 53 20 20 20 20 20 63 6f 6e 74 69 6e 75 | BVS continu| 00012d80 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 00012d90 20 20 20 20 20 20 20 20 20 3b 74 68 69 73 20 73 | ;this s| 00012da0 68 6f 75 6c 64 6e 27 74 20 68 61 70 70 65 6e 0a |houldn't happen.| 00012db0 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 |. STMFD | 00012dc0 20 73 70 21 2c 20 7b 72 31 2c 20 72 32 7d 0a 20 | sp!, {r1, r2}. | 00012dd0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00012de0 30 2c 20 72 36 0a 20 20 20 20 20 20 20 20 4d 4f |0, r6. MO| 00012df0 56 20 20 20 20 20 72 31 2c 20 23 39 0a 20 20 20 |V r1, #9. | 00012e00 20 20 20 20 20 53 57 49 20 20 20 20 20 58 4f 53 | SWI XOS| 00012e10 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 61 62 6c |_ReadModeVariabl| 00012e20 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |e. MOV | 00012e30 20 20 72 30 2c 20 72 32 0a 20 20 20 20 20 20 20 | r0, r2. | 00012e40 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 | LDMFD sp!, {r| 00012e50 31 2c 20 72 32 7d 0a 20 20 20 20 20 20 20 20 4c |1, r2}. L| 00012e60 44 4d 56 53 46 44 20 73 70 21 2c 20 7b 72 30 2d |DMVSFD sp!, {r0-| 00012e70 72 37 7d 0a 20 20 20 20 20 20 20 20 42 56 53 20 |r7}. BVS | 00012e80 20 20 20 20 63 6f 6e 74 69 6e 75 65 0a 20 20 20 | continue. | 00012e90 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 30 2c | CMP r0,| 00012ea0 20 23 32 0a 20 20 20 20 20 20 20 20 42 4e 45 20 | #2. BNE | 00012eb0 20 20 20 20 64 61 73 5f 75 73 65 73 77 69 20 20 | das_useswi | 00012ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00012ed0 20 20 20 20 3b 69 66 20 6e 6f 74 20 61 20 31 36 | ;if not a 16| 00012ee0 20 63 6f 6c 6f 75 72 20 73 70 72 69 74 65 2c 20 | colour sprite, | 00012ef0 75 73 65 20 53 57 49 20 74 6f 20 70 65 72 66 6f |use SWI to perfo| 00012f00 72 61 74 65 20 6d 61 73 6b 0a 20 20 20 20 20 20 |rate mask. | 00012f10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00012f30 20 20 20 20 20 20 20 20 20 20 3b 65 6c 73 65 20 | ;else | 00012f40 64 6f 20 69 74 20 6d 61 6e 75 61 6c 6c 79 20 2d |do it manually -| 00012f50 20 69 6d 70 6f 72 74 61 6e 74 20 66 6f 72 20 73 | important for s| 00012f60 70 65 65 64 2c 20 65 73 70 65 63 69 61 6c 6c 79 |peed, especially| 00012f70 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00012f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00012fa0 20 3b 6f 6e 20 61 6e 20 41 52 4d 32 20 6d 61 63 | ;on an ARM2 mac| 00012fb0 68 69 6e 65 20 66 6f 72 20 62 69 67 20 73 70 72 |hine for big spr| 00012fc0 69 74 65 73 2c 20 65 67 20 6d 6f 64 65 20 32 37 |ites, eg mode 27| 00012fd0 20 6d 75 6c 74 69 66 69 6c 65 0a 20 20 20 20 20 | multifile. | 00012fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013000 20 20 20 20 20 20 20 20 20 20 20 3b 77 68 69 63 | ;whic| 00013010 68 20 69 73 20 61 62 6f 75 74 20 31 31 34 78 31 |h is about 114x1| 00013020 31 33 20 70 69 78 65 6c 73 2c 20 26 20 74 68 65 |13 pixels, & the| 00013030 6e 20 74 61 6b 65 73 20 61 62 6f 75 74 20 32 20 |n takes about 2 | 00013040 73 65 63 6f 6e 64 73 0a 20 20 20 20 20 20 20 20 |seconds. | 00013050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013070 20 20 20 20 20 20 20 20 3b 74 6f 20 70 65 72 66 | ;to perf| 00013080 6f 72 61 74 65 20 75 73 69 6e 67 20 74 68 65 20 |orate using the | 00013090 53 57 49 20 63 61 6c 6c 2e 0a 20 20 20 20 20 20 |SWI call.. | 000130a0 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b 72 | LDR r0, [r| 000130b0 32 2c 20 23 33 36 5d 20 20 20 20 20 20 20 20 20 |2, #36] | 000130c0 20 20 20 20 20 20 20 20 20 20 3b 6d 61 73 6b 20 | ;mask | 000130d0 6f 66 66 73 65 74 0a 20 20 20 20 20 20 20 20 41 |offset. A| 000130e0 44 44 20 20 20 20 20 72 30 2c 20 72 32 2c 20 72 |DD r0, r2, r| 000130f0 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 00013100 20 20 20 20 20 20 20 3b 6d 61 73 6b 20 70 74 72 | ;mask ptr| 00013110 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00013120 20 72 35 2c 20 23 31 35 0a 20 20 20 20 20 20 20 | r5, #15. | 00013130 20 4f 52 52 20 20 20 20 20 72 35 2c 20 72 35 2c | ORR r5, r5,| 00013140 20 72 35 2c 20 41 53 4c 20 23 38 0a 20 20 20 20 | r5, ASL #8. | 00013150 20 20 20 20 4f 52 52 20 20 20 20 20 72 35 2c 20 | ORR r5, | 00013160 72 35 2c 20 72 35 2c 20 41 53 4c 20 23 31 36 20 |r5, r5, ASL #16 | 00013170 20 20 20 20 20 20 20 20 20 20 20 20 3b 6c 65 66 | ;lef| 00013180 74 20 61 6c 69 67 6e 65 64 20 33 32 20 62 69 74 |t aligned 32 bit| 00013190 20 63 68 65 63 6b 20 28 74 6f 20 62 65 20 62 69 | check (to be bi| 000131a0 63 27 65 64 20 69 6e 74 6f 20 77 6f 72 64 73 29 |c'ed into words)| 000131b0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 000131c0 20 72 36 2c 20 72 35 2c 20 41 53 4c 20 23 34 20 | r6, r5, ASL #4 | 000131d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000131e0 20 3b 72 69 67 68 74 20 61 6c 69 67 6e 65 64 20 | ;right aligned | 000131f0 33 32 20 62 69 74 20 63 68 65 63 6b 0a 20 20 20 |32 bit check. | 00013200 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 31 2c | LDR r1,| 00013210 20 5b 72 32 2c 20 23 31 36 5d 20 20 20 20 20 20 | [r2, #16] | 00013220 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 77 69 | ;wi| 00013230 64 74 68 20 69 6e 20 77 6f 72 64 73 20 2d 20 31 |dth in words - 1| 00013240 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 00013250 20 72 33 2c 20 5b 72 32 2c 20 23 32 30 5d 20 20 | r3, [r2, #20] | 00013260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013270 20 3b 68 65 69 67 68 74 20 69 6e 20 73 63 61 6e | ;height in scan| 00013280 6c 69 6e 65 73 20 2d 20 31 0a 64 61 73 5f 72 6f |lines - 1.das_ro| 00013290 77 6c 6f 6f 70 32 0a 20 20 20 20 20 20 20 20 4d |wloop2. M| 000132a0 4f 56 20 20 20 20 20 72 34 2c 20 72 31 20 20 20 |OV r4, r1 | 000132b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000132c0 20 20 20 20 20 20 20 3b 73 65 74 20 75 70 20 77 | ;set up w| 000132d0 69 64 74 68 20 63 6f 75 6e 74 0a 20 20 20 20 20 |idth count. | 000132e0 20 20 20 45 4f 52 20 20 20 20 20 72 35 2c 20 72 | EOR r5, r| 000132f0 35 2c 20 72 36 0a 20 20 20 20 20 20 20 20 45 4f |5, r6. EO| 00013300 52 20 20 20 20 20 72 36 2c 20 72 36 2c 20 72 35 |R r6, r6, r5| 00013310 0a 20 20 20 20 20 20 20 20 45 4f 52 20 20 20 20 |. EOR | 00013320 20 72 35 2c 20 72 36 2c 20 72 35 20 20 20 20 20 | r5, r6, r5 | 00013330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013340 20 3b 73 77 61 70 20 72 35 20 61 6e 64 20 72 36 | ;swap r5 and r6| 00013350 0a 64 61 73 5f 63 6f 6c 6c 6f 6f 70 32 0a 20 20 |.das_colloop2. | 00013360 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 32 | LDR r2| 00013370 2c 20 5b 72 30 5d 0a 20 20 20 20 20 20 20 20 42 |, [r0]. B| 00013380 49 43 20 20 20 20 20 72 32 2c 20 72 32 2c 20 72 |IC r2, r2, r| 00013390 36 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 20 |6. STR | 000133a0 20 20 72 32 2c 20 5b 72 30 5d 2c 20 23 34 0a 20 | r2, [r0], #4. | 000133b0 20 20 20 20 20 20 20 53 55 42 53 20 20 20 20 72 | SUBS r| 000133c0 34 2c 20 72 34 2c 20 23 31 0a 20 20 20 20 20 20 |4, r4, #1. | 000133d0 20 20 42 50 4c 20 20 20 20 20 64 61 73 5f 63 6f | BPL das_co| 000133e0 6c 6c 6f 6f 70 32 0a 20 20 20 20 20 20 20 20 53 |lloop2. S| 000133f0 55 42 53 20 20 20 20 72 33 2c 20 72 33 2c 20 23 |UBS r3, r3, #| 00013400 31 0a 20 20 20 20 20 20 20 20 42 50 4c 20 20 20 |1. BPL | 00013410 20 20 64 61 73 5f 72 6f 77 6c 6f 6f 70 32 0a 20 | das_rowloop2. | 00013420 20 20 20 20 20 20 20 42 20 20 20 20 20 20 20 64 | B d| 00013430 61 73 5f 6d 61 73 6b 70 65 72 66 0a 0a 64 61 73 |as_maskperf..das| 00013440 5f 75 73 65 73 77 69 0a 20 20 20 20 20 20 20 20 |_useswi. | 00013450 53 55 42 20 20 20 20 20 72 36 2c 20 72 33 2c 20 |SUB r6, r3, | 00013460 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#1 | 00013470 20 20 20 20 20 20 20 20 3b 63 6f 70 79 20 20 77 | ;copy w| 00013480 69 64 74 68 2d 31 20 74 6f 20 72 36 0a 20 20 20 |idth-1 to r6. | 00013490 20 20 20 20 20 53 55 42 20 20 20 20 20 72 34 2c | SUB r4,| 000134a0 20 72 34 2c 20 23 31 20 20 20 20 20 20 20 20 20 | r4, #1 | 000134b0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 | ; | 000134c0 20 20 20 68 65 69 67 68 74 2d 31 20 74 6f 20 72 | height-1 to r| 000134d0 34 0a 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 |4.. MOV | 000134e0 20 20 20 72 30 2c 20 23 26 32 32 43 0a 20 20 20 | r0, #&22C. | 000134f0 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 35 2c | MOV r5,| 00013500 20 23 30 0a 64 61 73 5f 72 6f 77 6c 6f 6f 70 0a | #0.das_rowloop.| 00013510 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00013520 72 33 2c 20 72 36 0a 20 20 20 20 20 20 20 20 54 |r3, r6. T| 00013530 53 54 20 20 20 20 20 72 34 2c 20 23 31 0a 20 20 |ST r4, #1. | 00013540 20 20 20 20 20 20 53 55 42 4e 45 20 20 20 72 33 | SUBNE r3| 00013550 2c 20 72 33 2c 20 23 31 20 20 20 20 20 20 20 20 |, r3, #1 | 00013560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 | ;i| 00013570 66 20 72 34 20 6f 64 64 2c 20 73 74 61 72 74 20 |f r4 odd, start | 00013580 77 69 74 68 20 63 6f 6c 75 6d 6e 20 6f 6e 65 20 |with column one | 00013590 74 6f 20 6c 65 66 74 20 6f 66 20 72 69 67 68 74 |to left of right| 000135a0 20 73 69 64 65 0a 64 61 73 5f 63 6f 6c 6c 6f 6f | side.das_colloo| 000135b0 70 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |p. SWI | 000135c0 20 20 58 4f 53 5f 53 70 72 69 74 65 4f 70 0a 20 | XOS_SpriteOp. | 000135d0 20 20 20 20 20 20 20 4c 44 4d 56 53 46 44 20 73 | LDMVSFD s| 000135e0 70 21 2c 20 7b 72 30 2d 72 37 7d 0a 20 20 20 20 |p!, {r0-r7}. | 000135f0 20 20 20 20 42 56 53 20 20 20 20 20 63 6f 6e 74 | BVS cont| 00013600 69 6e 75 65 20 20 20 20 20 20 20 20 20 20 20 20 |inue | 00013610 20 20 20 20 20 20 20 20 20 20 20 20 3b 74 68 69 | ;thi| 00013620 73 20 73 68 6f 75 6c 64 6e 27 74 20 68 61 70 70 |s shouldn't happ| 00013630 65 6e 0a 20 20 20 20 20 20 20 20 53 55 42 53 20 |en. SUBS | 00013640 20 20 20 72 33 2c 20 72 33 2c 20 23 32 0a 20 20 | r3, r3, #2. | 00013650 20 20 20 20 20 20 42 50 4c 20 20 20 20 20 64 61 | BPL da| 00013660 73 5f 63 6f 6c 6c 6f 6f 70 0a 20 20 20 20 20 20 |s_colloop. | 00013670 20 20 53 55 42 53 20 20 20 20 72 34 2c 20 72 34 | SUBS r4, r4| 00013680 2c 20 23 31 0a 20 20 20 20 20 20 20 20 42 50 4c |, #1. BPL| 00013690 20 20 20 20 20 64 61 73 5f 72 6f 77 6c 6f 6f 70 | das_rowloop| 000136a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000136b0 20 20 20 20 20 3b 6d 61 73 6b 20 6e 6f 77 20 70 | ;mask now p| 000136c0 65 72 66 6f 72 61 74 65 64 0a 0a 64 61 73 5f 6d |erforated..das_m| 000136d0 61 73 6b 70 65 72 66 0a 20 20 20 20 20 20 20 20 |askperf. | 000136e0 53 54 52 20 20 20 20 20 72 37 2c 20 64 61 73 5f |STR r7, das_| 000136f0 74 65 6d 70 0a 20 20 20 20 20 20 20 20 4c 44 4d |temp. LDM| 00013700 46 44 20 20 20 73 70 21 2c 20 7b 72 30 2d 72 37 |FD sp!, {r0-r7| 00013710 7d 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 |}. ADR | 00013720 20 20 6c 72 2c 20 64 61 73 5f 72 65 67 64 75 6d | lr, das_regdum| 00013730 70 0a 20 20 20 20 20 20 20 20 53 54 4d 49 41 20 |p. STMIA | 00013740 20 20 6c 72 2c 20 7b 72 30 2d 72 37 7d 20 20 20 | lr, {r0-r7} | 00013750 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013760 20 20 3b 64 75 6d 70 20 6f 72 69 67 69 6e 61 6c | ;dump original| 00013770 20 72 65 67 20 63 6f 6e 74 65 6e 74 73 2c 20 77 | reg contents, w| 00013780 68 65 72 65 20 63 61 6e 20 67 65 74 20 74 68 65 |here can get the| 00013790 6d 20 62 61 63 6b 20 69 66 0a 20 20 20 20 20 20 |m back if. | 000137a0 20 20 4c 44 52 20 20 20 20 20 72 31 2c 20 64 61 | LDR r1, da| 000137b0 73 5f 74 65 6d 70 20 20 20 20 20 20 20 20 20 20 |s_temp | 000137c0 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 20 | ; | 000137d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000137e0 20 20 20 20 20 64 72 61 67 61 73 70 72 69 74 65 | dragasprite| 000137f0 20 72 65 74 75 72 6e 73 20 61 6e 20 65 72 72 6f | returns an erro| 00013800 72 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 |r. ADD | 00013810 20 20 72 32 2c 20 72 31 2c 20 23 31 36 2b 34 20 | r2, r1, #16+4 | 00013820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013830 20 20 3b 70 74 72 20 74 6f 20 73 70 72 69 74 65 | ;ptr to sprite| 00013840 20 6e 61 6d 65 20 69 6e 20 72 32 20 26 20 61 72 | name in r2 & ar| 00013850 65 61 20 69 6e 20 72 31 20 28 74 6f 20 6d 6f 64 |ea in r1 (to mod| 00013860 69 66 69 65 64 20 63 6f 70 79 29 0a 0a 20 20 20 |ified copy).. | 00013870 20 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 | STMFD sp!| 00013880 2c 20 7b 72 31 7d 20 20 20 20 20 20 20 20 20 20 |, {r1} | 00013890 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 70 72 | ;pr| 000138a0 65 73 65 72 76 65 20 73 70 72 69 74 65 20 61 72 |eserve sprite ar| 000138b0 65 61 20 70 74 72 0a 20 20 20 20 20 20 20 20 4d |ea ptr. M| 000138c0 4f 56 20 20 20 20 20 6c 72 2c 20 70 63 20 20 20 |OV lr, pc | 000138d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000138e0 20 20 20 20 20 20 20 3b 63 61 6e 27 74 20 75 73 | ;can't us| 000138f0 65 20 27 41 44 52 20 6c 72 2c 20 64 61 73 5f 72 |e 'ADR lr, das_r| 00013900 65 74 75 72 6e 27 2c 20 61 73 20 69 74 20 30 27 |eturn', as it 0'| 00013910 73 20 50 53 52 0a 20 20 20 20 20 20 20 20 41 44 |s PSR. AD| 00013920 44 20 20 20 20 20 6c 72 2c 20 6c 72 2c 20 23 38 |D lr, lr, #8| 00013930 0a 20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 |. B | 00013940 20 73 65 63 6f 6e 64 5f 62 72 61 6e 63 68 20 20 | second_branch | 00013950 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013960 20 3b 70 61 73 73 20 63 61 6c 6c 20 6f 6e 2c 20 | ;pass call on, | 00013970 62 75 74 20 73 6f 20 74 68 61 74 20 69 74 20 77 |but so that it w| 00013980 69 6c 6c 20 72 65 74 75 72 6e 20 68 65 72 65 21 |ill return here!| 00013990 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 20 |. SWI | 000139a0 20 58 44 72 61 67 41 53 70 72 69 74 65 5f 53 74 | XDragASprite_St| 000139b0 61 72 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |art | 000139c0 20 3b 74 68 69 73 20 69 73 20 6e 65 76 65 72 20 | ;this is never | 000139d0 65 78 65 63 75 74 65 64 20 2d 20 42 55 54 20 69 |executed - BUT i| 000139e0 74 20 69 73 20 65 73 73 65 6e 74 69 61 6c 20 73 |t is essential s| 000139f0 6f 20 74 68 61 74 20 6e 65 78 74 0a 20 20 20 20 |o that next. | 00013a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013a20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 57 | ; SW| 00013a30 49 20 68 61 6e 64 6c 65 72 20 63 61 6e 20 66 69 |I handler can fi| 00013a40 6e 64 20 53 57 49 20 6e 75 6d 62 65 72 20 66 72 |nd SWI number fr| 00013a50 6f 6d 20 6c 72 0a 64 61 73 5f 72 65 74 75 72 6e |om lr.das_return| 00013a60 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 |. LDMFD | 00013a70 20 73 70 21 2c 20 7b 6c 72 7d 20 20 20 20 20 20 | sp!, {lr} | 00013a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013a90 20 3b 72 65 73 74 6f 72 65 20 77 6f 72 6b 73 70 | ;restore worksp| 00013aa0 61 63 65 20 28 73 70 72 20 61 72 65 61 29 20 70 |ace (spr area) p| 00013ab0 74 72 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 |tr. STMFD| 00013ac0 20 20 20 73 70 21 2c 20 7b 72 30 2c 20 72 32 7d | sp!, {r0, r2}| 00013ad0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013ae0 20 20 20 3b 73 74 6f 72 65 20 72 30 2c 72 32 20 | ;store r0,r2 | 00013af0 61 73 20 77 61 6e 74 20 74 6f 20 75 73 65 20 74 |as want to use t| 00013b00 68 65 73 65 20 28 6e 62 20 72 30 20 6d 61 79 20 |hese (nb r0 may | 00013b10 68 6f 6c 64 20 65 72 72 6f 72 20 70 74 72 29 0a |hold error ptr).| 00013b20 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 00013b30 72 30 2c 20 70 63 0a 20 20 20 20 20 20 20 20 53 |r0, pc. S| 00013b40 54 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 30 7d |TMFD sp!, {r0}| 00013b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013b60 20 20 20 20 20 20 20 3b 70 72 65 73 65 72 76 65 | ;preserve| 00013b70 20 56 20 62 69 74 20 66 6f 72 20 73 75 62 73 65 | V bit for subse| 00013b80 71 75 65 6e 74 20 74 65 73 74 20 28 61 73 20 77 |quent test (as w| 00013b90 61 6e 74 20 74 6f 20 66 72 65 65 20 6f 75 72 20 |ant to free our | 00013ba0 6d 65 6d 6f 72 79 2c 20 69 6e 20 65 69 74 68 65 |memory, in eithe| 00013bb0 72 20 63 61 73 65 29 0a 20 20 20 20 20 20 20 20 |r case). | 00013bc0 4d 4f 56 20 20 20 20 20 72 30 2c 20 23 37 0a 20 |MOV r0, #7. | 00013bd0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00013be0 32 2c 20 6c 72 0a 20 20 20 20 20 20 20 20 53 57 |2, lr. SW| 00013bf0 49 20 20 20 20 20 58 4f 53 5f 4d 6f 64 75 6c 65 |I XOS_Module| 00013c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00013c10 20 20 20 20 20 20 3b 66 72 65 65 20 6d 65 6d 6f | ;free memo| 00013c20 72 79 20 2d 20 69 66 20 61 6e 79 20 70 72 6f 62 |ry - if any prob| 00013c30 6c 65 6d 73 20 69 67 6e 6f 72 65 2c 20 61 73 20 |lems ignore, as | 00013c40 63 61 6e 27 74 20 66 69 78 20 74 68 65 6d 2c 20 |can't fix them, | 00013c50 61 72 65 20 6d 69 6e 6f 72 20 26 20 75 6e 65 78 |are minor & unex| 00013c60 70 65 63 74 65 64 0a 20 20 20 20 20 20 20 20 20 |pected. | 00013c70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013c90 20 20 20 20 20 20 20 3b 20 26 20 61 73 20 77 6f | ; & as wo| 00013ca0 75 6c 64 20 65 69 74 68 65 72 20 6e 65 65 64 20 |uld either need | 00013cb0 63 6f 6d 70 6c 65 78 20 72 65 70 6f 72 74 20 70 |complex report p| 00013cc0 72 6f 63 65 64 75 72 65 20 69 6e 63 6c 75 64 69 |rocedure includi| 00013cd0 6e 67 20 63 61 6e 63 65 6c 20 6f 66 20 64 72 61 |ng cancel of dra| 00013ce0 67 61 73 70 72 69 74 65 0a 20 20 20 20 20 20 20 |gasprite. | 00013cf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013d10 20 20 20 20 20 20 20 20 20 3b 20 6f 72 20 77 6f | ; or wo| 00013d20 75 6c 64 20 6e 65 65 64 20 74 6f 20 63 61 6e 63 |uld need to canc| 00013d30 65 6c 20 64 72 61 67 61 73 70 72 69 74 65 2c 20 |el dragasprite, | 00013d40 26 20 74 68 65 6e 20 68 61 76 65 20 61 6e 6f 74 |& then have anot| 00013d50 68 65 72 20 67 6f 2c 20 75 73 69 6e 67 20 75 6e |her go, using un| 00013d60 6d 6f 64 69 66 69 65 64 20 73 70 72 0a 20 20 20 |modified spr. | 00013d70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013d90 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 4e 42 | ;NB| 00013da0 20 69 67 6e 6f 72 65 20 65 72 72 6f 72 20 69 73 | ignore error is| 00013db0 20 6f 6b 2c 20 61 73 20 28 49 20 74 68 69 6e 6b | ok, as (I think| 00013dc0 29 20 6f 6e 6c 79 20 67 65 74 20 65 72 72 6f 72 |) only get error| 00013dd0 20 69 66 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 | if block. | 00013de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013e00 20 20 20 20 20 20 20 20 20 20 3b 6e 6f 74 20 76 | ;not v| 00013e10 61 6c 69 64 2c 20 62 75 74 20 74 68 69 73 20 63 |alid, but this c| 00013e20 61 6e 27 74 20 68 61 70 70 65 6e 20 68 65 72 65 |an't happen here| 00013e30 20 28 75 6e 6c 65 73 73 20 61 6e 20 69 6e 74 65 | (unless an inte| 00013e40 72 75 70 74 0a 20 20 20 20 20 20 20 20 20 20 20 |rupt. | 00013e50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013e70 20 20 20 20 20 3b 72 6f 75 74 69 6e 65 20 74 72 | ;routine tr| 00013e80 61 73 68 65 73 20 74 68 65 20 6d 65 6d 6f 72 79 |ashes the memory| 00013e90 20 2d 20 77 68 69 63 68 20 77 6f 75 6c 64 20 62 | - which would b| 00013ea0 75 67 67 65 72 20 65 76 65 72 79 74 68 69 6e 67 |ugger everything| 00013eb0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00013ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00013ee0 20 3b 61 6e 79 77 61 79 29 2e 0a 20 20 20 20 20 | ;anyway).. | 00013ef0 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 | LDMFD sp!, | 00013f00 7b 6c 72 7d 20 20 20 20 20 20 20 20 20 20 20 20 |{lr} | 00013f10 20 20 20 20 20 20 20 20 20 20 20 3b 74 68 69 73 | ;this| 00013f20 20 68 6f 6c 64 73 20 76 20 62 69 74 20 66 72 6f | holds v bit fro| 00013f30 6d 20 64 72 61 67 61 73 70 72 69 74 65 0a 20 20 |m dragasprite. | 00013f40 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 | LDMFD sp| 00013f50 21 2c 20 7b 72 30 2c 20 72 32 7d 0a 20 20 20 20 |!, {r0, r2}. | 00013f60 20 20 20 20 54 53 54 20 20 20 20 20 6c 72 2c 20 | TST lr, | 00013f70 23 56 5f 46 4c 41 47 20 20 20 20 20 20 20 20 20 |#V_FLAG | 00013f80 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 66 20 | ;if | 00013f90 64 72 61 67 61 73 70 72 69 74 65 20 72 65 74 75 |dragasprite retu| 00013fa0 72 6e 65 64 20 61 6e 20 65 72 72 6f 72 0a 20 20 |rned an error. | 00013fb0 20 20 20 20 20 20 41 44 52 4e 45 20 20 20 6c 72 | ADRNE lr| 00013fc0 2c 20 64 61 73 5f 72 65 67 64 75 6d 70 20 20 20 |, das_regdump | 00013fd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 | ;r| 00013fe0 65 76 65 72 74 20 74 6f 20 6f 72 69 67 69 6e 61 |evert to origina| 00013ff0 6c 20 63 61 6c 6c 2c 20 26 20 70 61 73 73 20 69 |l call, & pass i| 00014000 74 20 6f 6e 0a 20 20 20 20 20 20 20 20 4c 44 4d |t on. LDM| 00014010 4e 45 49 41 20 6c 72 2c 20 7b 72 30 2d 72 37 7d |NEIA lr, {r0-r7}| 00014020 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 00014030 20 63 6f 6e 74 69 6e 75 65 0a 0a 20 20 20 20 20 | continue.. | 00014040 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 | LDMFD sp!, | 00014050 7b 6c 72 7d 20 20 20 20 20 20 20 20 20 20 20 20 |{lr} | 00014060 20 20 20 20 20 20 20 20 20 20 20 3b 65 6c 73 65 | ;else| 00014070 20 72 65 74 75 72 6e 20 61 66 74 65 72 20 65 78 | return after ex| 00014080 70 6c 69 63 69 74 6c 79 20 63 6c 65 61 72 69 6e |plicitly clearin| 00014090 67 20 76 20 62 69 74 0a 20 20 20 20 20 20 20 20 |g v bit. | 000140a0 42 49 43 53 20 20 20 20 70 63 2c 20 6c 72 2c 20 |BICS pc, lr, | 000140b0 23 56 5f 46 4c 41 47 0a 0a 64 61 73 5f 74 65 6d |#V_FLAG..das_tem| 000140c0 70 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 |p. DCD | 000140d0 20 20 30 0a 64 61 73 5f 72 65 67 64 75 6d 70 0a | 0.das_regdump.| 000140e0 20 20 20 20 20 20 20 20 25 20 20 20 20 20 20 20 | % | 000140f0 33 32 0a 0a 0a 0a 20 20 20 45 4e 44 0a |32.... END.| 000140fd