1 |
REM > Library |
2 |
|
3 |
DEF PROCAssemble |
4 |
Size% = 1024 |
5 |
DIM Code% Size% |
6 |
|
7 |
FOR Pass% = %1000 TO %1010 STEP %10 |
8 |
|
9 |
P% = Code% |
10 |
L% = Code% + Size% |
11 |
|
12 |
[OPT Pass% |
13 |
|
14 |
.Move |
15 |
STMfd R13!, {R0-R5, R14} |
16 |
|
17 |
MOV R0, #21 |
18 |
ADR R1, Move_Block |
19 |
SWI "OS_Word" |
20 |
|
21 |
LDMfd R13!, {R0-R5, PC}^ |
22 |
|
23 |
.Move_Block |
24 |
EQUD 3 |
25 |
EQUD 0 |
26 |
|
27 |
.Move_End |
28 |
|
29 |
.Click |
30 |
STMfd R13!, {R0-R5, R14} |
31 |
|
32 |
SWI "OS_IntOff" |
33 |
|
34 |
MOV R0, #138 |
35 |
MOV R1, #9 |
36 |
|
37 |
LDRB R2, Click_Block + 0 |
38 |
SWI "OS_Byte" |
39 |
LDRB R2, Click_Block + 1 |
40 |
SWI "OS_Byte" |
41 |
LDRB R2, Click_Block + 2 |
42 |
SWI "OS_Byte" |
43 |
LDRB R2, Click_Block + 3 |
44 |
SWI "OS_Byte" |
45 |
LDRB R2, Click_Block + 4 |
46 |
SWI "OS_Byte" |
47 |
MOV R2, #0 |
48 |
SWI "OS_Byte" |
49 |
SWI "OS_Byte" |
50 |
SWI "OS_Byte" |
51 |
SWI "OS_Byte" |
52 |
SWI "OS_IntOn" |
53 |
|
54 |
LDMfd R13!, {R0-R5, PC}^ |
55 |
|
56 |
.Click_Block |
57 |
EQUD 0 |
58 |
EQUD 0 |
59 |
|
60 |
.Click_End |
61 |
] |
62 |
NEXT |
63 |
|
64 |
ENDPROC |
65 |
|
66 |
REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜ |
67 |
|
68 |
DEF PROCMove(s%, n%, x%, y%) |
69 |
Move_Block?4 = (x% AND 255) |
70 |
Move_Block?5 = (x% >> %1000) |
71 |
Move_Block?6 = (y% AND 255) |
72 |
Move_Block?7 = (y% >> %1000) |
73 |
|
74 |
SYS"Econet_DoImmediate", 3, -1, s%, n%, Move, Move_End |
75 |
ENDPROC |
76 |
|
77 |
REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜ |
78 |
|
79 |
DEF PROCClick(s%, n%, x%, y%, z%) |
80 |
Click_Block?0 = (x% AND 255) |
81 |
Click_Block?1 = (x% >> %1000) |
82 |
Click_Block?2 = (y% AND 255) |
83 |
Click_Block?3 = (y% >> %1000) |
84 |
Click_Block?4 = z% |
85 |
|
86 |
SYS"Econet_DoImmediate", 3, -1, s%, n%, Click, Click_End |
87 |
ENDPROC |