Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2 » StarInfo/Fletcher/ADFS/PatchBas
StarInfo/Fletcher/ADFS/PatchBas
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Regulars_2 |
Filename: | StarInfo/Fletcher/ADFS/PatchBas |
Read OK: | ✔ |
File size: | 36B0 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > Patch for memory compilation 20REM Created by JFPatch v2.24DRAW (22 May 1996) LEN Justin Fletcher 30REM Intermediate code file created 24 May 1996 40ON ERROR PROCError:END 50PROCpatch_loadfile 60sp=13:link=14:pc=15 70vbit=1<<28:cbit=1<<29:zbit=1<<30:nbit=1<<31 80P%=&0:O%=MC% 90FOR pass%=4 TO 6 STEP2 100REM **** Start of main code **** 110PROCpatch_setpc(0) 120[OPT pass% 130 ; **** Add module header **** 140 EQUD 0 ; Start offset 150 EQUD module_init ; Initialisation offset 160 EQUD module_final ; Finalisation offset 170 EQUD module_service ; Service request offset 180 EQUD module_title ; Title string offset 190 EQUD module_help ; Help string offset 200 EQUD module_commands ; Help and command keyword table offset 210: 220.module_title 230 EQUS "ADFSQuickSave"+CHR$0 240 ALIGN 250: 260.module_help 270 EQUS "ADFSQuickSave"+CHR$9+"1.02 ("+MID$(TIME$,5,11)+") � Justin Fletcher"+CHR$0 280 ALIGN 290: 300.module_service 310 LDR r12,[r12] 320 CMP r1,#&87 330 BEQ mod_svc_newfiltermgr 340._mod_svc_return 350 MOVS pc,link 360: 370.mod_svc_newfiltermgr 380 STMFD (sp)!,{r0-r4,link} ; Stack registers 390 BL mod_set_PostFilter 400 CMN r3,#1 410 BEQ mod_filter_error 420 SWI "Filter_RegisterPostFilter" 430 LDMFD (sp)!,{r0-r4,link} 440 B _mod_svc_return 450: 460.module_init 470 STMFD (sp)!,{r0-r4,link} ; Stack registers 480 BL mod_set_PostFilter 490 CMN r3,#1 500 BEQ mod_filter_error 510 SWI "Filter_RegisterPostFilter" 520 LDMFD (sp)!,{r0-r4,link} ; restore registers 530 B init 540: 550.module_final 560 STMFD (sp)!,{r0-r4,r12,link} ; Stack registers 570 BL mod_set_PostFilter 580 CMN r3,#1 590 SWINE "Filter_DeRegisterPostFilter" 600 LDMFD (sp)!,{r0-r4,r12,pc} ; Return 610: 620; ***** Module commands table 630.module_commands 640 EQUS "ADFSQuickSave" ; Command name 650 EQUB 0:ALIGN 660 EQUD 0 ; Code to call 670 EQUD &0 ; Flags 680 EQUD 0 ; Syntax pointer 690 EQUD help_adfsquicksave ; Help pointer 700 EQUB 0 710 ALIGN 720: 730; ***** Help and Syntax messages 740.help_adfsquicksave 750 EQUS "ADFSQuickSave allows you to drag unsaved files onto the ADFS " 760 EQUS "Filer icon to save them in the directory named :"+CHR$13 770 EQUS "ADFS::[drive]<QuickSave$Path>[file]"+CHR$13 780 EQUS "So you should set QuickSave$Path to something like .$.temp."+CHR$13 790 EQUS "This is dedicated to Jonix, as he wanted it :-)"+CHR$13 800 EQUS "Note: You will need to have clicked on the ADFS Filer before " 810 EQUS "it will do anything. " 820 EQUB 0 830 ALIGN 840: 850; ***** Set up registers for filters 860.mod_set_PostFilter 870 STMFD (sp)!,{link} 880 ADR r5,`module_PostFilterTask 890 BL mod_findtask 900 CMN r3,#1 910 LDMEQFD (sp)!,{pc} 920 ADR r0,`module_PostFilterName 930 FNLADR("",1,filter,31) 940 MOV r2,r12 950 LDR r4,`module_PostFilterMask 960 LDMFD (sp)!,{pc} 970: 980.`module_PostFilterMask 990 EQUD %10011111111110111111 1000.`module_PostFilterName 1010 EQUS "ADFSQuickSave"+CHR$0 1020.`module_PostFilterTask 1030 EQUS "ADFS Filer"+CHR$0 1040 ALIGN 1050: 1060.mod_filter_error 1070 ADR r0,`module_Filter_error 1080 ADD sp,sp,#4 1090 LDMFD (sp)!,{r1-r4,link} 1100 ORRS pc,link,#vbit 1110.`module_Filter_error 1120 EQUD 0 1130 EQUS "ADFSQuickSave cannot find task to apply filter to"+CHR$0 1140 ALIGN 1150: 1160.mod_findtask 1170 STMFD (sp)!,{link} 1180 MOV r0,#0 1190._mod_ft_l 1200 ADR r1,`mod_ft_block 1210 MOV r2,#16 1220 SWI "TaskManager_EnumerateTasks" 1230 CMN r0,#1 1240 MOVEQ r3,r0 1250 BEQ mod_xfindtask 1260 MOV r2,r5 1270 LDR r1,`mod_ft_block+4 1280._mod_ft_l2 1290 LDRB r3,[r1],#1 1300 LDRB r4,[r2],#1 1310 CMP r3,#32 1320 MOVLT r3,#0 1330 CMP r4,#32 1340 MOVLT r4,#0 1350 CMP r3,r4 1360 BNE _mod_ft_l 1370 CMP r3,#0 1380 BNE _mod_ft_l2 1390 LDR r3,`mod_ft_block 1400.mod_xfindtask 1410 LDMFD (sp)!,{pc} 1420.`mod_ft_block 1430 EQUD 0:EQUD 0:EQUD 0:EQUD 0 1440: 1450 ; **** End of module header **** 1460: 1470; ******************************************************************* 1480; Subroutine; init 1490; Description; Initialise the module - set the flag marking us as 1500; having not added message 1 to those we like 1510; Parameters; none 1520; Returns; none 1530; Note; Yucky way of working, but I'm not intending to ROM 1540; this module. 1550; ******************************************************************* 1560.init 1570 STMFD (sp)!,{r0-r5,link} ; Stack registers 1580 MOV r0,#0 ; 0 the flag 1590 STR r0,`added ; store in module 1600 LDMFD (sp)!,{r0-r5,pc} ; Return from call 1610: 1620; ******************************************************************* 1630; Subroutine; filter 1640; Description; Wimp_Poll filtered off 1650; Parameters; r0 = reason (17) 1660; r1-> user block 1670; Returns; r0 = -1 if it shouldn't be passed on 1680; ******************************************************************* 1690.filter 1700 STMFD (sp)!,{r0-r5,link} ; Stack registers 1710 ; "%c04%c30Our event" 1720 CMP r0,#6 ; is it a mouseclick ? 1730 BNE __z0_notmouse 1740 LDR r1,`added ; get the flag 1750 CMP r1,#0 ; have we added it ? 1760 BNE __z0_exit ; if so, exit 1770 STR r0,`added ; if not, store 6 in the block 1780 ADR r0,__z0_`messages ; get the message block 1790 SWI "XWimp_AddMessages" ; add them 1800 B __z0_exit ; and exit 1810: 1820.__z0_notmouse 1830 CMP r0,#17 ; is this a user message ? 1840 CMPNE r0,#18 ; is this a user message ? 1850 BNE __z0_exit ; if not, exit 1860 LDR r0,[r1,#16] ; get messagenumber 1870 ; "Message = %r0" 1880 CMP r0,#1 ; is this a DataSave ? 1890 BNE __z0_exit ; if not exit 1900: 1910 LDR r2,[r1,#20] ; read the number of the window 1920 CMN r2,#2 ; is it iconbar ? 1930 BNE __z0_exit ; if not, exit 1940 STR r2,__z0_`buffer ; store it in the scratch space 1950 LDR r2,[r1,#24] ; read the number of the icon 1960 STR r2,__z0_`buffer+4 ; store it in the scratch space 1970 FNLADR(" ",1,__z0_`buffer,83) 1980 ; pointer to scratch 1990 SWI "XWimp_GetIconState" ; find out about the icon 2000 BVS __z0_exit ; if error, exit 2010 LDR r0,[r1,#16+8] ; read the flags 2020 TST r0,#1 ; is there text in the icon ? 2030 BEQ __z0_exit ; if not, exit 2040 TST r0,#256 ; is it indirect ? 2050 LDRNE r0,[r1,#20+8] ; if so, get address 2060 ADDEQ r0,r1,#20+8 ; if not, use the offset 2070: 2080 LDRB r2,[r0,#0] ; get first byte of disc name 2090 CMP r2,#ASC(":") ; is it a colon ? 2100 ADDEQ r0,r0,#1 ; if so, skip it 2110: 2120 ADR r1,__z0_`buffer ; pointer to the start of the buffer 2130 BL movectrl ; copy the string 2140 BL lenctrl ; find the length (to r1) 2150 FNLADR(" ",0,__z0_`buffer,100) 2160 ; buffer to store 2170 ADD r1,r1,r0 ; increment buffer by strlen 2180: 2190 ADR r0,__z0_`var ; variable to read 2200 MOV r2,#256 ; length of buffer 2210 MOV r3,#0 ; name pointer (0 to start) 2220 MOV r4,#3 ; expand to text 2230 SWI "XOS_ReadVarVal" ; read the variable 2240 BVS __z0_exit 2250: 2260 ; "Val = %$1" 2270: 2280 MOV r0,r1 ; r0=buffer start 2290 LDR r1,[sp,#4] ; re-read block pointer 2300 ADD r4,r1,#44 ; r4=leafname 2310: 2320.__z0_loop 2330 LDRB r3,[r4] ; read a byte from the user block 2340 STRB r3,[r0,r2] ; store in our block 2350 ADD r4,r4,#1 ; increment r4 2360 ADD r2,r2,#1 ; increment r2 2370 CMP r3,#31 ; is it ctrl ? 2380 BGT __z0_loop ; if not then loop 2390: 2400 ADD r4,r1,#44 ; points to the userblock filename 2410 ADR r0,__z0_`startbuffer ; r0=the filename buffer 2420 MOV r2,#0 ; offset into buffer 2430: 2440.__z0_loop2 2450 LDRB r3,[r0,r2] ; read from our buffer 2460 STRB r3,[r4,r2] ; store in user block 2470 ADD r2,r2,#1 ; increment offset 2480 CMP r3,#31 ; is it ctrl ? 2490 BGT __z0_loop2 ; if not get next one 2500: 2510 ADD r0,r2,#3+44 ; add three to the length 2520 BIC r0,r0,#3 ; clear the bottom bits 2530 STR r0,[r1] ; store as length of block 2540: 2550 ADD r0,r1,#44 2560 ; "Filename = %$0" 2570: 2580 MOV r0,#2 ; DataSaveAck 2590 STR r0,[r1,#16] ; store in block 2600 LDR r0,[r1,#8] ; get the old pointer 2610 STR r0,[r1,#12] ; store back 2620 LDR r2,[r1,#4] ; r2= task to use 2630 MOV r0,#17 2640 SWI "XWimp_SendMessage" ; send the message 2650 BVS __z0_exit 2660: 2670 MVN r0,#NOT -1 ; ignore message 2680 STR r0,[sp,#0] ; store on stack 2690: 2700.__z0_exit 2710 LDMFD (sp)!,{r0-r5,pc}^ ; Return from call with flags 2720: 2730.__z0_`var 2740 EQUS "QuickSave$Path"+CHR$0 2750 ALIGN 2760 ; The variable to use 2770.__z0_`messages 2780 EQUD 1 ; DataSave 2790 EQUD 0 ; end of list 2800: 2810 EQUS "xx" ; to ensure that __z0_`buffer is aligned 2820.__z0_`startbuffer 2830 EQUS "ADFS::" ; the bit for the start of the line 2840.__z0_`buffer 2850 FNreserve(256) 2860 ; for storing the filename in 2870: 2880.`added 2890 EQUD 0 2900: 2910: 2920 ; Library routine Strings.movectrl 2930.movectrl 2940; *** liked *** 2950; > r0=input string 2960; r1=ouput buffer 2970; < __z1_r1=$r0 2980 STMFD (sp)!,{r0-r1,r5,link} 2990.__z1_loop 3000 LDRB r5,[r0],#1 3010 STRB r5,[r1],#1 3020 CMP r5,#31 3030 BGT __z1_loop 3040 LDMFD (sp)!,{r0-r1,r5,pc}^ 3050: 3060: 3070 ; Library routine Strings.lenctrl 3080.lenctrl 3090; > r0=input string 3100; < r1=LEN(r0) 3110 STMFD (sp)!,{r2,link} 3120 MOV r1,#0 3130.__z2_loop 3140 LDRB r2,[r0,r1] 3150 ADD r1,r1,#1 3160 CMP r2,#32 3170 BGE __z2_loop 3180 SUB r1,r1,#1 3190 LDMFD (sp)!,{r2,pc}^ 3200: 3210 ; Library 'Strings' ends 3220: 3230] 3240REM **** End of main code **** 3250REM Set final pointer to find the length of the code 3260PROCpatch_setpc(0) 3270NEXT pass% 3280PROCpatch_savefile 3310REM **** Post-assembly user code ***** 3320*Set QuickSave$Path .$.temp. 3330*Filer_OpenDir ADFS::4.$.temp 3340: 3350*Run <ADFSQuickSave$Dir>.ADFSQuickSave 3360END 3370: 3380REM **** Filing procedures **** 3390: 3400DEF PROCpatch_loadfile 3410codelen=0 3420DIM MC% &1400 3430endofcode=(codelen+&0+3) AND -4:max=codelen 3440L%=endofcode:__cap%=FALSE 3590ENDPROC 3600: 3610DEF PROCpatch_savefile 3620outfile$="<ADFSQuickSave$Dir>.ADFSQuickSave" 3630OSCLI("Save "+outfile$+" "+STR$~MC%+" "+STR$~(max+MC%)) 3640OSCLI("Settype "+outfile$+" Module") 3650patchdir$="<ADFSQuickSave$Dir>" 3700ENDPROC 3710: 3720REM **** Error Handler **** 3730: 3740DEFPROCError 3750LOCAL ERROR 3760ON ERROR LOCAL:RESTORE ERROR:ERROR EXT ERR,REPORT$+" whilst in error handler at line "+STR$ERL 3870ERROR EXT ERR,REPORT$+" at line "+STR$ERL 3880ENDPROC 3890: 4000REM **** Utility procedures **** 4010: 4020DEFPROCpatch_setpc(n) 4030IF P%-&0>max THENmax=P%-&0 4040P%=n:O%=MC%+n-&0 4050ENDPROC 4060: 4070DEFFNfindfreereg(a,b,c,d):LOCAL n:n=0 4080WHILE n=a OR n=b OR n=c OR n=d 4090 n+=1 4100ENDWHILE 4110=n 4120: 4130REM **** Long ADR macro procedure **** 4140: 4150REM DESC. : ADR equivalent for long address ranges, in 2 insts 4160REM ENTRY : cond$ = two char string, containing the ARM condition 4170REM reg% = 0..15 4180REM pointer% = long range pointer 4190REM COMM. : pass% = OPT variable in the assembler FOR..NEXT loop 4200REM Can only handle 64 KByte ranges 4210DEFFNLADR(cond$,reg%,pointer%,inline) 4220LOCAL cc%,diff%,lo%,hi%,op1%,op2% 4230IF (pass% AND%10)=0 P%+=8:O%+=8:=0 4270IF ABS(pointer%-P%)>65535 THENERROR 999,"LADR can only handle 64 KByte ranges" 4280IFcond$=" " OR cond$="" THENcond$="AL" 4290cc%=INSTR("EQNECSCCMIPLVSVCHILSGELTGTLEALNV",cond$) 4300IF cc%=0 THENERROR 999,"Unknown condition for LADR ("+cond$+")" ELSE cc%=(cc%-1)DIV2 4310diff%=pointer%-P%-8 4320lo%=ABS(diff%)AND&FF 4330hi%=ABS(diff%)AND&FF00 4340IFdiff%>=0THEN 4350 op1%=(cc%<<28)+&028F0000+(reg%<<12)+lo% 4360 op2%=(cc%<<28)+&02800C00+(reg%<<16)+(reg%<<12)+(hi%>>8) 4370ELSE 4380 op1%=(cc%<<28)+&024F0000+(reg%<<12)+lo% 4390 op2%=(cc%<<28)+&02400C00+(reg%<<16)+(reg%<<12)+(hi%>>8) 4400ENDIF 4410[OPT pass%:EQUD op1%:EQUD op2%:] 4420=0 4430: 4440REM FNreserve : Reserve space for x bytes 4450DEFFNreserve(bytes):bytes=(bytes+3) AND -4 4460IF (pass% AND 2)=2 THEN 4470 LOCAL I:FOR I=0TObytes-4 STEP4:O%!I=0:NEXT 4480ENDIF 4490P%+=bytes:O%+=bytes 4500=0 4510: 32639REM JFPatch
$� > Patch for memory compilation ?� Created by JFPatch v2.24� (22 May 1996) � Justin Fletcher 0� Intermediate code file created 24 May 1996 (� � �Error:� 2�patch_loadfile <sp=13:link=14:pc=15 F/vbit=1<<28:cbit=1<<29:zbit=1<<30:nbit=1<<31 PP%=&0:O%=MC% Z� pass%=4 � 6 �2 d"� **** Start of main code **** n�patch_setpc(0) x[OPT pass% �+ ; **** Add module header **** �- EQUD 0 ; Start offset �6 EQUD module_init ; Initialisation offset �4 EQUD module_final ; Finalisation offset �7 EQUD module_service ; Service request offset �4 EQUD module_title ; Title string offset �3 EQUD module_help ; Help string offset �F EQUD module_commands ; Help and command keyword table offset �: �.module_title � EQUS "ADFSQuickSave"+�0 � ALIGN �: .module_help J EQUS "ADFSQuickSave"+�9+"1.02 ("+��$,5,11)+") � Justin Fletcher"+�0 ALIGN ": ,.module_service 6 LDR r12,[r12] @ CMP r1,#&87 J# BEQ mod_svc_newfiltermgr T._mod_svc_return ^ MOVS pc,link h: r.mod_svc_newfiltermgr |7 STMFD (sp)!,{r0-r4,link} ; Stack registers �! BL mod_set_PostFilter � CMN r3,#1 � BEQ mod_filter_error �* SWI "Filter_RegisterPostFilter" �! LDMFD (sp)!,{r0-r4,link} � B _mod_svc_return �: �.module_init �7 STMFD (sp)!,{r0-r4,link} ; Stack registers �! BL mod_set_PostFilter � CMN r3,#1 � BEQ mod_filter_error �* SWI "Filter_RegisterPostFilter" 9 LDMFD (sp)!,{r0-r4,link} ; restore registers B init : &.module_final 07 STMFD (sp)!,{r0-r4,r12,link} ; Stack registers :! BL mod_set_PostFilter D CMN r3,#1 N, SWINE "Filter_DeRegisterPostFilter" X. LDMFD (sp)!,{r0-r4,r12,pc} ; Return b: l!; ***** Module commands table v.module_commands �- EQUS "ADFSQuickSave" ; Command name � EQUB 0:ALIGN �- EQUD 0 ; Code to call �& EQUD &0 ; Flags �/ EQUD 0 ; Syntax pointer �- EQUD help_adfsquicksave ; Help pointer � EQUB 0 � ALIGN �: �$; ***** Help and Syntax messages �.help_adfsquicksave �K EQUS "ADFSQuickSave allows you to drag unsaved files onto the ADFS " �B EQUS "Filer icon to save them in the directory named :"+�13 5 EQUS "ADFS::[drive]<QuickSave$Path>[file]"+�13 M EQUS "So you should set QuickSave$Path to something like .$.temp."+�13 A EQUS "This is dedicated to Jonix, as he wanted it :-)"+�13 K EQUS "Note: You will need to have clicked on the ADFS Filer before " *# EQUS "it will do anything. " 4 EQUB 0 > ALIGN H: R(; ***** Set up registers for filters \.mod_set_PostFilter f STMFD (sp)!,{link} p( ADR r5,`module_PostFilterTask z BL mod_findtask � CMN r3,#1 � LDMEQFD (sp)!,{pc} �( ADR r0,`module_PostFilterName � �LADR("",1,filter,31) � MOV r2,r12 �( LDR r4,`module_PostFilterMask � LDMFD (sp)!,{pc} �: �.`module_PostFilterMask �$ EQUD %10011111111110111111 �.`module_PostFilterName �! EQUS "ADFSQuickSave"+�0 �.`module_PostFilterTask EQUS "ADFS Filer"+�0 ALIGN : $.mod_filter_error .& ADR r0,`module_Filter_error 8 ADD sp,sp,#4 B! LDMFD (sp)!,{r1-r4,link} L �RS pc,link,#vbit V.`module_Filter_error ` EQUD 0 jE EQUS "ADFSQuickSave cannot find task to apply filter to"+�0 t ALIGN ~: �.mod_findtask � STMFD (sp)!,{link} � MOV r0,#0 �._mod_ft_l � ADR r1,`mod_ft_block � MOV r2,#16 �+ SWI "TaskManager_EnumerateTasks" � CMN r0,#1 � �Q r3,r0 � BEQ mod_xfindtask � MOV r2,r5 �! LDR r1,`mod_ft_block+4 ._mod_ft_l2 LDRB r3,[r1],#1 LDRB r4,[r2],#1 CMP r3,#32 ( MOVLT r3,#0 2 CMP r4,#32 < MOVLT r4,#0 F CMP r3,r4 P BNE _mod_ft_l Z CMP r3,#0 d BNE _mod_ft_l2 n LDR r3,`mod_ft_block x.mod_xfindtask � LDMFD (sp)!,{pc} �.`mod_ft_block �" EQUD 0:EQUD 0:EQUD 0:EQUD 0 �: �. ; **** End of module header **** �: �I; ******************************************************************* �; Subroutine; init �F; Description; Initialise the module - set the flag marking us as �?; having not added message 1 to those we like �; Parameters; none �; Returns; none �F; Note; Yucky way of working, but I'm not intending to ROM ; this module. I; ******************************************************************* .init "> STMFD (sp)!,{r0-r5,link} ; Stack registers ,9 MOV r0,#0 ; 0 the flag 6> STR r0,`added ; store in module @? LDMFD (sp)!,{r0-r5,pc} ; Return from call J: TI; ******************************************************************* ^; Subroutine; filter h*; Description; Wimp_Poll filtered off r$; Parameters; r0 = reason (17) |#; r1-> user block �8; Returns; r0 = -1 if it shouldn't be passed on �I; ******************************************************************* �.filter �> STMFD (sp)!,{r0-r5,link} ; Stack registers �# ; "%c04%c30Our event" �C CMP r0,#6 ; is it a mouseclick ? � BNE __z0_notmouse �; LDR r1,`added ; get the flag �A CMP r1,#0 ; have we added it ? �> BNE __z0_exit ; if so, exit �K STR r0,`added ; if not, store 6 in the block �H ADR r0,__z0_`messages ; get the message block �7 SWI "XWimp_AddMessages" ; add them ; B __z0_exit ; and exit : .__z0_notmouse &G CMP r0,#17 ; is this a user message ? 0G CMPNE r0,#18 ; is this a user message ? :? BNE __z0_exit ; if not, exit D@ LDR r0,[r1,#16] ; get messagenumber N ; "Message = %r0" XC CMP r0,#1 ; is this a DataSave ? b> BNE __z0_exit ; if not exit l: vL LDR r2,[r1,#20] ; read the number of the window �> CMN r2,#2 ; is it iconbar ? �? BNE __z0_exit ; if not, exit �P STR r2,__z0_`buffer ; store it in the scratch space �J LDR r2,[r1,#24] ; read the number of the icon �P STR r2,__z0_`buffer+4 ; store it in the scratch space �" �LADR(" ",1,__z0_`buffer,83) �" ; pointer to scratch �F SWI "XWimp_GetIconState" ; find out about the icon �A BVS __z0_exit ; if error, exit �= LDR r0,[r1,#16+8] ; read the flags �J TST r0,#1 ; is there text in the icon ? �? BEQ __z0_exit ; if not, exit �? TST r0,#256 ; is it indirect ? A LDRNE r0,[r1,#20+8] ; if so, get address E ADDEQ r0,r1,#20+8 ; if not, use the offset : J LDRB r2,[r0,#0] ; get first byte of disc name *< CMP r2,#�(":") ; is it a colon ? 4= ADDEQ r0,r0,#1 ; if so, skip it >: HU ADR r1,__z0_`buffer ; pointer to the start of the buffer R> BL movectrl ; copy the string \F BL lenctrl ; find the length (to r1) f# �LADR(" ",0,__z0_`buffer,100) p ; buffer to store zI ADD r1,r1,r0 ; increment buffer by strlen �: �C ADR r0,__z0_`var ; variable to read �? MOV r2,#256 ; length of buffer �H MOV r3,#0 ; name pointer (0 to start) �= MOV r4,#3 ; expand to text �@ SWI "XOS_ReadVarVal" ; read the variable � BVS __z0_exit �: � ; "Val = %$1" �: �> MOV r0,r1 ; r0=buffer start �D LDR r1,[sp,#4] ; re-read block pointer �: ADD r4,r1,#44 ; r4=leafname : .__z0_loop N LDRB r3,[r4] ; read a byte from the user block $A STRB r3,[r0,r2] ; store in our block .; ADD r4,r4,#1 ; increment r4 8; ADD r2,r2,#1 ; increment r2 B; CMP r3,#31 ; is it ctrl ? LC BGT __z0_loop ; if not then loop V: `O ADD r4,r1,#44 ; points to the userblock filename jI ADR r0,__z0_`startbuffer ; r0=the filename buffer tA MOV r2,#0 ; offset into buffer ~: �.__z0_loop2 �C LDRB r3,[r0,r2] ; read from our buffer �B STRB r3,[r4,r2] ; store in user block �? ADD r2,r2,#1 ; increment offset �; CMP r3,#31 ; is it ctrl ? �F BGT __z0_loop2 ; if not get next one �: �F ADD r0,r2,#3+44 ; add three to the length �D BIC r0,r0,#3 ; clear the bottom bits �G STR r0,[r1] ; store as length of block �: � ADD r0,r1,#44 ; "Filename = %$0" : : MOV r0,#2 ; DataSaveAck = STR r0,[r1,#16] ; store in block (B LDR r0,[r1,#8] ; get the old pointer 29 STR r0,[r1,#12] ; store back <> LDR r2,[r1,#4] ; r2= task to use F MOV r0,#17 P? SWI "XWimp_SendMessage" ; send the message Z BVS __z0_exit d: n; MVN r0,#� -1 ; ignore message x= STR r0,[sp,#0] ; store on stack �: �.__z0_exit �J LDMFD (sp)!,{r0-r5,pc}^ ; Return from call with flags �: �.__z0_`var �" EQUS "QuickSave$Path"+�0 � ALIGN �B ; The variable to use �.__z0_`messages �7 EQUD 1 ; DataSave �: EQUD 0 ; end of list �: �U EQUS "xx" ; to ensure that __z0_`buffer is aligned .__z0_`startbuffer P EQUS "ADFS::" ; the bit for the start of the line .__z0_`buffer " �reserve(256) ,+ ; for storing the filename in 6: @.`added J EQUD 0 T: ^: h0 ; Library routine Strings.movectrl r .movectrl |; *** liked *** �; > r0=input string �; r1=ouput buffer �; < __z1_r1=$r0 �$ STMFD (sp)!,{r0-r1,r5,link} �.__z1_loop � LDRB r5,[r0],#1 � STRB r5,[r1],#1 � CMP r5,#31 � BGT __z1_loop �# LDMFD (sp)!,{r0-r1,r5,pc}^ �: �: �/ ; Library routine Strings.lenctrl .lenctrl ; > r0=input string ; < r1=�(r0) & STMFD (sp)!,{r2,link} 0 MOV r1,#0 :.__z2_loop D LDRB r2,[r0,r1] N ADD r1,r1,#1 X CMP r2,#32 b BGE __z2_loop l SUB r1,r1,#1 v LDMFD (sp)!,{r2,pc}^ �: �& ; Library 'Strings' ends �: �] � � **** End of main code **** �6� Set final pointer to find the length of the code ��patch_setpc(0) �� pass% ��patch_savefile �(� **** Post-assembly user code ***** � *Set QuickSave$Path .$.temp. !*Filer_OpenDir ADFS::4.$.temp : **Run <ADFSQuickSave$Dir>.ADFSQuickSave � *: 4!� **** Filing procedures **** >: H� �patch_loadfile R codelen=0 \� MC% &1400 f-endofcode=(codelen+&0+3) � -4:max=codelen pL%=endofcode:__cap%=� � : � �patch_savefile $0outfile$="<ADFSQuickSave$Dir>.ADFSQuickSave" .1�("Save "+outfile$+" "+�~MC%+" "+�~(max+MC%)) 8$�("Settype "+outfile$+" Module") B#patchdir$="<ADFSQuickSave$Dir>" t� ~: �� **** Error Handler **** �: ���Error �� � �=� � �:� �:� � �,�$+" whilst in error handler at line "+Þ � � �,�$+" at line "+Þ (� 2: �"� **** Utility procedures **** �: ���patch_setpc(n) �� P%-&0>max �max=P%-&0 �P%=n:O%=MC%+n-&0 �� �: �"ݤfindfreereg(a,b,c,d):� n:n=0 �ȕ n=a � n=b � n=c � n=d � n+=1 � =n : "(� **** Long ADR macro procedure **** ,: 6@� DESC. : ADR equivalent for long address ranges, in 2 insts @C� ENTRY : cond$ = two char string, containing the ARM condition J� reg% = 0..15 T+� pointer% = long range pointer ^B� COMM. : pass% = OPT variable in the assembler FOR..NEXT loop h-� Can only handle 64 KByte ranges r&ݤLADR(cond$,reg%,pointer%,inline) |!� cc%,diff%,lo%,hi%,op1%,op2% �#� (pass% �%10)=0 P%+=8:O%+=8:=0 �H� �(pointer%-P%)>65535 �� 999,"LADR can only handle 64 KByte ranges" �'�cond$=" " � cond$="" �cond$="AL" �2cc%=�"EQNECSCCMIPLVSVCHILSGELTGTLEALNV",cond$) �K� cc%=0 �� 999,"Unknown condition for LADR ("+cond$+")" � cc%=(cc%-1)�2 �diff%=pointer%-P%-8 �lo%=�(diff%)�&FF �hi%=�(diff%)�&FF00 ��diff%>=0� �, op1%=(cc%<<28)+&028F0000+(reg%<<12)+lo% < op2%=(cc%<<28)+&02800C00+(reg%<<16)+(reg%<<12)+(hi%>>8) � , op1%=(cc%<<28)+&024F0000+(reg%<<12)+lo% &< op2%=(cc%<<28)+&02400C00+(reg%<<16)+(reg%<<12)+(hi%>>8) 0� :$[OPT pass%:EQUD op1%:EQUD op2%:] D=0 N: X+� FNreserve : Reserve space for x bytes b)ݤreserve(bytes):bytes=(bytes+3) � -4 l� (pass% � 2)=2 � v" � I:� I=0�bytes-4 �4:O%!I=0:� �� �P%+=bytes:O%+=bytes �=0 �: � JFPatch �
00000000 0d 00 0a 24 f4 20 3e 20 50 61 74 63 68 20 66 6f |...$. > Patch fo| 00000010 72 20 6d 65 6d 6f 72 79 20 63 6f 6d 70 69 6c 61 |r memory compila| 00000020 74 69 6f 6e 0d 00 14 3f f4 20 43 72 65 61 74 65 |tion...?. Create| 00000030 64 20 62 79 20 4a 46 50 61 74 63 68 20 76 32 2e |d by JFPatch v2.| 00000040 32 34 df 20 28 32 32 20 4d 61 79 20 31 39 39 36 |24. (22 May 1996| 00000050 29 20 a9 20 4a 75 73 74 69 6e 20 46 6c 65 74 63 |) . Justin Fletc| 00000060 68 65 72 0d 00 1e 30 f4 20 49 6e 74 65 72 6d 65 |her...0. Interme| 00000070 64 69 61 74 65 20 63 6f 64 65 20 66 69 6c 65 20 |diate code file | 00000080 63 72 65 61 74 65 64 20 32 34 20 4d 61 79 20 31 |created 24 May 1| 00000090 39 39 36 0d 00 28 10 ee 20 85 20 f2 45 72 72 6f |996..(.. . .Erro| 000000a0 72 3a e0 0d 00 32 13 f2 70 61 74 63 68 5f 6c 6f |r:...2..patch_lo| 000000b0 61 64 66 69 6c 65 0d 00 3c 17 73 70 3d 31 33 3a |adfile..<.sp=13:| 000000c0 6c 69 6e 6b 3d 31 34 3a 70 63 3d 31 35 0d 00 46 |link=14:pc=15..F| 000000d0 2f 76 62 69 74 3d 31 3c 3c 32 38 3a 63 62 69 74 |/vbit=1<<28:cbit| 000000e0 3d 31 3c 3c 32 39 3a 7a 62 69 74 3d 31 3c 3c 33 |=1<<29:zbit=1<<3| 000000f0 30 3a 6e 62 69 74 3d 31 3c 3c 33 31 0d 00 50 10 |0:nbit=1<<31..P.| 00000100 50 25 3d 26 30 3a 4f 25 3d 4d 43 25 0d 00 5a 14 |P%=&0:O%=MC%..Z.| 00000110 e3 20 70 61 73 73 25 3d 34 20 b8 20 36 20 88 32 |. pass%=4 . 6 .2| 00000120 0d 00 64 22 f4 20 2a 2a 2a 2a 20 53 74 61 72 74 |..d". **** Start| 00000130 20 6f 66 20 6d 61 69 6e 20 63 6f 64 65 20 2a 2a | of main code **| 00000140 2a 2a 0d 00 6e 13 f2 70 61 74 63 68 5f 73 65 74 |**..n..patch_set| 00000150 70 63 28 30 29 0d 00 78 0e 5b 4f 50 54 20 70 61 |pc(0)..x.[OPT pa| 00000160 73 73 25 0d 00 82 2b 20 20 20 20 20 20 20 20 20 |ss%...+ | 00000170 20 3b 20 2a 2a 2a 2a 20 41 64 64 20 6d 6f 64 75 | ; **** Add modu| 00000180 6c 65 20 68 65 61 64 65 72 20 2a 2a 2a 2a 0d 00 |le header ****..| 00000190 8c 2d 20 20 20 45 51 55 44 20 30 20 20 20 20 20 |.- EQUD 0 | 000001a0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 | ; S| 000001b0 74 61 72 74 20 6f 66 66 73 65 74 0d 00 96 36 20 |tart offset...6 | 000001c0 20 20 45 51 55 44 20 6d 6f 64 75 6c 65 5f 69 6e | EQUD module_in| 000001d0 69 74 20 20 20 20 20 20 20 20 3b 20 49 6e 69 74 |it ; Init| 000001e0 69 61 6c 69 73 61 74 69 6f 6e 20 6f 66 66 73 65 |ialisation offse| 000001f0 74 0d 00 a0 34 20 20 20 45 51 55 44 20 6d 6f 64 |t...4 EQUD mod| 00000200 75 6c 65 5f 66 69 6e 61 6c 20 20 20 20 20 20 20 |ule_final | 00000210 3b 20 46 69 6e 61 6c 69 73 61 74 69 6f 6e 20 6f |; Finalisation o| 00000220 66 66 73 65 74 0d 00 aa 37 20 20 20 45 51 55 44 |ffset...7 EQUD| 00000230 20 6d 6f 64 75 6c 65 5f 73 65 72 76 69 63 65 20 | module_service | 00000240 20 20 20 20 3b 20 53 65 72 76 69 63 65 20 72 65 | ; Service re| 00000250 71 75 65 73 74 20 6f 66 66 73 65 74 0d 00 b4 34 |quest offset...4| 00000260 20 20 20 45 51 55 44 20 6d 6f 64 75 6c 65 5f 74 | EQUD module_t| 00000270 69 74 6c 65 20 20 20 20 20 20 20 3b 20 54 69 74 |itle ; Tit| 00000280 6c 65 20 73 74 72 69 6e 67 20 6f 66 66 73 65 74 |le string offset| 00000290 0d 00 be 33 20 20 20 45 51 55 44 20 6d 6f 64 75 |...3 EQUD modu| 000002a0 6c 65 5f 68 65 6c 70 20 20 20 20 20 20 20 20 3b |le_help ;| 000002b0 20 48 65 6c 70 20 73 74 72 69 6e 67 20 6f 66 66 | Help string off| 000002c0 73 65 74 0d 00 c8 46 20 20 20 45 51 55 44 20 6d |set...F EQUD m| 000002d0 6f 64 75 6c 65 5f 63 6f 6d 6d 61 6e 64 73 20 20 |odule_commands | 000002e0 20 20 3b 20 48 65 6c 70 20 61 6e 64 20 63 6f 6d | ; Help and com| 000002f0 6d 61 6e 64 20 6b 65 79 77 6f 72 64 20 74 61 62 |mand keyword tab| 00000300 6c 65 20 6f 66 66 73 65 74 0d 00 d2 05 3a 0d 00 |le offset....:..| 00000310 dc 11 2e 6d 6f 64 75 6c 65 5f 74 69 74 6c 65 0d |...module_title.| 00000320 00 e6 1e 20 20 20 45 51 55 53 20 22 41 44 46 53 |... EQUS "ADFS| 00000330 51 75 69 63 6b 53 61 76 65 22 2b bd 30 0d 00 f0 |QuickSave"+.0...| 00000340 0c 20 20 20 41 4c 49 47 4e 0d 00 fa 05 3a 0d 01 |. ALIGN....:..| 00000350 04 10 2e 6d 6f 64 75 6c 65 5f 68 65 6c 70 0d 01 |...module_help..| 00000360 0e 4a 20 20 20 45 51 55 53 20 22 41 44 46 53 51 |.J EQUS "ADFSQ| 00000370 75 69 63 6b 53 61 76 65 22 2b bd 39 2b 22 31 2e |uickSave"+.9+"1.| 00000380 30 32 20 28 22 2b c1 91 24 2c 35 2c 31 31 29 2b |02 ("+..$,5,11)+| 00000390 22 29 20 a9 20 4a 75 73 74 69 6e 20 46 6c 65 74 |") . Justin Flet| 000003a0 63 68 65 72 22 2b bd 30 0d 01 18 0c 20 20 20 41 |cher"+.0.... A| 000003b0 4c 49 47 4e 0d 01 22 05 3a 0d 01 2c 13 2e 6d 6f |LIGN..".:..,..mo| 000003c0 64 75 6c 65 5f 73 65 72 76 69 63 65 0d 01 36 18 |dule_service..6.| 000003d0 20 20 20 4c 44 52 20 20 20 20 20 72 31 32 2c 5b | LDR r12,[| 000003e0 72 31 32 5d 0d 01 40 16 20 20 20 43 4d 50 20 20 |r12]..@. CMP | 000003f0 20 20 20 72 31 2c 23 26 38 37 0d 01 4a 23 20 20 | r1,#&87..J# | 00000400 20 42 45 51 20 20 20 20 20 6d 6f 64 5f 73 76 63 | BEQ mod_svc| 00000410 5f 6e 65 77 66 69 6c 74 65 72 6d 67 72 0d 01 54 |_newfiltermgr..T| 00000420 14 2e 5f 6d 6f 64 5f 73 76 63 5f 72 65 74 75 72 |.._mod_svc_retur| 00000430 6e 0d 01 5e 16 20 20 20 4d 4f 56 53 20 20 20 20 |n..^. MOVS | 00000440 70 63 2c 6c 69 6e 6b 0d 01 68 05 3a 0d 01 72 19 |pc,link..h.:..r.| 00000450 2e 6d 6f 64 5f 73 76 63 5f 6e 65 77 66 69 6c 74 |.mod_svc_newfilt| 00000460 65 72 6d 67 72 0d 01 7c 37 20 20 20 53 54 4d 46 |ermgr..|7 STMF| 00000470 44 20 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 34 |D (sp)!,{r0-r4| 00000480 2c 6c 69 6e 6b 7d 20 20 20 20 20 3b 20 53 74 61 |,link} ; Sta| 00000490 63 6b 20 72 65 67 69 73 74 65 72 73 0d 01 86 21 |ck registers...!| 000004a0 20 20 20 42 4c 20 20 20 20 20 20 6d 6f 64 5f 73 | BL mod_s| 000004b0 65 74 5f 50 6f 73 74 46 69 6c 74 65 72 0d 01 90 |et_PostFilter...| 000004c0 14 20 20 20 43 4d 4e 20 20 20 20 20 72 33 2c 23 |. CMN r3,#| 000004d0 31 0d 01 9a 1f 20 20 20 42 45 51 20 20 20 20 20 |1.... BEQ | 000004e0 6d 6f 64 5f 66 69 6c 74 65 72 5f 65 72 72 6f 72 |mod_filter_error| 000004f0 0d 01 a4 2a 20 20 20 53 57 49 20 20 20 20 20 22 |...* SWI "| 00000500 46 69 6c 74 65 72 5f 52 65 67 69 73 74 65 72 50 |Filter_RegisterP| 00000510 6f 73 74 46 69 6c 74 65 72 22 0d 01 ae 21 20 20 |ostFilter"...! | 00000520 20 4c 44 4d 46 44 20 20 20 28 73 70 29 21 2c 7b | LDMFD (sp)!,{| 00000530 72 30 2d 72 34 2c 6c 69 6e 6b 7d 0d 01 b8 1e 20 |r0-r4,link}.... | 00000540 20 20 42 20 20 20 20 20 20 20 5f 6d 6f 64 5f 73 | B _mod_s| 00000550 76 63 5f 72 65 74 75 72 6e 0d 01 c2 05 3a 0d 01 |vc_return....:..| 00000560 cc 10 2e 6d 6f 64 75 6c 65 5f 69 6e 69 74 0d 01 |...module_init..| 00000570 d6 37 20 20 20 53 54 4d 46 44 20 20 20 28 73 70 |.7 STMFD (sp| 00000580 29 21 2c 7b 72 30 2d 72 34 2c 6c 69 6e 6b 7d 20 |)!,{r0-r4,link} | 00000590 20 20 20 20 3b 20 53 74 61 63 6b 20 72 65 67 69 | ; Stack regi| 000005a0 73 74 65 72 73 0d 01 e0 21 20 20 20 42 4c 20 20 |sters...! BL | 000005b0 20 20 20 20 6d 6f 64 5f 73 65 74 5f 50 6f 73 74 | mod_set_Post| 000005c0 46 69 6c 74 65 72 0d 01 ea 14 20 20 20 43 4d 4e |Filter.... CMN| 000005d0 20 20 20 20 20 72 33 2c 23 31 0d 01 f4 1f 20 20 | r3,#1.... | 000005e0 20 42 45 51 20 20 20 20 20 6d 6f 64 5f 66 69 6c | BEQ mod_fil| 000005f0 74 65 72 5f 65 72 72 6f 72 0d 01 fe 2a 20 20 20 |ter_error...* | 00000600 53 57 49 20 20 20 20 20 22 46 69 6c 74 65 72 5f |SWI "Filter_| 00000610 52 65 67 69 73 74 65 72 50 6f 73 74 46 69 6c 74 |RegisterPostFilt| 00000620 65 72 22 0d 02 08 39 20 20 20 4c 44 4d 46 44 20 |er"...9 LDMFD | 00000630 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 34 2c 6c | (sp)!,{r0-r4,l| 00000640 69 6e 6b 7d 20 20 20 20 20 3b 20 72 65 73 74 6f |ink} ; resto| 00000650 72 65 20 72 65 67 69 73 74 65 72 73 0d 02 12 13 |re registers....| 00000660 20 20 20 42 20 20 20 20 20 20 20 69 6e 69 74 0d | B init.| 00000670 02 1c 05 3a 0d 02 26 11 2e 6d 6f 64 75 6c 65 5f |...:..&..module_| 00000680 66 69 6e 61 6c 0d 02 30 37 20 20 20 53 54 4d 46 |final..07 STMF| 00000690 44 20 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 34 |D (sp)!,{r0-r4| 000006a0 2c 72 31 32 2c 6c 69 6e 6b 7d 20 3b 20 53 74 61 |,r12,link} ; Sta| 000006b0 63 6b 20 72 65 67 69 73 74 65 72 73 0d 02 3a 21 |ck registers..:!| 000006c0 20 20 20 42 4c 20 20 20 20 20 20 6d 6f 64 5f 73 | BL mod_s| 000006d0 65 74 5f 50 6f 73 74 46 69 6c 74 65 72 0d 02 44 |et_PostFilter..D| 000006e0 14 20 20 20 43 4d 4e 20 20 20 20 20 72 33 2c 23 |. CMN r3,#| 000006f0 31 0d 02 4e 2c 20 20 20 53 57 49 4e 45 20 20 20 |1..N, SWINE | 00000700 22 46 69 6c 74 65 72 5f 44 65 52 65 67 69 73 74 |"Filter_DeRegist| 00000710 65 72 50 6f 73 74 46 69 6c 74 65 72 22 0d 02 58 |erPostFilter"..X| 00000720 2e 20 20 20 4c 44 4d 46 44 20 20 20 28 73 70 29 |. LDMFD (sp)| 00000730 21 2c 7b 72 30 2d 72 34 2c 72 31 32 2c 70 63 7d |!,{r0-r4,r12,pc}| 00000740 20 20 20 3b 20 52 65 74 75 72 6e 0d 02 62 05 3a | ; Return..b.:| 00000750 0d 02 6c 21 3b 20 2a 2a 2a 2a 2a 20 4d 6f 64 75 |..l!; ***** Modu| 00000760 6c 65 20 63 6f 6d 6d 61 6e 64 73 20 74 61 62 6c |le commands tabl| 00000770 65 0d 02 76 14 2e 6d 6f 64 75 6c 65 5f 63 6f 6d |e..v..module_com| 00000780 6d 61 6e 64 73 0d 02 80 2d 20 20 20 45 51 55 53 |mands...- EQUS| 00000790 20 22 41 44 46 53 51 75 69 63 6b 53 61 76 65 22 | "ADFSQuickSave"| 000007a0 20 20 20 20 3b 20 43 6f 6d 6d 61 6e 64 20 6e 61 | ; Command na| 000007b0 6d 65 0d 02 8a 13 20 20 20 45 51 55 42 20 30 3a |me.... EQUB 0:| 000007c0 41 4c 49 47 4e 0d 02 94 2d 20 20 20 45 51 55 44 |ALIGN...- EQUD| 000007d0 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | 0 | 000007e0 20 20 20 20 3b 20 43 6f 64 65 20 74 6f 20 63 61 | ; Code to ca| 000007f0 6c 6c 0d 02 9e 26 20 20 20 45 51 55 44 20 26 30 |ll...& EQUD &0| 00000800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000810 20 3b 20 46 6c 61 67 73 0d 02 a8 2f 20 20 20 45 | ; Flags.../ E| 00000820 51 55 44 20 30 20 20 20 20 20 20 20 20 20 20 20 |QUD 0 | 00000830 20 20 20 20 20 20 20 3b 20 53 79 6e 74 61 78 20 | ; Syntax | 00000840 70 6f 69 6e 74 65 72 0d 02 b2 2d 20 20 20 45 51 |pointer...- EQ| 00000850 55 44 20 68 65 6c 70 5f 61 64 66 73 71 75 69 63 |UD help_adfsquic| 00000860 6b 73 61 76 65 20 3b 20 48 65 6c 70 20 70 6f 69 |ksave ; Help poi| 00000870 6e 74 65 72 0d 02 bc 0d 20 20 20 45 51 55 42 20 |nter.... EQUB | 00000880 30 0d 02 c6 0c 20 20 20 41 4c 49 47 4e 0d 02 d0 |0.... ALIGN...| 00000890 05 3a 0d 02 da 24 3b 20 2a 2a 2a 2a 2a 20 48 65 |.:...$; ***** He| 000008a0 6c 70 20 61 6e 64 20 53 79 6e 74 61 78 20 6d 65 |lp and Syntax me| 000008b0 73 73 61 67 65 73 0d 02 e4 17 2e 68 65 6c 70 5f |ssages.....help_| 000008c0 61 64 66 73 71 75 69 63 6b 73 61 76 65 0d 02 ee |adfsquicksave...| 000008d0 4b 20 20 20 45 51 55 53 20 22 41 44 46 53 51 75 |K EQUS "ADFSQu| 000008e0 69 63 6b 53 61 76 65 20 61 6c 6c 6f 77 73 20 79 |ickSave allows y| 000008f0 6f 75 20 74 6f 20 64 72 61 67 20 75 6e 73 61 76 |ou to drag unsav| 00000900 65 64 20 66 69 6c 65 73 20 6f 6e 74 6f 20 74 68 |ed files onto th| 00000910 65 20 41 44 46 53 20 22 0d 02 f8 42 20 20 20 45 |e ADFS "...B E| 00000920 51 55 53 20 22 46 69 6c 65 72 20 69 63 6f 6e 20 |QUS "Filer icon | 00000930 74 6f 20 73 61 76 65 20 74 68 65 6d 20 69 6e 20 |to save them in | 00000940 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 6e 61 |the directory na| 00000950 6d 65 64 20 3a 22 2b bd 31 33 0d 03 02 35 20 20 |med :"+.13...5 | 00000960 20 45 51 55 53 20 22 41 44 46 53 3a 3a 5b 64 72 | EQUS "ADFS::[dr| 00000970 69 76 65 5d 3c 51 75 69 63 6b 53 61 76 65 24 50 |ive]<QuickSave$P| 00000980 61 74 68 3e 5b 66 69 6c 65 5d 22 2b bd 31 33 0d |ath>[file]"+.13.| 00000990 03 0c 4d 20 20 20 45 51 55 53 20 22 53 6f 20 79 |..M EQUS "So y| 000009a0 6f 75 20 73 68 6f 75 6c 64 20 73 65 74 20 51 75 |ou should set Qu| 000009b0 69 63 6b 53 61 76 65 24 50 61 74 68 20 74 6f 20 |ickSave$Path to | 000009c0 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 20 2e |something like .| 000009d0 24 2e 74 65 6d 70 2e 22 2b bd 31 33 0d 03 16 41 |$.temp."+.13...A| 000009e0 20 20 20 45 51 55 53 20 22 54 68 69 73 20 69 73 | EQUS "This is| 000009f0 20 64 65 64 69 63 61 74 65 64 20 74 6f 20 4a 6f | dedicated to Jo| 00000a00 6e 69 78 2c 20 61 73 20 68 65 20 77 61 6e 74 65 |nix, as he wante| 00000a10 64 20 69 74 20 3a 2d 29 22 2b bd 31 33 0d 03 20 |d it :-)"+.13.. | 00000a20 4b 20 20 20 45 51 55 53 20 22 4e 6f 74 65 3a 20 |K EQUS "Note: | 00000a30 59 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f |You will need to| 00000a40 20 68 61 76 65 20 63 6c 69 63 6b 65 64 20 6f 6e | have clicked on| 00000a50 20 74 68 65 20 41 44 46 53 20 46 69 6c 65 72 20 | the ADFS Filer | 00000a60 62 65 66 6f 72 65 20 22 0d 03 2a 23 20 20 20 45 |before "..*# E| 00000a70 51 55 53 20 22 69 74 20 77 69 6c 6c 20 64 6f 20 |QUS "it will do | 00000a80 61 6e 79 74 68 69 6e 67 2e 20 22 0d 03 34 0d 20 |anything. "..4. | 00000a90 20 20 45 51 55 42 20 30 0d 03 3e 0c 20 20 20 41 | EQUB 0..>. A| 00000aa0 4c 49 47 4e 0d 03 48 05 3a 0d 03 52 28 3b 20 2a |LIGN..H.:..R(; *| 00000ab0 2a 2a 2a 2a 20 53 65 74 20 75 70 20 72 65 67 69 |**** Set up regi| 00000ac0 73 74 65 72 73 20 66 6f 72 20 66 69 6c 74 65 72 |sters for filter| 00000ad0 73 0d 03 5c 17 2e 6d 6f 64 5f 73 65 74 5f 50 6f |s..\..mod_set_Po| 00000ae0 73 74 46 69 6c 74 65 72 0d 03 66 1b 20 20 20 53 |stFilter..f. S| 00000af0 54 4d 46 44 20 20 20 28 73 70 29 21 2c 7b 6c 69 |TMFD (sp)!,{li| 00000b00 6e 6b 7d 0d 03 70 28 20 20 20 41 44 52 20 20 20 |nk}..p( ADR | 00000b10 20 20 72 35 2c 60 6d 6f 64 75 6c 65 5f 50 6f 73 | r5,`module_Pos| 00000b20 74 46 69 6c 74 65 72 54 61 73 6b 0d 03 7a 1b 20 |tFilterTask..z. | 00000b30 20 20 42 4c 20 20 20 20 20 20 6d 6f 64 5f 66 69 | BL mod_fi| 00000b40 6e 64 74 61 73 6b 0d 03 84 14 20 20 20 43 4d 4e |ndtask.... CMN| 00000b50 20 20 20 20 20 72 33 2c 23 31 0d 03 8e 19 20 20 | r3,#1.... | 00000b60 20 4c 44 4d 45 51 46 44 20 28 73 70 29 21 2c 7b | LDMEQFD (sp)!,{| 00000b70 70 63 7d 0d 03 98 28 20 20 20 41 44 52 20 20 20 |pc}...( ADR | 00000b80 20 20 72 30 2c 60 6d 6f 64 75 6c 65 5f 50 6f 73 | r0,`module_Pos| 00000b90 74 46 69 6c 74 65 72 4e 61 6d 65 0d 03 a2 1a 20 |tFilterName.... | 00000ba0 a4 4c 41 44 52 28 22 22 2c 31 2c 66 69 6c 74 65 |.LADR("",1,filte| 00000bb0 72 2c 33 31 29 0d 03 ac 15 20 20 20 4d 4f 56 20 |r,31).... MOV | 00000bc0 20 20 20 20 72 32 2c 72 31 32 0d 03 b6 28 20 20 | r2,r12...( | 00000bd0 20 4c 44 52 20 20 20 20 20 72 34 2c 60 6d 6f 64 | LDR r4,`mod| 00000be0 75 6c 65 5f 50 6f 73 74 46 69 6c 74 65 72 4d 61 |ule_PostFilterMa| 00000bf0 73 6b 0d 03 c0 19 20 20 20 4c 44 4d 46 44 20 20 |sk.... LDMFD | 00000c00 20 28 73 70 29 21 2c 7b 70 63 7d 0d 03 ca 05 3a | (sp)!,{pc}....:| 00000c10 0d 03 d4 1b 2e 60 6d 6f 64 75 6c 65 5f 50 6f 73 |.....`module_Pos| 00000c20 74 46 69 6c 74 65 72 4d 61 73 6b 0d 03 de 24 20 |tFilterMask...$ | 00000c30 20 20 45 51 55 44 20 20 20 20 25 31 30 30 31 31 | EQUD %10011| 00000c40 31 31 31 31 31 31 31 31 30 31 31 31 31 31 31 0d |111111110111111.| 00000c50 03 e8 1b 2e 60 6d 6f 64 75 6c 65 5f 50 6f 73 74 |....`module_Post| 00000c60 46 69 6c 74 65 72 4e 61 6d 65 0d 03 f2 21 20 20 |FilterName...! | 00000c70 20 45 51 55 53 20 20 20 20 22 41 44 46 53 51 75 | EQUS "ADFSQu| 00000c80 69 63 6b 53 61 76 65 22 2b bd 30 0d 03 fc 1b 2e |ickSave"+.0.....| 00000c90 60 6d 6f 64 75 6c 65 5f 50 6f 73 74 46 69 6c 74 |`module_PostFilt| 00000ca0 65 72 54 61 73 6b 0d 04 06 1e 20 20 20 45 51 55 |erTask.... EQU| 00000cb0 53 20 20 20 20 22 41 44 46 53 20 46 69 6c 65 72 |S "ADFS Filer| 00000cc0 22 2b bd 30 0d 04 10 0c 20 20 20 41 4c 49 47 4e |"+.0.... ALIGN| 00000cd0 0d 04 1a 05 3a 0d 04 24 15 2e 6d 6f 64 5f 66 69 |....:..$..mod_fi| 00000ce0 6c 74 65 72 5f 65 72 72 6f 72 0d 04 2e 26 20 20 |lter_error...& | 00000cf0 20 41 44 52 20 20 20 20 20 72 30 2c 60 6d 6f 64 | ADR r0,`mod| 00000d00 75 6c 65 5f 46 69 6c 74 65 72 5f 65 72 72 6f 72 |ule_Filter_error| 00000d10 0d 04 38 17 20 20 20 41 44 44 20 20 20 20 20 73 |..8. ADD s| 00000d20 70 2c 73 70 2c 23 34 0d 04 42 21 20 20 20 4c 44 |p,sp,#4..B! LD| 00000d30 4d 46 44 20 20 20 28 73 70 29 21 2c 7b 72 31 2d |MFD (sp)!,{r1-| 00000d40 72 34 2c 6c 69 6e 6b 7d 0d 04 4c 1b 20 20 20 84 |r4,link}..L. .| 00000d50 52 53 20 20 20 20 70 63 2c 6c 69 6e 6b 2c 23 76 |RS pc,link,#v| 00000d60 62 69 74 0d 04 56 19 2e 60 6d 6f 64 75 6c 65 5f |bit..V..`module_| 00000d70 46 69 6c 74 65 72 5f 65 72 72 6f 72 0d 04 60 10 |Filter_error..`.| 00000d80 20 20 20 45 51 55 44 20 20 20 20 30 0d 04 6a 45 | EQUD 0..jE| 00000d90 20 20 20 45 51 55 53 20 20 20 20 22 41 44 46 53 | EQUS "ADFS| 00000da0 51 75 69 63 6b 53 61 76 65 20 63 61 6e 6e 6f 74 |QuickSave cannot| 00000db0 20 66 69 6e 64 20 74 61 73 6b 20 74 6f 20 61 70 | find task to ap| 00000dc0 70 6c 79 20 66 69 6c 74 65 72 20 74 6f 22 2b bd |ply filter to"+.| 00000dd0 30 0d 04 74 0c 20 20 20 41 4c 49 47 4e 0d 04 7e |0..t. ALIGN..~| 00000de0 05 3a 0d 04 88 11 2e 6d 6f 64 5f 66 69 6e 64 74 |.:.....mod_findt| 00000df0 61 73 6b 0d 04 92 1b 20 20 20 53 54 4d 46 44 20 |ask.... STMFD | 00000e00 20 20 28 73 70 29 21 2c 7b 6c 69 6e 6b 7d 0d 04 | (sp)!,{link}..| 00000e10 9c 14 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c |.. MOV r0,| 00000e20 23 30 0d 04 a6 0e 2e 5f 6d 6f 64 5f 66 74 5f 6c |#0....._mod_ft_l| 00000e30 0d 04 b0 1f 20 20 20 41 44 52 20 20 20 20 20 72 |.... ADR r| 00000e40 31 2c 60 6d 6f 64 5f 66 74 5f 62 6c 6f 63 6b 0d |1,`mod_ft_block.| 00000e50 04 ba 15 20 20 20 4d 4f 56 20 20 20 20 20 72 32 |... MOV r2| 00000e60 2c 23 31 36 0d 04 c4 2b 20 20 20 53 57 49 20 20 |,#16...+ SWI | 00000e70 20 20 20 22 54 61 73 6b 4d 61 6e 61 67 65 72 5f | "TaskManager_| 00000e80 45 6e 75 6d 65 72 61 74 65 54 61 73 6b 73 22 0d |EnumerateTasks".| 00000e90 04 ce 14 20 20 20 43 4d 4e 20 20 20 20 20 72 30 |... CMN r0| 00000ea0 2c 23 31 0d 04 d8 11 20 20 20 ec 51 20 20 20 72 |,#1.... .Q r| 00000eb0 33 2c 72 30 0d 04 e2 1c 20 20 20 42 45 51 20 20 |3,r0.... BEQ | 00000ec0 20 20 20 6d 6f 64 5f 78 66 69 6e 64 74 61 73 6b | mod_xfindtask| 00000ed0 0d 04 ec 14 20 20 20 4d 4f 56 20 20 20 20 20 72 |.... MOV r| 00000ee0 32 2c 72 35 0d 04 f6 21 20 20 20 4c 44 52 20 20 |2,r5...! LDR | 00000ef0 20 20 20 72 31 2c 60 6d 6f 64 5f 66 74 5f 62 6c | r1,`mod_ft_bl| 00000f00 6f 63 6b 2b 34 0d 05 00 0f 2e 5f 6d 6f 64 5f 66 |ock+4....._mod_f| 00000f10 74 5f 6c 32 0d 05 0a 19 20 20 20 4c 44 52 42 20 |t_l2.... LDRB | 00000f20 20 20 20 72 33 2c 5b 72 31 5d 2c 23 31 0d 05 14 | r3,[r1],#1...| 00000f30 19 20 20 20 4c 44 52 42 20 20 20 20 72 34 2c 5b |. LDRB r4,[| 00000f40 72 32 5d 2c 23 31 0d 05 1e 15 20 20 20 43 4d 50 |r2],#1.... CMP| 00000f50 20 20 20 20 20 72 33 2c 23 33 32 0d 05 28 14 20 | r3,#32..(. | 00000f60 20 20 4d 4f 56 4c 54 20 20 20 72 33 2c 23 30 0d | MOVLT r3,#0.| 00000f70 05 32 15 20 20 20 43 4d 50 20 20 20 20 20 72 34 |.2. CMP r4| 00000f80 2c 23 33 32 0d 05 3c 14 20 20 20 4d 4f 56 4c 54 |,#32..<. MOVLT| 00000f90 20 20 20 72 34 2c 23 30 0d 05 46 14 20 20 20 43 | r4,#0..F. C| 00000fa0 4d 50 20 20 20 20 20 72 33 2c 72 34 0d 05 50 18 |MP r3,r4..P.| 00000fb0 20 20 20 42 4e 45 20 20 20 20 20 5f 6d 6f 64 5f | BNE _mod_| 00000fc0 66 74 5f 6c 0d 05 5a 14 20 20 20 43 4d 50 20 20 |ft_l..Z. CMP | 00000fd0 20 20 20 72 33 2c 23 30 0d 05 64 19 20 20 20 42 | r3,#0..d. B| 00000fe0 4e 45 20 20 20 20 20 5f 6d 6f 64 5f 66 74 5f 6c |NE _mod_ft_l| 00000ff0 32 0d 05 6e 1f 20 20 20 4c 44 52 20 20 20 20 20 |2..n. LDR | 00001000 72 33 2c 60 6d 6f 64 5f 66 74 5f 62 6c 6f 63 6b |r3,`mod_ft_block| 00001010 0d 05 78 12 2e 6d 6f 64 5f 78 66 69 6e 64 74 61 |..x..mod_xfindta| 00001020 73 6b 0d 05 82 19 20 20 20 4c 44 4d 46 44 20 20 |sk.... LDMFD | 00001030 20 28 73 70 29 21 2c 7b 70 63 7d 0d 05 8c 12 2e | (sp)!,{pc}.....| 00001040 60 6d 6f 64 5f 66 74 5f 62 6c 6f 63 6b 0d 05 96 |`mod_ft_block...| 00001050 22 20 20 20 45 51 55 44 20 30 3a 45 51 55 44 20 |" EQUD 0:EQUD | 00001060 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 0d |0:EQUD 0:EQUD 0.| 00001070 05 a0 05 3a 0d 05 aa 2e 20 20 20 20 20 20 20 20 |...:.... | 00001080 20 20 3b 20 2a 2a 2a 2a 20 45 6e 64 20 6f 66 20 | ; **** End of | 00001090 6d 6f 64 75 6c 65 20 68 65 61 64 65 72 20 2a 2a |module header **| 000010a0 2a 2a 0d 05 b4 05 3a 0d 05 be 49 3b 20 2a 2a 2a |**....:...I; ***| 000010b0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000010f0 0d 05 c8 18 3b 20 53 75 62 72 6f 75 74 69 6e 65 |....; Subroutine| 00001100 3b 20 20 20 69 6e 69 74 0d 05 d2 46 3b 20 44 65 |; init...F; De| 00001110 73 63 72 69 70 74 69 6f 6e 3b 20 20 49 6e 69 74 |scription; Init| 00001120 69 61 6c 69 73 65 20 74 68 65 20 6d 6f 64 75 6c |ialise the modul| 00001130 65 20 2d 20 73 65 74 20 74 68 65 20 66 6c 61 67 |e - set the flag| 00001140 20 6d 61 72 6b 69 6e 67 20 75 73 20 61 73 0d 05 | marking us as..| 00001150 dc 3f 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 |.?; | 00001160 20 20 68 61 76 69 6e 67 20 6e 6f 74 20 61 64 64 | having not add| 00001170 65 64 20 6d 65 73 73 61 67 65 20 31 20 74 6f 20 |ed message 1 to | 00001180 74 68 6f 73 65 20 77 65 20 6c 69 6b 65 0d 05 e6 |those we like...| 00001190 18 3b 20 50 61 72 61 6d 65 74 65 72 73 3b 20 20 |.; Parameters; | 000011a0 20 6e 6f 6e 65 0d 05 f0 18 3b 20 52 65 74 75 72 | none....; Retur| 000011b0 6e 73 3b 20 20 20 20 20 20 6e 6f 6e 65 0d 05 fa |ns; none...| 000011c0 46 3b 20 4e 6f 74 65 3b 20 20 20 20 20 20 20 20 |F; Note; | 000011d0 20 59 75 63 6b 79 20 77 61 79 20 6f 66 20 77 6f | Yucky way of wo| 000011e0 72 6b 69 6e 67 2c 20 62 75 74 20 49 27 6d 20 6e |rking, but I'm n| 000011f0 6f 74 20 69 6e 74 65 6e 64 69 6e 67 20 74 6f 20 |ot intending to | 00001200 52 4f 4d 0d 06 04 20 3b 20 20 20 20 20 20 20 20 |ROM... ; | 00001210 20 20 20 20 20 20 20 74 68 69 73 20 6d 6f 64 75 | this modu| 00001220 6c 65 2e 0d 06 0e 49 3b 20 2a 2a 2a 2a 2a 2a 2a |le....I; *******| 00001230 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00001260 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 06 18 09 |************....| 00001270 2e 69 6e 69 74 0d 06 22 3e 20 20 20 53 54 4d 46 |.init.."> STMF| 00001280 44 20 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 35 |D (sp)!,{r0-r5| 00001290 2c 6c 69 6e 6b 7d 20 20 20 20 20 20 20 20 20 20 |,link} | 000012a0 20 20 3b 20 53 74 61 63 6b 20 72 65 67 69 73 74 | ; Stack regist| 000012b0 65 72 73 0d 06 2c 39 20 20 20 4d 4f 56 20 20 20 |ers..,9 MOV | 000012c0 20 20 72 30 2c 23 30 20 20 20 20 20 20 20 20 20 | r0,#0 | 000012d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000012e0 3b 20 30 20 74 68 65 20 66 6c 61 67 0d 06 36 3e |; 0 the flag..6>| 000012f0 20 20 20 53 54 52 20 20 20 20 20 72 30 2c 60 61 | STR r0,`a| 00001300 64 64 65 64 20 20 20 20 20 20 20 20 20 20 20 20 |dded | 00001310 20 20 20 20 20 20 20 20 20 3b 20 73 74 6f 72 65 | ; store| 00001320 20 69 6e 20 6d 6f 64 75 6c 65 0d 06 40 3f 20 20 | in module..@? | 00001330 20 4c 44 4d 46 44 20 20 20 28 73 70 29 21 2c 7b | LDMFD (sp)!,{| 00001340 72 30 2d 72 35 2c 70 63 7d 20 20 20 20 20 20 20 |r0-r5,pc} | 00001350 20 20 20 20 20 20 20 3b 20 52 65 74 75 72 6e 20 | ; Return | 00001360 66 72 6f 6d 20 63 61 6c 6c 0d 06 4a 05 3a 0d 06 |from call..J.:..| 00001370 54 49 3b 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |TI; ************| 00001380 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000013b0 2a 2a 2a 2a 2a 2a 2a 0d 06 5e 1a 3b 20 53 75 62 |*******..^.; Sub| 000013c0 72 6f 75 74 69 6e 65 3b 20 20 20 66 69 6c 74 65 |routine; filte| 000013d0 72 0d 06 68 2a 3b 20 44 65 73 63 72 69 70 74 69 |r..h*; Descripti| 000013e0 6f 6e 3b 20 20 57 69 6d 70 5f 50 6f 6c 6c 20 66 |on; Wimp_Poll f| 000013f0 69 6c 74 65 72 65 64 20 6f 66 66 0d 06 72 24 3b |iltered off..r$;| 00001400 20 50 61 72 61 6d 65 74 65 72 73 3b 20 20 20 72 | Parameters; r| 00001410 30 20 3d 20 72 65 61 73 6f 6e 20 28 31 37 29 0d |0 = reason (17).| 00001420 06 7c 23 3b 20 20 20 20 20 20 20 20 20 20 20 20 |.|#; | 00001430 20 20 20 72 31 2d 3e 20 75 73 65 72 20 62 6c 6f | r1-> user blo| 00001440 63 6b 0d 06 86 38 3b 20 52 65 74 75 72 6e 73 3b |ck...8; Returns;| 00001450 20 20 20 20 20 20 72 30 20 3d 20 2d 31 20 69 66 | r0 = -1 if| 00001460 20 69 74 20 73 68 6f 75 6c 64 6e 27 74 20 62 65 | it shouldn't be| 00001470 20 70 61 73 73 65 64 20 6f 6e 0d 06 90 49 3b 20 | passed on...I; | 00001480 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000014c0 2a 2a 2a 0d 06 9a 0b 2e 66 69 6c 74 65 72 0d 06 |***.....filter..| 000014d0 a4 3e 20 20 20 53 54 4d 46 44 20 20 20 28 73 70 |.> STMFD (sp| 000014e0 29 21 2c 7b 72 30 2d 72 35 2c 6c 69 6e 6b 7d 20 |)!,{r0-r5,link} | 000014f0 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 74 61 | ; Sta| 00001500 63 6b 20 72 65 67 69 73 74 65 72 73 0d 06 ae 23 |ck registers...#| 00001510 20 20 20 20 20 20 20 20 20 20 3b 20 22 25 63 30 | ; "%c0| 00001520 34 25 63 33 30 4f 75 72 20 65 76 65 6e 74 22 0d |4%c30Our event".| 00001530 06 b8 43 20 20 20 43 4d 50 20 20 20 20 20 72 30 |..C CMP r0| 00001540 2c 23 36 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#6 | 00001550 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 73 | ; is| 00001560 20 69 74 20 61 20 6d 6f 75 73 65 63 6c 69 63 6b | it a mouseclick| 00001570 20 3f 0d 06 c2 1c 20 20 20 42 4e 45 20 20 20 20 | ?.... BNE | 00001580 20 5f 5f 7a 30 5f 6e 6f 74 6d 6f 75 73 65 0d 06 | __z0_notmouse..| 00001590 cc 3b 20 20 20 4c 44 52 20 20 20 20 20 72 31 2c |.; LDR r1,| 000015a0 60 61 64 64 65 64 20 20 20 20 20 20 20 20 20 20 |`added | 000015b0 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 | ; get| 000015c0 20 74 68 65 20 66 6c 61 67 0d 06 d6 41 20 20 20 | the flag...A | 000015d0 43 4d 50 20 20 20 20 20 72 31 2c 23 30 20 20 20 |CMP r1,#0 | 000015e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000015f0 20 20 20 20 20 20 3b 20 68 61 76 65 20 77 65 20 | ; have we | 00001600 61 64 64 65 64 20 69 74 20 3f 0d 06 e0 3e 20 20 |added it ?...> | 00001610 20 42 4e 45 20 20 20 20 20 5f 5f 7a 30 5f 65 78 | BNE __z0_ex| 00001620 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |it | 00001630 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 | ; if | 00001640 73 6f 2c 20 65 78 69 74 0d 06 ea 4b 20 20 20 53 |so, exit...K S| 00001650 54 52 20 20 20 20 20 72 30 2c 60 61 64 64 65 64 |TR r0,`added| 00001660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001670 20 20 20 20 20 3b 20 69 66 20 6e 6f 74 2c 20 73 | ; if not, s| 00001680 74 6f 72 65 20 36 20 69 6e 20 74 68 65 20 62 6c |tore 6 in the bl| 00001690 6f 63 6b 0d 06 f4 48 20 20 20 41 44 52 20 20 20 |ock...H ADR | 000016a0 20 20 72 30 2c 5f 5f 7a 30 5f 60 6d 65 73 73 61 | r0,__z0_`messa| 000016b0 67 65 73 20 20 20 20 20 20 20 20 20 20 20 20 20 |ges | 000016c0 20 20 20 20 3b 20 67 65 74 20 74 68 65 20 6d 65 | ; get the me| 000016d0 73 73 61 67 65 20 62 6c 6f 63 6b 0d 06 fe 37 20 |ssage block...7 | 000016e0 20 20 53 57 49 20 20 20 20 20 22 58 57 69 6d 70 | SWI "XWimp| 000016f0 5f 41 64 64 4d 65 73 73 61 67 65 73 22 20 20 20 |_AddMessages" | 00001700 20 20 20 20 20 20 20 20 3b 20 61 64 64 20 74 68 | ; add th| 00001710 65 6d 0d 07 08 3b 20 20 20 42 20 20 20 20 20 20 |em...; B | 00001720 20 5f 5f 7a 30 5f 65 78 69 74 20 20 20 20 20 20 | __z0_exit | 00001730 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001740 20 20 20 3b 20 61 6e 64 20 65 78 69 74 0d 07 12 | ; and exit...| 00001750 05 3a 0d 07 1c 12 2e 5f 5f 7a 30 5f 6e 6f 74 6d |.:.....__z0_notm| 00001760 6f 75 73 65 0d 07 26 47 20 20 20 43 4d 50 20 20 |ouse..&G CMP | 00001770 20 20 20 72 30 2c 23 31 37 20 20 20 20 20 20 20 | r0,#17 | 00001780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001790 20 3b 20 69 73 20 74 68 69 73 20 61 20 75 73 65 | ; is this a use| 000017a0 72 20 6d 65 73 73 61 67 65 20 3f 0d 07 30 47 20 |r message ?..0G | 000017b0 20 20 43 4d 50 4e 45 20 20 20 72 30 2c 23 31 38 | CMPNE r0,#18| 000017c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000017d0 20 20 20 20 20 20 20 20 3b 20 69 73 20 74 68 69 | ; is thi| 000017e0 73 20 61 20 75 73 65 72 20 6d 65 73 73 61 67 65 |s a user message| 000017f0 20 3f 0d 07 3a 3f 20 20 20 42 4e 45 20 20 20 20 | ?..:? BNE | 00001800 20 5f 5f 7a 30 5f 65 78 69 74 20 20 20 20 20 20 | __z0_exit | 00001810 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001820 20 20 20 3b 20 69 66 20 6e 6f 74 2c 20 65 78 69 | ; if not, exi| 00001830 74 0d 07 44 40 20 20 20 4c 44 52 20 20 20 20 20 |t..D@ LDR | 00001840 72 30 2c 5b 72 31 2c 23 31 36 5d 20 20 20 20 20 |r0,[r1,#16] | 00001850 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001860 67 65 74 20 6d 65 73 73 61 67 65 6e 75 6d 62 65 |get messagenumbe| 00001870 72 0d 07 4e 1f 20 20 20 20 20 20 20 20 20 20 3b |r..N. ;| 00001880 20 22 4d 65 73 73 61 67 65 20 3d 20 25 72 30 22 | "Message = %r0"| 00001890 0d 07 58 43 20 20 20 43 4d 50 20 20 20 20 20 72 |..XC CMP r| 000018a0 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |0,#1 | 000018b0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i| 000018c0 73 20 74 68 69 73 20 61 20 44 61 74 61 53 61 76 |s this a DataSav| 000018d0 65 20 3f 0d 07 62 3e 20 20 20 42 4e 45 20 20 20 |e ?..b> BNE | 000018e0 20 20 5f 5f 7a 30 5f 65 78 69 74 20 20 20 20 20 | __z0_exit | 000018f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001900 20 20 20 20 3b 20 69 66 20 6e 6f 74 20 65 78 69 | ; if not exi| 00001910 74 0d 07 6c 05 3a 0d 07 76 4c 20 20 20 4c 44 52 |t..l.:..vL LDR| 00001920 20 20 20 20 20 72 32 2c 5b 72 31 2c 23 32 30 5d | r2,[r1,#20]| 00001930 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001940 20 20 20 3b 20 72 65 61 64 20 74 68 65 20 6e 75 | ; read the nu| 00001950 6d 62 65 72 20 6f 66 20 74 68 65 20 77 69 6e 64 |mber of the wind| 00001960 6f 77 0d 07 80 3e 20 20 20 43 4d 4e 20 20 20 20 |ow...> CMN | 00001970 20 72 32 2c 23 32 20 20 20 20 20 20 20 20 20 20 | r2,#2 | 00001980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00001990 20 69 73 20 69 74 20 69 63 6f 6e 62 61 72 20 3f | is it iconbar ?| 000019a0 0d 07 8a 3f 20 20 20 42 4e 45 20 20 20 20 20 5f |...? BNE _| 000019b0 5f 7a 30 5f 65 78 69 74 20 20 20 20 20 20 20 20 |_z0_exit | 000019c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000019d0 20 3b 20 69 66 20 6e 6f 74 2c 20 65 78 69 74 0d | ; if not, exit.| 000019e0 07 94 50 20 20 20 53 54 52 20 20 20 20 20 72 32 |..P STR r2| 000019f0 2c 5f 5f 7a 30 5f 60 62 75 66 66 65 72 20 20 20 |,__z0_`buffer | 00001a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001a10 3b 20 73 74 6f 72 65 20 69 74 20 69 6e 20 74 68 |; store it in th| 00001a20 65 20 73 63 72 61 74 63 68 20 73 70 61 63 65 0d |e scratch space.| 00001a30 07 9e 4a 20 20 20 4c 44 52 20 20 20 20 20 72 32 |..J LDR r2| 00001a40 2c 5b 72 31 2c 23 32 34 5d 20 20 20 20 20 20 20 |,[r1,#24] | 00001a50 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 72 65 | ; re| 00001a60 61 64 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 |ad the number of| 00001a70 20 74 68 65 20 69 63 6f 6e 0d 07 a8 50 20 20 20 | the icon...P | 00001a80 53 54 52 20 20 20 20 20 72 32 2c 5f 5f 7a 30 5f |STR r2,__z0_| 00001a90 60 62 75 66 66 65 72 2b 34 20 20 20 20 20 20 20 |`buffer+4 | 00001aa0 20 20 20 20 20 20 20 20 20 20 3b 20 73 74 6f 72 | ; stor| 00001ab0 65 20 69 74 20 69 6e 20 74 68 65 20 73 63 72 61 |e it in the scra| 00001ac0 74 63 68 20 73 70 61 63 65 0d 07 b2 22 20 a4 4c |tch space..." .L| 00001ad0 41 44 52 28 22 20 20 22 2c 31 2c 5f 5f 7a 30 5f |ADR(" ",1,__z0_| 00001ae0 60 62 75 66 66 65 72 2c 38 33 29 0d 07 bc 22 20 |`buffer,83)..." | 00001af0 20 20 20 20 20 20 20 20 20 3b 20 70 6f 69 6e 74 | ; point| 00001b00 65 72 20 74 6f 20 73 63 72 61 74 63 68 0d 07 c6 |er to scratch...| 00001b10 46 20 20 20 53 57 49 20 20 20 20 20 22 58 57 69 |F SWI "XWi| 00001b20 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 65 22 |mp_GetIconState"| 00001b30 20 20 20 20 20 20 20 20 20 20 3b 20 66 69 6e 64 | ; find| 00001b40 20 6f 75 74 20 61 62 6f 75 74 20 74 68 65 20 69 | out about the i| 00001b50 63 6f 6e 0d 07 d0 41 20 20 20 42 56 53 20 20 20 |con...A BVS | 00001b60 20 20 5f 5f 7a 30 5f 65 78 69 74 20 20 20 20 20 | __z0_exit | 00001b70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001b80 20 20 20 20 3b 20 69 66 20 65 72 72 6f 72 2c 20 | ; if error, | 00001b90 65 78 69 74 0d 07 da 3d 20 20 20 4c 44 52 20 20 |exit...= LDR | 00001ba0 20 20 20 72 30 2c 5b 72 31 2c 23 31 36 2b 38 5d | r0,[r1,#16+8]| 00001bb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001bc0 20 3b 20 72 65 61 64 20 74 68 65 20 66 6c 61 67 | ; read the flag| 00001bd0 73 0d 07 e4 4a 20 20 20 54 53 54 20 20 20 20 20 |s...J TST | 00001be0 72 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 |r0,#1 | 00001bf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001c00 69 73 20 74 68 65 72 65 20 74 65 78 74 20 69 6e |is there text in| 00001c10 20 74 68 65 20 69 63 6f 6e 20 3f 0d 07 ee 3f 20 | the icon ?...? | 00001c20 20 20 42 45 51 20 20 20 20 20 5f 5f 7a 30 5f 65 | BEQ __z0_e| 00001c30 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |xit | 00001c40 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 | ; if| 00001c50 20 6e 6f 74 2c 20 65 78 69 74 0d 07 f8 3f 20 20 | not, exit...? | 00001c60 20 54 53 54 20 20 20 20 20 72 30 2c 23 32 35 36 | TST r0,#256| 00001c70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c80 20 20 20 20 20 20 20 3b 20 69 73 20 69 74 20 69 | ; is it i| 00001c90 6e 64 69 72 65 63 74 20 3f 0d 08 02 41 20 20 20 |ndirect ?...A | 00001ca0 4c 44 52 4e 45 20 20 20 72 30 2c 5b 72 31 2c 23 |LDRNE r0,[r1,#| 00001cb0 32 30 2b 38 5d 20 20 20 20 20 20 20 20 20 20 20 |20+8] | 00001cc0 20 20 20 20 20 20 3b 20 69 66 20 73 6f 2c 20 67 | ; if so, g| 00001cd0 65 74 20 61 64 64 72 65 73 73 0d 08 0c 45 20 20 |et address...E | 00001ce0 20 41 44 44 45 51 20 20 20 72 30 2c 72 31 2c 23 | ADDEQ r0,r1,#| 00001cf0 32 30 2b 38 20 20 20 20 20 20 20 20 20 20 20 20 |20+8 | 00001d00 20 20 20 20 20 20 20 3b 20 69 66 20 6e 6f 74 2c | ; if not,| 00001d10 20 75 73 65 20 74 68 65 20 6f 66 66 73 65 74 0d | use the offset.| 00001d20 08 16 05 3a 0d 08 20 4a 20 20 20 4c 44 52 42 20 |...:.. J LDRB | 00001d30 20 20 20 72 32 2c 5b 72 30 2c 23 30 5d 20 20 20 | r2,[r0,#0] | 00001d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001d50 20 3b 20 67 65 74 20 66 69 72 73 74 20 62 79 74 | ; get first byt| 00001d60 65 20 6f 66 20 64 69 73 63 20 6e 61 6d 65 0d 08 |e of disc name..| 00001d70 2a 3c 20 20 20 43 4d 50 20 20 20 20 20 72 32 2c |*< CMP r2,| 00001d80 23 97 28 22 3a 22 29 20 20 20 20 20 20 20 20 20 |#.(":") | 00001d90 20 20 20 20 20 20 20 20 20 3b 20 69 73 20 69 74 | ; is it| 00001da0 20 61 20 63 6f 6c 6f 6e 20 3f 0d 08 34 3d 20 20 | a colon ?..4= | 00001db0 20 41 44 44 45 51 20 20 20 72 30 2c 72 30 2c 23 | ADDEQ r0,r0,#| 00001dc0 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |1 | 00001dd0 20 20 20 20 20 20 20 3b 20 69 66 20 73 6f 2c 20 | ; if so, | 00001de0 73 6b 69 70 20 69 74 0d 08 3e 05 3a 0d 08 48 55 |skip it..>.:..HU| 00001df0 20 20 20 41 44 52 20 20 20 20 20 72 31 2c 5f 5f | ADR r1,__| 00001e00 7a 30 5f 60 62 75 66 66 65 72 20 20 20 20 20 20 |z0_`buffer | 00001e10 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 70 | ; p| 00001e20 6f 69 6e 74 65 72 20 74 6f 20 74 68 65 20 73 74 |ointer to the st| 00001e30 61 72 74 20 6f 66 20 74 68 65 20 62 75 66 66 65 |art of the buffe| 00001e40 72 0d 08 52 3e 20 20 20 42 4c 20 20 20 20 20 20 |r..R> BL | 00001e50 6d 6f 76 65 63 74 72 6c 20 20 20 20 20 20 20 20 |movectrl | 00001e60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001e70 63 6f 70 79 20 74 68 65 20 73 74 72 69 6e 67 0d |copy the string.| 00001e80 08 5c 46 20 20 20 42 4c 20 20 20 20 20 20 6c 65 |.\F BL le| 00001e90 6e 63 74 72 6c 20 20 20 20 20 20 20 20 20 20 20 |nctrl | 00001ea0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 66 69 | ; fi| 00001eb0 6e 64 20 74 68 65 20 6c 65 6e 67 74 68 20 28 74 |nd the length (t| 00001ec0 6f 20 72 31 29 0d 08 66 23 20 a4 4c 41 44 52 28 |o r1)..f# .LADR(| 00001ed0 22 20 20 22 2c 30 2c 5f 5f 7a 30 5f 60 62 75 66 |" ",0,__z0_`buf| 00001ee0 66 65 72 2c 31 30 30 29 0d 08 70 1f 20 20 20 20 |fer,100)..p. | 00001ef0 20 20 20 20 20 20 3b 20 62 75 66 66 65 72 20 74 | ; buffer t| 00001f00 6f 20 73 74 6f 72 65 0d 08 7a 49 20 20 20 41 44 |o store..zI AD| 00001f10 44 20 20 20 20 20 72 31 2c 72 31 2c 72 30 20 20 |D r1,r1,r0 | 00001f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001f30 20 20 20 20 3b 20 69 6e 63 72 65 6d 65 6e 74 20 | ; increment | 00001f40 62 75 66 66 65 72 20 62 79 20 73 74 72 6c 65 6e |buffer by strlen| 00001f50 0d 08 84 05 3a 0d 08 8e 43 20 20 20 41 44 52 20 |....:...C ADR | 00001f60 20 20 20 20 72 30 2c 5f 5f 7a 30 5f 60 76 61 72 | r0,__z0_`var| 00001f70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001f80 20 20 20 20 20 20 3b 20 76 61 72 69 61 62 6c 65 | ; variable| 00001f90 20 74 6f 20 72 65 61 64 0d 08 98 3f 20 20 20 4d | to read...? M| 00001fa0 4f 56 20 20 20 20 20 72 32 2c 23 32 35 36 20 20 |OV r2,#256 | 00001fb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001fc0 20 20 20 20 20 3b 20 6c 65 6e 67 74 68 20 6f 66 | ; length of| 00001fd0 20 62 75 66 66 65 72 0d 08 a2 48 20 20 20 4d 4f | buffer...H MO| 00001fe0 56 20 20 20 20 20 72 33 2c 23 30 20 20 20 20 20 |V r3,#0 | 00001ff0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002000 20 20 20 20 3b 20 6e 61 6d 65 20 70 6f 69 6e 74 | ; name point| 00002010 65 72 20 28 30 20 74 6f 20 73 74 61 72 74 29 0d |er (0 to start).| 00002020 08 ac 3d 20 20 20 4d 4f 56 20 20 20 20 20 72 34 |..= MOV r4| 00002030 2c 23 33 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#3 | 00002040 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 65 78 | ; ex| 00002050 70 61 6e 64 20 74 6f 20 74 65 78 74 0d 08 b6 40 |pand to text...@| 00002060 20 20 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f | SWI "XOS_| 00002070 52 65 61 64 56 61 72 56 61 6c 22 20 20 20 20 20 |ReadVarVal" | 00002080 20 20 20 20 20 20 20 20 20 3b 20 72 65 61 64 20 | ; read | 00002090 74 68 65 20 76 61 72 69 61 62 6c 65 0d 08 c0 18 |the variable....| 000020a0 20 20 20 42 56 53 20 20 20 20 20 5f 5f 7a 30 5f | BVS __z0_| 000020b0 65 78 69 74 0d 08 ca 05 3a 0d 08 d4 1b 20 20 20 |exit....:.... | 000020c0 20 20 20 20 20 20 20 3b 20 22 56 61 6c 20 3d 20 | ; "Val = | 000020d0 25 24 31 22 0d 08 de 05 3a 0d 08 e8 3e 20 20 20 |%$1"....:...> | 000020e0 4d 4f 56 20 20 20 20 20 72 30 2c 72 31 20 20 20 |MOV r0,r1 | 000020f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002100 20 20 20 20 20 20 3b 20 72 30 3d 62 75 66 66 65 | ; r0=buffe| 00002110 72 20 73 74 61 72 74 0d 08 f2 44 20 20 20 4c 44 |r start...D LD| 00002120 52 20 20 20 20 20 72 31 2c 5b 73 70 2c 23 34 5d |R r1,[sp,#4]| 00002130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002140 20 20 20 20 3b 20 72 65 2d 72 65 61 64 20 62 6c | ; re-read bl| 00002150 6f 63 6b 20 70 6f 69 6e 74 65 72 0d 08 fc 3a 20 |ock pointer...: | 00002160 20 20 41 44 44 20 20 20 20 20 72 34 2c 72 31 2c | ADD r4,r1,| 00002170 23 34 34 20 20 20 20 20 20 20 20 20 20 20 20 20 |#44 | 00002180 20 20 20 20 20 20 20 20 3b 20 72 34 3d 6c 65 61 | ; r4=lea| 00002190 66 6e 61 6d 65 0d 09 06 05 3a 0d 09 10 0e 2e 5f |fname....:....._| 000021a0 5f 7a 30 5f 6c 6f 6f 70 0d 09 1a 4e 20 20 20 4c |_z0_loop...N L| 000021b0 44 52 42 20 20 20 20 72 33 2c 5b 72 34 5d 20 20 |DRB r3,[r4] | 000021c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000021d0 20 20 20 20 20 3b 20 72 65 61 64 20 61 20 62 79 | ; read a by| 000021e0 74 65 20 66 72 6f 6d 20 74 68 65 20 75 73 65 72 |te from the user| 000021f0 20 62 6c 6f 63 6b 0d 09 24 41 20 20 20 53 54 52 | block..$A STR| 00002200 42 20 20 20 20 72 33 2c 5b 72 30 2c 72 32 5d 20 |B r3,[r0,r2] | 00002210 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002220 20 20 20 3b 20 73 74 6f 72 65 20 69 6e 20 6f 75 | ; store in ou| 00002230 72 20 62 6c 6f 63 6b 0d 09 2e 3b 20 20 20 41 44 |r block...; AD| 00002240 44 20 20 20 20 20 72 34 2c 72 34 2c 23 31 20 20 |D r4,r4,#1 | 00002250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002260 20 20 20 20 3b 20 69 6e 63 72 65 6d 65 6e 74 20 | ; increment | 00002270 72 34 0d 09 38 3b 20 20 20 41 44 44 20 20 20 20 |r4..8; ADD | 00002280 20 72 32 2c 72 32 2c 23 31 20 20 20 20 20 20 20 | r2,r2,#1 | 00002290 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000022a0 20 69 6e 63 72 65 6d 65 6e 74 20 72 32 0d 09 42 | increment r2..B| 000022b0 3b 20 20 20 43 4d 50 20 20 20 20 20 72 33 2c 23 |; CMP r3,#| 000022c0 33 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |31 | 000022d0 20 20 20 20 20 20 20 20 20 20 3b 20 69 73 20 69 | ; is i| 000022e0 74 20 63 74 72 6c 20 3f 0d 09 4c 43 20 20 20 42 |t ctrl ?..LC B| 000022f0 47 54 20 20 20 20 20 5f 5f 7a 30 5f 6c 6f 6f 70 |GT __z0_loop| 00002300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002310 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 6e 6f | ; if no| 00002320 74 20 74 68 65 6e 20 6c 6f 6f 70 0d 09 56 05 3a |t then loop..V.:| 00002330 0d 09 60 4f 20 20 20 41 44 44 20 20 20 20 20 72 |..`O ADD r| 00002340 34 2c 72 31 2c 23 34 34 20 20 20 20 20 20 20 20 |4,r1,#44 | 00002350 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 70 | ; p| 00002360 6f 69 6e 74 73 20 74 6f 20 74 68 65 20 75 73 65 |oints to the use| 00002370 72 62 6c 6f 63 6b 20 66 69 6c 65 6e 61 6d 65 0d |rblock filename.| 00002380 09 6a 49 20 20 20 41 44 52 20 20 20 20 20 72 30 |.jI ADR r0| 00002390 2c 5f 5f 7a 30 5f 60 73 74 61 72 74 62 75 66 66 |,__z0_`startbuff| 000023a0 65 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |er | 000023b0 3b 20 72 30 3d 74 68 65 20 66 69 6c 65 6e 61 6d |; r0=the filenam| 000023c0 65 20 62 75 66 66 65 72 0d 09 74 41 20 20 20 4d |e buffer..tA M| 000023d0 4f 56 20 20 20 20 20 72 32 2c 23 30 20 20 20 20 |OV r2,#0 | 000023e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000023f0 20 20 20 20 20 3b 20 6f 66 66 73 65 74 20 69 6e | ; offset in| 00002400 74 6f 20 62 75 66 66 65 72 0d 09 7e 05 3a 0d 09 |to buffer..~.:..| 00002410 88 0f 2e 5f 5f 7a 30 5f 6c 6f 6f 70 32 0d 09 92 |...__z0_loop2...| 00002420 43 20 20 20 4c 44 52 42 20 20 20 20 72 33 2c 5b |C LDRB r3,[| 00002430 72 30 2c 72 32 5d 20 20 20 20 20 20 20 20 20 20 |r0,r2] | 00002440 20 20 20 20 20 20 20 20 20 20 3b 20 72 65 61 64 | ; read| 00002450 20 66 72 6f 6d 20 6f 75 72 20 62 75 66 66 65 72 | from our buffer| 00002460 0d 09 9c 42 20 20 20 53 54 52 42 20 20 20 20 72 |...B STRB r| 00002470 33 2c 5b 72 34 2c 72 32 5d 20 20 20 20 20 20 20 |3,[r4,r2] | 00002480 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 | ; s| 00002490 74 6f 72 65 20 69 6e 20 75 73 65 72 20 62 6c 6f |tore in user blo| 000024a0 63 6b 0d 09 a6 3f 20 20 20 41 44 44 20 20 20 20 |ck...? ADD | 000024b0 20 72 32 2c 72 32 2c 23 31 20 20 20 20 20 20 20 | r2,r2,#1 | 000024c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000024d0 20 69 6e 63 72 65 6d 65 6e 74 20 6f 66 66 73 65 | increment offse| 000024e0 74 0d 09 b0 3b 20 20 20 43 4d 50 20 20 20 20 20 |t...; CMP | 000024f0 72 33 2c 23 33 31 20 20 20 20 20 20 20 20 20 20 |r3,#31 | 00002500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002510 69 73 20 69 74 20 63 74 72 6c 20 3f 0d 09 ba 46 |is it ctrl ?...F| 00002520 20 20 20 42 47 54 20 20 20 20 20 5f 5f 7a 30 5f | BGT __z0_| 00002530 6c 6f 6f 70 32 20 20 20 20 20 20 20 20 20 20 20 |loop2 | 00002540 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i| 00002550 66 20 6e 6f 74 20 67 65 74 20 6e 65 78 74 20 6f |f not get next o| 00002560 6e 65 0d 09 c4 05 3a 0d 09 ce 46 20 20 20 41 44 |ne....:...F AD| 00002570 44 20 20 20 20 20 72 30 2c 72 32 2c 23 33 2b 34 |D r0,r2,#3+4| 00002580 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |4 | 00002590 20 20 20 20 3b 20 61 64 64 20 74 68 72 65 65 20 | ; add three | 000025a0 74 6f 20 74 68 65 20 6c 65 6e 67 74 68 0d 09 d8 |to the length...| 000025b0 44 20 20 20 42 49 43 20 20 20 20 20 72 30 2c 72 |D BIC r0,r| 000025c0 30 2c 23 33 20 20 20 20 20 20 20 20 20 20 20 20 |0,#3 | 000025d0 20 20 20 20 20 20 20 20 20 20 3b 20 63 6c 65 61 | ; clea| 000025e0 72 20 74 68 65 20 62 6f 74 74 6f 6d 20 62 69 74 |r the bottom bit| 000025f0 73 0d 09 e2 47 20 20 20 53 54 52 20 20 20 20 20 |s...G STR | 00002600 72 30 2c 5b 72 31 5d 20 20 20 20 20 20 20 20 20 |r0,[r1] | 00002610 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002620 73 74 6f 72 65 20 61 73 20 6c 65 6e 67 74 68 20 |store as length | 00002630 6f 66 20 62 6c 6f 63 6b 0d 09 ec 05 3a 0d 09 f6 |of block....:...| 00002640 18 20 20 20 41 44 44 20 20 20 20 20 72 30 2c 72 |. ADD r0,r| 00002650 31 2c 23 34 34 0d 0a 00 20 20 20 20 20 20 20 20 |1,#44... | 00002660 20 20 20 3b 20 22 46 69 6c 65 6e 61 6d 65 20 3d | ; "Filename =| 00002670 20 25 24 30 22 0d 0a 0a 05 3a 0d 0a 14 3a 20 20 | %$0"....:...: | 00002680 20 4d 4f 56 20 20 20 20 20 72 30 2c 23 32 20 20 | MOV r0,#2 | 00002690 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000026a0 20 20 20 20 20 20 20 3b 20 44 61 74 61 53 61 76 | ; DataSav| 000026b0 65 41 63 6b 0d 0a 1e 3d 20 20 20 53 54 52 20 20 |eAck...= STR | 000026c0 20 20 20 72 30 2c 5b 72 31 2c 23 31 36 5d 20 20 | r0,[r1,#16] | 000026d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000026e0 20 3b 20 73 74 6f 72 65 20 69 6e 20 62 6c 6f 63 | ; store in bloc| 000026f0 6b 0d 0a 28 42 20 20 20 4c 44 52 20 20 20 20 20 |k..(B LDR | 00002700 72 30 2c 5b 72 31 2c 23 38 5d 20 20 20 20 20 20 |r0,[r1,#8] | 00002710 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002720 67 65 74 20 74 68 65 20 6f 6c 64 20 70 6f 69 6e |get the old poin| 00002730 74 65 72 0d 0a 32 39 20 20 20 53 54 52 20 20 20 |ter..29 STR | 00002740 20 20 72 30 2c 5b 72 31 2c 23 31 32 5d 20 20 20 | r0,[r1,#12] | 00002750 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002760 3b 20 73 74 6f 72 65 20 62 61 63 6b 0d 0a 3c 3e |; store back..<>| 00002770 20 20 20 4c 44 52 20 20 20 20 20 72 32 2c 5b 72 | LDR r2,[r| 00002780 31 2c 23 34 5d 20 20 20 20 20 20 20 20 20 20 20 |1,#4] | 00002790 20 20 20 20 20 20 20 20 20 3b 20 72 32 3d 20 74 | ; r2= t| 000027a0 61 73 6b 20 74 6f 20 75 73 65 0d 0a 46 15 20 20 |ask to use..F. | 000027b0 20 4d 4f 56 20 20 20 20 20 72 30 2c 23 31 37 0d | MOV r0,#17.| 000027c0 0a 50 3f 20 20 20 53 57 49 20 20 20 20 20 22 58 |.P? SWI "X| 000027d0 57 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 67 65 |Wimp_SendMessage| 000027e0 22 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 65 |" ; se| 000027f0 6e 64 20 74 68 65 20 6d 65 73 73 61 67 65 0d 0a |nd the message..| 00002800 5a 18 20 20 20 42 56 53 20 20 20 20 20 5f 5f 7a |Z. BVS __z| 00002810 30 5f 65 78 69 74 0d 0a 64 05 3a 0d 0a 6e 3b 20 |0_exit..d.:..n; | 00002820 20 20 4d 56 4e 20 20 20 20 20 72 30 2c 23 ac 20 | MVN r0,#. | 00002830 2d 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |-1 | 00002840 20 20 20 20 20 20 3b 20 69 67 6e 6f 72 65 20 6d | ; ignore m| 00002850 65 73 73 61 67 65 0d 0a 78 3d 20 20 20 53 54 52 |essage..x= STR| 00002860 20 20 20 20 20 72 30 2c 5b 73 70 2c 23 30 5d 20 | r0,[sp,#0] | 00002870 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002880 20 20 20 3b 20 73 74 6f 72 65 20 6f 6e 20 73 74 | ; store on st| 00002890 61 63 6b 0d 0a 82 05 3a 0d 0a 8c 0e 2e 5f 5f 7a |ack....:.....__z| 000028a0 30 5f 65 78 69 74 0d 0a 96 4a 20 20 20 4c 44 4d |0_exit...J LDM| 000028b0 46 44 20 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 |FD (sp)!,{r0-r| 000028c0 35 2c 70 63 7d 5e 20 20 20 20 20 20 20 20 20 20 |5,pc}^ | 000028d0 20 20 20 3b 20 52 65 74 75 72 6e 20 66 72 6f 6d | ; Return from| 000028e0 20 63 61 6c 6c 20 77 69 74 68 20 66 6c 61 67 73 | call with flags| 000028f0 0d 0a a0 05 3a 0d 0a aa 0e 2e 5f 5f 7a 30 5f 60 |....:.....__z0_`| 00002900 76 61 72 0d 0a b4 22 20 20 20 45 51 55 53 20 20 |var..." EQUS | 00002910 20 20 22 51 75 69 63 6b 53 61 76 65 24 50 61 74 | "QuickSave$Pat| 00002920 68 22 2b bd 30 0d 0a be 0c 20 20 20 41 4c 49 47 |h"+.0.... ALIG| 00002930 4e 0d 0a c8 42 20 20 20 20 20 20 20 20 20 20 20 |N...B | 00002940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002950 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002960 54 68 65 20 76 61 72 69 61 62 6c 65 20 74 6f 20 |The variable to | 00002970 75 73 65 0d 0a d2 13 2e 5f 5f 7a 30 5f 60 6d 65 |use.....__z0_`me| 00002980 73 73 61 67 65 73 0d 0a dc 37 20 20 20 45 51 55 |ssages...7 EQU| 00002990 44 20 20 20 20 31 20 20 20 20 20 20 20 20 20 20 |D 1 | 000029a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000029b0 20 20 20 3b 20 44 61 74 61 53 61 76 65 0d 0a e6 | ; DataSave...| 000029c0 3a 20 20 20 45 51 55 44 20 20 20 20 30 20 20 20 |: EQUD 0 | 000029d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000029e0 20 20 20 20 20 20 20 20 20 20 3b 20 65 6e 64 20 | ; end | 000029f0 6f 66 20 6c 69 73 74 0d 0a f0 05 3a 0d 0a fa 55 |of list....:...U| 00002a00 20 20 20 45 51 55 53 20 20 20 20 22 78 78 22 20 | EQUS "xx" | 00002a10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002a20 20 20 20 20 20 20 20 20 20 3b 20 74 6f 20 65 6e | ; to en| 00002a30 73 75 72 65 20 74 68 61 74 20 5f 5f 7a 30 5f 60 |sure that __z0_`| 00002a40 62 75 66 66 65 72 20 69 73 20 61 6c 69 67 6e 65 |buffer is aligne| 00002a50 64 0d 0b 04 16 2e 5f 5f 7a 30 5f 60 73 74 61 72 |d.....__z0_`star| 00002a60 74 62 75 66 66 65 72 0d 0b 0e 50 20 20 20 45 51 |tbuffer...P EQ| 00002a70 55 53 20 20 20 20 22 41 44 46 53 3a 3a 22 20 20 |US "ADFS::" | 00002a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002a90 20 20 20 20 3b 20 74 68 65 20 62 69 74 20 66 6f | ; the bit fo| 00002aa0 72 20 74 68 65 20 73 74 61 72 74 20 6f 66 20 74 |r the start of t| 00002ab0 68 65 20 6c 69 6e 65 0d 0b 18 11 2e 5f 5f 7a 30 |he line.....__z0| 00002ac0 5f 60 62 75 66 66 65 72 0d 0b 22 12 20 a4 72 65 |_`buffer..". .re| 00002ad0 73 65 72 76 65 28 32 35 36 29 0d 0b 2c 2b 20 20 |serve(256)..,+ | 00002ae0 20 20 20 20 20 20 20 20 3b 20 66 6f 72 20 73 74 | ; for st| 00002af0 6f 72 69 6e 67 20 74 68 65 20 66 69 6c 65 6e 61 |oring the filena| 00002b00 6d 65 20 69 6e 0d 0b 36 05 3a 0d 0b 40 0b 2e 60 |me in..6.:..@..`| 00002b10 61 64 64 65 64 0d 0b 4a 10 20 20 20 45 51 55 44 |added..J. EQUD| 00002b20 20 20 20 20 30 0d 0b 54 05 3a 0d 0b 5e 05 3a 0d | 0..T.:..^.:.| 00002b30 0b 68 30 20 20 20 20 20 20 20 20 20 20 3b 20 4c |.h0 ; L| 00002b40 69 62 72 61 72 79 20 72 6f 75 74 69 6e 65 20 53 |ibrary routine S| 00002b50 74 72 69 6e 67 73 2e 6d 6f 76 65 63 74 72 6c 0d |trings.movectrl.| 00002b60 0b 72 0d 2e 6d 6f 76 65 63 74 72 6c 0d 0b 7c 13 |.r..movectrl..|.| 00002b70 3b 20 2a 2a 2a 20 6c 69 6b 65 64 20 2a 2a 2a 0d |; *** liked ***.| 00002b80 0b 86 17 3b 20 3e 20 72 30 3d 69 6e 70 75 74 20 |...; > r0=input | 00002b90 73 74 72 69 6e 67 0d 0b 90 17 3b 20 20 20 72 31 |string....; r1| 00002ba0 3d 6f 75 70 75 74 20 62 75 66 66 65 72 0d 0b 9a |=ouput buffer...| 00002bb0 13 3b 20 3c 20 5f 5f 7a 31 5f 72 31 3d 24 72 30 |.; < __z1_r1=$r0| 00002bc0 0d 0b a4 24 20 20 20 53 54 4d 46 44 20 20 20 28 |...$ STMFD (| 00002bd0 73 70 29 21 2c 7b 72 30 2d 72 31 2c 72 35 2c 6c |sp)!,{r0-r1,r5,l| 00002be0 69 6e 6b 7d 0d 0b ae 0e 2e 5f 5f 7a 31 5f 6c 6f |ink}.....__z1_lo| 00002bf0 6f 70 0d 0b b8 19 20 20 20 4c 44 52 42 20 20 20 |op.... LDRB | 00002c00 20 72 35 2c 5b 72 30 5d 2c 23 31 0d 0b c2 19 20 | r5,[r0],#1.... | 00002c10 20 20 53 54 52 42 20 20 20 20 72 35 2c 5b 72 31 | STRB r5,[r1| 00002c20 5d 2c 23 31 0d 0b cc 15 20 20 20 43 4d 50 20 20 |],#1.... CMP | 00002c30 20 20 20 72 35 2c 23 33 31 0d 0b d6 18 20 20 20 | r5,#31.... | 00002c40 42 47 54 20 20 20 20 20 5f 5f 7a 31 5f 6c 6f 6f |BGT __z1_loo| 00002c50 70 0d 0b e0 23 20 20 20 4c 44 4d 46 44 20 20 20 |p...# LDMFD | 00002c60 28 73 70 29 21 2c 7b 72 30 2d 72 31 2c 72 35 2c |(sp)!,{r0-r1,r5,| 00002c70 70 63 7d 5e 0d 0b ea 05 3a 0d 0b f4 05 3a 0d 0b |pc}^....:....:..| 00002c80 fe 2f 20 20 20 20 20 20 20 20 20 20 3b 20 4c 69 |./ ; Li| 00002c90 62 72 61 72 79 20 72 6f 75 74 69 6e 65 20 53 74 |brary routine St| 00002ca0 72 69 6e 67 73 2e 6c 65 6e 63 74 72 6c 0d 0c 08 |rings.lenctrl...| 00002cb0 0c 2e 6c 65 6e 63 74 72 6c 0d 0c 12 17 3b 20 3e |..lenctrl....; >| 00002cc0 20 72 30 3d 69 6e 70 75 74 20 73 74 72 69 6e 67 | r0=input string| 00002cd0 0d 0c 1c 10 3b 20 3c 20 72 31 3d a9 28 72 30 29 |....; < r1=.(r0)| 00002ce0 0d 0c 26 1e 20 20 20 53 54 4d 46 44 20 20 20 28 |..&. STMFD (| 00002cf0 73 70 29 21 2c 7b 72 32 2c 6c 69 6e 6b 7d 0d 0c |sp)!,{r2,link}..| 00002d00 30 14 20 20 20 4d 4f 56 20 20 20 20 20 72 31 2c |0. MOV r1,| 00002d10 23 30 0d 0c 3a 0e 2e 5f 5f 7a 32 5f 6c 6f 6f 70 |#0..:..__z2_loop| 00002d20 0d 0c 44 19 20 20 20 4c 44 52 42 20 20 20 20 72 |..D. LDRB r| 00002d30 32 2c 5b 72 30 2c 72 31 5d 0d 0c 4e 17 20 20 20 |2,[r0,r1]..N. | 00002d40 41 44 44 20 20 20 20 20 72 31 2c 72 31 2c 23 31 |ADD r1,r1,#1| 00002d50 0d 0c 58 15 20 20 20 43 4d 50 20 20 20 20 20 72 |..X. CMP r| 00002d60 32 2c 23 33 32 0d 0c 62 18 20 20 20 42 47 45 20 |2,#32..b. BGE | 00002d70 20 20 20 20 5f 5f 7a 32 5f 6c 6f 6f 70 0d 0c 6c | __z2_loop..l| 00002d80 17 20 20 20 53 55 42 20 20 20 20 20 72 31 2c 72 |. SUB r1,r| 00002d90 31 2c 23 31 0d 0c 76 1d 20 20 20 4c 44 4d 46 44 |1,#1..v. LDMFD| 00002da0 20 20 20 28 73 70 29 21 2c 7b 72 32 2c 70 63 7d | (sp)!,{r2,pc}| 00002db0 5e 0d 0c 80 05 3a 0d 0c 8a 26 20 20 20 20 20 20 |^....:...& | 00002dc0 20 20 20 20 3b 20 4c 69 62 72 61 72 79 20 27 53 | ; Library 'S| 00002dd0 74 72 69 6e 67 73 27 20 65 6e 64 73 0d 0c 94 05 |trings' ends....| 00002de0 3a 0d 0c 9e 05 5d 0d 0c a8 20 f4 20 2a 2a 2a 2a |:....]... . ****| 00002df0 20 45 6e 64 20 6f 66 20 6d 61 69 6e 20 63 6f 64 | End of main cod| 00002e00 65 20 2a 2a 2a 2a 0d 0c b2 36 f4 20 53 65 74 20 |e ****...6. Set | 00002e10 66 69 6e 61 6c 20 70 6f 69 6e 74 65 72 20 74 6f |final pointer to| 00002e20 20 66 69 6e 64 20 74 68 65 20 6c 65 6e 67 74 68 | find the length| 00002e30 20 6f 66 20 74 68 65 20 63 6f 64 65 0d 0c bc 13 | of the code....| 00002e40 f2 70 61 74 63 68 5f 73 65 74 70 63 28 30 29 0d |.patch_setpc(0).| 00002e50 0c c6 0b ed 20 70 61 73 73 25 0d 0c d0 13 f2 70 |.... pass%.....p| 00002e60 61 74 63 68 5f 73 61 76 65 66 69 6c 65 0d 0c ee |atch_savefile...| 00002e70 28 f4 20 2a 2a 2a 2a 20 50 6f 73 74 2d 61 73 73 |(. **** Post-ass| 00002e80 65 6d 62 6c 79 20 75 73 65 72 20 63 6f 64 65 20 |embly user code | 00002e90 2a 2a 2a 2a 2a 0d 0c f8 20 2a 53 65 74 20 51 75 |*****... *Set Qu| 00002ea0 69 63 6b 53 61 76 65 24 50 61 74 68 20 2e 24 2e |ickSave$Path .$.| 00002eb0 74 65 6d 70 2e 0d 0d 02 21 2a 46 69 6c 65 72 5f |temp....!*Filer_| 00002ec0 4f 70 65 6e 44 69 72 20 41 44 46 53 3a 3a 34 2e |OpenDir ADFS::4.| 00002ed0 24 2e 74 65 6d 70 0d 0d 0c 05 3a 0d 0d 16 2a 2a |$.temp....:...**| 00002ee0 52 75 6e 20 3c 41 44 46 53 51 75 69 63 6b 53 61 |Run <ADFSQuickSa| 00002ef0 76 65 24 44 69 72 3e 2e 41 44 46 53 51 75 69 63 |ve$Dir>.ADFSQuic| 00002f00 6b 53 61 76 65 0d 0d 20 05 e0 0d 0d 2a 05 3a 0d |kSave.. ....*.:.| 00002f10 0d 34 21 f4 20 2a 2a 2a 2a 20 46 69 6c 69 6e 67 |.4!. **** Filing| 00002f20 20 70 72 6f 63 65 64 75 72 65 73 20 2a 2a 2a 2a | procedures ****| 00002f30 0d 0d 3e 05 3a 0d 0d 48 15 dd 20 f2 70 61 74 63 |..>.:..H.. .patc| 00002f40 68 5f 6c 6f 61 64 66 69 6c 65 0d 0d 52 0d 63 6f |h_loadfile..R.co| 00002f50 64 65 6c 65 6e 3d 30 0d 0d 5c 0f de 20 4d 43 25 |delen=0..\.. MC%| 00002f60 20 26 31 34 30 30 0d 0d 66 2d 65 6e 64 6f 66 63 | &1400..f-endofc| 00002f70 6f 64 65 3d 28 63 6f 64 65 6c 65 6e 2b 26 30 2b |ode=(codelen+&0+| 00002f80 33 29 20 80 20 2d 34 3a 6d 61 78 3d 63 6f 64 65 |3) . -4:max=code| 00002f90 6c 65 6e 0d 0d 70 19 4c 25 3d 65 6e 64 6f 66 63 |len..p.L%=endofc| 00002fa0 6f 64 65 3a 5f 5f 63 61 70 25 3d a3 0d 0e 06 05 |ode:__cap%=.....| 00002fb0 e1 0d 0e 10 05 3a 0d 0e 1a 15 dd 20 f2 70 61 74 |.....:..... .pat| 00002fc0 63 68 5f 73 61 76 65 66 69 6c 65 0d 0e 24 30 6f |ch_savefile..$0o| 00002fd0 75 74 66 69 6c 65 24 3d 22 3c 41 44 46 53 51 75 |utfile$="<ADFSQu| 00002fe0 69 63 6b 53 61 76 65 24 44 69 72 3e 2e 41 44 46 |ickSave$Dir>.ADF| 00002ff0 53 51 75 69 63 6b 53 61 76 65 22 0d 0e 2e 31 ff |SQuickSave"...1.| 00003000 28 22 53 61 76 65 20 22 2b 6f 75 74 66 69 6c 65 |("Save "+outfile| 00003010 24 2b 22 20 22 2b c3 7e 4d 43 25 2b 22 20 22 2b |$+" "+.~MC%+" "+| 00003020 c3 7e 28 6d 61 78 2b 4d 43 25 29 29 0d 0e 38 24 |.~(max+MC%))..8$| 00003030 ff 28 22 53 65 74 74 79 70 65 20 22 2b 6f 75 74 |.("Settype "+out| 00003040 66 69 6c 65 24 2b 22 20 4d 6f 64 75 6c 65 22 29 |file$+" Module")| 00003050 0d 0e 42 23 70 61 74 63 68 64 69 72 24 3d 22 3c |..B#patchdir$="<| 00003060 41 44 46 53 51 75 69 63 6b 53 61 76 65 24 44 69 |ADFSQuickSave$Di| 00003070 72 3e 22 0d 0e 74 05 e1 0d 0e 7e 05 3a 0d 0e 88 |r>"..t....~.:...| 00003080 1d f4 20 2a 2a 2a 2a 20 45 72 72 6f 72 20 48 61 |.. **** Error Ha| 00003090 6e 64 6c 65 72 20 2a 2a 2a 2a 0d 0e 92 05 3a 0d |ndler ****....:.| 000030a0 0e 9c 0b dd f2 45 72 72 6f 72 0d 0e a6 07 ea 20 |.....Error..... | 000030b0 85 0d 0e b0 3d ee 20 85 20 ea 3a f7 20 85 3a 85 |....=. . .:. .:.| 000030c0 20 a2 20 9f 2c f6 24 2b 22 20 77 68 69 6c 73 74 | . .,.$+" whilst| 000030d0 20 69 6e 20 65 72 72 6f 72 20 68 61 6e 64 6c 65 | in error handle| 000030e0 72 20 61 74 20 6c 69 6e 65 20 22 2b c3 9e 0d 0f |r at line "+....| 000030f0 1e 1b 85 20 a2 20 9f 2c f6 24 2b 22 20 61 74 20 |... . .,.$+" at | 00003100 6c 69 6e 65 20 22 2b c3 9e 0d 0f 28 05 e1 0d 0f |line "+....(....| 00003110 32 05 3a 0d 0f a0 22 f4 20 2a 2a 2a 2a 20 55 74 |2.:...". **** Ut| 00003120 69 6c 69 74 79 20 70 72 6f 63 65 64 75 72 65 73 |ility procedures| 00003130 20 2a 2a 2a 2a 0d 0f aa 05 3a 0d 0f b4 14 dd f2 | ****....:......| 00003140 70 61 74 63 68 5f 73 65 74 70 63 28 6e 29 0d 0f |patch_setpc(n)..| 00003150 be 1a e7 20 50 25 2d 26 30 3e 6d 61 78 20 8c 6d |... P%-&0>max .m| 00003160 61 78 3d 50 25 2d 26 30 0d 0f c8 14 50 25 3d 6e |ax=P%-&0....P%=n| 00003170 3a 4f 25 3d 4d 43 25 2b 6e 2d 26 30 0d 0f d2 05 |:O%=MC%+n-&0....| 00003180 e1 0d 0f dc 05 3a 0d 0f e6 22 dd a4 66 69 6e 64 |.....:..."..find| 00003190 66 72 65 65 72 65 67 28 61 2c 62 2c 63 2c 64 29 |freereg(a,b,c,d)| 000031a0 3a ea 20 6e 3a 6e 3d 30 0d 0f f0 1c c8 95 20 6e |:. n:n=0...... n| 000031b0 3d 61 20 84 20 6e 3d 62 20 84 20 6e 3d 63 20 84 |=a . n=b . n=c .| 000031c0 20 6e 3d 64 0d 0f fa 09 20 6e 2b 3d 31 0d 10 04 | n=d.... n+=1...| 000031d0 05 ce 0d 10 0e 06 3d 6e 0d 10 18 05 3a 0d 10 22 |......=n....:.."| 000031e0 28 f4 20 2a 2a 2a 2a 20 4c 6f 6e 67 20 41 44 52 |(. **** Long ADR| 000031f0 20 6d 61 63 72 6f 20 70 72 6f 63 65 64 75 72 65 | macro procedure| 00003200 20 2a 2a 2a 2a 0d 10 2c 05 3a 0d 10 36 40 f4 20 | ****..,.:..6@. | 00003210 44 45 53 43 2e 20 3a 20 41 44 52 20 65 71 75 69 |DESC. : ADR equi| 00003220 76 61 6c 65 6e 74 20 66 6f 72 20 6c 6f 6e 67 20 |valent for long | 00003230 61 64 64 72 65 73 73 20 72 61 6e 67 65 73 2c 20 |address ranges, | 00003240 69 6e 20 32 20 69 6e 73 74 73 0d 10 40 43 f4 20 |in 2 insts..@C. | 00003250 45 4e 54 52 59 20 3a 20 63 6f 6e 64 24 20 3d 20 |ENTRY : cond$ = | 00003260 74 77 6f 20 63 68 61 72 20 73 74 72 69 6e 67 2c |two char string,| 00003270 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 | containing the | 00003280 41 52 4d 20 63 6f 6e 64 69 74 69 6f 6e 0d 10 4a |ARM condition..J| 00003290 1a f4 20 20 20 20 20 20 20 20 20 72 65 67 25 20 |.. reg% | 000032a0 3d 20 30 2e 2e 31 35 0d 10 54 2b f4 20 20 20 20 |= 0..15..T+. | 000032b0 20 20 20 20 20 70 6f 69 6e 74 65 72 25 20 3d 20 | pointer% = | 000032c0 6c 6f 6e 67 20 72 61 6e 67 65 20 70 6f 69 6e 74 |long range point| 000032d0 65 72 0d 10 5e 42 f4 20 43 4f 4d 4d 2e 20 3a 20 |er..^B. COMM. : | 000032e0 70 61 73 73 25 20 3d 20 4f 50 54 20 76 61 72 69 |pass% = OPT vari| 000032f0 61 62 6c 65 20 69 6e 20 74 68 65 20 61 73 73 65 |able in the asse| 00003300 6d 62 6c 65 72 20 46 4f 52 2e 2e 4e 45 58 54 20 |mbler FOR..NEXT | 00003310 6c 6f 6f 70 0d 10 68 2d f4 20 20 20 20 20 20 20 |loop..h-. | 00003320 20 20 43 61 6e 20 6f 6e 6c 79 20 68 61 6e 64 6c | Can only handl| 00003330 65 20 36 34 20 4b 42 79 74 65 20 72 61 6e 67 65 |e 64 KByte range| 00003340 73 0d 10 72 26 dd a4 4c 41 44 52 28 63 6f 6e 64 |s..r&..LADR(cond| 00003350 24 2c 72 65 67 25 2c 70 6f 69 6e 74 65 72 25 2c |$,reg%,pointer%,| 00003360 69 6e 6c 69 6e 65 29 0d 10 7c 21 ea 20 63 63 25 |inline)..|!. cc%| 00003370 2c 64 69 66 66 25 2c 6c 6f 25 2c 68 69 25 2c 6f |,diff%,lo%,hi%,o| 00003380 70 31 25 2c 6f 70 32 25 0d 10 86 23 e7 20 28 70 |p1%,op2%...#. (p| 00003390 61 73 73 25 20 80 25 31 30 29 3d 30 20 50 25 2b |ass% .%10)=0 P%+| 000033a0 3d 38 3a 4f 25 2b 3d 38 3a 3d 30 0d 10 ae 48 e7 |=8:O%+=8:=0...H.| 000033b0 20 94 28 70 6f 69 6e 74 65 72 25 2d 50 25 29 3e | .(pointer%-P%)>| 000033c0 36 35 35 33 35 20 8c 85 20 39 39 39 2c 22 4c 41 |65535 .. 999,"LA| 000033d0 44 52 20 63 61 6e 20 6f 6e 6c 79 20 68 61 6e 64 |DR can only hand| 000033e0 6c 65 20 36 34 20 4b 42 79 74 65 20 72 61 6e 67 |le 64 KByte rang| 000033f0 65 73 22 0d 10 b8 27 e7 63 6f 6e 64 24 3d 22 20 |es"...'.cond$=" | 00003400 20 22 20 84 20 63 6f 6e 64 24 3d 22 22 20 20 8c | " . cond$="" .| 00003410 63 6f 6e 64 24 3d 22 41 4c 22 0d 10 c2 32 63 63 |cond$="AL"...2cc| 00003420 25 3d a7 22 45 51 4e 45 43 53 43 43 4d 49 50 4c |%=."EQNECSCCMIPL| 00003430 56 53 56 43 48 49 4c 53 47 45 4c 54 47 54 4c 45 |VSVCHILSGELTGTLE| 00003440 41 4c 4e 56 22 2c 63 6f 6e 64 24 29 0d 10 cc 4b |ALNV",cond$)...K| 00003450 e7 20 63 63 25 3d 30 20 8c 85 20 39 39 39 2c 22 |. cc%=0 .. 999,"| 00003460 55 6e 6b 6e 6f 77 6e 20 63 6f 6e 64 69 74 69 6f |Unknown conditio| 00003470 6e 20 66 6f 72 20 4c 41 44 52 20 28 22 2b 63 6f |n for LADR ("+co| 00003480 6e 64 24 2b 22 29 22 20 8b 20 63 63 25 3d 28 63 |nd$+")" . cc%=(c| 00003490 63 25 2d 31 29 81 32 0d 10 d6 17 64 69 66 66 25 |c%-1).2....diff%| 000034a0 3d 70 6f 69 6e 74 65 72 25 2d 50 25 2d 38 0d 10 |=pointer%-P%-8..| 000034b0 e0 14 6c 6f 25 3d 94 28 64 69 66 66 25 29 80 26 |..lo%=.(diff%).&| 000034c0 46 46 0d 10 ea 16 68 69 25 3d 94 28 64 69 66 66 |FF....hi%=.(diff| 000034d0 25 29 80 26 46 46 30 30 0d 10 f4 0e e7 64 69 66 |%).&FF00.....dif| 000034e0 66 25 3e 3d 30 8c 0d 10 fe 2c 20 6f 70 31 25 3d |f%>=0...., op1%=| 000034f0 28 63 63 25 3c 3c 32 38 29 2b 26 30 32 38 46 30 |(cc%<<28)+&028F0| 00003500 30 30 30 2b 28 72 65 67 25 3c 3c 31 32 29 2b 6c |000+(reg%<<12)+l| 00003510 6f 25 0d 11 08 3c 20 6f 70 32 25 3d 28 63 63 25 |o%...< op2%=(cc%| 00003520 3c 3c 32 38 29 2b 26 30 32 38 30 30 43 30 30 2b |<<28)+&02800C00+| 00003530 28 72 65 67 25 3c 3c 31 36 29 2b 28 72 65 67 25 |(reg%<<16)+(reg%| 00003540 3c 3c 31 32 29 2b 28 68 69 25 3e 3e 38 29 0d 11 |<<12)+(hi%>>8)..| 00003550 12 05 cc 0d 11 1c 2c 20 6f 70 31 25 3d 28 63 63 |......, op1%=(cc| 00003560 25 3c 3c 32 38 29 2b 26 30 32 34 46 30 30 30 30 |%<<28)+&024F0000| 00003570 2b 28 72 65 67 25 3c 3c 31 32 29 2b 6c 6f 25 0d |+(reg%<<12)+lo%.| 00003580 11 26 3c 20 6f 70 32 25 3d 28 63 63 25 3c 3c 32 |.&< op2%=(cc%<<2| 00003590 38 29 2b 26 30 32 34 30 30 43 30 30 2b 28 72 65 |8)+&02400C00+(re| 000035a0 67 25 3c 3c 31 36 29 2b 28 72 65 67 25 3c 3c 31 |g%<<16)+(reg%<<1| 000035b0 32 29 2b 28 68 69 25 3e 3e 38 29 0d 11 30 05 cd |2)+(hi%>>8)..0..| 000035c0 0d 11 3a 24 5b 4f 50 54 20 70 61 73 73 25 3a 45 |..:$[OPT pass%:E| 000035d0 51 55 44 20 6f 70 31 25 3a 45 51 55 44 20 6f 70 |QUD op1%:EQUD op| 000035e0 32 25 3a 5d 0d 11 44 06 3d 30 0d 11 4e 05 3a 0d |2%:]..D.=0..N.:.| 000035f0 11 58 2b f4 20 46 4e 72 65 73 65 72 76 65 20 3a |.X+. FNreserve :| 00003600 20 52 65 73 65 72 76 65 20 73 70 61 63 65 20 66 | Reserve space f| 00003610 6f 72 20 78 20 62 79 74 65 73 0d 11 62 29 dd a4 |or x bytes..b)..| 00003620 72 65 73 65 72 76 65 28 62 79 74 65 73 29 3a 62 |reserve(bytes):b| 00003630 79 74 65 73 3d 28 62 79 74 65 73 2b 33 29 20 80 |ytes=(bytes+3) .| 00003640 20 2d 34 0d 11 6c 15 e7 20 28 70 61 73 73 25 20 | -4..l.. (pass% | 00003650 80 20 32 29 3d 32 20 8c 0d 11 76 22 20 ea 20 49 |. 2)=2 ...v" . I| 00003660 3a e3 20 49 3d 30 b8 62 79 74 65 73 2d 34 20 88 |:. I=0.bytes-4 .| 00003670 34 3a 4f 25 21 49 3d 30 3a ed 0d 11 80 05 cd 0d |4:O%!I=0:.......| 00003680 11 8a 17 50 25 2b 3d 62 79 74 65 73 3a 4f 25 2b |...P%+=bytes:O%+| 00003690 3d 62 79 74 65 73 0d 11 94 06 3d 30 0d 11 9e 05 |=bytes....=0....| 000036a0 3a 0d 7f 7f 0d f4 20 4a 46 50 61 74 63 68 0d ff |:..... JFPatch..| 000036b0