10 REM ><Kapstok$Dir>.!RunImage

20 REM Free of copyright/Zonder auteursrechten

30 REM Last update: 05-Feb-2001

40 REM Basis programma, doet niets!

50 REM Initialisatie

60 DIM buffer% 256, q% 256

70 quit%=FALSE

80

90 REM WIMP initialisatie

100 SYS "Wimp_Initialise",310,&4B534153,"Kapstok",0 TO

wimpversion%,taskhandle%

110

120 REM Wimp_Poll loop

130 REPEAT

140 SYS "Wimp_Poll",0,q% TO reason%

150 CASE reason% OF

160 WHEN 0 : REM Null_Reasin_Code

170 REM Do something in the background

180

190 WHEN x : REM EventCode 'x'

200 REM Handle EventCode 'x'

210

220 WHEN 17 : REM User_Message

230 CASE q%!16 OF

240 WHEN 0 : REM Message_Quot

250 quit% = TRUE

260 WHEN &400C1 : REM Message_ModeChange

270 REM Perform actions related to a mode

280 REM change. (Eg. Loading new sprites in

290 REM local memory)

300 ENDCASE

310 ENDCASE

320 UNTIL quit%

330

340 REM WIMP finalisation

350 SYS "Wimp_CloseDown",taskhandle%,&4B534154

360 END