4 ; Test driver for Termite script language
9 ;----- Standard Header ------------------------------------------------------
16 ;----- External dependencies ------------------------------------------------
18 IMPORT |Image$$RW$$Limit|
19 IMPORT |!!!TermScript$$Header$$Base|
21 ;----- Main code ------------------------------------------------------------
23 AREA |Driver$$Code|,CODE,READONLY
32 LDR R12,=|Image$$RW$$Limit|
39 ; --- load the file ---
42 thingy LDRB R14,[R0],#1
49 LDR R10,=|!!!TermScript$$Header$$Base|
59 ; --- The main loop ---
80 DCB "+++ Finished!!!",10,13,0
91 end DCB "+++ End",13,10,0
92 chain DCB "+++ Chain",13,10,0
93 finish DCB "+++ Finnish",13,10,0
99 STMFD R13!,{R0-R5,R14}
113 LDMFD R13!,{R0-R5,PC}^
137 makeBeep SWI OS_WriteS
138 DCB "+++ Beep!!!",7,10,13,0
141 sendRemote STMFD R13!,{R0-R3}
143 DCB "+++ Sending out `",0
146 sodloop LDRB R0,[R2],#1
163 sodendl SUBS R3,R3,#1
165 sodret SWI OS_WriteI+'''
170 reportMessage STMFD R13!,{R0,R14}
172 DCB "+++ Reporting: `",0
178 printMessage STMFD R13!,{R0,R14}
180 DCB "+++ Printing: `",0
186 sendLocal STMFD R13!,{R0-R3}
188 DCB "+++ Sending in: `",0
191 logFileAdd STMFD R13!,{R0,R14}
193 DCB "+++ Adding to log: `",0
199 clearScreen SWI OS_WriteS
200 DCB "+++ Clear screen",13,10,0
203 download STMFD R13!,{R0}
205 DCB "+++ Download, protocol == `",0
209 DCB "', filename == `",0
219 defname DCB "<default>",0
221 upload STMFD R13!,{R0,R3,R14}
223 DCB "+++ Upload, protocol == `",0
227 DCB "', files:",13,10,0
228 uploop LDRB R0,[R3],#1
230 LDMEQFD R13!,{R0,R3,PC}^
233 upotherloop SWI OS_WriteC
240 checkCarrier SWI OS_WriteS
241 DCB "+++ Carrier detect? [yn] ",0
252 readLocal SWI OS_ReadC
255 readRemote SWI OS_ReadC
258 ;----- Workspace ------------------------------------------------------------
260 ;----- That's all, folks ----------------------------------------------------