Home » Archimedes archive » Acorn Computing » 1993 06 Mega Disk.adf » 93_06 » Miscellany/SolidDrag/!SolidDrag/Source/drag_src9
Miscellany/SolidDrag/!SolidDrag/Source/drag_src9
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 Computing » 1993 06 Mega Disk.adf » 93_06 |
Filename: | Miscellany/SolidDrag/!SolidDrag/Source/drag_src9 |
Read OK: | ✔ |
File size: | 2A2C bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
; > drag_src 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_GetIconState EQU &600CE XDragASprite_Start EQU &62400 XDragASprite_Stop EQU &62401 XOS_AddCallBack EQU &20054 XOS_SpriteOp EQU &2002E XWimp_SpriteOp EQU &600E9 V_FLAG EQU 1:SHL:28 XFilter_RegisterPostFilter EQU &62641 XFilter_DeRegisterPostFilter EQU &62643 Service_Reset EQU &27 Service_NewFilterManager EQU &87 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 0 ; --------------------------------------------------------------------------------------------------------- initialise STMFD sp!, {lr} BL register_filter BLVC claim_swi_vector LDMFD sp!, {pc} mask DCD 2_11100001100100110011 register_filter STMFD sp!,{lr} ADR r0, title_string ADR r1, filter_code MOV r2, #0 MOV r3, #0 STR r3, dragging_flag LDR r4, mask SWI XFilter_RegisterPostFilter LDMFD sp!,{pc} ; --------------------------------------------------------------------------------------------------------- finalise STMFD sp!, {lr} BL release_swi_vector ADRVC r0, title_string ADRVC r1, filter_code MOVVC r2, #0 MOVVC r3, #0 SWIVC XFilter_DeRegisterPostFilter LDMFD sp!, {pc} ; --------------------------------------------------------------------------------------------------------- service CMP r1, #Service_Reset CMPNE r1, #Service_NewFilterManager MOVNES pc, lr STMFD sp!,{r0-r4,lr} CMP r1, #Service_Reset BNE next_service BL claim_swi_vector LDMFD sp!,{r0-r4,pc}^ next_service BL register_filter LDMFD sp!,{r0-r4,pc}^ ; --------------------------------------------------------------------------------------------------------- title_string DCB "SolidDrag",0 help_string DCB "SolidDrag ",9,"0.30 (21 Sep 1992)",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 STR r0, second_branch ADD r0, r0, #(second_branch-first_branch) / 4 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, #&D0 ; is it Wimp_DragBox ? LDMNEFD sp!, {lr} ; otherwise drop through to SWI handler first_branch DCD 0 LDR lr, [r1,#4] ; get drag type CMP lr, #5 BNE continue LDR lr, dragging_flag CMP lr, #0 BEQ callback_code LDMFD sp!, {pc}^ not_sprite LDMFD sp!,{r0-r4,lr} continue LDMFD sp!, {lr} ; call Wimp_DragBox as usual second_branch DCD 0 workspace % 52 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 not_sprite ; do the usual drag box ADD r1, r1, #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 CMP r2, #70 BGT not_sprite 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 CMP r2, #40 BGT not_sprite TST r3, #256 ; is it indirected ? BNE indirected ADD r2, r1, #28 ; sprite name directly specified MOV r1, #1 B 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 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 MOV r1, #1 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} BVS not_sprite 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 ADD r3, r4, #8 ADD r4, r4, #24 SWI XDragASprite_Start STRVC r0, dragging_flag 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 ; --------------------------------------------------------------------------------------------------------- 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 CMP r0, #7 MOVNE pc, lr STMFD sp!, {lr} LDR lr, dragging_flag CMP lr, #0 MOVNE lr, #0 STRNE lr, dragging_flag SWINE XDragASprite_Stop LDMFD sp!, {pc} END
00000000 3b 20 3e 20 64 72 61 67 5f 73 72 63 0a 72 30 20 |; > drag_src.r0 | 00000010 52 4e 20 30 0a 72 31 20 52 4e 20 31 0a 72 32 20 |RN 0.r1 RN 1.r2 | 00000020 52 4e 20 32 0a 72 33 20 52 4e 20 33 0a 72 34 20 |RN 2.r3 RN 3.r4 | 00000030 52 4e 20 34 0a 72 35 20 52 4e 20 35 0a 72 36 20 |RN 4.r5 RN 5.r6 | 00000040 52 4e 20 36 0a 72 37 20 52 4e 20 37 0a 72 38 20 |RN 6.r7 RN 7.r8 | 00000050 52 4e 20 38 0a 72 39 20 52 4e 20 39 0a 72 31 30 |RN 8.r9 RN 9.r10| 00000060 20 52 4e 20 31 30 0a 72 31 31 20 52 4e 20 31 31 | RN 10.r11 RN 11| 00000070 0a 72 31 32 20 52 4e 20 31 32 0a 73 70 20 52 4e |.r12 RN 12.sp RN| 00000080 20 31 33 0a 6c 72 20 52 4e 20 31 34 0a 70 63 20 | 13.lr RN 14.pc | 00000090 52 4e 20 31 35 0a 0a 57 69 6d 70 5f 44 72 61 67 |RN 15..Wimp_Drag| 000000a0 42 6f 78 20 20 20 20 20 20 20 20 20 20 20 20 20 |Box | 000000b0 20 20 20 20 20 20 20 45 51 55 20 26 34 30 30 44 | EQU &400D| 000000c0 30 0a 58 57 69 6d 70 5f 44 72 61 67 42 6f 78 20 |0.XWimp_DragBox | 000000d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000e0 20 20 45 51 55 20 26 36 30 30 44 30 0a 58 57 69 | EQU &600D0.XWi| 000000f0 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 |mp_GetPointerInf| 00000100 6f 20 20 20 20 20 20 20 20 20 20 20 20 45 51 55 |o EQU| 00000110 20 26 36 30 30 43 46 0a 58 57 69 6d 70 5f 47 65 | &600CF.XWimp_Ge| 00000120 74 49 63 6f 6e 53 74 61 74 65 20 20 20 20 20 20 |tIconState | 00000130 20 20 20 20 20 20 20 20 45 51 55 20 26 36 30 30 | EQU &600| 00000140 43 45 0a 58 44 72 61 67 41 53 70 72 69 74 65 5f |CE.XDragASprite_| 00000150 53 74 61 72 74 20 20 20 20 20 20 20 20 20 20 20 |Start | 00000160 20 20 20 45 51 55 20 26 36 32 34 30 30 0a 58 44 | EQU &62400.XD| 00000170 72 61 67 41 53 70 72 69 74 65 5f 53 74 6f 70 20 |ragASprite_Stop | 00000180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 | EQ| 00000190 55 20 26 36 32 34 30 31 0a 58 4f 53 5f 41 64 64 |U &62401.XOS_Add| 000001a0 43 61 6c 6c 42 61 63 6b 20 20 20 20 20 20 20 20 |CallBack | 000001b0 20 20 20 20 20 20 20 20 20 45 51 55 20 26 32 30 | EQU &20| 000001c0 30 35 34 0a 58 4f 53 5f 53 70 72 69 74 65 4f 70 |054.XOS_SpriteOp| 000001d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000001e0 20 20 20 20 45 51 55 20 26 32 30 30 32 45 0a 58 | EQU &2002E.X| 000001f0 57 69 6d 70 5f 53 70 72 69 74 65 4f 70 20 20 20 |Wimp_SpriteOp | 00000200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 | E| 00000210 51 55 20 26 36 30 30 45 39 0a 56 5f 46 4c 41 47 |QU &600E9.V_FLAG| 00000220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000230 20 20 20 20 20 20 20 20 20 20 45 51 55 20 31 3a | EQU 1:| 00000240 53 48 4c 3a 32 38 0a 58 46 69 6c 74 65 72 5f 52 |SHL:28.XFilter_R| 00000250 65 67 69 73 74 65 72 50 6f 73 74 46 69 6c 74 65 |egisterPostFilte| 00000260 72 20 20 20 20 20 20 45 51 55 20 26 36 32 36 34 |r EQU &6264| 00000270 31 0a 58 46 69 6c 74 65 72 5f 44 65 52 65 67 69 |1.XFilter_DeRegi| 00000280 73 74 65 72 50 6f 73 74 46 69 6c 74 65 72 20 20 |sterPostFilter | 00000290 20 20 45 51 55 20 26 36 32 36 34 33 0a 53 65 72 | EQU &62643.Ser| 000002a0 76 69 63 65 5f 52 65 73 65 74 20 20 20 20 20 20 |vice_Reset | 000002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 45 51 55 | EQU| 000002c0 20 26 32 37 0a 53 65 72 76 69 63 65 5f 4e 65 77 | &27.Service_New| 000002d0 46 69 6c 74 65 72 4d 61 6e 61 67 65 72 20 20 20 |FilterManager | 000002e0 20 20 20 20 20 45 51 55 20 26 38 37 0a 0a 6d 6f | EQU &87..mo| 000002f0 64 75 6c 65 5f 62 61 73 65 0a 20 20 20 20 20 20 |dule_base. | 00000300 20 20 44 43 44 20 20 20 20 20 30 0a 20 20 20 20 | DCD 0. | 00000310 20 20 20 20 44 43 44 20 20 20 20 20 69 6e 69 74 | DCD init| 00000320 69 61 6c 69 73 65 20 2d 20 6d 6f 64 75 6c 65 5f |ialise - module_| 00000330 62 61 73 65 0a 20 20 20 20 20 20 20 20 44 43 44 |base. DCD| 00000340 20 20 20 20 20 66 69 6e 61 6c 69 73 65 20 2d 20 | finalise - | 00000350 6d 6f 64 75 6c 65 5f 62 61 73 65 0a 20 20 20 20 |module_base. | 00000360 20 20 20 20 44 43 44 20 20 20 20 20 73 65 72 76 | DCD serv| 00000370 69 63 65 20 2d 20 6d 6f 64 75 6c 65 5f 62 61 73 |ice - module_bas| 00000380 65 0a 20 20 20 20 20 20 20 20 44 43 44 20 20 20 |e. DCD | 00000390 20 20 74 69 74 6c 65 5f 73 74 72 69 6e 67 20 2d | title_string -| 000003a0 20 6d 6f 64 75 6c 65 5f 62 61 73 65 0a 20 20 20 | module_base. | 000003b0 20 20 20 20 20 44 43 44 20 20 20 20 20 68 65 6c | DCD hel| 000003c0 70 5f 73 74 72 69 6e 67 20 2d 20 6d 6f 64 75 6c |p_string - modul| 000003d0 65 5f 62 61 73 65 0a 20 20 20 20 20 20 20 20 44 |e_base. D| 000003e0 43 44 20 20 20 20 20 30 0a 0a 3b 20 2d 2d 2d 2d |CD 0..; ----| 000003f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000450 2d 2d 2d 2d 2d 0a 0a 69 6e 69 74 69 61 6c 69 73 |-----..initialis| 00000460 65 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 |e. STMFD | 00000470 20 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 20 20 20 | sp!, {lr}. | 00000480 20 20 20 20 42 4c 20 20 20 20 20 20 72 65 67 69 | BL regi| 00000490 73 74 65 72 5f 66 69 6c 74 65 72 0a 20 20 20 20 |ster_filter. | 000004a0 20 20 20 20 42 4c 56 43 20 20 20 20 63 6c 61 69 | BLVC clai| 000004b0 6d 5f 73 77 69 5f 76 65 63 74 6f 72 0a 20 20 20 |m_swi_vector. | 000004c0 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 | LDMFD sp!| 000004d0 2c 20 7b 70 63 7d 0a 0a 6d 61 73 6b 0a 20 20 20 |, {pc}..mask. | 000004e0 20 20 20 20 20 44 43 44 20 20 20 20 20 32 5f 31 | DCD 2_1| 000004f0 31 31 30 30 30 30 31 31 30 30 31 30 30 31 31 30 |1100001100100110| 00000500 30 31 31 0a 0a 72 65 67 69 73 74 65 72 5f 66 69 |011..register_fi| 00000510 6c 74 65 72 0a 20 20 20 20 20 20 20 20 53 54 4d |lter. STM| 00000520 46 44 20 20 20 73 70 21 2c 7b 6c 72 7d 0a 20 20 |FD sp!,{lr}. | 00000530 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 30 | ADR r0| 00000540 2c 20 74 69 74 6c 65 5f 73 74 72 69 6e 67 0a 20 |, title_string. | 00000550 20 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 | ADR r| 00000560 31 2c 20 66 69 6c 74 65 72 5f 63 6f 64 65 0a 20 |1, filter_code. | 00000570 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00000580 32 2c 20 23 30 0a 20 20 20 20 20 20 20 20 4d 4f |2, #0. MO| 00000590 56 20 20 20 20 20 72 33 2c 20 23 30 0a 20 20 20 |V r3, #0. | 000005a0 20 20 20 20 20 53 54 52 20 20 20 20 20 72 33 2c | STR r3,| 000005b0 20 64 72 61 67 67 69 6e 67 5f 66 6c 61 67 0a 20 | dragging_flag. | 000005c0 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 000005d0 34 2c 20 6d 61 73 6b 0a 20 20 20 20 20 20 20 20 |4, mask. | 000005e0 53 57 49 20 20 20 20 20 58 46 69 6c 74 65 72 5f |SWI XFilter_| 000005f0 52 65 67 69 73 74 65 72 50 6f 73 74 46 69 6c 74 |RegisterPostFilt| 00000600 65 72 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 44 |er. LDMFD| 00000610 20 20 20 73 70 21 2c 7b 70 63 7d 0a 0a 0a 0a 3b | sp!,{pc}....;| 00000620 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ---------------| 00000630 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000680 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 66 69 6e 61 |----------..fina| 00000690 6c 69 73 65 0a 20 20 20 20 20 20 20 20 53 54 4d |lise. STM| 000006a0 46 44 20 20 20 73 70 21 2c 20 7b 6c 72 7d 0a 20 |FD sp!, {lr}. | 000006b0 20 20 20 20 20 20 20 42 4c 20 20 20 20 20 20 72 | BL r| 000006c0 65 6c 65 61 73 65 5f 73 77 69 5f 76 65 63 74 6f |elease_swi_vecto| 000006d0 72 0a 20 20 20 20 20 20 20 20 41 44 52 56 43 20 |r. ADRVC | 000006e0 20 20 72 30 2c 20 74 69 74 6c 65 5f 73 74 72 69 | r0, title_stri| 000006f0 6e 67 0a 20 20 20 20 20 20 20 20 41 44 52 56 43 |ng. ADRVC| 00000700 20 20 20 72 31 2c 20 66 69 6c 74 65 72 5f 63 6f | r1, filter_co| 00000710 64 65 0a 20 20 20 20 20 20 20 20 4d 4f 56 56 43 |de. MOVVC| 00000720 20 20 20 72 32 2c 20 23 30 0a 20 20 20 20 20 20 | r2, #0. | 00000730 20 20 4d 4f 56 56 43 20 20 20 72 33 2c 20 23 30 | MOVVC r3, #0| 00000740 0a 20 20 20 20 20 20 20 20 53 57 49 56 43 20 20 |. SWIVC | 00000750 20 58 46 69 6c 74 65 72 5f 44 65 52 65 67 69 73 | XFilter_DeRegis| 00000760 74 65 72 50 6f 73 74 46 69 6c 74 65 72 0a 20 20 |terPostFilter. | 00000770 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 | LDMFD sp| 00000780 21 2c 20 7b 70 63 7d 0a 0a 3b 20 2d 2d 2d 2d 2d |!, {pc}..; -----| 00000790 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000007f0 2d 2d 2d 2d 0a 0a 73 65 72 76 69 63 65 0a 20 20 |----..service. | 00000800 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 | CMP r1| 00000810 2c 20 23 53 65 72 76 69 63 65 5f 52 65 73 65 74 |, #Service_Reset| 00000820 0a 20 20 20 20 20 20 20 20 43 4d 50 4e 45 20 20 |. CMPNE | 00000830 20 72 31 2c 20 23 53 65 72 76 69 63 65 5f 4e 65 | r1, #Service_Ne| 00000840 77 46 69 6c 74 65 72 4d 61 6e 61 67 65 72 0a 20 |wFilterManager. | 00000850 20 20 20 20 20 20 20 4d 4f 56 4e 45 53 20 20 70 | MOVNES p| 00000860 63 2c 20 6c 72 0a 20 20 20 20 20 20 20 20 53 54 |c, lr. ST| 00000870 4d 46 44 20 20 20 73 70 21 2c 7b 72 30 2d 72 34 |MFD sp!,{r0-r4| 00000880 2c 6c 72 7d 0a 20 20 20 20 20 20 20 20 43 4d 50 |,lr}. CMP| 00000890 20 20 20 20 20 72 31 2c 20 23 53 65 72 76 69 63 | r1, #Servic| 000008a0 65 5f 52 65 73 65 74 0a 20 20 20 20 20 20 20 20 |e_Reset. | 000008b0 42 4e 45 20 20 20 20 20 6e 65 78 74 5f 73 65 72 |BNE next_ser| 000008c0 76 69 63 65 0a 20 20 20 20 20 20 20 20 42 4c 20 |vice. BL | 000008d0 20 20 20 20 20 63 6c 61 69 6d 5f 73 77 69 5f 76 | claim_swi_v| 000008e0 65 63 74 6f 72 0a 20 20 20 20 20 20 20 20 4c 44 |ector. LD| 000008f0 4d 46 44 20 20 20 73 70 21 2c 7b 72 30 2d 72 34 |MFD sp!,{r0-r4| 00000900 2c 70 63 7d 5e 0a 0a 6e 65 78 74 5f 73 65 72 76 |,pc}^..next_serv| 00000910 69 63 65 0a 20 20 20 20 20 20 20 20 42 4c 20 20 |ice. BL | 00000920 20 20 20 20 72 65 67 69 73 74 65 72 5f 66 69 6c | register_fil| 00000930 74 65 72 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 |ter. LDMF| 00000940 44 20 20 20 73 70 21 2c 7b 72 30 2d 72 34 2c 70 |D sp!,{r0-r4,p| 00000950 63 7d 5e 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d |c}^..; ---------| 00000960 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000009c0 0a 0a 74 69 74 6c 65 5f 73 74 72 69 6e 67 0a 20 |..title_string. | 000009d0 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 22 | DCB "| 000009e0 53 6f 6c 69 64 44 72 61 67 22 2c 30 0a 0a 68 65 |SolidDrag",0..he| 000009f0 6c 70 5f 73 74 72 69 6e 67 0a 20 20 20 20 20 20 |lp_string. | 00000a00 20 20 44 43 42 20 20 20 20 20 22 53 6f 6c 69 64 | DCB "Solid| 00000a10 44 72 61 67 20 22 2c 39 2c 22 30 2e 33 30 20 28 |Drag ",9,"0.30 (| 00000a20 32 31 20 53 65 70 20 31 39 39 32 29 22 2c 30 0a |21 Sep 1992)",0.| 00000a30 20 20 20 20 20 20 20 20 41 4c 49 47 4e 0a 0a 3b | ALIGN..;| 00000a40 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ---------------| 00000a50 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000aa0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 72 65 6c 65 |----------..rele| 00000ab0 61 73 65 5f 73 77 69 5f 76 65 63 74 6f 72 0a 20 |ase_swi_vector. | 00000ac0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00000ad0 30 2c 20 23 38 0a 20 20 20 20 20 20 20 20 4c 44 |0, #8. LD| 00000ae0 52 20 20 20 20 20 72 31 2c 20 5b 72 30 5d 0a 20 |R r1, [r0]. | 00000af0 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 00000b00 32 2c 20 6e 65 77 5f 62 72 61 6e 63 68 20 20 20 |2, new_branch | 00000b10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00000b20 20 63 68 65 63 6b 20 74 68 61 74 20 6f 75 72 20 | check that our | 00000b30 53 57 49 20 64 65 63 6f 64 65 72 20 68 61 73 6e |SWI decoder hasn| 00000b40 27 74 20 62 65 65 6e 20 72 65 70 6c 61 63 65 64 |'t been replaced| 00000b50 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 00000b60 20 72 31 2c 20 72 32 0a 20 20 20 20 20 20 20 20 | r1, r2. | 00000b70 4c 44 52 45 51 20 20 20 72 31 2c 20 6f 6c 64 5f |LDREQ r1, old_| 00000b80 62 72 61 6e 63 68 20 20 20 20 20 20 20 20 20 20 |branch | 00000b90 20 20 20 20 20 20 20 20 3b 20 72 65 70 6c 61 63 | ; replac| 00000ba0 65 20 6f 72 69 67 69 6e 61 6c 20 64 65 63 6f 64 |e original decod| 00000bb0 65 72 20 69 66 20 69 74 20 68 61 73 6e 27 74 0a |er if it hasn't.| 00000bc0 20 20 20 20 20 20 20 20 53 54 52 45 51 20 20 20 | STREQ | 00000bd0 72 31 2c 20 5b 72 30 5d 0a 20 20 20 20 20 20 20 |r1, [r0]. | 00000be0 20 4d 4f 56 45 51 20 20 20 72 30 2c 20 23 30 0a | MOVEQ r0, #0.| 00000bf0 20 20 20 20 20 20 20 20 53 54 52 45 51 20 20 20 | STREQ | 00000c00 72 31 2c 20 6f 6c 64 5f 62 72 61 6e 63 68 0a 20 |r1, old_branch. | 00000c10 20 20 20 20 20 20 20 4d 4f 56 45 51 53 20 20 70 | MOVEQS p| 00000c20 63 2c 20 6c 72 0a 0a 20 20 20 20 20 20 20 20 4c |c, lr.. L| 00000c30 44 52 20 20 20 20 20 72 32 2c 20 6f 6c 64 5f 62 |DR r2, old_b| 00000c40 72 61 6e 63 68 20 20 20 20 20 20 20 20 20 20 20 |ranch | 00000c50 20 20 20 20 20 20 20 3b 20 69 66 20 74 68 65 20 | ; if the | 00000c60 6f 6c 64 20 62 72 61 6e 63 68 20 69 73 20 61 6c |old branch is al| 00000c70 72 65 61 64 79 20 74 68 65 72 65 20 74 68 65 6e |ready there then| 00000c80 20 64 6f 20 6e 6f 74 68 69 6e 67 0a 20 20 20 20 | do nothing. | 00000c90 20 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c 20 | CMP r1, | 00000ca0 72 32 0a 20 20 20 20 20 20 20 20 4d 4f 56 45 51 |r2. MOVEQ| 00000cb0 53 20 20 70 63 2c 20 6c 72 0a 0a 20 20 20 20 20 |S pc, lr.. | 00000cc0 20 20 20 41 44 52 20 20 20 72 30 2c 20 65 72 72 | ADR r0, err| 00000cd0 6f 72 5f 62 6c 6f 63 6b 20 20 20 20 20 20 20 20 |or_block | 00000ce0 20 20 20 20 20 20 20 20 20 20 20 3b 20 6f 74 68 | ; oth| 00000cf0 65 72 77 69 73 65 20 72 65 74 75 72 6e 20 61 6e |erwise return an| 00000d00 20 65 72 72 6f 72 0a 20 20 20 20 20 20 20 20 4f | error. O| 00000d10 52 52 53 20 20 70 63 2c 20 6c 72 2c 20 23 56 5f |RRS pc, lr, #V_| 00000d20 46 4c 41 47 0a 0a 65 72 72 6f 72 5f 62 6c 6f 63 |FLAG..error_bloc| 00000d30 6b 20 20 20 20 20 44 43 44 20 20 20 20 20 26 31 |k DCD &1| 00000d40 30 33 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |03. | 00000d50 20 20 20 44 43 42 20 20 20 20 20 22 43 61 6e 27 | DCB "Can'| 00000d60 74 20 64 65 74 61 63 68 20 53 57 49 20 68 61 6e |t detach SWI han| 00000d70 64 6c 65 72 22 2c 20 30 0a 20 20 20 20 20 20 20 |dler", 0. | 00000d80 20 20 20 20 20 20 20 20 20 41 4c 49 47 4e 0a 0a | ALIGN..| 00000d90 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |; --------------| 00000da0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000df0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 63 6c 61 |-----------..cla| 00000e00 69 6d 5f 73 77 69 5f 76 65 63 74 6f 72 0a 20 20 |im_swi_vector. | 00000e10 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 30 | MOV r0| 00000e20 2c 20 23 38 0a 20 20 20 20 20 20 20 20 4c 44 52 |, #8. LDR| 00000e30 20 20 20 20 20 72 30 2c 20 5b 72 30 5d 20 20 20 | r0, [r0] | 00000e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000e50 20 20 20 20 20 3b 20 67 65 74 20 62 72 61 6e 63 | ; get branc| 00000e60 68 20 74 6f 20 53 57 49 20 68 61 6e 64 6c 65 72 |h to SWI handler| 00000e70 0a 20 20 20 20 20 20 20 20 53 54 52 20 20 20 20 |. STR | 00000e80 20 72 30 2c 20 6f 6c 64 5f 62 72 61 6e 63 68 0a | r0, old_branch.| 00000e90 0a 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 |. ADR | 00000ea0 20 72 31 2c 20 73 65 63 6f 6e 64 5f 62 72 61 6e | r1, second_bran| 00000eb0 63 68 2d 38 20 20 20 20 20 20 20 20 20 20 20 20 |ch-8 | 00000ec0 20 3b 20 69 6e 73 65 72 74 20 69 6e 20 6f 75 72 | ; insert in our| 00000ed0 20 6f 77 6e 20 63 6f 64 65 0a 20 20 20 20 20 20 | own code. | 00000ee0 20 20 53 55 42 20 20 20 20 20 72 30 2c 20 72 30 | SUB r0, r0| 00000ef0 2c 20 72 31 2c 20 4c 53 52 20 23 32 0a 20 20 20 |, r1, LSR #2. | 00000f00 20 20 20 20 20 53 54 52 20 20 20 20 20 72 30 2c | STR r0,| 00000f10 20 73 65 63 6f 6e 64 5f 62 72 61 6e 63 68 0a 0a | second_branch..| 00000f20 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 | ADD | 00000f30 72 30 2c 20 72 30 2c 20 23 28 73 65 63 6f 6e 64 |r0, r0, #(second| 00000f40 5f 62 72 61 6e 63 68 2d 66 69 72 73 74 5f 62 72 |_branch-first_br| 00000f50 61 6e 63 68 29 20 2f 20 34 0a 20 20 20 20 20 20 |anch) / 4. | 00000f60 20 20 53 55 42 20 20 20 20 20 72 30 2c 20 72 30 | SUB r0, r0| 00000f70 2c 20 23 26 44 30 30 30 30 30 30 30 0a 20 20 20 |, #&D0000000. | 00000f80 20 20 20 20 20 53 54 52 20 20 20 20 20 72 30 2c | STR r0,| 00000f90 20 66 69 72 73 74 5f 62 72 61 6e 63 68 20 20 20 | first_branch | 00000fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 63 | ; c| 00000fb0 6f 6e 76 65 72 74 20 74 6f 20 61 20 42 4e 45 0a |onvert to a BNE.| 00000fc0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00000fd0 20 72 31 2c 20 23 38 0a 20 20 20 20 20 20 20 20 | r1, #8. | 00000fe0 41 44 52 20 20 20 20 20 72 30 2c 20 73 77 69 5f |ADR r0, swi_| 00000ff0 70 61 74 63 68 2d 38 2d 38 0a 20 20 20 20 20 20 |patch-8-8. | 00001000 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 20 72 30 | MOV r0, r0| 00001010 2c 20 4c 53 52 20 23 32 0a 20 20 20 20 20 20 20 |, LSR #2. | 00001020 20 41 44 44 20 20 20 20 20 72 30 2c 20 72 30 2c | ADD r0, r0,| 00001030 20 23 26 45 41 30 30 30 30 30 30 0a 20 20 20 20 | #&EA000000. | 00001040 20 20 20 20 53 54 52 20 20 20 20 20 72 30 2c 20 | STR r0, | 00001050 5b 72 31 5d 0a 20 20 20 20 20 20 20 20 53 54 52 |[r1]. STR| 00001060 20 20 20 20 20 72 30 2c 20 6e 65 77 5f 62 72 61 | r0, new_bra| 00001070 6e 63 68 20 20 20 20 20 20 20 20 20 20 20 20 20 |nch | 00001080 20 20 20 20 20 3b 20 70 75 74 20 69 6e 20 61 20 | ; put in a | 00001090 62 72 61 6e 63 68 20 74 6f 20 6f 75 72 20 63 6f |branch to our co| 000010a0 64 65 0a 0a 20 20 20 20 20 20 20 20 4d 4f 56 53 |de.. MOVS| 000010b0 20 20 20 20 20 70 63 2c 20 6c 72 0a 0a 3b 20 2d | pc, lr..; -| 000010c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001120 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 73 77 69 5f 70 61 |--------..swi_pa| 00001130 74 63 68 0a 20 20 20 20 20 20 20 20 53 54 4d 46 |tch. STMF| 00001140 44 20 20 20 73 70 21 2c 7b 6c 72 7d 0a 20 20 20 |D sp!,{lr}. | 00001150 20 20 20 20 20 42 49 43 20 20 20 20 20 6c 72 2c | BIC lr,| 00001160 20 6c 72 2c 20 23 26 46 43 30 30 30 30 30 33 0a | lr, #&FC000003.| 00001170 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00001180 6c 72 2c 20 5b 6c 72 2c 23 2d 34 5d 20 20 20 20 |lr, [lr,#-4] | 00001190 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000011a0 3b 20 67 65 74 20 53 57 49 20 69 6e 73 74 72 75 |; get SWI instru| 000011b0 63 74 69 6f 6e 0a 0a 20 20 20 20 20 20 20 20 42 |ction.. B| 000011c0 49 43 20 20 20 20 20 6c 72 2c 20 6c 72 2c 20 23 |IC lr, lr, #| 000011d0 26 46 46 30 30 30 30 30 30 0a 20 20 20 20 20 20 |&FF000000. | 000011e0 20 20 42 49 43 20 20 20 20 20 6c 72 2c 20 6c 72 | BIC lr, lr| 000011f0 2c 20 23 26 32 30 30 30 30 0a 20 20 20 20 20 20 |, #&20000. | 00001200 20 20 53 55 42 20 20 20 20 20 6c 72 2c 20 6c 72 | SUB lr, lr| 00001210 2c 20 23 26 34 30 30 30 30 0a 20 20 20 20 20 20 |, #&40000. | 00001220 20 20 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 26 | CMP lr, #&| 00001230 44 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |D0 | 00001240 20 20 20 20 20 20 20 20 20 20 3b 20 69 73 20 69 | ; is i| 00001250 74 20 57 69 6d 70 5f 44 72 61 67 42 6f 78 20 3f |t Wimp_DragBox ?| 00001260 0a 0a 20 20 20 20 20 20 20 20 4c 44 4d 4e 45 46 |.. LDMNEF| 00001270 44 20 73 70 21 2c 20 7b 6c 72 7d 20 20 20 20 20 |D sp!, {lr} | 00001280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001290 20 20 3b 20 6f 74 68 65 72 77 69 73 65 20 64 72 | ; otherwise dr| 000012a0 6f 70 20 74 68 72 6f 75 67 68 20 74 6f 20 53 57 |op through to SW| 000012b0 49 20 68 61 6e 64 6c 65 72 0a 66 69 72 73 74 5f |I handler.first_| 000012c0 62 72 61 6e 63 68 0a 20 20 20 20 20 20 20 20 44 |branch. D| 000012d0 43 44 20 20 20 20 20 30 0a 0a 20 20 20 20 20 20 |CD 0.. | 000012e0 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 5b 72 | LDR lr, [r| 000012f0 31 2c 23 34 5d 20 20 20 20 20 20 20 20 20 20 20 |1,#4] | 00001300 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 | ; get | 00001310 64 72 61 67 20 74 79 70 65 0a 20 20 20 20 20 20 |drag type. | 00001320 20 20 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 35 | CMP lr, #5| 00001330 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 20 20 |. BNE | 00001340 20 63 6f 6e 74 69 6e 75 65 0a 20 20 20 20 20 20 | continue. | 00001350 20 20 4c 44 52 20 20 20 20 20 6c 72 2c 20 64 72 | LDR lr, dr| 00001360 61 67 67 69 6e 67 5f 66 6c 61 67 0a 20 20 20 20 |agging_flag. | 00001370 20 20 20 20 43 4d 50 20 20 20 20 20 6c 72 2c 20 | CMP lr, | 00001380 23 30 0a 20 20 20 20 20 20 20 20 42 45 51 20 20 |#0. BEQ | 00001390 20 20 20 63 61 6c 6c 62 61 63 6b 5f 63 6f 64 65 | callback_code| 000013a0 0a 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 20 |. LDMFD | 000013b0 20 73 70 21 2c 20 7b 70 63 7d 5e 0a 0a 6e 6f 74 | sp!, {pc}^..not| 000013c0 5f 73 70 72 69 74 65 0a 20 20 20 20 20 20 20 20 |_sprite. | 000013d0 4c 44 4d 46 44 20 20 20 73 70 21 2c 7b 72 30 2d |LDMFD sp!,{r0-| 000013e0 72 34 2c 6c 72 7d 0a 63 6f 6e 74 69 6e 75 65 0a |r4,lr}.continue.| 000013f0 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 73 70 | LDMFD sp| 00001400 21 2c 20 7b 6c 72 7d 20 20 20 20 20 20 20 20 20 |!, {lr} | 00001410 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001420 3b 20 63 61 6c 6c 20 57 69 6d 70 5f 44 72 61 67 |; call Wimp_Drag| 00001430 42 6f 78 20 61 73 20 75 73 75 61 6c 0a 73 65 63 |Box as usual.sec| 00001440 6f 6e 64 5f 62 72 61 6e 63 68 0a 20 20 20 20 20 |ond_branch. | 00001450 20 20 20 44 43 44 20 20 20 20 20 30 0a 0a 77 6f | DCD 0..wo| 00001460 72 6b 73 70 61 63 65 0a 20 20 20 20 20 20 20 20 |rkspace. | 00001470 25 20 20 20 20 20 20 20 35 32 0a 0a 63 61 6c 6c |% 52..call| 00001480 62 61 63 6b 5f 63 6f 64 65 0a 20 20 20 20 20 20 |back_code. | 00001490 20 20 53 54 4d 46 44 20 20 20 73 70 21 2c 7b 72 | STMFD sp!,{r| 000014a0 30 2d 72 34 2c 6c 72 7d 0a 20 20 20 20 20 20 20 |0-r4,lr}. | 000014b0 20 4d 4f 56 20 20 20 20 20 72 34 2c 20 72 31 0a | MOV r4, r1.| 000014c0 20 20 20 20 20 20 20 20 41 44 52 20 20 20 20 20 | ADR | 000014d0 72 31 2c 20 77 6f 72 6b 73 70 61 63 65 0a 20 20 |r1, workspace. | 000014e0 20 20 20 20 20 20 53 57 49 20 20 20 20 20 58 57 | SWI XW| 000014f0 69 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e |imp_GetPointerIn| 00001500 66 6f 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 |fo. LDR | 00001510 20 20 20 72 30 2c 20 5b 72 31 2c 20 23 31 36 5d | r0, [r1, #16]| 00001520 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 |. CMP | 00001530 20 72 30 2c 20 23 30 20 20 20 20 20 20 20 20 20 | r0, #0 | 00001540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001550 20 3b 20 69 66 20 74 68 65 72 65 27 73 20 6e 6f | ; if there's no| 00001560 20 69 63 6f 6e 20 75 6e 64 65 72 20 74 68 65 20 | icon under the | 00001570 70 6f 69 6e 74 65 72 20 74 68 65 6e 0a 20 20 20 |pointer then. | 00001580 20 20 20 20 20 42 4c 54 20 20 20 20 20 6e 6f 74 | BLT not| 00001590 5f 73 70 72 69 74 65 20 20 20 20 20 20 20 20 20 |_sprite | 000015a0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 64 | ; d| 000015b0 6f 20 74 68 65 20 75 73 75 61 6c 20 64 72 61 67 |o the usual drag| 000015c0 20 62 6f 78 0a 0a 20 20 20 20 20 20 20 20 41 44 | box.. AD| 000015d0 44 20 20 20 20 20 72 31 2c 20 72 31 2c 20 23 31 |D r1, r1, #1| 000015e0 32 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 20 |2. SWI | 000015f0 20 20 58 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 | XWimp_GetIconS| 00001600 74 61 74 65 20 20 20 20 20 20 20 20 20 20 20 20 |tate | 00001610 20 20 3b 20 67 65 74 20 64 61 74 61 20 62 6c 6f | ; get data blo| 00001620 63 6b 20 66 6f 72 20 69 63 6f 6e 20 75 6e 64 65 |ck for icon unde| 00001630 72 20 74 68 65 20 70 6f 69 6e 74 65 72 0a 0a 20 |r the pointer.. | 00001640 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 72 | LDR r| 00001650 33 2c 20 5b 72 31 2c 20 23 32 34 5d 0a 20 20 20 |3, [r1, #24]. | 00001660 20 20 20 20 20 54 53 54 20 20 20 20 20 72 33 2c | TST r3,| 00001670 20 23 32 20 20 20 20 20 20 20 20 20 20 20 20 20 | #2 | 00001680 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i| 00001690 66 20 69 74 27 73 20 6e 6f 74 20 61 20 73 70 72 |f it's not a spr| 000016a0 69 74 65 20 74 68 65 6e 20 64 6f 20 6e 6f 74 68 |ite then do noth| 000016b0 69 6e 67 0a 20 20 20 20 20 20 20 20 42 45 51 20 |ing. BEQ | 000016c0 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a 0a | not_sprite..| 000016d0 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 000016e0 72 30 2c 20 5b 72 31 2c 20 23 31 36 5d 20 20 20 |r0, [r1, #16] | 000016f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001700 3b 20 67 65 74 20 69 63 6f 6e 20 77 69 64 74 68 |; get icon width| 00001710 20 69 6e 20 72 33 0a 20 20 20 20 20 20 20 20 4c | in r3. L| 00001720 44 52 20 20 20 20 20 72 32 2c 20 5b 72 31 2c 20 |DR r2, [r1, | 00001730 23 38 5d 0a 20 20 20 20 20 20 20 20 53 55 42 20 |#8]. SUB | 00001740 20 20 20 20 72 32 2c 20 72 30 2c 20 72 32 0a 0a | r2, r0, r2..| 00001750 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 00001760 72 30 2c 20 5b 72 34 2c 20 23 31 36 5d 0a 20 20 |r0, [r4, #16]. | 00001770 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 | SUB r2| 00001780 2c 20 72 32 2c 20 72 30 0a 20 20 20 20 20 20 20 |, r2, r0. | 00001790 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b 72 34 | LDR r0, [r4| 000017a0 2c 20 23 38 5d 0a 20 20 20 20 20 20 20 20 41 44 |, #8]. AD| 000017b0 44 53 20 20 20 20 72 32 2c 20 72 32 2c 20 72 30 |DS r2, r2, r0| 000017c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000017d0 20 20 20 20 20 20 3b 20 67 65 74 20 64 72 61 67 | ; get drag| 000017e0 20 62 6f 78 20 77 69 64 74 68 20 69 6e 20 72 32 | box width in r2| 000017f0 0a 0a 20 20 20 20 20 20 20 20 52 53 42 4c 54 20 |.. RSBLT | 00001800 20 20 72 32 2c 20 72 32 2c 20 23 30 20 20 20 20 | r2, r2, #0 | 00001810 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001820 20 20 3b 20 69 66 20 77 69 64 74 68 73 20 61 72 | ; if widths ar| 00001830 65 20 77 72 6f 6e 67 20 74 68 65 6e 20 64 6f 20 |e wrong then do | 00001840 61 20 6e 6f 72 6d 61 6c 20 64 72 61 67 0a 20 20 |a normal drag. | 00001850 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 32 | CMP r2| 00001860 2c 20 23 37 30 0a 20 20 20 20 20 20 20 20 42 47 |, #70. BG| 00001870 54 20 20 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 |T not_sprite| 00001880 0a 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 |.. LDR | 00001890 20 20 72 30 2c 20 5b 72 31 2c 20 23 32 30 5d 0a | r0, [r1, #20].| 000018a0 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 20 | LDR | 000018b0 72 32 2c 20 5b 72 31 2c 20 23 31 32 5d 0a 20 20 |r2, [r1, #12]. | 000018c0 20 20 20 20 20 20 53 55 42 20 20 20 20 20 72 32 | SUB r2| 000018d0 2c 20 72 30 2c 20 72 32 0a 0a 20 20 20 20 20 20 |, r0, r2.. | 000018e0 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 5b 72 | LDR r0, [r| 000018f0 34 2c 20 23 32 30 5d 0a 20 20 20 20 20 20 20 20 |4, #20]. | 00001900 53 55 42 20 20 20 20 20 72 32 2c 20 72 32 2c 20 |SUB r2, r2, | 00001910 72 30 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 |r0. LDR | 00001920 20 20 20 72 30 2c 20 5b 72 34 2c 20 23 31 32 5d | r0, [r4, #12]| 00001930 0a 20 20 20 20 20 20 20 20 41 44 44 53 20 20 20 |. ADDS | 00001940 20 72 32 2c 20 72 32 2c 20 72 30 20 20 20 20 20 | r2, r2, r0 | 00001950 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001960 20 3b 20 67 65 74 20 64 72 61 67 20 62 6f 78 20 | ; get drag box | 00001970 68 65 69 67 68 74 20 69 6e 20 72 32 0a 0a 20 20 |height in r2.. | 00001980 20 20 20 20 20 20 52 53 42 4c 54 20 20 20 72 32 | RSBLT r2| 00001990 2c 20 72 32 2c 20 23 30 20 20 20 20 20 20 20 20 |, r2, #0 | 000019a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000019b0 69 66 20 68 65 69 67 68 74 73 20 61 72 65 20 77 |if heights are w| 000019c0 72 6f 6e 67 20 74 68 65 6e 20 64 6f 20 61 20 6e |rong then do a n| 000019d0 6f 72 6d 61 6c 20 64 72 61 67 0a 20 20 20 20 20 |ormal drag. | 000019e0 20 20 20 43 4d 50 20 20 20 20 20 72 32 2c 20 23 | CMP r2, #| 000019f0 34 30 0a 20 20 20 20 20 20 20 20 42 47 54 20 20 |40. BGT | 00001a00 20 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a 0a 20 | not_sprite.. | 00001a10 20 20 20 20 20 20 20 54 53 54 20 20 20 20 20 72 | TST r| 00001a20 33 2c 20 23 32 35 36 20 20 20 20 20 20 20 20 20 |3, #256 | 00001a30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00001a40 20 69 73 20 69 74 20 69 6e 64 69 72 65 63 74 65 | is it indirecte| 00001a50 64 20 3f 0a 20 20 20 20 20 20 20 20 42 4e 45 20 |d ?. BNE | 00001a60 20 20 20 20 69 6e 64 69 72 65 63 74 65 64 0a 0a | indirected..| 00001a70 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 | ADD | 00001a80 72 32 2c 20 72 31 2c 20 23 32 38 20 20 20 20 20 |r2, r1, #28 | 00001a90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001aa0 3b 20 73 70 72 69 74 65 20 6e 61 6d 65 20 64 69 |; sprite name di| 00001ab0 72 65 63 74 6c 79 20 73 70 65 63 69 66 69 65 64 |rectly specified| 00001ac0 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |. MOV | 00001ad0 20 72 31 2c 20 23 31 0a 20 20 20 20 20 20 20 20 | r1, #1. | 00001ae0 42 20 20 20 20 20 20 20 64 6f 5f 64 72 61 67 0a |B do_drag.| 00001af0 0a 69 6e 64 69 72 65 63 74 65 64 0a 20 20 20 20 |.indirected. | 00001b00 20 20 20 20 54 53 54 20 20 20 20 20 72 33 2c 20 | TST r3, | 00001b10 23 31 0a 20 20 20 20 20 20 20 20 42 4e 45 20 20 |#1. BNE | 00001b20 20 20 20 74 65 78 74 5f 61 6e 64 5f 73 70 72 69 | text_and_spri| 00001b30 74 65 0a 20 20 20 20 20 20 20 20 4c 44 52 20 20 |te. LDR | 00001b40 20 20 20 72 33 2c 20 5b 72 31 2c 20 23 33 36 5d | r3, [r1, #36]| 00001b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001b60 20 20 20 3b 20 67 65 74 20 69 6e 64 69 72 65 63 | ; get indirec| 00001b70 74 65 64 20 73 70 72 69 74 65 20 6e 61 6d 65 20 |ted sprite name | 00001b80 6c 65 6e 67 74 68 0a 20 20 20 20 20 20 20 20 4c |length. L| 00001b90 44 52 20 20 20 20 20 72 32 2c 20 5b 72 31 2c 20 |DR r2, [r1, | 00001ba0 23 32 38 5d 0a 20 20 20 20 20 20 20 20 4c 44 52 |#28]. LDR| 00001bb0 20 20 20 20 20 72 31 2c 20 5b 72 31 2c 20 23 33 | r1, [r1, #3| 00001bc0 32 5d 0a 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |2].. CMP | 00001bd0 20 20 20 20 72 33 2c 20 23 30 20 20 20 20 20 20 | r3, #0 | 00001be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001bf0 20 20 20 20 3b 20 69 66 20 6c 65 6e 67 74 68 20 | ; if length | 00001c00 3d 20 30 20 74 68 65 6e 20 72 32 20 70 6f 69 6e |= 0 then r2 poin| 00001c10 74 73 20 74 6f 20 73 74 61 72 74 20 6f 66 20 73 |ts to start of s| 00001c20 70 72 69 74 65 0a 20 20 20 20 20 20 20 20 41 44 |prite. AD| 00001c30 44 45 51 20 20 20 72 32 2c 20 72 32 2c 20 23 34 |DEQ r2, r2, #4| 00001c40 0a 20 20 20 20 20 20 20 20 42 20 20 20 20 20 20 |. B | 00001c50 20 64 6f 5f 64 72 61 67 0a 0a 74 65 78 74 5f 61 | do_drag..text_a| 00001c60 6e 64 5f 73 70 72 69 74 65 0a 20 20 20 20 20 20 |nd_sprite. | 00001c70 20 20 4c 44 52 20 20 20 20 20 72 32 2c 20 5b 72 | LDR r2, [r| 00001c80 31 2c 20 23 33 32 5d 0a 20 20 20 20 20 20 20 20 |1, #32]. | 00001c90 43 4d 50 20 20 20 20 20 72 32 2c 20 23 30 0a 20 |CMP r2, #0. | 00001ca0 20 20 20 20 20 20 20 42 4c 45 20 20 20 20 20 6e | BLE n| 00001cb0 6f 74 5f 73 70 72 69 74 65 0a 20 20 20 20 20 20 |ot_sprite. | 00001cc0 20 20 0a 66 69 6e 64 5f 73 74 61 72 74 0a 20 20 | .find_start. | 00001cd0 20 20 20 20 20 20 4c 44 52 42 20 20 20 20 72 33 | LDRB r3| 00001ce0 2c 20 5b 72 32 5d 2c 20 23 31 20 20 20 20 20 20 |, [r2], #1 | 00001cf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001d00 65 78 74 72 61 63 74 20 73 70 72 69 74 65 20 6e |extract sprite n| 00001d10 61 6d 65 20 66 72 6f 6d 20 76 61 6c 69 64 61 74 |ame from validat| 00001d20 69 6f 6e 20 73 74 72 69 6e 67 0a 20 20 20 20 20 |ion string. | 00001d30 20 20 20 43 4d 50 20 20 20 20 20 72 33 2c 20 23 | CMP r3, #| 00001d40 27 53 27 0a 20 20 20 20 20 20 20 20 43 4d 50 4e |'S'. CMPN| 00001d50 45 20 20 20 72 33 2c 20 23 27 73 27 0a 20 20 20 |E r3, #'s'. | 00001d60 20 20 20 20 20 42 45 51 20 20 20 20 20 66 6f 75 | BEQ fou| 00001d70 6e 64 5f 73 74 61 72 74 0a 20 20 20 20 20 20 20 |nd_start. | 00001d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001da0 20 20 20 20 20 20 20 20 20 3b 20 66 6f 75 6e 64 | ; found| 00001db0 20 61 20 63 6f 6d 6d 61 6e 64 2c 20 6e 6f 77 20 | a command, now | 00001dc0 6c 6f 6f 6b 20 66 6f 72 20 6e 65 78 74 20 73 65 |look for next se| 00001dd0 6d 69 63 6f 6c 6f 6e 0a 63 6f 6d 6d 61 6e 64 5f |micolon.command_| 00001de0 65 6e 64 0a 20 20 20 20 20 20 20 20 43 4d 50 20 |end. CMP | 00001df0 20 20 20 20 72 33 2c 20 23 27 5c 27 20 20 20 20 | r3, #'\' | 00001e00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001e10 20 20 20 20 3b 20 27 5c 27 20 6d 65 61 6e 73 20 | ; '\' means | 00001e20 6e 65 78 74 20 63 68 61 72 61 63 74 65 72 20 69 |next character i| 00001e30 73 20 6c 69 74 65 72 61 6c 2c 20 6e 6f 74 20 61 |s literal, not a| 00001e40 20 63 6f 6d 6d 61 6e 64 0a 20 20 20 20 20 20 20 | command. | 00001e50 20 41 44 44 45 51 20 20 20 72 32 2c 20 72 32 2c | ADDEQ r2, r2,| 00001e60 20 23 31 0a 20 20 20 20 20 20 20 20 43 4d 50 20 | #1. CMP | 00001e70 20 20 20 20 72 33 2c 20 23 27 3b 27 0a 20 20 20 | r3, #';'. | 00001e80 20 20 20 20 20 42 45 51 20 20 20 20 20 66 69 6e | BEQ fin| 00001e90 64 5f 73 74 61 72 74 0a 20 20 20 20 20 20 20 20 |d_start. | 00001ea0 43 4d 50 20 20 20 20 20 72 33 2c 20 23 27 20 27 |CMP r3, #' '| 00001eb0 0a 20 20 20 20 20 20 20 20 4c 44 52 47 45 42 20 |. LDRGEB | 00001ec0 20 72 33 2c 20 5b 72 32 5d 2c 20 23 31 0a 20 20 | r3, [r2], #1. | 00001ed0 20 20 20 20 20 20 42 47 45 20 20 20 20 20 63 6f | BGE co| 00001ee0 6d 6d 61 6e 64 5f 65 6e 64 0a 20 20 20 20 20 20 |mmand_end. | 00001ef0 20 20 42 20 20 20 20 20 20 20 6e 6f 74 5f 73 70 | B not_sp| 00001f00 72 69 74 65 0a 0a 66 6f 75 6e 64 5f 73 74 61 72 |rite..found_star| 00001f10 74 0a 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |t. MOV | 00001f20 20 20 72 31 2c 20 23 31 0a 0a 64 6f 5f 64 72 61 | r1, #1..do_dra| 00001f30 67 0a 20 20 20 20 20 20 20 20 43 4d 50 20 20 20 |g. CMP | 00001f40 20 20 72 31 2c 20 23 31 20 20 20 20 20 20 20 20 | r1, #1 | 00001f50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001f60 20 20 3b 20 69 66 20 77 65 20 63 61 6e 27 74 20 | ; if we can't | 00001f70 66 69 6e 64 20 74 68 65 20 73 70 72 69 74 65 20 |find the sprite | 00001f80 74 68 65 6e 20 70 72 6f 63 65 65 64 20 61 73 20 |then proceed as | 00001f90 6e 6f 72 6d 61 6c 0a 20 20 20 20 20 20 20 20 4d |normal. M| 00001fa0 4f 56 20 20 20 20 20 72 30 2c 20 23 26 31 31 38 |OV r0, #&118| 00001fb0 0a 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 20 |. STMFD | 00001fc0 20 73 70 21 2c 20 7b 72 32 7d 20 20 20 20 20 20 | sp!, {r2} | 00001fd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001fe0 20 3b 20 6e 65 65 64 20 74 6f 20 70 72 65 73 65 | ; need to prese| 00001ff0 72 76 65 20 74 68 65 20 73 70 72 69 74 65 27 73 |rve the sprite's| 00002000 20 6e 61 6d 65 20 69 6e 20 72 32 0a 20 20 20 20 | name in r2. | 00002010 20 20 20 20 53 57 49 45 51 20 20 20 58 57 69 6d | SWIEQ XWim| 00002020 70 5f 53 70 72 69 74 65 4f 70 0a 20 20 20 20 20 |p_SpriteOp. | 00002030 20 20 20 53 57 49 4e 45 20 20 20 58 4f 53 5f 53 | SWINE XOS_S| 00002040 70 72 69 74 65 4f 70 0a 20 20 20 20 20 20 20 20 |priteOp. | 00002050 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 7b 72 32 |LDMFD sp!, {r2| 00002060 7d 0a 20 20 20 20 20 20 20 20 42 56 53 20 20 20 |}. BVS | 00002070 20 20 6e 6f 74 5f 73 70 72 69 74 65 0a 0a 20 20 | not_sprite.. | 00002080 20 20 20 20 20 20 41 44 52 20 20 20 20 20 72 30 | ADR r0| 00002090 2c 20 77 6f 72 6b 73 70 61 63 65 0a 20 20 20 20 |, workspace. | 000020a0 20 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 20 | LDR r0, | 000020b0 5b 72 30 2c 20 23 33 36 5d 20 20 20 20 20 20 20 |[r0, #36] | 000020c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 | ; ge| 000020d0 74 20 66 6c 61 67 73 20 77 6f 72 64 0a 20 20 20 |t flags word. | 000020e0 20 20 20 20 20 54 53 54 20 20 20 20 20 72 30 2c | TST r0,| 000020f0 20 23 26 32 30 30 0a 20 20 20 20 20 20 20 20 4f | #&200. O| 00002100 52 52 4e 45 20 20 20 72 30 2c 20 72 30 2c 20 23 |RRNE r0, r0, #| 00002110 32 5f 31 30 30 30 30 30 20 20 20 20 20 20 20 20 |2_100000 | 00002120 20 20 20 20 20 20 20 3b 20 73 65 74 20 6f 72 20 | ; set or | 00002130 63 6c 65 61 72 20 62 69 74 20 35 0a 20 20 20 20 |clear bit 5. | 00002140 20 20 20 20 42 49 43 45 51 20 20 20 72 30 2c 20 | BICEQ r0, | 00002150 72 30 2c 20 23 32 5f 31 30 30 30 30 30 0a 20 20 |r0, #2_100000. | 00002160 20 20 20 20 20 20 41 4e 44 20 20 20 20 20 72 30 | AND r0| 00002170 2c 20 72 30 2c 20 23 32 5f 31 31 31 30 30 31 0a |, r0, #2_111001.| 00002180 20 20 20 20 20 20 20 20 54 53 54 20 20 20 20 20 | TST | 00002190 72 30 2c 20 23 31 0a 20 20 20 20 20 20 20 20 41 |r0, #1. A| 000021a0 44 52 45 51 20 20 20 72 33 2c 20 66 6c 61 67 73 |DREQ r3, flags| 000021b0 5f 74 61 62 6c 65 0a 20 20 20 20 20 20 20 20 41 |_table. A| 000021c0 44 52 4e 45 20 20 20 72 33 2c 20 62 6f 74 68 5f |DRNE r3, both_| 000021d0 74 61 62 6c 65 0a 20 20 20 20 20 20 20 20 4c 44 |table. LD| 000021e0 52 42 20 20 20 20 72 30 2c 20 5b 72 33 2c 20 72 |RB r0, [r3, r| 000021f0 30 2c 20 4c 53 52 20 23 33 5d 20 20 20 20 20 20 |0, LSR #3] | 00002200 20 20 20 20 20 20 3b 20 6c 6f 6f 6b 20 75 70 20 | ; look up | 00002210 66 6c 61 67 73 20 69 6e 20 74 61 62 6c 65 0a 0a |flags in table..| 00002220 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 | ADD | 00002230 72 30 2c 20 72 30 2c 20 23 31 32 38 2b 36 34 2b |r0, r0, #128+64+| 00002240 33 32 0a 0a 20 20 20 20 20 20 20 20 41 44 44 20 |32.. ADD | 00002250 20 20 20 20 72 33 2c 20 72 34 2c 20 23 38 0a 20 | r3, r4, #8. | 00002260 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 72 | ADD r| 00002270 34 2c 20 72 34 2c 20 23 32 34 20 20 20 20 20 20 |4, r4, #24 | 00002280 20 20 0a 20 20 20 20 20 20 20 20 53 57 49 20 20 | . SWI | 00002290 20 20 20 58 44 72 61 67 41 53 70 72 69 74 65 5f | XDragASprite_| 000022a0 53 74 61 72 74 0a 20 20 20 20 20 20 20 20 53 54 |Start. ST| 000022b0 52 56 43 20 20 20 72 30 2c 20 64 72 61 67 67 69 |RVC r0, draggi| 000022c0 6e 67 5f 66 6c 61 67 0a 20 20 20 20 20 20 20 20 |ng_flag. | 000022d0 4c 44 4d 56 43 46 44 20 73 70 21 2c 7b 72 30 2d |LDMVCFD sp!,{r0-| 000022e0 72 34 2c 6c 72 2c 70 63 7d 5e 20 20 20 20 20 20 |r4,lr,pc}^ | 000022f0 20 20 20 20 20 20 20 20 3b 20 72 65 74 75 72 6e | ; return| 00002300 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 69 66 20 | immediately if | 00002310 74 68 65 72 65 27 73 20 6e 6f 20 65 72 72 6f 72 |there's no error| 00002320 0a 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 |. ADD | 00002330 20 73 70 2c 20 73 70 2c 20 23 34 0a 20 20 20 20 | sp, sp, #4. | 00002340 20 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c | LDMFD sp!,| 00002350 7b 72 31 2d 72 34 2c 6c 72 7d 0a 20 20 20 20 20 |{r1-r4,lr}. | 00002360 20 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 7b | LDMFD sp!,{| 00002370 6c 72 7d 20 20 20 20 20 20 20 20 20 20 20 20 20 |lr} | 00002380 20 20 20 20 20 20 20 20 20 20 20 3b 20 6f 74 68 | ; oth| 00002390 65 72 77 69 73 65 20 72 65 74 75 72 6e 20 77 69 |erwise return wi| 000023a0 74 68 20 56 20 73 65 74 20 61 6e 64 20 65 72 72 |th V set and err| 000023b0 6f 72 20 70 6f 69 6e 74 65 72 20 69 6e 20 72 30 |or pointer in r0| 000023c0 0a 20 20 20 20 20 20 20 20 4f 52 52 53 20 20 20 |. ORRS | 000023d0 20 70 63 2c 20 6c 72 2c 20 23 56 5f 46 4c 41 47 | pc, lr, #V_FLAG| 000023e0 0a 0a 3b 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..; ------------| 000023f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002440 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 4c |-------------..L| 00002450 45 46 54 20 20 20 20 45 51 55 20 20 20 20 20 30 |EFT EQU 0| 00002460 0a 48 43 45 4e 54 52 45 20 45 51 55 20 20 20 20 |.HCENTRE EQU | 00002470 20 31 0a 52 49 47 48 54 20 20 20 45 51 55 20 20 | 1.RIGHT EQU | 00002480 20 20 20 32 0a 0a 42 4f 54 54 4f 4d 20 20 45 51 | 2..BOTTOM EQ| 00002490 55 20 20 20 20 20 30 0a 56 43 45 4e 54 52 45 20 |U 0.VCENTRE | 000024a0 45 51 55 20 20 20 20 20 34 0a 54 4f 50 20 20 20 |EQU 4.TOP | 000024b0 20 20 45 51 55 20 20 20 20 20 38 0a 0a 62 6f 74 | EQU 8..bot| 000024c0 68 5f 74 61 62 6c 65 0a 20 20 20 20 20 20 20 20 |h_table. | 000024d0 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 000024e0 54 4f 50 20 2b 20 4c 45 46 54 0a 20 20 20 20 20 |TOP + LEFT. | 000024f0 20 20 20 20 20 20 20 20 20 20 20 44 43 42 20 20 | DCB | 00002500 20 20 20 54 4f 50 20 2b 20 48 43 45 4e 54 52 45 | TOP + HCENTRE| 00002510 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00002520 20 44 43 42 20 20 20 20 20 56 43 45 4e 54 52 45 | DCB VCENTRE| 00002530 20 2b 20 4c 45 46 54 0a 20 20 20 20 20 20 20 20 | + LEFT. | 00002540 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 00002550 56 43 45 4e 54 52 45 20 2b 20 48 43 45 4e 54 52 |VCENTRE + HCENTR| 00002560 45 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |E. | 00002570 20 20 44 43 42 20 20 20 20 20 54 4f 50 20 2b 20 | DCB TOP + | 00002580 52 49 47 48 54 0a 20 20 20 20 20 20 20 20 20 20 |RIGHT. | 00002590 20 20 20 20 20 20 44 43 42 20 20 20 20 20 42 4f | DCB BO| 000025a0 54 54 4f 4d 20 2b 20 48 43 45 4e 54 52 45 0a 20 |TTOM + HCENTRE. | 000025b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 | D| 000025c0 43 42 20 20 20 20 20 56 43 45 4e 54 52 45 20 2b |CB VCENTRE +| 000025d0 20 52 49 47 48 54 0a 20 20 20 20 20 20 20 20 20 | RIGHT. | 000025e0 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 56 | DCB V| 000025f0 43 45 4e 54 52 45 20 2b 20 4c 45 46 54 0a 0a 66 |CENTRE + LEFT..f| 00002600 6c 61 67 73 5f 74 61 62 6c 65 0a 20 20 20 20 20 |lags_table. | 00002610 20 20 20 20 20 20 20 20 20 20 20 44 43 42 20 20 | DCB | 00002620 20 20 20 42 4f 54 54 4f 4d 20 2b 20 4c 45 46 54 | BOTTOM + LEFT| 00002630 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00002640 20 44 43 42 20 20 20 20 20 42 4f 54 54 4f 4d 20 | DCB BOTTOM | 00002650 2b 20 48 43 45 4e 54 52 45 0a 20 20 20 20 20 20 |+ HCENTRE. | 00002660 20 20 20 20 20 20 20 20 20 20 44 43 42 20 20 20 | DCB | 00002670 20 20 56 43 45 4e 54 52 45 20 2b 20 4c 45 46 54 | VCENTRE + LEFT| 00002680 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00002690 20 44 43 42 20 20 20 20 20 56 43 45 4e 54 52 45 | DCB VCENTRE| 000026a0 20 2b 20 48 43 45 4e 54 52 45 0a 20 20 20 20 20 | + HCENTRE. | 000026b0 20 20 20 20 20 20 20 20 20 20 20 44 43 42 20 20 | DCB | 000026c0 20 20 20 42 4f 54 54 4f 4d 20 2b 20 52 49 47 48 | BOTTOM + RIGH| 000026d0 54 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |T. | 000026e0 20 20 44 43 42 20 20 20 20 20 42 4f 54 54 4f 4d | DCB BOTTOM| 000026f0 20 2b 20 48 43 45 4e 54 52 45 0a 20 20 20 20 20 | + HCENTRE. | 00002700 20 20 20 20 20 20 20 20 20 20 20 44 43 42 20 20 | DCB | 00002710 20 20 20 56 43 45 4e 54 52 45 20 2b 20 52 49 47 | VCENTRE + RIG| 00002720 48 54 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |HT. | 00002730 20 20 20 44 43 42 20 20 20 20 20 56 43 45 4e 54 | DCB VCENT| 00002740 52 45 20 2b 20 48 43 45 4e 54 52 45 0a 0a 6f 6c |RE + HCENTRE..ol| 00002750 64 5f 62 72 61 6e 63 68 20 20 20 20 20 20 44 43 |d_branch DC| 00002760 44 20 20 20 20 20 30 20 20 20 20 20 20 20 20 20 |D 0 | 00002770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002780 62 72 61 6e 63 68 20 74 6f 20 6f 72 69 67 69 6e |branch to origin| 00002790 61 6c 20 53 57 49 20 64 65 63 6f 64 65 72 0a 6e |al SWI decoder.n| 000027a0 65 77 5f 62 72 61 6e 63 68 20 20 20 20 20 20 44 |ew_branch D| 000027b0 43 44 20 20 20 20 20 30 20 20 20 20 20 20 20 20 |CD 0 | 000027c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000027d0 20 62 72 61 6e 63 68 20 74 6f 20 6f 75 72 20 6e | branch to our n| 000027e0 65 77 20 53 57 49 20 64 65 63 6f 64 65 72 20 20 |ew SWI decoder | 000027f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002800 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 64 72 | .dr| 00002810 61 67 67 69 6e 67 5f 66 6c 61 67 20 20 20 44 43 |agging_flag DC| 00002820 44 20 20 20 20 20 30 20 20 20 20 20 20 20 20 20 |D 0 | 00002830 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002840 73 65 74 20 77 68 65 6e 20 74 68 65 72 65 27 73 |set when there's| 00002850 20 61 20 73 70 72 69 74 65 20 64 72 61 67 20 69 | a sprite drag i| 00002860 6e 20 70 72 6f 67 72 65 73 73 0a 0a 3b 20 2d 2d |n progress..; --| 00002870 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000028d0 2d 2d 2d 2d 2d 2d 2d 0a 0a 66 69 6c 74 65 72 5f |-------..filter_| 000028e0 63 6f 64 65 20 20 20 20 20 20 20 20 20 20 20 20 |code | 000028f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002900 20 20 20 20 20 20 20 20 20 3b 20 73 74 6f 70 20 | ; stop | 00002910 74 68 65 20 73 70 72 69 74 65 20 64 72 61 67 67 |the sprite dragg| 00002920 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e 0a 20 20 |ing operation. | 00002930 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 30 | CMP r0| 00002940 2c 20 23 37 0a 20 20 20 20 20 20 20 20 4d 4f 56 |, #7. MOV| 00002950 4e 45 20 20 20 70 63 2c 20 6c 72 0a 20 20 20 20 |NE pc, lr. | 00002960 20 20 20 20 53 54 4d 46 44 20 20 20 73 70 21 2c | STMFD sp!,| 00002970 20 7b 6c 72 7d 0a 20 20 20 20 20 20 20 20 4c 44 | {lr}. LD| 00002980 52 20 20 20 20 20 6c 72 2c 20 64 72 61 67 67 69 |R lr, draggi| 00002990 6e 67 5f 66 6c 61 67 0a 20 20 20 20 20 20 20 20 |ng_flag. | 000029a0 43 4d 50 20 20 20 20 20 6c 72 2c 20 23 30 0a 20 |CMP lr, #0. | 000029b0 20 20 20 20 20 20 20 4d 4f 56 4e 45 20 20 20 6c | MOVNE l| 000029c0 72 2c 20 23 30 0a 20 20 20 20 20 20 20 20 53 54 |r, #0. ST| 000029d0 52 4e 45 20 20 20 6c 72 2c 20 64 72 61 67 67 69 |RNE lr, draggi| 000029e0 6e 67 5f 66 6c 61 67 0a 20 20 20 20 20 20 20 20 |ng_flag. | 000029f0 53 57 49 4e 45 20 20 20 58 44 72 61 67 41 53 70 |SWINE XDragASp| 00002a00 72 69 74 65 5f 53 74 6f 70 0a 20 20 20 20 20 20 |rite_Stop. | 00002a10 20 20 4c 44 4d 46 44 20 20 20 73 70 21 2c 20 7b | LDMFD sp!, {| 00002a20 70 63 7d 0a 0a 20 20 20 45 4e 44 0a |pc}.. END.| 00002a2c