Commit | Line | Data |
---|---|---|
c1b567d8 MW |
1 | REM |
2 | REM plainError | |
3 | REM | |
4 | REM Remove the irritating `Application has gone wrong' message. | |
5 | REM | |
6 | REM © 1996-1998 Mark Wooding | |
7 | REM | |
8 | ||
9 | REM ----- Licensing note ---------------------------------------------------- | |
10 | REM | |
11 | REM PlainError is free software; you can redistribute it and/or modify | |
12 | REM it under the terms of the GNU General Public License as published by | |
13 | REM the Free Software Foundation; either version 2, or (at your option) | |
14 | REM any later version | |
15 | REM | |
16 | REM PlainError is distributed in the hope that it will be useful, | |
17 | REM but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | REM GNU General Public License for more details. | |
20 | REM | |
21 | REM You should have received a copy of the GNU General Public License | |
22 | REM along with PlainError. If not, write to the Free Software Foundation, | |
23 | REM 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
24 | ||
25 | help$="PlainError"+CHR$(9)+"1.02 (%dy %m3 %ce%yr) © %ce%yr Mark Wooding" | |
26 | ||
27 | DIM code% 1024 | |
28 | !code%=3 | |
29 | SYS "OS_Word",14,code% | |
30 | SYS "OS_ConvertDateAndTime",code%,code%+8,256,help$ | |
31 | SYS "XOS_GenerateError",code%+8 TO help$ | |
32 | ||
33 | ||
34 | FOR o=4 TO 6 STEP 2 | |
35 | O%=code% | |
36 | P%=0 | |
37 | ||
38 | [ opt o | |
39 | ||
40 | dcd 0 | |
41 | dcd init | |
42 | dcd final | |
43 | dcd service | |
44 | dcd title | |
45 | dcd help | |
46 | dcd 0 | |
47 | ||
48 | .title | |
49 | equz "PlainError" | |
50 | align | |
51 | ||
52 | .init | |
53 | stmfd r13!,{r14} | |
54 | mov r0,#6 | |
55 | mov r3,#256 | |
56 | swi "XOS_Module" | |
57 | strvc r2,[r12,#0] | |
58 | ldmfd r13!,{pc} | |
59 | ||
60 | .final | |
61 | stmfd r13!,{r14} | |
62 | mov r0,#7 | |
63 | ldr r2,[r12,#0] | |
64 | swi "XOS_Module" | |
65 | mov r14,#0 | |
66 | str r14,[r12,#0] | |
67 | ldmfd r13!,{pc}^ | |
68 | ||
69 | .service | |
70 | stmfd r13!,{r14} | |
71 | eor r14,r1,#&40000 | |
72 | teq r14,#&c0 | |
73 | ldmnefd r13!,{pc}^ | |
74 | ||
75 | stmfd r13!,{r0,r1} | |
76 | ldr r12,[r12,#0] | |
77 | ||
78 | mov r14,#0 | |
79 | str r14,[r12,#0] | |
80 | ||
81 | add r0,r12,#4 | |
82 | add r2,r2,#4 | |
83 | .a | |
84 | ldrb r14,[r2],#1 | |
85 | cmp r14,#&20 | |
86 | movcc r14,#0 | |
87 | strb r14,[r0],#1 | |
88 | bcs a | |
89 | ||
90 | mov r2,r12 | |
91 | ldmfd r13!,{r0,r1,pc}^ | |
92 | ||
93 | .help | |
94 | equz help$ | |
95 | align | |
96 | ||
97 | ] | |
98 | NEXT | |
99 | ||
100 | SYS "OS_File",10,"PlainError",&FFA,,code%,O% | |
101 | END |