Home » Archimedes archive » Acorn User » AU 1996-02.adf » Regulars » StarInfo/Fletcher/!NoCover/PatchBas
StarInfo/Fletcher/!NoCover/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-02.adf » Regulars |
| Filename: | StarInfo/Fletcher/!NoCover/PatchBas |
| Read OK: | ✔ |
| File size: | 3B69 bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
File contents
10REM > Patch for memory compilation
20REM Created by JFPatch LEN Justin Fletcher, 05 Sep 1995
30REM Intermediate code file created 01 Oct 1995
40ON ERROR PROCError:END
50PROCpatch_loadfile
60:
70REM **** User pre-assembly ****
80ibtop=128
90 PRINT "Do you want Ctrl-Shift to cancel Shift action ? (y/n) ";
100 REPEAT:SYS "OS_Confirm" TO g:g$=CHR$g:UNTILINSTR("yn",g$)>0
110 PRINTg$
120 cond_ctrl=INSTR("yY",g$)>0
130:
140REM **** Main assembly routine ****
150sp=13:link=14:pc=15
160vbit=1<<28:cbit=1<<29:zbit=1<<30:nbit=1<<31
170P%=&0:O%=MC%
180FOR pass%=4 TO 6 STEP2
190REM **** Start of main code ****
200PROCpatch_setpc(0)
210[OPT pass%
220 ; **** Add module header ****
230 EQUD 0 ; Start offset
240 EQUD module_init ; Initialisation offset
250 EQUD module_final ; Finalisation offset
260 EQUD module_service ; Service request offset
270 EQUD module_title ; Title string offset
280 EQUD module_help ; Help string offset
290 EQUD module_commands ; Help and command keyword table offset
300:
310.module_title
320 EQUS "NoCoverIB"+CHR$0
330 ALIGN
340:
350.module_help
360 EQUS "NoCoverIB"+CHR$9+"1.04 ("+MID$(TIME$,5,11)+") � Justin Fletcher"+CHR$0
370 ALIGN
380:
390.module_service
400 LDR r12,[r12]
410 MOVS pc,link
420:
430.module_init
440 STMFD (sp)!,{r0-r4,link} ; Stack registers
450 MOV r0,#6
460 FNLMOV("",3,&A0)
470 SWI "XOS_Module" ; Claim private workspace
480 ADDVS sp,sp,#4 ; if error return r0
490 LDMVSFD (sp)!,{r1-r4,pc} ; return error
500 STR r2,[r12] ; store in private word
510 MOV r12,r2 ; r12=space
520 MOV r0,#0 ; initialise to 0
530 ADD r3,r3,r2 ; end of block
540._mod_ws_init
550 STR r0,[r2],#4 ; store and inc
560 CMP r2,r3 ; at end ?
570 BLT _mod_ws_init ; n = loop again
580; ***** WimpSWI claim code
590 MOV r0,#18
600 FNLADR("",1,`module_WSWIname)
610 SWI "XOS_Module" ; Look up module name
620 FNLADR("VS",0,`module_WSWIerr)
630 ADDVS sp,sp,#4
640 LDMVSFD (sp)!,{r1-r4,pc}
650 LDR r0,`module_WSWIword
660 MOV r2,r12
670 MOV r1,#5+(%10<<30)
680 FNLADR("",3,openwin)
690 MOV r4,#0
700 SWI "Wimp_RegisterFilter"
710 LDMFD (sp)!,{r0-r4,pc} ; restore registers
720:
730.`module_WSWIerr
740 EQUD &0
750 EQUS "NoCoverIB requires the WimpSWIVe module to be present"+CHR$0
760.`module_WSWIname
770 EQUS "WimpSWIVe"+CHR$0
780 ALIGN
790.`module_WSWIword
800 EQUS "WSWI"
810:
820.module_final
830 STMFD (sp)!,{r0-r4,r12,link} ; Stack registers
840 LDR r12,[r12]
850; ***** WimpSWI release code
860 LDR r0,`module_WSWIword
870 MOV r2,r12
880 MOV r1,#5+(%00<<30)
890 FNLADR("",3,openwin)
900 MOV r4,#0
910 SWI "Wimp_RegisterFilter"
920 LDMFD (sp),{r0-r4} ; restore registers
930 MOV r0,#7
940 MOV r2,r12
950 SWI "XOS_Module" ; Release workspace
960 ADDVS sp,sp,#4
970 LDMVSFD (sp)!,{r1-r4,r12,pc} ; Return if error
980 LDMFD (sp)!,{r0-r4,r12,pc} ; Return
990:
1000; ***** Module commands table
1010.module_commands
1020 EQUS "NoCoverIB" ; Command name
1030 EQUB 0:ALIGN
1040 EQUD 0 ; Code to call
1050 EQUD &0 ; Flags
1060 EQUD 0 ; Syntax pointer
1070 EQUD help_nocoverib ; Help pointer
1080 EQUB 0
1090 ALIGN
1100:
1110; ***** Help and Syntax messages
1120.help_nocoverib
1130 EQUS "The NoCoverIB module forces the Wimp to obey the 'don't cover "
1140 EQUS "iconbar' flag in CMOS RAM. If you wish to cover the iconbar, "
1150 EQUS "then hold shift whilst performing any drags."+CHR$13+CHR$13
1160 EQUS "Note: The toggle has had to be simulated, and therefore it does "
1170 EQUS "not work totally correctly. I cannot (legally) code around this "
1180 EQUS "as I do not know the how to read previous size. Sorry about that. "
1190 EQUB 0
1200 ALIGN
1210:
1220 ; **** End of module header ****
1230:
1240; Replaces Wimp_OpenWindow
1250.openwin
1260 STMFD (sp)!,{r0-r5,link} ; Stack registers
1270 ; "%c04Open window, number = %&1"
1280 LDR r3,[r12,#124] ; get flag
1290 ADD r3,r3,#1 ; increment flag
1300 STR r3,[r12,#124] ; store back
1310 CMP r3,#1 ; is it 0 ? (process)
1320 BNE __z0_exit ; if not, exit
1330 MOV r5,r1 ; r5=pointer to window block
1340 MOV r0,#161
1350 MOV r1,#28
1360 SWI "OS_Byte"
1370 ; get CMOS byte
1380 TST r2,#&10 ; is bit set ?
1390 BEQ __z0_exit ; if not, exit
1400 MOV r0,#121
1410 MOV r1,#0 EOR &80
1420 SWI "OS_Byte"
1430 ; get shift status
1440 CMP r1,#&FF ; is it pressed ?
1450]
1460IF cond_ctrl THEN
1470[ OPT pass%
1480 BNE __z0_notshift
1490 MOV r0,#121
1500 MOV r1,#1 EOR &80
1510 SWI "OS_Byte"
1520 ; get ctrl status
1530 CMP r1,#&FF ; is it also pressed ?
1540 BNE __z0_exit ; if not, exit
1550]
1560ELSE
1570[ OPT pass%
1580 BEQ __z0_exit
1590]
1600ENDIF
1610[ OPT pass%
1620.__z0_notshift
1630 ; "Can process"
1640:
1650 LDR r2,[r5,#28] ; get window behind
1660 CMN r2,#3 ; is it iconised ?
1670 BEQ __z0_exit ; if so, exit
1680 MOV r1,r12 ; r1=pointer to WS, and set b0
1690 LDR r2,[r5] ; get window handle
1700 STR r2,[r1] ; store in block
1710 ORR r1,r1,#1 ; set b0
1720 SWI "Wimp_GetWindowInfo" ; get data, bar icons
1730 ; "Got info"
1740 LDR r0,[r12,#32] ; get flags
1750 STR r0,[r12,#120] ; store flags for later
1760 TST r0,#1<<29 ; has it got adjust size ?
1770 TSTNE r0,#1<<28 ; if so, has it got vertical scroll?
1780 BEQ __z0_exit ; if not, exit
1790:
1800 TST r0,#1<<16 ; is it open ?
1810 BNE __z0_notopen
1820 MOV r1,r5 ; no, re-get pointer to block,
1830 ; "Call second routine"
1840 SWI "Wimp_OpenWindow" ; THEN open it as specifed,
1850 ; "Exitted second"
1860; BL Display
1870 LDR r4,[r5,#32] ; THEN read old offset 32
1880 SWI "Wimp_GetWindowState" ; THEN get new location,
1890 STR r4,[r5,#32] ; THEN restore old offset 32
1900; BL Display
1910 ORR r1,r12,#1 ; THEN set b0 to return just header,
1920 SWI "Wimp_GetWindowInfo" ; THEN and get the info again
1930.__z0_notopen
1940 ADD r1,r12,#96 ; add#96 as offset for outline blk
1950 STR r2,[r1] ; store window handle
1960 SWI "Wimp_GetWindowOutline" ; get outline
1970 LDR r0,[r12,#8] ; get VWA bottom
1980 LDR r2,[r12,#96+8] ; get bottom of window
1990 SUB r0,r0,r2 ; r0=size of scroll bar
2000 ADD r4,r0,#ibtop ; add to iconbar top
2010 LDR r0,[r5,#28] ; get position in stack
2020 CMN r0,#2 ; is it at back ?
2030 BEQ __z0_exit
2040 LDR r0,[r5,#8] ; get bottom
2050 LDR r1,[r5,#16] ; get top
2060 CMP r1,r4 ; is top below iconbar ?
2070 BLT __z0_exit ; if so, then skip
2080 CMP r0,r4 ; is bottom below iconbar ?
2090 MOVLT r0,r4 ; if so, move it above iconbar
2100 STR r0,[r5,#8] ; and store back in block
2110 BL checktoggle
2120 LDR r0,[r12,#120] ; get original flags
2130 TST r0,#1<<21 ; did it need forcing to screen ?
2140 BNE __z0_forcetoscreen ; if so, make sure
2150 TST r0,#1<<16 ; was it open before ?
2160 BNE __z0_exit ; if not, then forget
2170 LDR r0,[r12,#32] ; get flags
2180 TST r0,#1<<6 ; is it no bounds ?
2190 BNE __z0_exit
2200.__z0_forcetoscreen
2210 LDR r3,[r12,#16] ; get win top
2220 LDR r2,[r12,#96+16] ; get outline top
2230 SUB r4,r2,r3 ; r4=title bar height
2240 LDR r3,[r5,#16] ; get new win top
2250 BL keeponscreen
2260.__z0_exit
2270 ; "End filter"
2280 LDR r0,[r12,#124] ; get flag
2290 SUB r0,r0,#1 ; decrement flag
2300 STR r0,[r12,#124] ; store back
2310:
2320 LDMFD (sp)!,{r0-r5,pc}^ ; Return from call
2330:
2340.checktoggle
2350 STMFD (sp)!,{r0-r6,link} ; Stack registers
2360 ; "Toggle check"
2370 LDR r0,[r12,#32] ; get flags
2380 TST r0,#1<<27 ; toggle icon ?
2390 BEQ __z1_exit ; if not, exit
2400 TST r0,#1<<18 ; already full size ?
2410 BNE __z1_exit ; if so, exit
2420 ; "%c04Toggle icon?"
2430 SWI "OS_Mouse" ; get position
2440 TST r2,#%101 ; is select or adjust pressed ?
2450 BEQ __z1_exit ; if not, then just passing over - exit
2460 LDR r2,[r12,#12] ; get win right
2470 LDR r3,[r12,#96+12] ; get outline right
2480 CMP r2,r0 ; compare win right with mousex
2490 BGT __z1_exit ; if >, exit
2500 CMP r3,r0 ; compare outline right with mousex
2510 BLT __z1_exit ; if <, exit
2520 LDR r2,[r12,#16] ; get win top
2530 LDR r3,[r12,#96+16] ; get outline top
2540 CMP r2,r1 ; compare win top with mousey
2550 BGT __z1_exit ; if >, exit
2560 CMP r3,r1 ; compare outline top with mousey
2570 BLT __z1_exit ; if <, exit
2580 ; "Yes"
2590 SUB r4,r3,r2 ; r4=title bar height
2600 LDR r2,[r12,#56] ; get maxy
2610 LDR r3,[r12,#48] ; get miny
2620 SUB r2,r2,r3 ; r2=total height
2630 LDR r3,[r5,#8] ; get bottom of window
2640 ; "Bottom=%r3"
2650 ; "Total height=%r2"
2660 ADD r3,r3,r2 ; add height
2670 BL keeponscreen
2680.__z1_exit
2690 LDMFD (sp)!,{r0-r6,pc} ; Return from call
2700:
2710; > r3=win top
2720; r4=title bar height
2730.keeponscreen
2740 STMFD (sp)!,{r0-r6,link} ; Stack registers
2750 ; "Keep on screen, top=%r3, %r4"
2760 MVN r0,#NOT -1
2770 MOV r1,#12
2780 SWI "OS_ReadModeVariable"
2790 ; get YWindLimit
2800 MOV r6,r2 ; r6=YWindLimit
2810 MVN r0,#NOT -1
2820 MOV r1,#5
2830 SWI "OS_ReadModeVariable"
2840 ; get YEigFactor
2850 MOV r6,r6,LSL r2 ; shift YWindLimit by YEigFactor
2860 ADD r0,r3,r4 ; what will be location of titlebar?
2870 CMP r0,r6 ; > top of screen ?
2880 SUBGT r3,r6,r4 ; if so, top=scrtop-title height
2890 MOVGT r0,#1 ; get 1 pixel to add to top
2900 ADDGT r3,r3,r0,LSL r2 ; add pixel to make title at top
2910 STR r3,[r5,#16] ; store back in block
2920 ; "Top=%r3"
2930.__z2_exit
2940 LDMFD (sp)!,{r0-r6,pc} ; Return from call
2950:
2960; .Display
2970; STMFD (sp)!,{r0-r9,link} ; Stack registers
2980; LDMIA r5,{r0-r8} ; read block
2990; REM "Display ;"
3000; REM "%R"
3010; LDMFD (sp)!,{r0-r9,pc} ; Return from call
3020:
3030]
3040REM **** End of main code ****
3050REM Set final pointer to find the length of the code
3060PROCpatch_setpc(0)
3070NEXT pass%
3080PROCpatch_savefile
3110REM **** Post-assembly user code *****
3120REM #Run <CODE>
3130REM *Filer_Run Resources:$.Apps.!Draw
3140REM *Son
3150END
3160:
3170REM **** Filing procedures ****
3180:
3190DEF PROCpatch_loadfile
3200codelen=0
3210DIM MC% &1400
3220endofcode=codelen+&0:max=codelen
3230L%=endofcode:__cap%=FALSE
3330ENDPROC
3340:
3350DEF PROCpatch_savefile
3360outfile$="<NoCoverIconBar$Dir>.NoCoverIB"
3370OSCLI("Save "+outfile$+" "+STR$~MC%+" "+STR$~(max+MC%))
3380OSCLI("Settype "+outfile$+" Module")
3390patchdir$="<NoCoverIconBar$Dir>"
3430ENDPROC
3440:
3450REM **** Error Handler ****
3460:
3470DEFPROCError
3550ERROR EXT ERR,REPORT$+" at line "+STR$ERL
3560ENDPROC
3570:
3580REM **** Utility procedures ****
3590:
3600DEFPROCpatch_setpc(n)
3610IF P%-&0>max THENmax=P%-&0
3620P%=n:O%=MC%+n-&0
3630ENDPROC
3640:
3650DEFFNfindfreereg(a,b,c,d):LOCAL n:n=0
3660WHILE n=a OR n=b OR n=c OR n=d
3670 n+=1
3680ENDWHILE
3690=n
3700:
3710REM **** Long ADR macro procedure ****
3720:
3730REM DESC. : ADR equivalent for long address ranges, in 2 insts
3740REM ENTRY : cond$ = two char string, containing the ARM condition
3750REM reg% = 0..15
3760REM pointer% = long range pointer
3770REM COMM. : pass% = OPT variable in the assembler FOR..NEXT loop
3780REM Can only handle 64 KByte ranges
3790DEFFNLADR(cond$,reg%,pointer%)
3800LOCAL cc%,diff%,lo%,hi%,op1%,op2%
3810IF (pass% AND%10)=0 P%+=8:O%+=8:=0
3820IF ABS(pointer%-P%)>65535 THEN ERROR 1,"LADR can only handle 64 KByte ranges at &"+STR$~P%+" (&"+STR$~(pointer%-P%)+" distant)"
3830IFcond$=" " OR cond$="" THENcond$="AL"
3840cc%=INSTR("EQNECSCCMIPLVSVCHILSGELTGTLEALNV",cond$)
3850IF cc%=0 ERROR 1,"FATAL ERROR : Unknown condition for LADR at &"+STR$~P%+" (&"+STR$~O%+")" ELSE cc%=(cc%-1)DIV2
3860diff%=pointer%-P%-8
3870lo%=ABS(diff%)AND&FF
3880hi%=ABS(diff%)AND&FF00
3890IFdiff%>=0THEN
3900 op1%=(cc%<<28)+&028F0000+(reg%<<12)+lo%
3910 op2%=(cc%<<28)+&02800C00+(reg%<<16)+(reg%<<12)+(hi%>>8)
3920ELSE
3930 op1%=(cc%<<28)+&024F0000+(reg%<<12)+lo%
3940 op2%=(cc%<<28)+&02400C00+(reg%<<16)+(reg%<<12)+(hi%>>8)
3950ENDIF
3960[OPT pass%:EQUD op1%:EQUD op2%:]
3970=0
3980:
3990REM **** Long MOV macro instruction ****
4000:
4010DEFFNLMOV(cond$,reg,value)
4020IF cond$="" OR cond$=" " THENcond$="AL"
4030cond=(INSTR("EQNECSCCMIPLVSVCHILSGELTGTLEALNV",cond$)-1)/2
4040mov=(&3A<<20)+(reg<<12)+(cond<<28)
4050add=(&28<<20)+(reg<<12)+(reg<<16)+(cond<<28)
4060IF value<0 THENneg=TRUE:mov=mov OR (1<<22):add=add EOR (12<<20):value=-value-1 ELSEneg=FALSE
4070shift=0
4080REPEAT
4090 WHILE (value AND 3)=0 AND shift<16
4100 shift+=1:value=value DIV4
4110 ENDWHILE
4120 xshift=16-shift:IF xshift=16 THENxshift=0
4130 IF mov<>0 THEN
4140 [OPT pass%:EQUD mov+(xshift<<8)+(value AND 255):]
4150 mov=0
4160 ELSE
4170 [OPT pass%:EQUD add+(xshift<<8)+(value AND 255):]
4180 ENDIF
4190 value=value DIV256:shift+=4
4200UNTILvalue=0
4210=0
4220:
32639REM JFPatch
$� > Patch for memory compilation
7� Created by JFPatch � Justin Fletcher, 05 Sep 1995
0� Intermediate code file created 01 Oct 1995
(� � �Error:�
2�patch_loadfile
<:
F!� **** User pre-assembly ****
P
ibtop=128
Z@ � "Do you want Ctrl-Shift to cancel Shift action ? (y/n) ";
d- �:ș "OS_Confirm" � g:g$=�g:��"yn",g$)>0
n �g$
x cond_ctrl=�"yY",g$)>0
�:
�%� **** Main assembly routine ****
�sp=13:link=14:pc=15
�/vbit=1<<28:cbit=1<<29:zbit=1<<30:nbit=1<<31
�P%=&0:O%=MC%
�� pass%=4 � 6 �2
�"� **** Start of main code ****
��patch_setpc(0)
�[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
,:
6.module_title
@ EQUS "NoCoverIB"+�0
J ALIGN
T:
^.module_help
hF EQUS "NoCoverIB"+�9+"1.04 ("+��$,5,11)+") � Justin Fletcher"+�0
r ALIGN
|:
�.module_service
� LDR r12,[r12]
� MOVS pc,link
�:
�.module_init
�7 STMFD (sp)!,{r0-r4,link} ; Stack registers
� MOV r0,#6
� �LMOV("",3,&A0)
�? SWI "XOS_Module" ; Claim private workspace
�: ADDVS sp,sp,#4 ; if error return r0
�4 LDMVSFD (sp)!,{r1-r4,pc} ; return error
�= STR r2,[r12] ; store in private word
�1 MOV r12,r2 ; r12=space
7 MOV r0,#0 ; initialise to 0
4 ADD r3,r3,r2 ; end of block
._mod_ws_init
&5 STR r0,[r2],#4 ; store and inc
00 CMP r2,r3 ; at end ?
:6 BLT _mod_ws_init ; n = loop again
D; ***** WimpSWI claim code
N MOV r0,#18
X! �LADR("",1,`module_WSWIname)
b; SWI "XOS_Module" ; Look up module name
l" �LADR("VS",0,`module_WSWIerr)
v ADDVS sp,sp,#4
� LDMVSFD (sp)!,{r1-r4,pc}
�" LDR r0,`module_WSWIword
� MOV r2,r12
� MOV r1,#5+(%10<<30)
� �LADR("",3,openwin)
� MOV r4,#0
�$ SWI "Wimp_RegisterFilter"
�9 LDMFD (sp)!,{r0-r4,pc} ; restore registers
�:
�.`module_WSWIerr
� EQUD &0
�J EQUS "NoCoverIB requires the WimpSWIVe module to be present"+�0
�.`module_WSWIname
EQUS "WimpSWIVe"+�0
ALIGN
.`module_WSWIword
EQUS "WSWI"
*:
4.module_final
>7 STMFD (sp)!,{r0-r4,r12,link} ; Stack registers
H LDR r12,[r12]
R ; ***** WimpSWI release code
\" LDR r0,`module_WSWIword
f MOV r2,r12
p MOV r1,#5+(%00<<30)
z �LADR("",3,openwin)
� MOV r4,#0
�$ SWI "Wimp_RegisterFilter"
�9 LDMFD (sp),{r0-r4} ; restore registers
� MOV r0,#7
� MOV r2,r12
�9 SWI "XOS_Module" ; Release workspace
� ADDVS sp,sp,#4
�7 LDMVSFD (sp)!,{r1-r4,r12,pc} ; Return if error
�. LDMFD (sp)!,{r0-r4,r12,pc} ; Return
�:
�!; ***** Module commands table
�.module_commands
�- EQUS "NoCoverIB" ; Command name
EQUB 0:ALIGN
- EQUD 0 ; Code to call
& EQUD &0 ; Flags
$/ EQUD 0 ; Syntax pointer
.- EQUD help_nocoverib ; Help pointer
8
EQUB 0
B ALIGN
L:
V$; ***** Help and Syntax messages
`.help_nocoverib
jL EQUS "The NoCoverIB module forces the Wimp to obey the 'don't cover "
tK EQUS "iconbar' flag in CMOS RAM. If you wish to cover the iconbar, "
~B EQUS "then hold shift whilst performing any drags."+�13+�13
�N EQUS "Note: The toggle has had to be simulated, and therefore it does "
�N EQUS "not work totally correctly. I cannot (legally) code around this "
�P EQUS "as I do not know the how to read previous size. Sorry about that. "
�
EQUB 0
� ALIGN
�:
�. ; **** End of module header ****
�:
�; Replaces Wimp_OpenWindow
�.openwin
�> STMFD (sp)!,{r0-r5,link} ; Stack registers
�/ ; "%c04Open window, number = %&1"
7 LDR r3,[r12,#124] ; get flag
= ADD r3,r3,#1 ; increment flag
9 STR r3,[r12,#124] ; store back
B CMP r3,#1 ; is it 0 ? (process)
(? BNE __z0_exit ; if not, exit
2I MOV r5,r1 ; r5=pointer to window block
< MOV r0,#161
F MOV r1,#28
P SWI "OS_Byte"
Z ; get CMOS byte
d; TST r2,#&10 ; is bit set ?
n? BEQ __z0_exit ; if not, exit
x MOV r0,#121
� MOV r1,#0 � &80
� SWI "OS_Byte"
� ; get shift status
�> CMP r1,#&FF ; is it pressed ?
�]
�� cond_ctrl �
�[ OPT pass%
� BNE __z0_notshift
� MOV r0,#121
� MOV r1,#1 � &80
� SWI "OS_Byte"
� ; get ctrl status
�C CMP r1,#&FF ; is it also pressed ?
? BNE __z0_exit ; if not, exit
]
�
"[ OPT pass%
, BEQ __z0_exit
6]
@�
J[ OPT pass%
T.__z0_notshift
^ ; "Can process"
h:
r@ LDR r2,[r5,#28] ; get window behind
|? CMN r2,#3 ; is it iconised ?
�> BEQ __z0_exit ; if so, exit
�K MOV r1,r12 ; r1=pointer to WS, and set b0
�@ LDR r2,[r5] ; get window handle
�= STR r2,[r1] ; store in block
�4 �R r1,r1,#1 ; set b0
�B SWI "Wimp_GetWindowInfo" ; get data, bar icons
� ; "Got info"
�8 LDR r0,[r12,#32] ; get flags
�D STR r0,[r12,#120] ; store flags for later
�G TST r0,#1<<29 ; has it got adjust size ?
�Q TSTNE r0,#1<<28 ; if so, has it got vertical scroll?
�? BEQ __z0_exit ; if not, exit
�:
; TST r0,#1<<16 ; is it open ?
BNE __z0_notopen
K MOV r1,r5 ; no, re-get pointer to block,
&% ; "Call second routine"
0E SWI "Wimp_OpenWindow" ; � open it as specifed,
: ; "Exitted second"
D; BL Display
NC LDR r4,[r5,#32] ; � read old offset 32
XB SWI "Wimp_GetWindowState" ; � get new location,
bF STR r4,[r5,#32] ; � restore old offset 32
l; BL Display
vM �R r1,r12,#1 ; � set b0 to return just header,
�G SWI "Wimp_GetWindowInfo" ; � and get the info again
�.__z0_notopen
�O ADD r1,r12,#96 ; add#96 as offset for outline blk
�B STR r2,[r1] ; store window handle
�: SWI "Wimp_GetWindowOutline" ; get outline
�= LDR r0,[r12,#8] ; get VWA bottom
�C LDR r2,[r12,#96+8] ; get bottom of window
�D SUB r0,r0,r2 ; r0=size of scroll bar
�A ADD r4,r0,#ibtop ; add to iconbar top
�D LDR r0,[r5,#28] ; get position in stack
�> CMN r0,#2 ; is it at back ?
� BEQ __z0_exit
�9 LDR r0,[r5,#8] ; get bottom
6 LDR r1,[r5,#16] ; get top
E CMP r1,r4 ; is top below iconbar ?
C BLT __z0_exit ; if so, then skip
H CMP r0,r4 ; is bottom below iconbar ?
*K MOVLT r0,r4 ; if so, move it above iconbar
4F STR r0,[r5,#8] ; and store back in block
> BL checktoggle
HA LDR r0,[r12,#120] ; get original flags
RN TST r0,#1<<21 ; did it need forcing to screen ?
\C BNE __z0_forcetoscreen ; if so, make sure
fC TST r0,#1<<16 ; was it open before ?
pF BNE __z0_exit ; if not, then forget
z8 LDR r0,[r12,#32] ; get flags
�@ TST r0,#1<<6 ; is it no bounds ?
� BNE __z0_exit
�.__z0_forcetoscreen
�: LDR r3,[r12,#16] ; get win top
�> LDR r2,[r12,#96+16] ; get outline top
�B SUB r4,r2,r3 ; r4=title bar height
�> LDR r3,[r5,#16] ; get new win top
� BL keeponscreen
�.__z0_exit
� ; "End filter"
�7 LDR r0,[r12,#124] ; get flag
�= SUB r0,r0,#1 ; decrement flag
�9 STR r0,[r12,#124] ; store back
:
? LDMFD (sp)!,{r0-r5,pc}^ ; Return from call
:
$.checktoggle
.> STMFD (sp)!,{r0-r6,link} ; Stack registers
8 ; "Toggle check"
B8 LDR r0,[r12,#32] ; get flags
L< TST r0,#1<<27 ; toggle icon ?
V? BEQ __z1_exit ; if not, exit
`B TST r0,#1<<18 ; already full size ?
j> BNE __z1_exit ; if so, exit
t" ; "%c04Toggle icon?"
~; SWI "OS_Mouse" ; get position
�L TST r2,#%101 ; is select or adjust pressed ?
�X BEQ __z1_exit ; if not, then just passing over - exit
�< LDR r2,[r12,#12] ; get win right
�@ LDR r3,[r12,#96+12] ; get outline right
�L CMP r2,r0 ; compare win right with mousex
�= BGT __z1_exit ; if >, exit
�P CMP r3,r0 ; compare outline right with mousex
�= BLT __z1_exit ; if <, exit
�: LDR r2,[r12,#16] ; get win top
�> LDR r3,[r12,#96+16] ; get outline top
�J CMP r2,r1 ; compare win top with mousey
�= BGT __z1_exit ; if >, exit
N CMP r3,r1 ; compare outline top with mousey
= BLT __z1_exit ; if <, exit
; "Yes"
B SUB r4,r3,r2 ; r4=title bar height
(7 LDR r2,[r12,#56] ; get maxy
27 LDR r3,[r12,#48] ; get miny
<> SUB r2,r2,r3 ; r2=total height
FC LDR r3,[r5,#8] ; get bottom of window
P ; "Bottom=%r3"
Z" ; "Total height=%r2"
d9 ADD r3,r3,r2 ; add height
n BL keeponscreen
x.__z1_exit
�? LDMFD (sp)!,{r0-r6,pc} ; Return from call
�:
�; > r3=win top
�; r4=title bar height
�.keeponscreen
�> STMFD (sp)!,{r0-r6,link} ; Stack registers
�. ; "Keep on screen, top=%r3, %r4"
� MVN r0,#� -1
� MOV r1,#12
�$ SWI "OS_ReadModeVariable"
� ; get YWindLimit
�< MOV r6,r2 ; r6=YWindLimit
� MVN r0,#� -1
MOV r1,#5
$ SWI "OS_ReadModeVariable"
; get YEigFactor
"M MOV r6,r6,LSL r2 ; shift YWindLimit by YEigFactor
,Q ADD r0,r3,r4 ; what will be location of titlebar?
6@ CMP r0,r6 ; > top of screen ?
@M SUBGT r3,r6,r4 ; if so, top=scrtop-title height
JH MOVGT r0,#1 ; get 1 pixel to add to top
TM ADDGT r3,r3,r0,LSL r2 ; add pixel to make title at top
^B STR r3,[r5,#16] ; store back in block
h ; "Top=%r3"
r.__z2_exit
|? LDMFD (sp)!,{r0-r6,pc} ; Return from call
�:
�; .Display
�@; STMFD (sp)!,{r0-r9,link} ; Stack registers
�;; LDMIA r5,{r0-r8} ; read block
�; � "Display ;"
�; � "%R"
�A; LDMFD (sp)!,{r0-r9,pc} ; Return from call
�:
�]
� � **** 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 *****
0� #Run <CODE>
:'� *Filer_Run Resources:$.Apps.!Draw
D
� *Son
N�
X:
b!� **** Filing procedures ****
l:
v� �patch_loadfile
�
codelen=0
�� MC% &1400
�$endofcode=codelen+&0:max=codelen
�L%=endofcode:__cap%=�
�
:
� �patch_savefile
-outfile$="<NoCoverIconBar$Dir>.NoCoverIB"
*1�("Save "+outfile$+" "+�~MC%+" "+�~(max+MC%))
4$�("Settype "+outfile$+" Module")
>$patchdir$="<NoCoverIconBar$Dir>"
f�
p:
z� **** Error Handler ****
�:
���Error
�� � �,�$+" at line "+Þ
��
�:
�"� **** Utility procedures ****
:
��patch_setpc(n)
� P%-&0>max �max=P%-&0
$P%=n:O%=MC%+n-&0
.�
8:
B"ݤfindfreereg(a,b,c,d):� n:n=0
Lȕ n=a � n=b � n=c � n=d
V n+=1
`�
j=n
t:
~(� **** Long ADR macro procedure ****
�:
�@� DESC. : ADR equivalent for long address ranges, in 2 insts
�C� ENTRY : cond$ = two char string, containing the ARM condition
�� reg% = 0..15
�+� pointer% = long range pointer
�B� COMM. : pass% = OPT variable in the assembler FOR..NEXT loop
�-� Can only handle 64 KByte ranges
�ݤLADR(cond$,reg%,pointer%)
�!� cc%,diff%,lo%,hi%,op1%,op2%
�#� (pass% �%10)=0 P%+=8:O%+=8:=0
�s� �(pointer%-P%)>65535 � � 1,"LADR can only handle 64 KByte ranges at &"+�~P%+" (&"+�~(pointer%-P%)+" distant)"
�'�cond$=" " � cond$="" �cond$="AL"
2cc%=�"EQNECSCCMIPLVSVCHILSGELTGTLEALNV",cond$)
c� cc%=0 � 1,"FATAL ERROR : Unknown condition for LADR at &"+�~P%+" (&"+�~O%+")" � cc%=(cc%-1)�2
diff%=pointer%-P%-8
lo%=�(diff%)�&FF
(hi%=�(diff%)�&FF00
2�diff%>=0�
<, op1%=(cc%<<28)+&028F0000+(reg%<<12)+lo%
F< op2%=(cc%<<28)+&02800C00+(reg%<<16)+(reg%<<12)+(hi%>>8)
P�
Z, op1%=(cc%<<28)+&024F0000+(reg%<<12)+lo%
d< op2%=(cc%<<28)+&02400C00+(reg%<<16)+(reg%<<12)+(hi%>>8)
n�
x$[OPT pass%:EQUD op1%:EQUD op2%:]
�=0
�:
�*� **** Long MOV macro instruction ****
�:
�ݤLMOV(cond$,reg,value)
�'� cond$="" � cond$=" " �cond$="AL"
�9cond=(�"EQNECSCCMIPLVSVCHILSGELTGTLEALNV",cond$)-1)/2
�&mov=(&3A<<20)+(reg<<12)+(cond<<28)
�0add=(&28<<20)+(reg<<12)+(reg<<16)+(cond<<28)
�O� value<0 �neg=�:mov=mov � (1<<22):add=add � (12<<20):value=-value-1 �neg=�
�shift=0
��
� ȕ (value � 3)=0 � shift<16
shift+=1:value=value �4
�
* xshift=16-shift:� xshift=16 �xshift=0
" � mov<>0 �
,5 [OPT pass%:EQUD mov+(xshift<<8)+(value � 255):]
6 mov=0
@ �
J5 [OPT pass%:EQUD add+(xshift<<8)+(value � 255):]
T �
^ value=value �256:shift+=4
h�value=0
r=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 37 f4 20 43 72 65 61 74 65 |tion...7. Create|
00000030 64 20 62 79 20 4a 46 50 61 74 63 68 20 a9 20 4a |d by JFPatch . J|
00000040 75 73 74 69 6e 20 46 6c 65 74 63 68 65 72 2c 20 |ustin Fletcher, |
00000050 30 35 20 53 65 70 20 31 39 39 35 0d 00 1e 30 f4 |05 Sep 1995...0.|
00000060 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 63 6f | Intermediate co|
00000070 64 65 20 66 69 6c 65 20 63 72 65 61 74 65 64 20 |de file created |
00000080 30 31 20 4f 63 74 20 31 39 39 35 0d 00 28 10 ee |01 Oct 1995..(..|
00000090 20 85 20 f2 45 72 72 6f 72 3a e0 0d 00 32 13 f2 | . .Error:...2..|
000000a0 70 61 74 63 68 5f 6c 6f 61 64 66 69 6c 65 0d 00 |patch_loadfile..|
000000b0 3c 05 3a 0d 00 46 21 f4 20 2a 2a 2a 2a 20 55 73 |<.:..F!. **** Us|
000000c0 65 72 20 70 72 65 2d 61 73 73 65 6d 62 6c 79 20 |er pre-assembly |
000000d0 2a 2a 2a 2a 0d 00 50 0d 69 62 74 6f 70 3d 31 32 |****..P.ibtop=12|
000000e0 38 0d 00 5a 40 20 f1 20 22 44 6f 20 79 6f 75 20 |8..Z@ . "Do you |
000000f0 77 61 6e 74 20 43 74 72 6c 2d 53 68 69 66 74 20 |want Ctrl-Shift |
00000100 74 6f 20 63 61 6e 63 65 6c 20 53 68 69 66 74 20 |to cancel Shift |
00000110 61 63 74 69 6f 6e 20 3f 20 28 79 2f 6e 29 20 22 |action ? (y/n) "|
00000120 3b 0d 00 64 2d 20 f5 3a c8 99 20 22 4f 53 5f 43 |;..d- .:.. "OS_C|
00000130 6f 6e 66 69 72 6d 22 20 b8 20 67 3a 67 24 3d bd |onfirm" . g:g$=.|
00000140 67 3a fd a7 22 79 6e 22 2c 67 24 29 3e 30 0d 00 |g:.."yn",g$)>0..|
00000150 6e 08 20 f1 67 24 0d 00 78 1a 20 63 6f 6e 64 5f |n. .g$..x. cond_|
00000160 63 74 72 6c 3d a7 22 79 59 22 2c 67 24 29 3e 30 |ctrl=."yY",g$)>0|
00000170 0d 00 82 05 3a 0d 00 8c 25 f4 20 2a 2a 2a 2a 20 |....:...%. **** |
00000180 4d 61 69 6e 20 61 73 73 65 6d 62 6c 79 20 72 6f |Main assembly ro|
00000190 75 74 69 6e 65 20 2a 2a 2a 2a 0d 00 96 17 73 70 |utine ****....sp|
000001a0 3d 31 33 3a 6c 69 6e 6b 3d 31 34 3a 70 63 3d 31 |=13:link=14:pc=1|
000001b0 35 0d 00 a0 2f 76 62 69 74 3d 31 3c 3c 32 38 3a |5.../vbit=1<<28:|
000001c0 63 62 69 74 3d 31 3c 3c 32 39 3a 7a 62 69 74 3d |cbit=1<<29:zbit=|
000001d0 31 3c 3c 33 30 3a 6e 62 69 74 3d 31 3c 3c 33 31 |1<<30:nbit=1<<31|
000001e0 0d 00 aa 10 50 25 3d 26 30 3a 4f 25 3d 4d 43 25 |....P%=&0:O%=MC%|
000001f0 0d 00 b4 14 e3 20 70 61 73 73 25 3d 34 20 b8 20 |..... pass%=4 . |
00000200 36 20 88 32 0d 00 be 22 f4 20 2a 2a 2a 2a 20 53 |6 .2...". **** S|
00000210 74 61 72 74 20 6f 66 20 6d 61 69 6e 20 63 6f 64 |tart of main cod|
00000220 65 20 2a 2a 2a 2a 0d 00 c8 13 f2 70 61 74 63 68 |e ****.....patch|
00000230 5f 73 65 74 70 63 28 30 29 0d 00 d2 0e 5b 4f 50 |_setpc(0)....[OP|
00000240 54 20 70 61 73 73 25 0d 00 dc 2b 20 20 20 20 20 |T pass%...+ |
00000250 20 20 20 20 20 3b 20 2a 2a 2a 2a 20 41 64 64 20 | ; **** Add |
00000260 6d 6f 64 75 6c 65 20 68 65 61 64 65 72 20 2a 2a |module header **|
00000270 2a 2a 0d 00 e6 2d 20 20 20 45 51 55 44 20 30 20 |**...- EQUD 0 |
00000280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00000290 20 3b 20 53 74 61 72 74 20 6f 66 66 73 65 74 0d | ; Start offset.|
000002a0 00 f0 36 20 20 20 45 51 55 44 20 6d 6f 64 75 6c |..6 EQUD modul|
000002b0 65 5f 69 6e 69 74 20 20 20 20 20 20 20 20 3b 20 |e_init ; |
000002c0 49 6e 69 74 69 61 6c 69 73 61 74 69 6f 6e 20 6f |Initialisation o|
000002d0 66 66 73 65 74 0d 00 fa 34 20 20 20 45 51 55 44 |ffset...4 EQUD|
000002e0 20 6d 6f 64 75 6c 65 5f 66 69 6e 61 6c 20 20 20 | module_final |
000002f0 20 20 20 20 3b 20 46 69 6e 61 6c 69 73 61 74 69 | ; Finalisati|
00000300 6f 6e 20 6f 66 66 73 65 74 0d 01 04 37 20 20 20 |on offset...7 |
00000310 45 51 55 44 20 6d 6f 64 75 6c 65 5f 73 65 72 76 |EQUD module_serv|
00000320 69 63 65 20 20 20 20 20 3b 20 53 65 72 76 69 63 |ice ; Servic|
00000330 65 20 72 65 71 75 65 73 74 20 6f 66 66 73 65 74 |e request offset|
00000340 0d 01 0e 34 20 20 20 45 51 55 44 20 6d 6f 64 75 |...4 EQUD modu|
00000350 6c 65 5f 74 69 74 6c 65 20 20 20 20 20 20 20 3b |le_title ;|
00000360 20 54 69 74 6c 65 20 73 74 72 69 6e 67 20 6f 66 | Title string of|
00000370 66 73 65 74 0d 01 18 33 20 20 20 45 51 55 44 20 |fset...3 EQUD |
00000380 6d 6f 64 75 6c 65 5f 68 65 6c 70 20 20 20 20 20 |module_help |
00000390 20 20 20 3b 20 48 65 6c 70 20 73 74 72 69 6e 67 | ; Help string|
000003a0 20 6f 66 66 73 65 74 0d 01 22 46 20 20 20 45 51 | offset.."F EQ|
000003b0 55 44 20 6d 6f 64 75 6c 65 5f 63 6f 6d 6d 61 6e |UD module_comman|
000003c0 64 73 20 20 20 20 3b 20 48 65 6c 70 20 61 6e 64 |ds ; Help and|
000003d0 20 63 6f 6d 6d 61 6e 64 20 6b 65 79 77 6f 72 64 | command keyword|
000003e0 20 74 61 62 6c 65 20 6f 66 66 73 65 74 0d 01 2c | table offset..,|
000003f0 05 3a 0d 01 36 11 2e 6d 6f 64 75 6c 65 5f 74 69 |.:..6..module_ti|
00000400 74 6c 65 0d 01 40 1a 20 20 20 45 51 55 53 20 22 |tle..@. EQUS "|
00000410 4e 6f 43 6f 76 65 72 49 42 22 2b bd 30 0d 01 4a |NoCoverIB"+.0..J|
00000420 0c 20 20 20 41 4c 49 47 4e 0d 01 54 05 3a 0d 01 |. ALIGN..T.:..|
00000430 5e 10 2e 6d 6f 64 75 6c 65 5f 68 65 6c 70 0d 01 |^..module_help..|
00000440 68 46 20 20 20 45 51 55 53 20 22 4e 6f 43 6f 76 |hF EQUS "NoCov|
00000450 65 72 49 42 22 2b bd 39 2b 22 31 2e 30 34 20 28 |erIB"+.9+"1.04 (|
00000460 22 2b c1 91 24 2c 35 2c 31 31 29 2b 22 29 20 a9 |"+..$,5,11)+") .|
00000470 20 4a 75 73 74 69 6e 20 46 6c 65 74 63 68 65 72 | Justin Fletcher|
00000480 22 2b bd 30 0d 01 72 0c 20 20 20 41 4c 49 47 4e |"+.0..r. ALIGN|
00000490 0d 01 7c 05 3a 0d 01 86 13 2e 6d 6f 64 75 6c 65 |..|.:.....module|
000004a0 5f 73 65 72 76 69 63 65 0d 01 90 18 20 20 20 4c |_service.... L|
000004b0 44 52 20 20 20 20 20 72 31 32 2c 5b 72 31 32 5d |DR r12,[r12]|
000004c0 0d 01 9a 16 20 20 20 4d 4f 56 53 20 20 20 20 70 |.... MOVS p|
000004d0 63 2c 6c 69 6e 6b 0d 01 a4 05 3a 0d 01 ae 10 2e |c,link....:.....|
000004e0 6d 6f 64 75 6c 65 5f 69 6e 69 74 0d 01 b8 37 20 |module_init...7 |
000004f0 20 20 53 54 4d 46 44 20 20 20 28 73 70 29 21 2c | STMFD (sp)!,|
00000500 7b 72 30 2d 72 34 2c 6c 69 6e 6b 7d 20 20 20 20 |{r0-r4,link} |
00000510 20 3b 20 53 74 61 63 6b 20 72 65 67 69 73 74 65 | ; Stack registe|
00000520 72 73 0d 01 c2 14 20 20 20 4d 4f 56 20 20 20 20 |rs.... MOV |
00000530 20 72 30 2c 23 36 0d 01 cc 14 20 a4 4c 4d 4f 56 | r0,#6.... .LMOV|
00000540 28 22 22 2c 33 2c 26 41 30 29 0d 01 d6 3f 20 20 |("",3,&A0)...? |
00000550 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f 4d 6f | SWI "XOS_Mo|
00000560 64 75 6c 65 22 20 20 20 20 20 20 20 20 20 20 20 |dule" |
00000570 3b 20 43 6c 61 69 6d 20 70 72 69 76 61 74 65 20 |; Claim private |
00000580 77 6f 72 6b 73 70 61 63 65 0d 01 e0 3a 20 20 20 |workspace...: |
00000590 41 44 44 56 53 20 20 20 73 70 2c 73 70 2c 23 34 |ADDVS sp,sp,#4|
000005a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;|
000005b0 20 69 66 20 65 72 72 6f 72 20 72 65 74 75 72 6e | if error return|
000005c0 20 72 30 0d 01 ea 34 20 20 20 4c 44 4d 56 53 46 | r0...4 LDMVSF|
000005d0 44 20 28 73 70 29 21 2c 7b 72 31 2d 72 34 2c 70 |D (sp)!,{r1-r4,p|
000005e0 63 7d 20 20 20 20 20 20 20 3b 20 72 65 74 75 72 |c} ; retur|
000005f0 6e 20 65 72 72 6f 72 0d 01 f4 3d 20 20 20 53 54 |n error...= ST|
00000600 52 20 20 20 20 20 72 32 2c 5b 72 31 32 5d 20 20 |R r2,[r12] |
00000610 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 | ; s|
00000620 74 6f 72 65 20 69 6e 20 70 72 69 76 61 74 65 20 |tore in private |
00000630 77 6f 72 64 0d 01 fe 31 20 20 20 4d 4f 56 20 20 |word...1 MOV |
00000640 20 20 20 72 31 32 2c 72 32 20 20 20 20 20 20 20 | r12,r2 |
00000650 20 20 20 20 20 20 20 20 20 20 3b 20 72 31 32 3d | ; r12=|
00000660 73 70 61 63 65 0d 02 08 37 20 20 20 4d 4f 56 20 |space...7 MOV |
00000670 20 20 20 20 72 30 2c 23 30 20 20 20 20 20 20 20 | r0,#0 |
00000680 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 6e 69 | ; ini|
00000690 74 69 61 6c 69 73 65 20 74 6f 20 30 0d 02 12 34 |tialise to 0...4|
000006a0 20 20 20 41 44 44 20 20 20 20 20 72 33 2c 72 33 | ADD r3,r3|
000006b0 2c 72 32 20 20 20 20 20 20 20 20 20 20 20 20 20 |,r2 |
000006c0 20 20 3b 20 65 6e 64 20 6f 66 20 62 6c 6f 63 6b | ; end of block|
000006d0 0d 02 1c 11 2e 5f 6d 6f 64 5f 77 73 5f 69 6e 69 |....._mod_ws_ini|
000006e0 74 0d 02 26 35 20 20 20 53 54 52 20 20 20 20 20 |t..&5 STR |
000006f0 72 30 2c 5b 72 32 5d 2c 23 34 20 20 20 20 20 20 |r0,[r2],#4 |
00000700 20 20 20 20 20 20 20 3b 20 73 74 6f 72 65 20 61 | ; store a|
00000710 6e 64 20 69 6e 63 0d 02 30 30 20 20 20 43 4d 50 |nd inc..00 CMP|
00000720 20 20 20 20 20 72 32 2c 72 33 20 20 20 20 20 20 | r2,r3 |
00000730 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 61 74 | ; at|
00000740 20 65 6e 64 20 3f 0d 02 3a 36 20 20 20 42 4c 54 | end ?..:6 BLT|
00000750 20 20 20 20 20 5f 6d 6f 64 5f 77 73 5f 69 6e 69 | _mod_ws_ini|
00000760 74 20 20 20 20 20 20 20 20 20 20 20 3b 20 6e 20 |t ; n |
00000770 3d 20 6c 6f 6f 70 20 61 67 61 69 6e 0d 02 44 1e |= loop again..D.|
00000780 3b 20 2a 2a 2a 2a 2a 20 57 69 6d 70 53 57 49 20 |; ***** WimpSWI |
00000790 63 6c 61 69 6d 20 63 6f 64 65 0d 02 4e 15 20 20 |claim code..N. |
000007a0 20 4d 4f 56 20 20 20 20 20 72 30 2c 23 31 38 0d | MOV r0,#18.|
000007b0 02 58 21 20 a4 4c 41 44 52 28 22 22 2c 31 2c 60 |.X! .LADR("",1,`|
000007c0 6d 6f 64 75 6c 65 5f 57 53 57 49 6e 61 6d 65 29 |module_WSWIname)|
000007d0 0d 02 62 3b 20 20 20 53 57 49 20 20 20 20 20 22 |..b; SWI "|
000007e0 58 4f 53 5f 4d 6f 64 75 6c 65 22 20 20 20 20 20 |XOS_Module" |
000007f0 20 20 20 20 20 20 3b 20 4c 6f 6f 6b 20 75 70 20 | ; Look up |
00000800 6d 6f 64 75 6c 65 20 6e 61 6d 65 0d 02 6c 22 20 |module name..l" |
00000810 a4 4c 41 44 52 28 22 56 53 22 2c 30 2c 60 6d 6f |.LADR("VS",0,`mo|
00000820 64 75 6c 65 5f 57 53 57 49 65 72 72 29 0d 02 76 |dule_WSWIerr)..v|
00000830 17 20 20 20 41 44 44 56 53 20 20 20 73 70 2c 73 |. ADDVS sp,s|
00000840 70 2c 23 34 0d 02 80 1f 20 20 20 4c 44 4d 56 53 |p,#4.... LDMVS|
00000850 46 44 20 28 73 70 29 21 2c 7b 72 31 2d 72 34 2c |FD (sp)!,{r1-r4,|
00000860 70 63 7d 0d 02 8a 22 20 20 20 4c 44 52 20 20 20 |pc}..." LDR |
00000870 20 20 72 30 2c 60 6d 6f 64 75 6c 65 5f 57 53 57 | r0,`module_WSW|
00000880 49 77 6f 72 64 0d 02 94 15 20 20 20 4d 4f 56 20 |Iword.... MOV |
00000890 20 20 20 20 72 32 2c 72 31 32 0d 02 9e 1e 20 20 | r2,r12.... |
000008a0 20 4d 4f 56 20 20 20 20 20 72 31 2c 23 35 2b 28 | MOV r1,#5+(|
000008b0 25 31 30 3c 3c 33 30 29 0d 02 a8 18 20 a4 4c 41 |%10<<30).... .LA|
000008c0 44 52 28 22 22 2c 33 2c 6f 70 65 6e 77 69 6e 29 |DR("",3,openwin)|
000008d0 0d 02 b2 14 20 20 20 4d 4f 56 20 20 20 20 20 72 |.... MOV r|
000008e0 34 2c 23 30 0d 02 bc 24 20 20 20 53 57 49 20 20 |4,#0...$ SWI |
000008f0 20 20 20 22 57 69 6d 70 5f 52 65 67 69 73 74 65 | "Wimp_Registe|
00000900 72 46 69 6c 74 65 72 22 0d 02 c6 39 20 20 20 4c |rFilter"...9 L|
00000910 44 4d 46 44 20 20 20 28 73 70 29 21 2c 7b 72 30 |DMFD (sp)!,{r0|
00000920 2d 72 34 2c 70 63 7d 20 20 20 20 20 20 20 3b 20 |-r4,pc} ; |
00000930 72 65 73 74 6f 72 65 20 72 65 67 69 73 74 65 72 |restore register|
00000940 73 0d 02 d0 05 3a 0d 02 da 14 2e 60 6d 6f 64 75 |s....:.....`modu|
00000950 6c 65 5f 57 53 57 49 65 72 72 0d 02 e4 12 20 20 |le_WSWIerr.... |
00000960 20 45 51 55 44 20 20 20 20 20 26 30 0d 02 ee 4a | EQUD &0...J|
00000970 20 20 20 45 51 55 53 20 20 20 20 20 22 4e 6f 43 | EQUS "NoC|
00000980 6f 76 65 72 49 42 20 72 65 71 75 69 72 65 73 20 |overIB requires |
00000990 74 68 65 20 57 69 6d 70 53 57 49 56 65 20 6d 6f |the WimpSWIVe mo|
000009a0 64 75 6c 65 20 74 6f 20 62 65 20 70 72 65 73 65 |dule to be prese|
000009b0 6e 74 22 2b bd 30 0d 02 f8 15 2e 60 6d 6f 64 75 |nt"+.0.....`modu|
000009c0 6c 65 5f 57 53 57 49 6e 61 6d 65 0d 03 02 1e 20 |le_WSWIname.... |
000009d0 20 20 45 51 55 53 20 20 20 20 20 22 57 69 6d 70 | EQUS "Wimp|
000009e0 53 57 49 56 65 22 2b bd 30 0d 03 0c 0c 20 20 20 |SWIVe"+.0.... |
000009f0 41 4c 49 47 4e 0d 03 16 15 2e 60 6d 6f 64 75 6c |ALIGN.....`modul|
00000a00 65 5f 57 53 57 49 77 6f 72 64 0d 03 20 16 20 20 |e_WSWIword.. . |
00000a10 20 45 51 55 53 20 20 20 20 20 22 57 53 57 49 22 | EQUS "WSWI"|
00000a20 0d 03 2a 05 3a 0d 03 34 11 2e 6d 6f 64 75 6c 65 |..*.:..4..module|
00000a30 5f 66 69 6e 61 6c 0d 03 3e 37 20 20 20 53 54 4d |_final..>7 STM|
00000a40 46 44 20 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 |FD (sp)!,{r0-r|
00000a50 34 2c 72 31 32 2c 6c 69 6e 6b 7d 20 3b 20 53 74 |4,r12,link} ; St|
00000a60 61 63 6b 20 72 65 67 69 73 74 65 72 73 0d 03 48 |ack registers..H|
00000a70 18 20 20 20 4c 44 52 20 20 20 20 20 72 31 32 2c |. LDR r12,|
00000a80 5b 72 31 32 5d 0d 03 52 20 3b 20 2a 2a 2a 2a 2a |[r12]..R ; *****|
00000a90 20 57 69 6d 70 53 57 49 20 72 65 6c 65 61 73 65 | WimpSWI release|
00000aa0 20 63 6f 64 65 0d 03 5c 22 20 20 20 4c 44 52 20 | code..\" LDR |
00000ab0 20 20 20 20 72 30 2c 60 6d 6f 64 75 6c 65 5f 57 | r0,`module_W|
00000ac0 53 57 49 77 6f 72 64 0d 03 66 15 20 20 20 4d 4f |SWIword..f. MO|
00000ad0 56 20 20 20 20 20 72 32 2c 72 31 32 0d 03 70 1e |V r2,r12..p.|
00000ae0 20 20 20 4d 4f 56 20 20 20 20 20 72 31 2c 23 35 | MOV r1,#5|
00000af0 2b 28 25 30 30 3c 3c 33 30 29 0d 03 7a 18 20 a4 |+(%00<<30)..z. .|
00000b00 4c 41 44 52 28 22 22 2c 33 2c 6f 70 65 6e 77 69 |LADR("",3,openwi|
00000b10 6e 29 0d 03 84 14 20 20 20 4d 4f 56 20 20 20 20 |n).... MOV |
00000b20 20 72 34 2c 23 30 0d 03 8e 24 20 20 20 53 57 49 | r4,#0...$ SWI|
00000b30 20 20 20 20 20 22 57 69 6d 70 5f 52 65 67 69 73 | "Wimp_Regis|
00000b40 74 65 72 46 69 6c 74 65 72 22 0d 03 98 39 20 20 |terFilter"...9 |
00000b50 20 4c 44 4d 46 44 20 20 20 28 73 70 29 2c 7b 72 | LDMFD (sp),{r|
00000b60 30 2d 72 34 7d 20 20 20 20 20 20 20 20 20 20 20 |0-r4} |
00000b70 3b 20 72 65 73 74 6f 72 65 20 72 65 67 69 73 74 |; restore regist|
00000b80 65 72 73 0d 03 a2 14 20 20 20 4d 4f 56 20 20 20 |ers.... MOV |
00000b90 20 20 72 30 2c 23 37 0d 03 ac 15 20 20 20 4d 4f | r0,#7.... MO|
00000ba0 56 20 20 20 20 20 72 32 2c 72 31 32 0d 03 b6 39 |V r2,r12...9|
00000bb0 20 20 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f | SWI "XOS_|
00000bc0 4d 6f 64 75 6c 65 22 20 20 20 20 20 20 20 20 20 |Module" |
00000bd0 20 20 3b 20 52 65 6c 65 61 73 65 20 77 6f 72 6b | ; Release work|
00000be0 73 70 61 63 65 0d 03 c0 17 20 20 20 41 44 44 56 |space.... ADDV|
00000bf0 53 20 20 20 73 70 2c 73 70 2c 23 34 0d 03 ca 37 |S sp,sp,#4...7|
00000c00 20 20 20 4c 44 4d 56 53 46 44 20 28 73 70 29 21 | LDMVSFD (sp)!|
00000c10 2c 7b 72 31 2d 72 34 2c 72 31 32 2c 70 63 7d 20 |,{r1-r4,r12,pc} |
00000c20 20 20 3b 20 52 65 74 75 72 6e 20 69 66 20 65 72 | ; Return if er|
00000c30 72 6f 72 0d 03 d4 2e 20 20 20 4c 44 4d 46 44 20 |ror.... LDMFD |
00000c40 20 20 28 73 70 29 21 2c 7b 72 30 2d 72 34 2c 72 | (sp)!,{r0-r4,r|
00000c50 31 32 2c 70 63 7d 20 20 20 3b 20 52 65 74 75 72 |12,pc} ; Retur|
00000c60 6e 0d 03 de 05 3a 0d 03 e8 21 3b 20 2a 2a 2a 2a |n....:...!; ****|
00000c70 2a 20 4d 6f 64 75 6c 65 20 63 6f 6d 6d 61 6e 64 |* Module command|
00000c80 73 20 74 61 62 6c 65 0d 03 f2 14 2e 6d 6f 64 75 |s table.....modu|
00000c90 6c 65 5f 63 6f 6d 6d 61 6e 64 73 0d 03 fc 2d 20 |le_commands...- |
00000ca0 20 20 45 51 55 53 20 22 4e 6f 43 6f 76 65 72 49 | EQUS "NoCoverI|
00000cb0 42 22 20 20 20 20 20 20 20 20 3b 20 43 6f 6d 6d |B" ; Comm|
00000cc0 61 6e 64 20 6e 61 6d 65 0d 04 06 13 20 20 20 45 |and name.... E|
00000cd0 51 55 42 20 30 3a 41 4c 49 47 4e 0d 04 10 2d 20 |QUB 0:ALIGN...- |
00000ce0 20 20 45 51 55 44 20 30 20 20 20 20 20 20 20 20 | EQUD 0 |
00000cf0 20 20 20 20 20 20 20 20 20 20 3b 20 43 6f 64 65 | ; Code|
00000d00 20 74 6f 20 63 61 6c 6c 0d 04 1a 26 20 20 20 45 | to call...& E|
00000d10 51 55 44 20 26 30 20 20 20 20 20 20 20 20 20 20 |QUD &0 |
00000d20 20 20 20 20 20 20 20 3b 20 46 6c 61 67 73 0d 04 | ; Flags..|
00000d30 24 2f 20 20 20 45 51 55 44 20 30 20 20 20 20 20 |$/ EQUD 0 |
00000d40 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 | ; S|
00000d50 79 6e 74 61 78 20 70 6f 69 6e 74 65 72 0d 04 2e |yntax pointer...|
00000d60 2d 20 20 20 45 51 55 44 20 68 65 6c 70 5f 6e 6f |- EQUD help_no|
00000d70 63 6f 76 65 72 69 62 20 20 20 20 20 3b 20 48 65 |coverib ; He|
00000d80 6c 70 20 70 6f 69 6e 74 65 72 0d 04 38 0d 20 20 |lp pointer..8. |
00000d90 20 45 51 55 42 20 30 0d 04 42 0c 20 20 20 41 4c | EQUB 0..B. AL|
00000da0 49 47 4e 0d 04 4c 05 3a 0d 04 56 24 3b 20 2a 2a |IGN..L.:..V$; **|
00000db0 2a 2a 2a 20 48 65 6c 70 20 61 6e 64 20 53 79 6e |*** Help and Syn|
00000dc0 74 61 78 20 6d 65 73 73 61 67 65 73 0d 04 60 13 |tax messages..`.|
00000dd0 2e 68 65 6c 70 5f 6e 6f 63 6f 76 65 72 69 62 0d |.help_nocoverib.|
00000de0 04 6a 4c 20 20 20 45 51 55 53 20 22 54 68 65 20 |.jL EQUS "The |
00000df0 4e 6f 43 6f 76 65 72 49 42 20 6d 6f 64 75 6c 65 |NoCoverIB module|
00000e00 20 66 6f 72 63 65 73 20 74 68 65 20 57 69 6d 70 | forces the Wimp|
00000e10 20 74 6f 20 6f 62 65 79 20 74 68 65 20 27 64 6f | to obey the 'do|
00000e20 6e 27 74 20 63 6f 76 65 72 20 22 0d 04 74 4b 20 |n't cover "..tK |
00000e30 20 20 45 51 55 53 20 22 69 63 6f 6e 62 61 72 27 | EQUS "iconbar'|
00000e40 20 66 6c 61 67 20 69 6e 20 43 4d 4f 53 20 52 41 | flag in CMOS RA|
00000e50 4d 2e 20 49 66 20 79 6f 75 20 77 69 73 68 20 74 |M. If you wish t|
00000e60 6f 20 63 6f 76 65 72 20 74 68 65 20 69 63 6f 6e |o cover the icon|
00000e70 62 61 72 2c 20 22 0d 04 7e 42 20 20 20 45 51 55 |bar, "..~B EQU|
00000e80 53 20 22 74 68 65 6e 20 68 6f 6c 64 20 73 68 69 |S "then hold shi|
00000e90 66 74 20 77 68 69 6c 73 74 20 70 65 72 66 6f 72 |ft whilst perfor|
00000ea0 6d 69 6e 67 20 61 6e 79 20 64 72 61 67 73 2e 22 |ming any drags."|
00000eb0 2b bd 31 33 2b bd 31 33 0d 04 88 4e 20 20 20 45 |+.13+.13...N E|
00000ec0 51 55 53 20 22 4e 6f 74 65 3a 20 54 68 65 20 74 |QUS "Note: The t|
00000ed0 6f 67 67 6c 65 20 68 61 73 20 68 61 64 20 74 6f |oggle has had to|
00000ee0 20 62 65 20 73 69 6d 75 6c 61 74 65 64 2c 20 61 | be simulated, a|
00000ef0 6e 64 20 74 68 65 72 65 66 6f 72 65 20 69 74 20 |nd therefore it |
00000f00 64 6f 65 73 20 22 0d 04 92 4e 20 20 20 45 51 55 |does "...N EQU|
00000f10 53 20 22 6e 6f 74 20 77 6f 72 6b 20 74 6f 74 61 |S "not work tota|
00000f20 6c 6c 79 20 63 6f 72 72 65 63 74 6c 79 2e 20 49 |lly correctly. I|
00000f30 20 63 61 6e 6e 6f 74 20 28 6c 65 67 61 6c 6c 79 | cannot (legally|
00000f40 29 20 63 6f 64 65 20 61 72 6f 75 6e 64 20 74 68 |) code around th|
00000f50 69 73 20 22 0d 04 9c 50 20 20 20 45 51 55 53 20 |is "...P EQUS |
00000f60 22 61 73 20 49 20 64 6f 20 6e 6f 74 20 6b 6e 6f |"as I do not kno|
00000f70 77 20 74 68 65 20 68 6f 77 20 74 6f 20 72 65 61 |w the how to rea|
00000f80 64 20 70 72 65 76 69 6f 75 73 20 73 69 7a 65 2e |d previous size.|
00000f90 20 53 6f 72 72 79 20 61 62 6f 75 74 20 74 68 61 | Sorry about tha|
00000fa0 74 2e 20 22 0d 04 a6 0d 20 20 20 45 51 55 42 20 |t. ".... EQUB |
00000fb0 30 0d 04 b0 0c 20 20 20 41 4c 49 47 4e 0d 04 ba |0.... ALIGN...|
00000fc0 05 3a 0d 04 c4 2e 20 20 20 20 20 20 20 20 20 20 |.:.... |
00000fd0 3b 20 2a 2a 2a 2a 20 45 6e 64 20 6f 66 20 6d 6f |; **** End of mo|
00000fe0 64 75 6c 65 20 68 65 61 64 65 72 20 2a 2a 2a 2a |dule header ****|
00000ff0 0d 04 ce 05 3a 0d 04 d8 1e 3b 20 52 65 70 6c 61 |....:....; Repla|
00001000 63 65 73 20 57 69 6d 70 5f 4f 70 65 6e 57 69 6e |ces Wimp_OpenWin|
00001010 64 6f 77 0d 04 e2 0c 2e 6f 70 65 6e 77 69 6e 0d |dow.....openwin.|
00001020 04 ec 3e 20 20 20 53 54 4d 46 44 20 20 20 28 73 |..> STMFD (s|
00001030 70 29 21 2c 7b 72 30 2d 72 35 2c 6c 69 6e 6b 7d |p)!,{r0-r5,link}|
00001040 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 74 | ; St|
00001050 61 63 6b 20 72 65 67 69 73 74 65 72 73 0d 04 f6 |ack registers...|
00001060 2f 20 20 20 20 20 20 20 20 20 20 3b 20 22 25 63 |/ ; "%c|
00001070 30 34 4f 70 65 6e 20 77 69 6e 64 6f 77 2c 20 6e |04Open window, n|
00001080 75 6d 62 65 72 20 3d 20 25 26 31 22 0d 05 00 37 |umber = %&1"...7|
00001090 20 20 20 4c 44 52 20 20 20 20 20 72 33 2c 5b 72 | LDR r3,[r|
000010a0 31 32 2c 23 31 32 34 5d 20 20 20 20 20 20 20 20 |12,#124] |
000010b0 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 66 | ; get f|
000010c0 6c 61 67 0d 05 0a 3d 20 20 20 41 44 44 20 20 20 |lag...= ADD |
000010d0 20 20 72 33 2c 72 33 2c 23 31 20 20 20 20 20 20 | r3,r3,#1 |
000010e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000010f0 3b 20 69 6e 63 72 65 6d 65 6e 74 20 66 6c 61 67 |; increment flag|
00001100 0d 05 14 39 20 20 20 53 54 52 20 20 20 20 20 72 |...9 STR r|
00001110 33 2c 5b 72 31 32 2c 23 31 32 34 5d 20 20 20 20 |3,[r12,#124] |
00001120 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 | ; s|
00001130 74 6f 72 65 20 62 61 63 6b 0d 05 1e 42 20 20 20 |tore back...B |
00001140 43 4d 50 20 20 20 20 20 72 33 2c 23 31 20 20 20 |CMP r3,#1 |
00001150 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001160 20 20 20 20 20 20 3b 20 69 73 20 69 74 20 30 20 | ; is it 0 |
00001170 3f 20 28 70 72 6f 63 65 73 73 29 0d 05 28 3f 20 |? (process)..(? |
00001180 20 20 42 4e 45 20 20 20 20 20 5f 5f 7a 30 5f 65 | BNE __z0_e|
00001190 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |xit |
000011a0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 | ; if|
000011b0 20 6e 6f 74 2c 20 65 78 69 74 0d 05 32 49 20 20 | not, exit..2I |
000011c0 20 4d 4f 56 20 20 20 20 20 72 35 2c 72 31 20 20 | MOV r5,r1 |
000011d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000011e0 20 20 20 20 20 20 20 3b 20 72 35 3d 70 6f 69 6e | ; r5=poin|
000011f0 74 65 72 20 74 6f 20 77 69 6e 64 6f 77 20 62 6c |ter to window bl|
00001200 6f 63 6b 0d 05 3c 16 20 20 20 4d 4f 56 20 20 20 |ock..<. MOV |
00001210 20 20 72 30 2c 23 31 36 31 0d 05 46 15 20 20 20 | r0,#161..F. |
00001220 4d 4f 56 20 20 20 20 20 72 31 2c 23 32 38 0d 05 |MOV r1,#28..|
00001230 50 18 20 20 20 53 57 49 20 20 20 20 20 22 4f 53 |P. SWI "OS|
00001240 5f 42 79 74 65 22 0d 05 5a 1d 20 20 20 20 20 20 |_Byte"..Z. |
00001250 20 20 20 20 3b 20 67 65 74 20 43 4d 4f 53 20 62 | ; get CMOS b|
00001260 79 74 65 0d 05 64 3b 20 20 20 54 53 54 20 20 20 |yte..d; TST |
00001270 20 20 72 32 2c 23 26 31 30 20 20 20 20 20 20 20 | r2,#&10 |
00001280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001290 3b 20 69 73 20 62 69 74 20 73 65 74 20 3f 0d 05 |; is bit set ?..|
000012a0 6e 3f 20 20 20 42 45 51 20 20 20 20 20 5f 5f 7a |n? BEQ __z|
000012b0 30 5f 65 78 69 74 20 20 20 20 20 20 20 20 20 20 |0_exit |
000012c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;|
000012d0 20 69 66 20 6e 6f 74 2c 20 65 78 69 74 0d 05 78 | if not, exit..x|
000012e0 16 20 20 20 4d 4f 56 20 20 20 20 20 72 30 2c 23 |. MOV r0,#|
000012f0 31 32 31 0d 05 82 1a 20 20 20 4d 4f 56 20 20 20 |121.... MOV |
00001300 20 20 72 31 2c 23 30 20 82 20 26 38 30 0d 05 8c | r1,#0 . &80...|
00001310 18 20 20 20 53 57 49 20 20 20 20 20 22 4f 53 5f |. SWI "OS_|
00001320 42 79 74 65 22 0d 05 96 20 20 20 20 20 20 20 20 |Byte"... |
00001330 20 20 20 3b 20 67 65 74 20 73 68 69 66 74 20 73 | ; get shift s|
00001340 74 61 74 75 73 0d 05 a0 3e 20 20 20 43 4d 50 20 |tatus...> CMP |
00001350 20 20 20 20 72 31 2c 23 26 46 46 20 20 20 20 20 | r1,#&FF |
00001360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001370 20 20 3b 20 69 73 20 69 74 20 70 72 65 73 73 65 | ; is it presse|
00001380 64 20 3f 0d 05 aa 05 5d 0d 05 b4 11 e7 20 63 6f |d ?....]..... co|
00001390 6e 64 5f 63 74 72 6c 20 8c 0d 05 be 0f 5b 20 4f |nd_ctrl .....[ O|
000013a0 50 54 20 70 61 73 73 25 0d 05 c8 1c 20 20 20 42 |PT pass%.... B|
000013b0 4e 45 20 20 20 20 20 5f 5f 7a 30 5f 6e 6f 74 73 |NE __z0_nots|
000013c0 68 69 66 74 0d 05 d2 16 20 20 20 4d 4f 56 20 20 |hift.... MOV |
000013d0 20 20 20 72 30 2c 23 31 32 31 0d 05 dc 1a 20 20 | r0,#121.... |
000013e0 20 4d 4f 56 20 20 20 20 20 72 31 2c 23 31 20 82 | MOV r1,#1 .|
000013f0 20 26 38 30 0d 05 e6 18 20 20 20 53 57 49 20 20 | &80.... SWI |
00001400 20 20 20 22 4f 53 5f 42 79 74 65 22 0d 05 f0 1f | "OS_Byte"....|
00001410 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 | ; get |
00001420 63 74 72 6c 20 73 74 61 74 75 73 0d 05 fa 43 20 |ctrl status...C |
00001430 20 20 43 4d 50 20 20 20 20 20 72 31 2c 23 26 46 | CMP r1,#&F|
00001440 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |F |
00001450 20 20 20 20 20 20 20 20 3b 20 69 73 20 69 74 20 | ; is it |
00001460 61 6c 73 6f 20 70 72 65 73 73 65 64 20 3f 0d 06 |also pressed ?..|
00001470 04 3f 20 20 20 42 4e 45 20 20 20 20 20 5f 5f 7a |.? BNE __z|
00001480 30 5f 65 78 69 74 20 20 20 20 20 20 20 20 20 20 |0_exit |
00001490 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;|
000014a0 20 69 66 20 6e 6f 74 2c 20 65 78 69 74 0d 06 0e | if not, exit...|
000014b0 05 5d 0d 06 18 05 cc 0d 06 22 0f 5b 20 4f 50 54 |.].......".[ OPT|
000014c0 20 70 61 73 73 25 0d 06 2c 18 20 20 20 42 45 51 | pass%..,. BEQ|
000014d0 20 20 20 20 20 5f 5f 7a 30 5f 65 78 69 74 0d 06 | __z0_exit..|
000014e0 36 05 5d 0d 06 40 05 cd 0d 06 4a 0f 5b 20 4f 50 |6.]..@....J.[ OP|
000014f0 54 20 70 61 73 73 25 0d 06 54 12 2e 5f 5f 7a 30 |T pass%..T..__z0|
00001500 5f 6e 6f 74 73 68 69 66 74 0d 06 5e 1d 20 20 20 |_notshift..^. |
00001510 20 20 20 20 20 20 20 3b 20 22 43 61 6e 20 70 72 | ; "Can pr|
00001520 6f 63 65 73 73 22 0d 06 68 05 3a 0d 06 72 40 20 |ocess"..h.:..r@ |
00001530 20 20 4c 44 52 20 20 20 20 20 72 32 2c 5b 72 35 | LDR r2,[r5|
00001540 2c 23 32 38 5d 20 20 20 20 20 20 20 20 20 20 20 |,#28] |
00001550 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 77 69 | ; get wi|
00001560 6e 64 6f 77 20 62 65 68 69 6e 64 0d 06 7c 3f 20 |ndow behind..|? |
00001570 20 20 43 4d 4e 20 20 20 20 20 72 32 2c 23 33 20 | CMN r2,#3 |
00001580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001590 20 20 20 20 20 20 20 20 3b 20 69 73 20 69 74 20 | ; is it |
000015a0 69 63 6f 6e 69 73 65 64 20 3f 0d 06 86 3e 20 20 |iconised ?...> |
000015b0 20 42 45 51 20 20 20 20 20 5f 5f 7a 30 5f 65 78 | BEQ __z0_ex|
000015c0 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |it |
000015d0 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 | ; if |
000015e0 73 6f 2c 20 65 78 69 74 0d 06 90 4b 20 20 20 4d |so, exit...K M|
000015f0 4f 56 20 20 20 20 20 72 31 2c 72 31 32 20 20 20 |OV r1,r12 |
00001600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001610 20 20 20 20 20 3b 20 72 31 3d 70 6f 69 6e 74 65 | ; r1=pointe|
00001620 72 20 74 6f 20 57 53 2c 20 61 6e 64 20 73 65 74 |r to WS, and set|
00001630 20 62 30 0d 06 9a 40 20 20 20 4c 44 52 20 20 20 | b0...@ LDR |
00001640 20 20 72 32 2c 5b 72 35 5d 20 20 20 20 20 20 20 | r2,[r5] |
00001650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001660 3b 20 67 65 74 20 77 69 6e 64 6f 77 20 68 61 6e |; get window han|
00001670 64 6c 65 0d 06 a4 3d 20 20 20 53 54 52 20 20 20 |dle...= STR |
00001680 20 20 72 32 2c 5b 72 31 5d 20 20 20 20 20 20 20 | r2,[r1] |
00001690 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000016a0 3b 20 73 74 6f 72 65 20 69 6e 20 62 6c 6f 63 6b |; store in block|
000016b0 0d 06 ae 34 20 20 20 84 52 20 20 20 20 20 72 31 |...4 .R r1|
000016c0 2c 72 31 2c 23 31 20 20 20 20 20 20 20 20 20 20 |,r1,#1 |
000016d0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 73 65 | ; se|
000016e0 74 20 62 30 0d 06 b8 42 20 20 20 53 57 49 20 20 |t b0...B SWI |
000016f0 20 20 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 | "Wimp_GetWind|
00001700 6f 77 49 6e 66 6f 22 20 20 20 20 20 20 20 20 20 |owInfo" |
00001710 20 3b 20 67 65 74 20 64 61 74 61 2c 20 62 61 72 | ; get data, bar|
00001720 20 69 63 6f 6e 73 0d 06 c2 1a 20 20 20 20 20 20 | icons.... |
00001730 20 20 20 20 3b 20 22 47 6f 74 20 69 6e 66 6f 22 | ; "Got info"|
00001740 0d 06 cc 38 20 20 20 4c 44 52 20 20 20 20 20 72 |...8 LDR r|
00001750 30 2c 5b 72 31 32 2c 23 33 32 5d 20 20 20 20 20 |0,[r12,#32] |
00001760 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 | ; g|
00001770 65 74 20 66 6c 61 67 73 0d 06 d6 44 20 20 20 53 |et flags...D S|
00001780 54 52 20 20 20 20 20 72 30 2c 5b 72 31 32 2c 23 |TR r0,[r12,#|
00001790 31 32 30 5d 20 20 20 20 20 20 20 20 20 20 20 20 |120] |
000017a0 20 20 20 20 20 3b 20 73 74 6f 72 65 20 66 6c 61 | ; store fla|
000017b0 67 73 20 66 6f 72 20 6c 61 74 65 72 0d 06 e0 47 |gs for later...G|
000017c0 20 20 20 54 53 54 20 20 20 20 20 72 30 2c 23 31 | TST r0,#1|
000017d0 3c 3c 32 39 20 20 20 20 20 20 20 20 20 20 20 20 |<<29 |
000017e0 20 20 20 20 20 20 20 20 20 3b 20 68 61 73 20 69 | ; has i|
000017f0 74 20 67 6f 74 20 61 64 6a 75 73 74 20 73 69 7a |t got adjust siz|
00001800 65 20 3f 0d 06 ea 51 20 20 20 54 53 54 4e 45 20 |e ?...Q TSTNE |
00001810 20 20 72 30 2c 23 31 3c 3c 32 38 20 20 20 20 20 | r0,#1<<28 |
00001820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001830 3b 20 69 66 20 73 6f 2c 20 68 61 73 20 69 74 20 |; if so, has it |
00001840 67 6f 74 20 76 65 72 74 69 63 61 6c 20 73 63 72 |got vertical scr|
00001850 6f 6c 6c 3f 0d 06 f4 3f 20 20 20 42 45 51 20 20 |oll?...? BEQ |
00001860 20 20 20 5f 5f 7a 30 5f 65 78 69 74 20 20 20 20 | __z0_exit |
00001870 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001880 20 20 20 20 20 3b 20 69 66 20 6e 6f 74 2c 20 65 | ; if not, e|
00001890 78 69 74 0d 06 fe 05 3a 0d 07 08 3b 20 20 20 54 |xit....:...; T|
000018a0 53 54 20 20 20 20 20 72 30 2c 23 31 3c 3c 31 36 |ST r0,#1<<16|
000018b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000018c0 20 20 20 20 20 3b 20 69 73 20 69 74 20 6f 70 65 | ; is it ope|
000018d0 6e 20 3f 0d 07 12 1b 20 20 20 42 4e 45 20 20 20 |n ?.... BNE |
000018e0 20 20 5f 5f 7a 30 5f 6e 6f 74 6f 70 65 6e 0d 07 | __z0_notopen..|
000018f0 1c 4b 20 20 20 4d 4f 56 20 20 20 20 20 72 31 2c |.K MOV r1,|
00001900 72 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |r5 |
00001910 20 20 20 20 20 20 20 20 20 20 20 3b 20 6e 6f 2c | ; no,|
00001920 20 72 65 2d 67 65 74 20 70 6f 69 6e 74 65 72 20 | re-get pointer |
00001930 74 6f 20 62 6c 6f 63 6b 2c 0d 07 26 25 20 20 20 |to block,..&% |
00001940 20 20 20 20 20 20 20 3b 20 22 43 61 6c 6c 20 73 | ; "Call s|
00001950 65 63 6f 6e 64 20 72 6f 75 74 69 6e 65 22 0d 07 |econd routine"..|
00001960 30 45 20 20 20 53 57 49 20 20 20 20 20 22 57 69 |0E SWI "Wi|
00001970 6d 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 20 20 |mp_OpenWindow" |
00001980 20 20 20 20 20 20 20 20 20 20 20 3b 20 8c 20 6f | ; . o|
00001990 70 65 6e 20 69 74 20 61 73 20 73 70 65 63 69 66 |pen it as specif|
000019a0 65 64 2c 0d 07 3a 20 20 20 20 20 20 20 20 20 20 |ed,..: |
000019b0 20 3b 20 22 45 78 69 74 74 65 64 20 73 65 63 6f | ; "Exitted seco|
000019c0 6e 64 22 0d 07 44 18 3b 20 20 20 20 42 4c 20 20 |nd"..D.; BL |
000019d0 20 20 20 20 44 69 73 70 6c 61 79 0d 07 4e 43 20 | Display..NC |
000019e0 20 20 4c 44 52 20 20 20 20 20 72 34 2c 5b 72 35 | LDR r4,[r5|
000019f0 2c 23 33 32 5d 20 20 20 20 20 20 20 20 20 20 20 |,#32] |
00001a00 20 20 20 20 20 20 20 20 3b 20 8c 20 72 65 61 64 | ; . read|
00001a10 20 6f 6c 64 20 6f 66 66 73 65 74 20 33 32 0d 07 | old offset 32..|
00001a20 58 42 20 20 20 53 57 49 20 20 20 20 20 22 57 69 |XB SWI "Wi|
00001a30 6d 70 5f 47 65 74 57 69 6e 64 6f 77 53 74 61 74 |mp_GetWindowStat|
00001a40 65 22 20 20 20 20 20 20 20 20 20 3b 20 8c 20 67 |e" ; . g|
00001a50 65 74 20 6e 65 77 20 6c 6f 63 61 74 69 6f 6e 2c |et new location,|
00001a60 0d 07 62 46 20 20 20 53 54 52 20 20 20 20 20 72 |..bF STR r|
00001a70 34 2c 5b 72 35 2c 23 33 32 5d 20 20 20 20 20 20 |4,[r5,#32] |
00001a80 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 8c | ; .|
00001a90 20 72 65 73 74 6f 72 65 20 6f 6c 64 20 6f 66 66 | restore old off|
00001aa0 73 65 74 20 33 32 0d 07 6c 18 3b 20 20 20 20 42 |set 32..l.; B|
00001ab0 4c 20 20 20 20 20 20 44 69 73 70 6c 61 79 0d 07 |L Display..|
00001ac0 76 4d 20 20 20 84 52 20 20 20 20 20 72 31 2c 72 |vM .R r1,r|
00001ad0 31 32 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 |12,#1 |
00001ae0 20 20 20 20 20 20 20 20 20 20 3b 20 8c 20 73 65 | ; . se|
00001af0 74 20 62 30 20 74 6f 20 72 65 74 75 72 6e 20 6a |t b0 to return j|
00001b00 75 73 74 20 68 65 61 64 65 72 2c 0d 07 80 47 20 |ust header,...G |
00001b10 20 20 53 57 49 20 20 20 20 20 22 57 69 6d 70 5f | SWI "Wimp_|
00001b20 47 65 74 57 69 6e 64 6f 77 49 6e 66 6f 22 20 20 |GetWindowInfo" |
00001b30 20 20 20 20 20 20 20 20 3b 20 8c 20 61 6e 64 20 | ; . and |
00001b40 67 65 74 20 74 68 65 20 69 6e 66 6f 20 61 67 61 |get the info aga|
00001b50 69 6e 0d 07 8a 11 2e 5f 5f 7a 30 5f 6e 6f 74 6f |in.....__z0_noto|
00001b60 70 65 6e 0d 07 94 4f 20 20 20 41 44 44 20 20 20 |pen...O ADD |
00001b70 20 20 72 31 2c 72 31 32 2c 23 39 36 20 20 20 20 | r1,r12,#96 |
00001b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001b90 3b 20 61 64 64 23 39 36 20 61 73 20 6f 66 66 73 |; add#96 as offs|
00001ba0 65 74 20 66 6f 72 20 6f 75 74 6c 69 6e 65 20 62 |et for outline b|
00001bb0 6c 6b 0d 07 9e 42 20 20 20 53 54 52 20 20 20 20 |lk...B STR |
00001bc0 20 72 32 2c 5b 72 31 5d 20 20 20 20 20 20 20 20 | r2,[r1] |
00001bd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;|
00001be0 20 73 74 6f 72 65 20 77 69 6e 64 6f 77 20 68 61 | store window ha|
00001bf0 6e 64 6c 65 0d 07 a8 3a 20 20 20 53 57 49 20 20 |ndle...: SWI |
00001c00 20 20 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 | "Wimp_GetWind|
00001c10 6f 77 4f 75 74 6c 69 6e 65 22 20 20 20 20 20 20 |owOutline" |
00001c20 20 3b 20 67 65 74 20 6f 75 74 6c 69 6e 65 0d 07 | ; get outline..|
00001c30 b2 3d 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c |.= LDR r0,|
00001c40 5b 72 31 32 2c 23 38 5d 20 20 20 20 20 20 20 20 |[r12,#8] |
00001c50 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 | ; get|
00001c60 20 56 57 41 20 62 6f 74 74 6f 6d 0d 07 bc 43 20 | VWA bottom...C |
00001c70 20 20 4c 44 52 20 20 20 20 20 72 32 2c 5b 72 31 | LDR r2,[r1|
00001c80 32 2c 23 39 36 2b 38 5d 20 20 20 20 20 20 20 20 |2,#96+8] |
00001c90 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 62 6f | ; get bo|
00001ca0 74 74 6f 6d 20 6f 66 20 77 69 6e 64 6f 77 0d 07 |ttom of window..|
00001cb0 c6 44 20 20 20 53 55 42 20 20 20 20 20 72 30 2c |.D SUB r0,|
00001cc0 72 30 2c 72 32 20 20 20 20 20 20 20 20 20 20 20 |r0,r2 |
00001cd0 20 20 20 20 20 20 20 20 20 20 20 3b 20 72 30 3d | ; r0=|
00001ce0 73 69 7a 65 20 6f 66 20 73 63 72 6f 6c 6c 20 62 |size of scroll b|
00001cf0 61 72 0d 07 d0 41 20 20 20 41 44 44 20 20 20 20 |ar...A ADD |
00001d00 20 72 34 2c 72 30 2c 23 69 62 74 6f 70 20 20 20 | r4,r0,#ibtop |
00001d10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;|
00001d20 20 61 64 64 20 74 6f 20 69 63 6f 6e 62 61 72 20 | add to iconbar |
00001d30 74 6f 70 0d 07 da 44 20 20 20 4c 44 52 20 20 20 |top...D LDR |
00001d40 20 20 72 30 2c 5b 72 35 2c 23 32 38 5d 20 20 20 | r0,[r5,#28] |
00001d50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001d60 3b 20 67 65 74 20 70 6f 73 69 74 69 6f 6e 20 69 |; get position i|
00001d70 6e 20 73 74 61 63 6b 0d 07 e4 3e 20 20 20 43 4d |n stack...> CM|
00001d80 4e 20 20 20 20 20 72 30 2c 23 32 20 20 20 20 20 |N r0,#2 |
00001d90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001da0 20 20 20 20 3b 20 69 73 20 69 74 20 61 74 20 62 | ; is it at b|
00001db0 61 63 6b 20 3f 0d 07 ee 18 20 20 20 42 45 51 20 |ack ?.... BEQ |
00001dc0 20 20 20 20 5f 5f 7a 30 5f 65 78 69 74 0d 07 f8 | __z0_exit...|
00001dd0 39 20 20 20 4c 44 52 20 20 20 20 20 72 30 2c 5b |9 LDR r0,[|
00001de0 72 35 2c 23 38 5d 20 20 20 20 20 20 20 20 20 20 |r5,#8] |
00001df0 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 | ; get |
00001e00 62 6f 74 74 6f 6d 0d 08 02 36 20 20 20 4c 44 52 |bottom...6 LDR|
00001e10 20 20 20 20 20 72 31 2c 5b 72 35 2c 23 31 36 5d | r1,[r5,#16]|
00001e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001e30 20 20 20 3b 20 67 65 74 20 74 6f 70 0d 08 0c 45 | ; get top...E|
00001e40 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c 72 34 | CMP r1,r4|
00001e50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001e60 20 20 20 20 20 20 20 20 20 3b 20 69 73 20 74 6f | ; is to|
00001e70 70 20 62 65 6c 6f 77 20 69 63 6f 6e 62 61 72 20 |p below iconbar |
00001e80 3f 0d 08 16 43 20 20 20 42 4c 54 20 20 20 20 20 |?...C BLT |
00001e90 5f 5f 7a 30 5f 65 78 69 74 20 20 20 20 20 20 20 |__z0_exit |
00001ea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001eb0 20 20 3b 20 69 66 20 73 6f 2c 20 74 68 65 6e 20 | ; if so, then |
00001ec0 73 6b 69 70 0d 08 20 48 20 20 20 43 4d 50 20 20 |skip.. H CMP |
00001ed0 20 20 20 72 30 2c 72 34 20 20 20 20 20 20 20 20 | r0,r4 |
00001ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001ef0 20 3b 20 69 73 20 62 6f 74 74 6f 6d 20 62 65 6c | ; is bottom bel|
00001f00 6f 77 20 69 63 6f 6e 62 61 72 20 3f 0d 08 2a 4b |ow iconbar ?..*K|
00001f10 20 20 20 4d 4f 56 4c 54 20 20 20 72 30 2c 72 34 | MOVLT r0,r4|
00001f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001f30 20 20 20 20 20 20 20 20 20 3b 20 69 66 20 73 6f | ; if so|
00001f40 2c 20 6d 6f 76 65 20 69 74 20 61 62 6f 76 65 20 |, move it above |
00001f50 69 63 6f 6e 62 61 72 0d 08 34 46 20 20 20 53 54 |iconbar..4F ST|
00001f60 52 20 20 20 20 20 72 30 2c 5b 72 35 2c 23 38 5d |R r0,[r5,#8]|
00001f70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00001f80 20 20 20 20 3b 20 61 6e 64 20 73 74 6f 72 65 20 | ; and store |
00001f90 62 61 63 6b 20 69 6e 20 62 6c 6f 63 6b 0d 08 3e |back in block..>|
00001fa0 1a 20 20 20 42 4c 20 20 20 20 20 20 63 68 65 63 |. BL chec|
00001fb0 6b 74 6f 67 67 6c 65 0d 08 48 41 20 20 20 4c 44 |ktoggle..HA LD|
00001fc0 52 20 20 20 20 20 72 30 2c 5b 72 31 32 2c 23 31 |R r0,[r12,#1|
00001fd0 32 30 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 |20] |
00001fe0 20 20 20 20 3b 20 67 65 74 20 6f 72 69 67 69 6e | ; get origin|
00001ff0 61 6c 20 66 6c 61 67 73 0d 08 52 4e 20 20 20 54 |al flags..RN T|
00002000 53 54 20 20 20 20 20 72 30 2c 23 31 3c 3c 32 31 |ST r0,#1<<21|
00002010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002020 20 20 20 20 20 3b 20 64 69 64 20 69 74 20 6e 65 | ; did it ne|
00002030 65 64 20 66 6f 72 63 69 6e 67 20 74 6f 20 73 63 |ed forcing to sc|
00002040 72 65 65 6e 20 3f 0d 08 5c 43 20 20 20 42 4e 45 |reen ?..\C BNE|
00002050 20 20 20 20 20 5f 5f 7a 30 5f 66 6f 72 63 65 74 | __z0_forcet|
00002060 6f 73 63 72 65 65 6e 20 20 20 20 20 20 20 20 20 |oscreen |
00002070 20 20 20 20 20 20 20 3b 20 69 66 20 73 6f 2c 20 | ; if so, |
00002080 6d 61 6b 65 20 73 75 72 65 0d 08 66 43 20 20 20 |make sure..fC |
00002090 54 53 54 20 20 20 20 20 72 30 2c 23 31 3c 3c 31 |TST r0,#1<<1|
000020a0 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |6 |
000020b0 20 20 20 20 20 20 3b 20 77 61 73 20 69 74 20 6f | ; was it o|
000020c0 70 65 6e 20 62 65 66 6f 72 65 20 3f 0d 08 70 46 |pen before ?..pF|
000020d0 20 20 20 42 4e 45 20 20 20 20 20 5f 5f 7a 30 5f | BNE __z0_|
000020e0 65 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 |exit |
000020f0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i|
00002100 66 20 6e 6f 74 2c 20 74 68 65 6e 20 66 6f 72 67 |f not, then forg|
00002110 65 74 0d 08 7a 38 20 20 20 4c 44 52 20 20 20 20 |et..z8 LDR |
00002120 20 72 30 2c 5b 72 31 32 2c 23 33 32 5d 20 20 20 | r0,[r12,#32] |
00002130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;|
00002140 20 67 65 74 20 66 6c 61 67 73 0d 08 84 40 20 20 | get flags...@ |
00002150 20 54 53 54 20 20 20 20 20 72 30 2c 23 31 3c 3c | TST r0,#1<<|
00002160 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |6 |
00002170 20 20 20 20 20 20 20 3b 20 69 73 20 69 74 20 6e | ; is it n|
00002180 6f 20 62 6f 75 6e 64 73 20 3f 0d 08 8e 18 20 20 |o bounds ?.... |
00002190 20 42 4e 45 20 20 20 20 20 5f 5f 7a 30 5f 65 78 | BNE __z0_ex|
000021a0 69 74 0d 08 98 17 2e 5f 5f 7a 30 5f 66 6f 72 63 |it.....__z0_forc|
000021b0 65 74 6f 73 63 72 65 65 6e 0d 08 a2 3a 20 20 20 |etoscreen...: |
000021c0 4c 44 52 20 20 20 20 20 72 33 2c 5b 72 31 32 2c |LDR r3,[r12,|
000021d0 23 31 36 5d 20 20 20 20 20 20 20 20 20 20 20 20 |#16] |
000021e0 20 20 20 20 20 20 3b 20 67 65 74 20 77 69 6e 20 | ; get win |
000021f0 74 6f 70 0d 08 ac 3e 20 20 20 4c 44 52 20 20 20 |top...> LDR |
00002200 20 20 72 32 2c 5b 72 31 32 2c 23 39 36 2b 31 36 | r2,[r12,#96+16|
00002210 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] |
00002220 3b 20 67 65 74 20 6f 75 74 6c 69 6e 65 20 74 6f |; get outline to|
00002230 70 0d 08 b6 42 20 20 20 53 55 42 20 20 20 20 20 |p...B SUB |
00002240 72 34 2c 72 32 2c 72 33 20 20 20 20 20 20 20 20 |r4,r2,r3 |
00002250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; |
00002260 72 34 3d 74 69 74 6c 65 20 62 61 72 20 68 65 69 |r4=title bar hei|
00002270 67 68 74 0d 08 c0 3e 20 20 20 4c 44 52 20 20 20 |ght...> LDR |
00002280 20 20 72 33 2c 5b 72 35 2c 23 31 36 5d 20 20 20 | r3,[r5,#16] |
00002290 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000022a0 3b 20 67 65 74 20 6e 65 77 20 77 69 6e 20 74 6f |; get new win to|
000022b0 70 0d 08 ca 1b 20 20 20 42 4c 20 20 20 20 20 20 |p.... BL |
000022c0 6b 65 65 70 6f 6e 73 63 72 65 65 6e 0d 08 d4 0e |keeponscreen....|
000022d0 2e 5f 5f 7a 30 5f 65 78 69 74 0d 08 de 1c 20 20 |.__z0_exit.... |
000022e0 20 20 20 20 20 20 20 20 3b 20 22 45 6e 64 20 66 | ; "End f|
000022f0 69 6c 74 65 72 22 0d 08 e8 37 20 20 20 4c 44 52 |ilter"...7 LDR|
00002300 20 20 20 20 20 72 30 2c 5b 72 31 32 2c 23 31 32 | r0,[r12,#12|
00002310 34 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |4] |
00002320 20 20 20 3b 20 67 65 74 20 66 6c 61 67 0d 08 f2 | ; get flag...|
00002330 3d 20 20 20 53 55 42 20 20 20 20 20 72 30 2c 72 |= SUB r0,r|
00002340 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |0,#1 |
00002350 20 20 20 20 20 20 20 20 20 20 3b 20 64 65 63 72 | ; decr|
00002360 65 6d 65 6e 74 20 66 6c 61 67 0d 08 fc 39 20 20 |ement flag...9 |
00002370 20 53 54 52 20 20 20 20 20 72 30 2c 5b 72 31 32 | STR r0,[r12|
00002380 2c 23 31 32 34 5d 20 20 20 20 20 20 20 20 20 20 |,#124] |
00002390 20 20 20 20 20 20 20 3b 20 73 74 6f 72 65 20 62 | ; store b|
000023a0 61 63 6b 0d 09 06 05 3a 0d 09 10 3f 20 20 20 4c |ack....:...? L|
000023b0 44 4d 46 44 20 20 20 28 73 70 29 21 2c 7b 72 30 |DMFD (sp)!,{r0|
000023c0 2d 72 35 2c 70 63 7d 5e 20 20 20 20 20 20 20 20 |-r5,pc}^ |
000023d0 20 20 20 20 20 3b 20 52 65 74 75 72 6e 20 66 72 | ; Return fr|
000023e0 6f 6d 20 63 61 6c 6c 0d 09 1a 05 3a 0d 09 24 10 |om call....:..$.|
000023f0 2e 63 68 65 63 6b 74 6f 67 67 6c 65 0d 09 2e 3e |.checktoggle...>|
00002400 20 20 20 53 54 4d 46 44 20 20 20 28 73 70 29 21 | STMFD (sp)!|
00002410 2c 7b 72 30 2d 72 36 2c 6c 69 6e 6b 7d 20 20 20 |,{r0-r6,link} |
00002420 20 20 20 20 20 20 20 20 20 3b 20 53 74 61 63 6b | ; Stack|
00002430 20 72 65 67 69 73 74 65 72 73 0d 09 38 1e 20 20 | registers..8. |
00002440 20 20 20 20 20 20 20 20 3b 20 22 54 6f 67 67 6c | ; "Toggl|
00002450 65 20 63 68 65 63 6b 22 0d 09 42 38 20 20 20 4c |e check"..B8 L|
00002460 44 52 20 20 20 20 20 72 30 2c 5b 72 31 32 2c 23 |DR r0,[r12,#|
00002470 33 32 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 |32] |
00002480 20 20 20 20 20 3b 20 67 65 74 20 66 6c 61 67 73 | ; get flags|
00002490 0d 09 4c 3c 20 20 20 54 53 54 20 20 20 20 20 72 |..L< TST r|
000024a0 30 2c 23 31 3c 3c 32 37 20 20 20 20 20 20 20 20 |0,#1<<27 |
000024b0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 74 | ; t|
000024c0 6f 67 67 6c 65 20 69 63 6f 6e 20 3f 0d 09 56 3f |oggle icon ?..V?|
000024d0 20 20 20 42 45 51 20 20 20 20 20 5f 5f 7a 31 5f | BEQ __z1_|
000024e0 65 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 |exit |
000024f0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 | ; i|
00002500 66 20 6e 6f 74 2c 20 65 78 69 74 0d 09 60 42 20 |f not, exit..`B |
00002510 20 20 54 53 54 20 20 20 20 20 72 30 2c 23 31 3c | TST r0,#1<|
00002520 3c 31 38 20 20 20 20 20 20 20 20 20 20 20 20 20 |<18 |
00002530 20 20 20 20 20 20 20 20 3b 20 61 6c 72 65 61 64 | ; alread|
00002540 79 20 66 75 6c 6c 20 73 69 7a 65 20 3f 0d 09 6a |y full size ?..j|
00002550 3e 20 20 20 42 4e 45 20 20 20 20 20 5f 5f 7a 31 |> BNE __z1|
00002560 5f 65 78 69 74 20 20 20 20 20 20 20 20 20 20 20 |_exit |
00002570 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; |
00002580 69 66 20 73 6f 2c 20 65 78 69 74 0d 09 74 22 20 |if so, exit..t" |
00002590 20 20 20 20 20 20 20 20 20 3b 20 22 25 63 30 34 | ; "%c04|
000025a0 54 6f 67 67 6c 65 20 69 63 6f 6e 3f 22 0d 09 7e |Toggle icon?"..~|
000025b0 3b 20 20 20 53 57 49 20 20 20 20 20 22 4f 53 5f |; SWI "OS_|
000025c0 4d 6f 75 73 65 22 20 20 20 20 20 20 20 20 20 20 |Mouse" |
000025d0 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 | ; get |
000025e0 70 6f 73 69 74 69 6f 6e 0d 09 88 4c 20 20 20 54 |position...L T|
000025f0 53 54 20 20 20 20 20 72 32 2c 23 25 31 30 31 20 |ST r2,#%101 |
00002600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002610 20 20 20 20 20 3b 20 69 73 20 73 65 6c 65 63 74 | ; is select|
00002620 20 6f 72 20 61 64 6a 75 73 74 20 70 72 65 73 73 | or adjust press|
00002630 65 64 20 3f 0d 09 92 58 20 20 20 42 45 51 20 20 |ed ?...X BEQ |
00002640 20 20 20 5f 5f 7a 31 5f 65 78 69 74 20 20 20 20 | __z1_exit |
00002650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002660 20 20 20 20 20 3b 20 69 66 20 6e 6f 74 2c 20 74 | ; if not, t|
00002670 68 65 6e 20 6a 75 73 74 20 70 61 73 73 69 6e 67 |hen just passing|
00002680 20 6f 76 65 72 20 2d 20 65 78 69 74 0d 09 9c 3c | over - exit...<|
00002690 20 20 20 4c 44 52 20 20 20 20 20 72 32 2c 5b 72 | LDR r2,[r|
000026a0 31 32 2c 23 31 32 5d 20 20 20 20 20 20 20 20 20 |12,#12] |
000026b0 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 77 | ; get w|
000026c0 69 6e 20 72 69 67 68 74 0d 09 a6 40 20 20 20 4c |in right...@ L|
000026d0 44 52 20 20 20 20 20 72 33 2c 5b 72 31 32 2c 23 |DR r3,[r12,#|
000026e0 39 36 2b 31 32 5d 20 20 20 20 20 20 20 20 20 20 |96+12] |
000026f0 20 20 20 20 20 3b 20 67 65 74 20 6f 75 74 6c 69 | ; get outli|
00002700 6e 65 20 72 69 67 68 74 0d 09 b0 4c 20 20 20 43 |ne right...L C|
00002710 4d 50 20 20 20 20 20 72 32 2c 72 30 20 20 20 20 |MP r2,r0 |
00002720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002730 20 20 20 20 20 3b 20 63 6f 6d 70 61 72 65 20 77 | ; compare w|
00002740 69 6e 20 72 69 67 68 74 20 77 69 74 68 20 6d 6f |in right with mo|
00002750 75 73 65 78 0d 09 ba 3d 20 20 20 42 47 54 20 20 |usex...= BGT |
00002760 20 20 20 5f 5f 7a 31 5f 65 78 69 74 20 20 20 20 | __z1_exit |
00002770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002780 20 20 20 20 20 3b 20 69 66 20 3e 2c 20 65 78 69 | ; if >, exi|
00002790 74 0d 09 c4 50 20 20 20 43 4d 50 20 20 20 20 20 |t...P CMP |
000027a0 72 33 2c 72 30 20 20 20 20 20 20 20 20 20 20 20 |r3,r0 |
000027b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; |
000027c0 63 6f 6d 70 61 72 65 20 6f 75 74 6c 69 6e 65 20 |compare outline |
000027d0 72 69 67 68 74 20 77 69 74 68 20 6d 6f 75 73 65 |right with mouse|
000027e0 78 0d 09 ce 3d 20 20 20 42 4c 54 20 20 20 20 20 |x...= BLT |
000027f0 5f 5f 7a 31 5f 65 78 69 74 20 20 20 20 20 20 20 |__z1_exit |
00002800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002810 20 20 3b 20 69 66 20 3c 2c 20 65 78 69 74 0d 09 | ; if <, exit..|
00002820 d8 3a 20 20 20 4c 44 52 20 20 20 20 20 72 32 2c |.: LDR r2,|
00002830 5b 72 31 32 2c 23 31 36 5d 20 20 20 20 20 20 20 |[r12,#16] |
00002840 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 | ; get|
00002850 20 77 69 6e 20 74 6f 70 0d 09 e2 3e 20 20 20 4c | win top...> L|
00002860 44 52 20 20 20 20 20 72 33 2c 5b 72 31 32 2c 23 |DR r3,[r12,#|
00002870 39 36 2b 31 36 5d 20 20 20 20 20 20 20 20 20 20 |96+16] |
00002880 20 20 20 20 20 3b 20 67 65 74 20 6f 75 74 6c 69 | ; get outli|
00002890 6e 65 20 74 6f 70 0d 09 ec 4a 20 20 20 43 4d 50 |ne top...J CMP|
000028a0 20 20 20 20 20 72 32 2c 72 31 20 20 20 20 20 20 | r2,r1 |
000028b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
000028c0 20 20 20 3b 20 63 6f 6d 70 61 72 65 20 77 69 6e | ; compare win|
000028d0 20 74 6f 70 20 77 69 74 68 20 6d 6f 75 73 65 79 | top with mousey|
000028e0 0d 09 f6 3d 20 20 20 42 47 54 20 20 20 20 20 5f |...= BGT _|
000028f0 5f 7a 31 5f 65 78 69 74 20 20 20 20 20 20 20 20 |_z1_exit |
00002900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002910 20 3b 20 69 66 20 3e 2c 20 65 78 69 74 0d 0a 00 | ; if >, exit...|
00002920 4e 20 20 20 43 4d 50 20 20 20 20 20 72 33 2c 72 |N CMP r3,r|
00002930 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |1 |
00002940 20 20 20 20 20 20 20 20 20 20 3b 20 63 6f 6d 70 | ; comp|
00002950 61 72 65 20 6f 75 74 6c 69 6e 65 20 74 6f 70 20 |are outline top |
00002960 77 69 74 68 20 6d 6f 75 73 65 79 0d 0a 0a 3d 20 |with mousey...= |
00002970 20 20 42 4c 54 20 20 20 20 20 5f 5f 7a 31 5f 65 | BLT __z1_e|
00002980 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |xit |
00002990 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 | ; if|
000029a0 20 3c 2c 20 65 78 69 74 0d 0a 14 15 20 20 20 20 | <, exit.... |
000029b0 20 20 20 20 20 20 3b 20 22 59 65 73 22 0d 0a 1e | ; "Yes"...|
000029c0 42 20 20 20 53 55 42 20 20 20 20 20 72 34 2c 72 |B SUB r4,r|
000029d0 33 2c 72 32 20 20 20 20 20 20 20 20 20 20 20 20 |3,r2 |
000029e0 20 20 20 20 20 20 20 20 20 20 3b 20 72 34 3d 74 | ; r4=t|
000029f0 69 74 6c 65 20 62 61 72 20 68 65 69 67 68 74 0d |itle bar height.|
00002a00 0a 28 37 20 20 20 4c 44 52 20 20 20 20 20 72 32 |.(7 LDR r2|
00002a10 2c 5b 72 31 32 2c 23 35 36 5d 20 20 20 20 20 20 |,[r12,#56] |
00002a20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 | ; ge|
00002a30 74 20 6d 61 78 79 0d 0a 32 37 20 20 20 4c 44 52 |t maxy..27 LDR|
00002a40 20 20 20 20 20 72 33 2c 5b 72 31 32 2c 23 34 38 | r3,[r12,#48|
00002a50 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] |
00002a60 20 20 20 3b 20 67 65 74 20 6d 69 6e 79 0d 0a 3c | ; get miny..<|
00002a70 3e 20 20 20 53 55 42 20 20 20 20 20 72 32 2c 72 |> SUB r2,r|
00002a80 32 2c 72 33 20 20 20 20 20 20 20 20 20 20 20 20 |2,r3 |
00002a90 20 20 20 20 20 20 20 20 20 20 3b 20 72 32 3d 74 | ; r2=t|
00002aa0 6f 74 61 6c 20 68 65 69 67 68 74 0d 0a 46 43 20 |otal height..FC |
00002ab0 20 20 4c 44 52 20 20 20 20 20 72 33 2c 5b 72 35 | LDR r3,[r5|
00002ac0 2c 23 38 5d 20 20 20 20 20 20 20 20 20 20 20 20 |,#8] |
00002ad0 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 62 6f | ; get bo|
00002ae0 74 74 6f 6d 20 6f 66 20 77 69 6e 64 6f 77 0d 0a |ttom of window..|
00002af0 50 1c 20 20 20 20 20 20 20 20 20 20 3b 20 22 42 |P. ; "B|
00002b00 6f 74 74 6f 6d 3d 25 72 33 22 0d 0a 5a 22 20 20 |ottom=%r3"..Z" |
00002b10 20 20 20 20 20 20 20 20 3b 20 22 54 6f 74 61 6c | ; "Total|
00002b20 20 68 65 69 67 68 74 3d 25 72 32 22 0d 0a 64 39 | height=%r2"..d9|
00002b30 20 20 20 41 44 44 20 20 20 20 20 72 33 2c 72 33 | ADD r3,r3|
00002b40 2c 72 32 20 20 20 20 20 20 20 20 20 20 20 20 20 |,r2 |
00002b50 20 20 20 20 20 20 20 20 20 3b 20 61 64 64 20 68 | ; add h|
00002b60 65 69 67 68 74 0d 0a 6e 1b 20 20 20 42 4c 20 20 |eight..n. BL |
00002b70 20 20 20 20 6b 65 65 70 6f 6e 73 63 72 65 65 6e | keeponscreen|
00002b80 0d 0a 78 0e 2e 5f 5f 7a 31 5f 65 78 69 74 0d 0a |..x..__z1_exit..|
00002b90 82 3f 20 20 20 4c 44 4d 46 44 20 20 20 28 73 70 |.? LDMFD (sp|
00002ba0 29 21 2c 7b 72 30 2d 72 36 2c 70 63 7d 20 20 20 |)!,{r0-r6,pc} |
00002bb0 20 20 20 20 20 20 20 20 20 20 20 3b 20 52 65 74 | ; Ret|
00002bc0 75 72 6e 20 66 72 6f 6d 20 63 61 6c 6c 0d 0a 8c |urn from call...|
00002bd0 05 3a 0d 0a 96 12 3b 20 3e 20 72 33 3d 77 69 6e |.:....; > r3=win|
00002be0 20 74 6f 70 0d 0a a0 1b 3b 20 20 20 72 34 3d 74 | top....; r4=t|
00002bf0 69 74 6c 65 20 62 61 72 20 68 65 69 67 68 74 0d |itle bar height.|
00002c00 0a aa 11 2e 6b 65 65 70 6f 6e 73 63 72 65 65 6e |....keeponscreen|
00002c10 0d 0a b4 3e 20 20 20 53 54 4d 46 44 20 20 20 28 |...> STMFD (|
00002c20 73 70 29 21 2c 7b 72 30 2d 72 36 2c 6c 69 6e 6b |sp)!,{r0-r6,link|
00002c30 7d 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 |} ; S|
00002c40 74 61 63 6b 20 72 65 67 69 73 74 65 72 73 0d 0a |tack registers..|
00002c50 be 2e 20 20 20 20 20 20 20 20 20 20 3b 20 22 4b |.. ; "K|
00002c60 65 65 70 20 6f 6e 20 73 63 72 65 65 6e 2c 20 74 |eep on screen, t|
00002c70 6f 70 3d 25 72 33 2c 20 25 72 34 22 0d 0a c8 17 |op=%r3, %r4"....|
00002c80 20 20 20 4d 56 4e 20 20 20 20 20 72 30 2c 23 ac | MVN r0,#.|
00002c90 20 2d 31 0d 0a d2 15 20 20 20 4d 4f 56 20 20 20 | -1.... MOV |
00002ca0 20 20 72 31 2c 23 31 32 0d 0a dc 24 20 20 20 53 | r1,#12...$ S|
00002cb0 57 49 20 20 20 20 20 22 4f 53 5f 52 65 61 64 4d |WI "OS_ReadM|
00002cc0 6f 64 65 56 61 72 69 61 62 6c 65 22 0d 0a e6 1e |odeVariable"....|
00002cd0 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 | ; get |
00002ce0 59 57 69 6e 64 4c 69 6d 69 74 0d 0a f0 3c 20 20 |YWindLimit...< |
00002cf0 20 4d 4f 56 20 20 20 20 20 72 36 2c 72 32 20 20 | MOV r6,r2 |
00002d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002d10 20 20 20 20 20 20 20 3b 20 72 36 3d 59 57 69 6e | ; r6=YWin|
00002d20 64 4c 69 6d 69 74 0d 0a fa 17 20 20 20 4d 56 4e |dLimit.... MVN|
00002d30 20 20 20 20 20 72 30 2c 23 ac 20 2d 31 0d 0b 04 | r0,#. -1...|
00002d40 14 20 20 20 4d 4f 56 20 20 20 20 20 72 31 2c 23 |. MOV r1,#|
00002d50 35 0d 0b 0e 24 20 20 20 53 57 49 20 20 20 20 20 |5...$ SWI |
00002d60 22 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 |"OS_ReadModeVari|
00002d70 61 62 6c 65 22 0d 0b 18 1e 20 20 20 20 20 20 20 |able".... |
00002d80 20 20 20 3b 20 67 65 74 20 59 45 69 67 46 61 63 | ; get YEigFac|
00002d90 74 6f 72 0d 0b 22 4d 20 20 20 4d 4f 56 20 20 20 |tor.."M MOV |
00002da0 20 20 72 36 2c 72 36 2c 4c 53 4c 20 72 32 20 20 | r6,r6,LSL r2 |
00002db0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002dc0 3b 20 73 68 69 66 74 20 59 57 69 6e 64 4c 69 6d |; shift YWindLim|
00002dd0 69 74 20 62 79 20 59 45 69 67 46 61 63 74 6f 72 |it by YEigFactor|
00002de0 0d 0b 2c 51 20 20 20 41 44 44 20 20 20 20 20 72 |..,Q ADD r|
00002df0 30 2c 72 33 2c 72 34 20 20 20 20 20 20 20 20 20 |0,r3,r4 |
00002e00 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 77 | ; w|
00002e10 68 61 74 20 77 69 6c 6c 20 62 65 20 6c 6f 63 61 |hat will be loca|
00002e20 74 69 6f 6e 20 6f 66 20 74 69 74 6c 65 62 61 72 |tion of titlebar|
00002e30 3f 0d 0b 36 40 20 20 20 43 4d 50 20 20 20 20 20 |?..6@ CMP |
00002e40 72 30 2c 72 36 20 20 20 20 20 20 20 20 20 20 20 |r0,r6 |
00002e50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; |
00002e60 3e 20 74 6f 70 20 6f 66 20 73 63 72 65 65 6e 20 |> top of screen |
00002e70 3f 0d 0b 40 4d 20 20 20 53 55 42 47 54 20 20 20 |?..@M SUBGT |
00002e80 72 33 2c 72 36 2c 72 34 20 20 20 20 20 20 20 20 |r3,r6,r4 |
00002e90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; |
00002ea0 69 66 20 73 6f 2c 20 74 6f 70 3d 73 63 72 74 6f |if so, top=scrto|
00002eb0 70 2d 74 69 74 6c 65 20 68 65 69 67 68 74 0d 0b |p-title height..|
00002ec0 4a 48 20 20 20 4d 4f 56 47 54 20 20 20 72 30 2c |JH MOVGT r0,|
00002ed0 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#1 |
00002ee0 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 | ; get|
00002ef0 20 31 20 70 69 78 65 6c 20 74 6f 20 61 64 64 20 | 1 pixel to add |
00002f00 74 6f 20 74 6f 70 0d 0b 54 4d 20 20 20 41 44 44 |to top..TM ADD|
00002f10 47 54 20 20 20 72 33 2c 72 33 2c 72 30 2c 4c 53 |GT r3,r3,r0,LS|
00002f20 4c 20 72 32 20 20 20 20 20 20 20 20 20 20 20 20 |L r2 |
00002f30 20 20 20 3b 20 61 64 64 20 70 69 78 65 6c 20 74 | ; add pixel t|
00002f40 6f 20 6d 61 6b 65 20 74 69 74 6c 65 20 61 74 20 |o make title at |
00002f50 74 6f 70 0d 0b 5e 42 20 20 20 53 54 52 20 20 20 |top..^B STR |
00002f60 20 20 72 33 2c 5b 72 35 2c 23 31 36 5d 20 20 20 | r3,[r5,#16] |
00002f70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |
00002f80 3b 20 73 74 6f 72 65 20 62 61 63 6b 20 69 6e 20 |; store back in |
00002f90 62 6c 6f 63 6b 0d 0b 68 19 20 20 20 20 20 20 20 |block..h. |
00002fa0 20 20 20 3b 20 22 54 6f 70 3d 25 72 33 22 0d 0b | ; "Top=%r3"..|
00002fb0 72 0e 2e 5f 5f 7a 32 5f 65 78 69 74 0d 0b 7c 3f |r..__z2_exit..|?|
00002fc0 20 20 20 4c 44 4d 46 44 20 20 20 28 73 70 29 21 | LDMFD (sp)!|
00002fd0 2c 7b 72 30 2d 72 36 2c 70 63 7d 20 20 20 20 20 |,{r0-r6,pc} |
00002fe0 20 20 20 20 20 20 20 20 20 3b 20 52 65 74 75 72 | ; Retur|
00002ff0 6e 20 66 72 6f 6d 20 63 61 6c 6c 0d 0b 86 05 3a |n from call....:|
00003000 0d 0b 90 0e 3b 20 2e 44 69 73 70 6c 61 79 0d 0b |....; .Display..|
00003010 9a 40 3b 20 20 20 20 53 54 4d 46 44 20 20 20 28 |.@; STMFD (|
00003020 73 70 29 21 2c 7b 72 30 2d 72 39 2c 6c 69 6e 6b |sp)!,{r0-r9,link|
00003030 7d 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 |} ; S|
00003040 74 61 63 6b 20 72 65 67 69 73 74 65 72 73 0d 0b |tack registers..|
00003050 a4 3b 3b 20 20 20 20 4c 44 4d 49 41 20 20 20 72 |.;; LDMIA r|
00003060 35 2c 7b 72 30 2d 72 38 7d 20 20 20 20 20 20 20 |5,{r0-r8} |
00003070 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 72 | ; r|
00003080 65 61 64 20 62 6c 6f 63 6b 0d 0b ae 1a 3b 20 20 |ead block....; |
00003090 20 20 f4 20 20 20 20 20 22 44 69 73 70 6c 61 79 | . "Display|
000030a0 20 3b 22 0d 0b b8 13 3b 20 20 20 20 f4 20 20 20 | ;"....; . |
000030b0 20 20 22 25 52 22 0d 0b c2 41 3b 20 20 20 20 4c | "%R"...A; L|
000030c0 44 4d 46 44 20 20 20 28 73 70 29 21 2c 7b 72 30 |DMFD (sp)!,{r0|
000030d0 2d 72 39 2c 70 63 7d 20 20 20 20 20 20 20 20 20 |-r9,pc} |
000030e0 20 20 20 20 20 3b 20 52 65 74 75 72 6e 20 66 72 | ; Return fr|
000030f0 6f 6d 20 63 61 6c 6c 0d 0b cc 05 3a 0d 0b d6 05 |om call....:....|
00003100 5d 0d 0b e0 20 f4 20 2a 2a 2a 2a 20 45 6e 64 20 |]... . **** End |
00003110 6f 66 20 6d 61 69 6e 20 63 6f 64 65 20 2a 2a 2a |of main code ***|
00003120 2a 0d 0b ea 36 f4 20 53 65 74 20 66 69 6e 61 6c |*...6. Set final|
00003130 20 70 6f 69 6e 74 65 72 20 74 6f 20 66 69 6e 64 | pointer to find|
00003140 20 74 68 65 20 6c 65 6e 67 74 68 20 6f 66 20 74 | the length of t|
00003150 68 65 20 63 6f 64 65 0d 0b f4 13 f2 70 61 74 63 |he code.....patc|
00003160 68 5f 73 65 74 70 63 28 30 29 0d 0b fe 0b ed 20 |h_setpc(0)..... |
00003170 70 61 73 73 25 0d 0c 08 13 f2 70 61 74 63 68 5f |pass%.....patch_|
00003180 73 61 76 65 66 69 6c 65 0d 0c 26 28 f4 20 2a 2a |savefile..&(. **|
00003190 2a 2a 20 50 6f 73 74 2d 61 73 73 65 6d 62 6c 79 |** Post-assembly|
000031a0 20 75 73 65 72 20 63 6f 64 65 20 2a 2a 2a 2a 2a | user code *****|
000031b0 0d 0c 30 11 f4 20 23 52 75 6e 20 3c 43 4f 44 45 |..0.. #Run <CODE|
000031c0 3e 0d 0c 3a 27 f4 20 2a 46 69 6c 65 72 5f 52 75 |>..:'. *Filer_Ru|
000031d0 6e 20 52 65 73 6f 75 72 63 65 73 3a 24 2e 41 70 |n Resources:$.Ap|
000031e0 70 73 2e 21 44 72 61 77 0d 0c 44 0a f4 20 2a 53 |ps.!Draw..D.. *S|
000031f0 6f 6e 0d 0c 4e 05 e0 0d 0c 58 05 3a 0d 0c 62 21 |on..N....X.:..b!|
00003200 f4 20 2a 2a 2a 2a 20 46 69 6c 69 6e 67 20 70 72 |. **** Filing pr|
00003210 6f 63 65 64 75 72 65 73 20 2a 2a 2a 2a 0d 0c 6c |ocedures ****..l|
00003220 05 3a 0d 0c 76 15 dd 20 f2 70 61 74 63 68 5f 6c |.:..v.. .patch_l|
00003230 6f 61 64 66 69 6c 65 0d 0c 80 0d 63 6f 64 65 6c |oadfile....codel|
00003240 65 6e 3d 30 0d 0c 8a 0f de 20 4d 43 25 20 26 31 |en=0..... MC% &1|
00003250 34 30 30 0d 0c 94 24 65 6e 64 6f 66 63 6f 64 65 |400...$endofcode|
00003260 3d 63 6f 64 65 6c 65 6e 2b 26 30 3a 6d 61 78 3d |=codelen+&0:max=|
00003270 63 6f 64 65 6c 65 6e 0d 0c 9e 19 4c 25 3d 65 6e |codelen....L%=en|
00003280 64 6f 66 63 6f 64 65 3a 5f 5f 63 61 70 25 3d a3 |dofcode:__cap%=.|
00003290 0d 0d 02 05 e1 0d 0d 0c 05 3a 0d 0d 16 15 dd 20 |.........:..... |
000032a0 f2 70 61 74 63 68 5f 73 61 76 65 66 69 6c 65 0d |.patch_savefile.|
000032b0 0d 20 2d 6f 75 74 66 69 6c 65 24 3d 22 3c 4e 6f |. -outfile$="<No|
000032c0 43 6f 76 65 72 49 63 6f 6e 42 61 72 24 44 69 72 |CoverIconBar$Dir|
000032d0 3e 2e 4e 6f 43 6f 76 65 72 49 42 22 0d 0d 2a 31 |>.NoCoverIB"..*1|
000032e0 ff 28 22 53 61 76 65 20 22 2b 6f 75 74 66 69 6c |.("Save "+outfil|
000032f0 65 24 2b 22 20 22 2b c3 7e 4d 43 25 2b 22 20 22 |e$+" "+.~MC%+" "|
00003300 2b c3 7e 28 6d 61 78 2b 4d 43 25 29 29 0d 0d 34 |+.~(max+MC%))..4|
00003310 24 ff 28 22 53 65 74 74 79 70 65 20 22 2b 6f 75 |$.("Settype "+ou|
00003320 74 66 69 6c 65 24 2b 22 20 4d 6f 64 75 6c 65 22 |tfile$+" Module"|
00003330 29 0d 0d 3e 24 70 61 74 63 68 64 69 72 24 3d 22 |)..>$patchdir$="|
00003340 3c 4e 6f 43 6f 76 65 72 49 63 6f 6e 42 61 72 24 |<NoCoverIconBar$|
00003350 44 69 72 3e 22 0d 0d 66 05 e1 0d 0d 70 05 3a 0d |Dir>"..f....p.:.|
00003360 0d 7a 1d f4 20 2a 2a 2a 2a 20 45 72 72 6f 72 20 |.z.. **** Error |
00003370 48 61 6e 64 6c 65 72 20 2a 2a 2a 2a 0d 0d 84 05 |Handler ****....|
00003380 3a 0d 0d 8e 0b dd f2 45 72 72 6f 72 0d 0d de 1b |:......Error....|
00003390 85 20 a2 20 9f 2c f6 24 2b 22 20 61 74 20 6c 69 |. . .,.$+" at li|
000033a0 6e 65 20 22 2b c3 9e 0d 0d e8 05 e1 0d 0d f2 05 |ne "+...........|
000033b0 3a 0d 0d fc 22 f4 20 2a 2a 2a 2a 20 55 74 69 6c |:...". **** Util|
000033c0 69 74 79 20 70 72 6f 63 65 64 75 72 65 73 20 2a |ity procedures *|
000033d0 2a 2a 2a 0d 0e 06 05 3a 0d 0e 10 14 dd f2 70 61 |***....:......pa|
000033e0 74 63 68 5f 73 65 74 70 63 28 6e 29 0d 0e 1a 1a |tch_setpc(n)....|
000033f0 e7 20 50 25 2d 26 30 3e 6d 61 78 20 8c 6d 61 78 |. P%-&0>max .max|
00003400 3d 50 25 2d 26 30 0d 0e 24 14 50 25 3d 6e 3a 4f |=P%-&0..$.P%=n:O|
00003410 25 3d 4d 43 25 2b 6e 2d 26 30 0d 0e 2e 05 e1 0d |%=MC%+n-&0......|
00003420 0e 38 05 3a 0d 0e 42 22 dd a4 66 69 6e 64 66 72 |.8.:..B"..findfr|
00003430 65 65 72 65 67 28 61 2c 62 2c 63 2c 64 29 3a ea |eereg(a,b,c,d):.|
00003440 20 6e 3a 6e 3d 30 0d 0e 4c 1c c8 95 20 6e 3d 61 | n:n=0..L... n=a|
00003450 20 84 20 6e 3d 62 20 84 20 6e 3d 63 20 84 20 6e | . n=b . n=c . n|
00003460 3d 64 0d 0e 56 09 20 6e 2b 3d 31 0d 0e 60 05 ce |=d..V. n+=1..`..|
00003470 0d 0e 6a 06 3d 6e 0d 0e 74 05 3a 0d 0e 7e 28 f4 |..j.=n..t.:..~(.|
00003480 20 2a 2a 2a 2a 20 4c 6f 6e 67 20 41 44 52 20 6d | **** Long ADR m|
00003490 61 63 72 6f 20 70 72 6f 63 65 64 75 72 65 20 2a |acro procedure *|
000034a0 2a 2a 2a 0d 0e 88 05 3a 0d 0e 92 40 f4 20 44 45 |***....:...@. DE|
000034b0 53 43 2e 20 3a 20 41 44 52 20 65 71 75 69 76 61 |SC. : ADR equiva|
000034c0 6c 65 6e 74 20 66 6f 72 20 6c 6f 6e 67 20 61 64 |lent for long ad|
000034d0 64 72 65 73 73 20 72 61 6e 67 65 73 2c 20 69 6e |dress ranges, in|
000034e0 20 32 20 69 6e 73 74 73 0d 0e 9c 43 f4 20 45 4e | 2 insts...C. EN|
000034f0 54 52 59 20 3a 20 63 6f 6e 64 24 20 3d 20 74 77 |TRY : cond$ = tw|
00003500 6f 20 63 68 61 72 20 73 74 72 69 6e 67 2c 20 63 |o char string, c|
00003510 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 41 52 |ontaining the AR|
00003520 4d 20 63 6f 6e 64 69 74 69 6f 6e 0d 0e a6 1a f4 |M condition.....|
00003530 20 20 20 20 20 20 20 20 20 72 65 67 25 20 3d 20 | reg% = |
00003540 30 2e 2e 31 35 0d 0e b0 2b f4 20 20 20 20 20 20 |0..15...+. |
00003550 20 20 20 70 6f 69 6e 74 65 72 25 20 3d 20 6c 6f | pointer% = lo|
00003560 6e 67 20 72 61 6e 67 65 20 70 6f 69 6e 74 65 72 |ng range pointer|
00003570 0d 0e ba 42 f4 20 43 4f 4d 4d 2e 20 3a 20 70 61 |...B. COMM. : pa|
00003580 73 73 25 20 3d 20 4f 50 54 20 76 61 72 69 61 62 |ss% = OPT variab|
00003590 6c 65 20 69 6e 20 74 68 65 20 61 73 73 65 6d 62 |le in the assemb|
000035a0 6c 65 72 20 46 4f 52 2e 2e 4e 45 58 54 20 6c 6f |ler FOR..NEXT lo|
000035b0 6f 70 0d 0e c4 2d f4 20 20 20 20 20 20 20 20 20 |op...-. |
000035c0 43 61 6e 20 6f 6e 6c 79 20 68 61 6e 64 6c 65 20 |Can only handle |
000035d0 36 34 20 4b 42 79 74 65 20 72 61 6e 67 65 73 0d |64 KByte ranges.|
000035e0 0e ce 1f dd a4 4c 41 44 52 28 63 6f 6e 64 24 2c |.....LADR(cond$,|
000035f0 72 65 67 25 2c 70 6f 69 6e 74 65 72 25 29 0d 0e |reg%,pointer%)..|
00003600 d8 21 ea 20 63 63 25 2c 64 69 66 66 25 2c 6c 6f |.!. cc%,diff%,lo|
00003610 25 2c 68 69 25 2c 6f 70 31 25 2c 6f 70 32 25 0d |%,hi%,op1%,op2%.|
00003620 0e e2 23 e7 20 28 70 61 73 73 25 20 80 25 31 30 |..#. (pass% .%10|
00003630 29 3d 30 20 50 25 2b 3d 38 3a 4f 25 2b 3d 38 3a |)=0 P%+=8:O%+=8:|
00003640 3d 30 0d 0e ec 73 e7 20 94 28 70 6f 69 6e 74 65 |=0...s. .(pointe|
00003650 72 25 2d 50 25 29 3e 36 35 35 33 35 20 8c 20 85 |r%-P%)>65535 . .|
00003660 20 31 2c 22 4c 41 44 52 20 63 61 6e 20 6f 6e 6c | 1,"LADR can onl|
00003670 79 20 68 61 6e 64 6c 65 20 36 34 20 4b 42 79 74 |y handle 64 KByt|
00003680 65 20 72 61 6e 67 65 73 20 61 74 20 26 22 2b c3 |e ranges at &"+.|
00003690 7e 50 25 2b 22 20 28 26 22 2b c3 7e 28 70 6f 69 |~P%+" (&"+.~(poi|
000036a0 6e 74 65 72 25 2d 50 25 29 2b 22 20 64 69 73 74 |nter%-P%)+" dist|
000036b0 61 6e 74 29 22 0d 0e f6 27 e7 63 6f 6e 64 24 3d |ant)"...'.cond$=|
000036c0 22 20 20 22 20 84 20 63 6f 6e 64 24 3d 22 22 20 |" " . cond$="" |
000036d0 20 8c 63 6f 6e 64 24 3d 22 41 4c 22 0d 0f 00 32 | .cond$="AL"...2|
000036e0 63 63 25 3d a7 22 45 51 4e 45 43 53 43 43 4d 49 |cc%=."EQNECSCCMI|
000036f0 50 4c 56 53 56 43 48 49 4c 53 47 45 4c 54 47 54 |PLVSVCHILSGELTGT|
00003700 4c 45 41 4c 4e 56 22 2c 63 6f 6e 64 24 29 0d 0f |LEALNV",cond$)..|
00003710 0a 63 e7 20 63 63 25 3d 30 20 85 20 31 2c 22 46 |.c. cc%=0 . 1,"F|
00003720 41 54 41 4c 20 45 52 52 4f 52 20 3a 20 55 6e 6b |ATAL ERROR : Unk|
00003730 6e 6f 77 6e 20 63 6f 6e 64 69 74 69 6f 6e 20 66 |nown condition f|
00003740 6f 72 20 4c 41 44 52 20 61 74 20 26 22 2b c3 7e |or LADR at &"+.~|
00003750 50 25 2b 22 20 28 26 22 2b c3 7e 4f 25 2b 22 29 |P%+" (&"+.~O%+")|
00003760 22 20 8b 20 63 63 25 3d 28 63 63 25 2d 31 29 81 |" . cc%=(cc%-1).|
00003770 32 0d 0f 14 17 64 69 66 66 25 3d 70 6f 69 6e 74 |2....diff%=point|
00003780 65 72 25 2d 50 25 2d 38 0d 0f 1e 14 6c 6f 25 3d |er%-P%-8....lo%=|
00003790 94 28 64 69 66 66 25 29 80 26 46 46 0d 0f 28 16 |.(diff%).&FF..(.|
000037a0 68 69 25 3d 94 28 64 69 66 66 25 29 80 26 46 46 |hi%=.(diff%).&FF|
000037b0 30 30 0d 0f 32 0e e7 64 69 66 66 25 3e 3d 30 8c |00..2..diff%>=0.|
000037c0 0d 0f 3c 2c 20 6f 70 31 25 3d 28 63 63 25 3c 3c |..<, op1%=(cc%<<|
000037d0 32 38 29 2b 26 30 32 38 46 30 30 30 30 2b 28 72 |28)+&028F0000+(r|
000037e0 65 67 25 3c 3c 31 32 29 2b 6c 6f 25 0d 0f 46 3c |eg%<<12)+lo%..F<|
000037f0 20 6f 70 32 25 3d 28 63 63 25 3c 3c 32 38 29 2b | op2%=(cc%<<28)+|
00003800 26 30 32 38 30 30 43 30 30 2b 28 72 65 67 25 3c |&02800C00+(reg%<|
00003810 3c 31 36 29 2b 28 72 65 67 25 3c 3c 31 32 29 2b |<16)+(reg%<<12)+|
00003820 28 68 69 25 3e 3e 38 29 0d 0f 50 05 cc 0d 0f 5a |(hi%>>8)..P....Z|
00003830 2c 20 6f 70 31 25 3d 28 63 63 25 3c 3c 32 38 29 |, op1%=(cc%<<28)|
00003840 2b 26 30 32 34 46 30 30 30 30 2b 28 72 65 67 25 |+&024F0000+(reg%|
00003850 3c 3c 31 32 29 2b 6c 6f 25 0d 0f 64 3c 20 6f 70 |<<12)+lo%..d< op|
00003860 32 25 3d 28 63 63 25 3c 3c 32 38 29 2b 26 30 32 |2%=(cc%<<28)+&02|
00003870 34 30 30 43 30 30 2b 28 72 65 67 25 3c 3c 31 36 |400C00+(reg%<<16|
00003880 29 2b 28 72 65 67 25 3c 3c 31 32 29 2b 28 68 69 |)+(reg%<<12)+(hi|
00003890 25 3e 3e 38 29 0d 0f 6e 05 cd 0d 0f 78 24 5b 4f |%>>8)..n....x$[O|
000038a0 50 54 20 70 61 73 73 25 3a 45 51 55 44 20 6f 70 |PT pass%:EQUD op|
000038b0 31 25 3a 45 51 55 44 20 6f 70 32 25 3a 5d 0d 0f |1%:EQUD op2%:]..|
000038c0 82 06 3d 30 0d 0f 8c 05 3a 0d 0f 96 2a f4 20 2a |..=0....:...*. *|
000038d0 2a 2a 2a 20 4c 6f 6e 67 20 4d 4f 56 20 6d 61 63 |*** Long MOV mac|
000038e0 72 6f 20 69 6e 73 74 72 75 63 74 69 6f 6e 20 2a |ro instruction *|
000038f0 2a 2a 2a 0d 0f a0 05 3a 0d 0f aa 1b dd a4 4c 4d |***....:......LM|
00003900 4f 56 28 63 6f 6e 64 24 2c 72 65 67 2c 76 61 6c |OV(cond$,reg,val|
00003910 75 65 29 0d 0f b4 27 e7 20 63 6f 6e 64 24 3d 22 |ue)...'. cond$="|
00003920 22 20 84 20 63 6f 6e 64 24 3d 22 20 20 22 20 8c |" . cond$=" " .|
00003930 63 6f 6e 64 24 3d 22 41 4c 22 0d 0f be 39 63 6f |cond$="AL"...9co|
00003940 6e 64 3d 28 a7 22 45 51 4e 45 43 53 43 43 4d 49 |nd=(."EQNECSCCMI|
00003950 50 4c 56 53 56 43 48 49 4c 53 47 45 4c 54 47 54 |PLVSVCHILSGELTGT|
00003960 4c 45 41 4c 4e 56 22 2c 63 6f 6e 64 24 29 2d 31 |LEALNV",cond$)-1|
00003970 29 2f 32 0d 0f c8 26 6d 6f 76 3d 28 26 33 41 3c |)/2...&mov=(&3A<|
00003980 3c 32 30 29 2b 28 72 65 67 3c 3c 31 32 29 2b 28 |<20)+(reg<<12)+(|
00003990 63 6f 6e 64 3c 3c 32 38 29 0d 0f d2 30 61 64 64 |cond<<28)...0add|
000039a0 3d 28 26 32 38 3c 3c 32 30 29 2b 28 72 65 67 3c |=(&28<<20)+(reg<|
000039b0 3c 31 32 29 2b 28 72 65 67 3c 3c 31 36 29 2b 28 |<12)+(reg<<16)+(|
000039c0 63 6f 6e 64 3c 3c 32 38 29 0d 0f dc 4f e7 20 76 |cond<<28)...O. v|
000039d0 61 6c 75 65 3c 30 20 8c 6e 65 67 3d b9 3a 6d 6f |alue<0 .neg=.:mo|
000039e0 76 3d 6d 6f 76 20 84 20 28 31 3c 3c 32 32 29 3a |v=mov . (1<<22):|
000039f0 61 64 64 3d 61 64 64 20 82 20 28 31 32 3c 3c 32 |add=add . (12<<2|
00003a00 30 29 3a 76 61 6c 75 65 3d 2d 76 61 6c 75 65 2d |0):value=-value-|
00003a10 31 20 8b 6e 65 67 3d a3 0d 0f e6 0b 73 68 69 66 |1 .neg=.....shif|
00003a20 74 3d 30 0d 0f f0 05 f5 0d 0f fa 20 20 c8 95 20 |t=0........ .. |
00003a30 28 76 61 6c 75 65 20 80 20 33 29 3d 30 20 80 20 |(value . 3)=0 . |
00003a40 73 68 69 66 74 3c 31 36 0d 10 04 1d 20 20 73 68 |shift<16.... sh|
00003a50 69 66 74 2b 3d 31 3a 76 61 6c 75 65 3d 76 61 6c |ift+=1:value=val|
00003a60 75 65 20 81 34 0d 10 0e 06 20 ce 0d 10 18 2a 20 |ue .4.... ....* |
00003a70 78 73 68 69 66 74 3d 31 36 2d 73 68 69 66 74 3a |xshift=16-shift:|
00003a80 e7 20 78 73 68 69 66 74 3d 31 36 20 8c 78 73 68 |. xshift=16 .xsh|
00003a90 69 66 74 3d 30 0d 10 22 0f 20 e7 20 6d 6f 76 3c |ift=0..". . mov<|
00003aa0 3e 30 20 8c 0d 10 2c 35 20 20 5b 4f 50 54 20 70 |>0 ...,5 [OPT p|
00003ab0 61 73 73 25 3a 45 51 55 44 20 6d 6f 76 2b 28 78 |ass%:EQUD mov+(x|
00003ac0 73 68 69 66 74 3c 3c 38 29 2b 28 76 61 6c 75 65 |shift<<8)+(value|
00003ad0 20 80 20 32 35 35 29 3a 5d 0d 10 36 0b 20 20 6d | . 255):]..6. m|
00003ae0 6f 76 3d 30 0d 10 40 06 20 cc 0d 10 4a 35 20 20 |ov=0..@. ...J5 |
00003af0 5b 4f 50 54 20 70 61 73 73 25 3a 45 51 55 44 20 |[OPT pass%:EQUD |
00003b00 61 64 64 2b 28 78 73 68 69 66 74 3c 3c 38 29 2b |add+(xshift<<8)+|
00003b10 28 76 61 6c 75 65 20 80 20 32 35 35 29 3a 5d 0d |(value . 255):].|
00003b20 10 54 06 20 cd 0d 10 5e 1e 20 76 61 6c 75 65 3d |.T. ...^. value=|
00003b30 76 61 6c 75 65 20 81 32 35 36 3a 73 68 69 66 74 |value .256:shift|
00003b40 2b 3d 34 0d 10 68 0c fd 76 61 6c 75 65 3d 30 0d |+=4..h..value=0.|
00003b50 10 72 06 3d 30 0d 10 7c 05 3a 0d 7f 7f 0d f4 20 |.r.=0..|.:..... |
00003b60 4a 46 50 61 74 63 68 0d ff |JFPatch..|
00003b69
.