Home » Archimedes archive » Archimedes World » AW-1992-12.adf » AWDec92 » !AWDec92/Goodies/Wimp/Software/Stages/!Sort_3/!RunImage
!AWDec92/Goodies/Wimp/Software/Stages/!Sort_3/!RunImage
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 » Archimedes World » AW-1992-12.adf » AWDec92 |
Filename: | !AWDec92/Goodies/Wimp/Software/Stages/!Sort_3/!RunImage |
Read OK: | ✔ |
File size: | 078A bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10 LIBRARY "<Obey$Dir>.Wimp" 20 PROCWimp_Start("Sort_3",545,425) 30 PROCUser_SetInitialData 40 PROCCreate_Windows 50 PROCCreate_Menus 60 PROCWimp_WaitForEvent 70 PROCWimp_CloseDown 80 END 90 : 100 DEF PROCUser_SetInitialData 110 ENDPROC 120 : 130 DEF PROCCreate_Windows 140 Info_Window%=FNWimp_WindowLoad("Info") 150 Save_Window%=FNWimp_WindowLoad("Save") 160 Bar_Icon%=FNWimp_IconBar("!Sort_3") 170 ENDPROC 180 : 190 DEF FNEvent_Save(window%) 200 CASE window% OF 210 WHEN Save_Window% :=TRUE 220 OTHERWISE :=FALSE 230 ENDCASE 240 : 250 DEF FNEvent_Sprites(window%)=sprites% 260 : 270 DEF PROCCreate_Menus 280 menu$="!Sort_3\Info>Info_Window%\Save>Save_Window%\Quit" 290 Bar_Menu%=FNWimp_MenuCreate(menu$) 300 ENDPROC 310 : 320 DEF FNEvent_Menu(window%) 330 CASE window% OF 340 WHEN Bar_Window% : =Bar_Menu% 350 OTHERWISE : =FALSE 360 ENDCASE 370 : 380 DEF PROCEvent_MenuChoice(menu%) 390 CASE FNWimp_MenuChoice(0) OF 400 WHEN 1 : 410 WHEN 2 : 420 WHEN 3 :finished%=TRUE 430 ENDCASE 440 ENDPROC 450 : 460 DEF PROCEvent_WindowClose(window%,buttons%) 470 ENDPROC 480 : 490 DEF PROCEvent_Draw(window%,x_origin%,y_origin%) 500 ENDPROC 510 : 520 DEF PROCEvent_MouseClick(window%,icon%,button%,x%,y%) 530 ENDPROC 540 : 550 DEF PROCEvent_KeyPress(window%,icon%,key%) 560 ENDPROC 570 : 580 DEF PROCEvent_LoadFile(file$,type$) 590 CASE type$ OF 600 WHEN "Text" : PROCFile_Load(file$) 610 ENDCASE 620 ENDPROC 630 : 640 DEF PROCEvent_SaveFile(file$,window%) 650 CASE window% OF 660 WHEN Save_Window% : 670 PROCFile_Sort(file$) 680 PROCFile_Save(file$) 690 PROCWimp_MenuClose 700 ENDCASE 710 ENDPROC 720 : 730 REM ------------------- 740 REM Non-Wimp procedures 750 REM ------------------- 760 : 770 DEF PROCFile_Load(file$) 780 LOCAL F%,Line%,Line$ 790 F%=OPENIN(file$) 800 Line%=0 810 REPEAT 820 Line$=GET$#F% 830 CASE Line$ OF 840 WHEN "" 850 OTHERWISE : 860 Line%+=1 870 PROCWimp_WindowAlert(STR$(Line%),Line$) 880 ENDCASE 890 UNTIL EOF#F% 900 CLOSE#F% 910 NoOfLines%=Line% 920 PROCWimp_WindowAlert("Number of lines of data",STR$NoOfLines%) 930 ENDPROC 940 : 950 DEF PROCFile_Sort(file$) 960 PROCWimp_WindowAlert("Mock Sort",file$) 970 ENDPROC 980 : 990 DEF PROCFile_Save(file$) 1000 PROCWimp_WindowAlert("Mock Save",file$) 1010 ENDPROC 1020 1030
ț "<Obey$Dir>.Wimp" " �Wimp_Start("Sort_3",545,425) �User_SetInitialData ( �Create_Windows 2 �Create_Menus < �Wimp_WaitForEvent F �Wimp_CloseDown P � Z : d � �User_SetInitialData n � x : � � �Create_Windows �+ Info_Window%=�Wimp_WindowLoad("Info") �+ Save_Window%=�Wimp_WindowLoad("Save") �( Bar_Icon%=�Wimp_IconBar("!Sort_3") � � � : � � �Event_Save(window%) � Ȏ window% � � � Save_Window% :=� � :=� � � � : �' � �Event_Sprites(window%)=sprites% : � �Create_Menus = menu$="!Sort_3\Info>Info_Window%\Save>Save_Window%\Quit" "& Bar_Menu%=�Wimp_MenuCreate(menu$) , � 6 : @ � �Event_Menu(window%) J Ȏ window% � T � Bar_Window% : =Bar_Menu% ^ : =� h � r : | � �Event_MenuChoice(menu%) � Ȏ �Wimp_MenuChoice(0) � � � 1 : � � 2 : � � 3 :finished%=� � � � � � : �+ � �Event_WindowClose(window%,buttons%) � � � : �/ � �Event_Draw(window%,x_origin%,y_origin%) � � � : 5 � �Event_MouseClick(window%,icon%,button%,x%,y%) � : &* � �Event_KeyPress(window%,icon%,key%) 0 � : : D# � �Event_LoadFile(file$,type$) N Ȏ type$ � X" � "Text" : �File_Load(file$) b � l � v : �% � �Event_SaveFile(file$,window%) � Ȏ window% � � � Save_Window% : � �File_Sort(file$) � �File_Save(file$) � �Wimp_MenuClose � � � � � : � � ------------------- � � Non-Wimp procedures � � ------------------- � : � �File_Load(file$) � F%,Line%,Line$ F%=�(file$) Line%=0 * � 4 Line$=�#F% > Ȏ Line$ � H � "" R : \ Line%+=1 f) �Wimp_WindowAlert(�(Line%),Line$) p � z � �#F% � �#F% � NoOfLines%=Line% �> �Wimp_WindowAlert("Number of lines of data",�NoOfLines%) � � � : � � �File_Sort(file$) �* �Wimp_WindowAlert("Mock Sort",file$) � � � : � � �File_Save(file$) �* �Wimp_WindowAlert("Mock Save",file$) � � � �
00000000 0d 00 0a 19 20 c8 9b 20 22 3c 4f 62 65 79 24 44 |.... .. "<Obey$D| 00000010 69 72 3e 2e 57 69 6d 70 22 0d 00 14 22 20 f2 57 |ir>.Wimp"..." .W| 00000020 69 6d 70 5f 53 74 61 72 74 28 22 53 6f 72 74 5f |imp_Start("Sort_| 00000030 33 22 2c 35 34 35 2c 34 32 35 29 0d 00 1e 19 20 |3",545,425).... | 00000040 f2 55 73 65 72 5f 53 65 74 49 6e 69 74 69 61 6c |.User_SetInitial| 00000050 44 61 74 61 0d 00 28 14 20 f2 43 72 65 61 74 65 |Data..(. .Create| 00000060 5f 57 69 6e 64 6f 77 73 0d 00 32 12 20 f2 43 72 |_Windows..2. .Cr| 00000070 65 61 74 65 5f 4d 65 6e 75 73 0d 00 3c 17 20 f2 |eate_Menus..<. .| 00000080 57 69 6d 70 5f 57 61 69 74 46 6f 72 45 76 65 6e |Wimp_WaitForEven| 00000090 74 0d 00 46 14 20 f2 57 69 6d 70 5f 43 6c 6f 73 |t..F. .Wimp_Clos| 000000a0 65 44 6f 77 6e 0d 00 50 06 20 e0 0d 00 5a 06 20 |eDown..P. ...Z. | 000000b0 3a 0d 00 64 1b 20 dd 20 f2 55 73 65 72 5f 53 65 |:..d. . .User_Se| 000000c0 74 49 6e 69 74 69 61 6c 44 61 74 61 0d 00 6e 06 |tInitialData..n.| 000000d0 20 e1 0d 00 78 06 20 3a 0d 00 82 16 20 dd 20 f2 | ...x. :.... . .| 000000e0 43 72 65 61 74 65 5f 57 69 6e 64 6f 77 73 0d 00 |Create_Windows..| 000000f0 8c 2b 20 20 49 6e 66 6f 5f 57 69 6e 64 6f 77 25 |.+ Info_Window%| 00000100 3d a4 57 69 6d 70 5f 57 69 6e 64 6f 77 4c 6f 61 |=.Wimp_WindowLoa| 00000110 64 28 22 49 6e 66 6f 22 29 0d 00 96 2b 20 20 53 |d("Info")...+ S| 00000120 61 76 65 5f 57 69 6e 64 6f 77 25 3d a4 57 69 6d |ave_Window%=.Wim| 00000130 70 5f 57 69 6e 64 6f 77 4c 6f 61 64 28 22 53 61 |p_WindowLoad("Sa| 00000140 76 65 22 29 0d 00 a0 28 20 20 42 61 72 5f 49 63 |ve")...( Bar_Ic| 00000150 6f 6e 25 3d a4 57 69 6d 70 5f 49 63 6f 6e 42 61 |on%=.Wimp_IconBa| 00000160 72 28 22 21 53 6f 72 74 5f 33 22 29 0d 00 aa 06 |r("!Sort_3")....| 00000170 20 e1 0d 00 b4 06 20 3a 0d 00 be 1b 20 dd 20 a4 | ..... :.... . .| 00000180 45 76 65 6e 74 5f 53 61 76 65 28 77 69 6e 64 6f |Event_Save(windo| 00000190 77 25 29 0d 00 c8 11 20 c8 8e 20 77 69 6e 64 6f |w%).... .. windo| 000001a0 77 25 20 ca 0d 00 d2 18 20 20 c9 20 53 61 76 65 |w% ..... . Save| 000001b0 5f 57 69 6e 64 6f 77 25 20 3a 3d b9 0d 00 dc 13 |_Window% :=.....| 000001c0 20 20 7f 20 20 20 20 20 20 20 20 20 3a 3d a3 0d | . :=..| 000001d0 00 e6 06 20 cb 0d 00 f0 06 20 3a 0d 00 fa 27 20 |... ..... :...' | 000001e0 dd 20 a4 45 76 65 6e 74 5f 53 70 72 69 74 65 73 |. .Event_Sprites| 000001f0 28 77 69 6e 64 6f 77 25 29 3d 73 70 72 69 74 65 |(window%)=sprite| 00000200 73 25 0d 01 04 06 20 3a 0d 01 0e 14 20 dd 20 f2 |s%.... :.... . .| 00000210 43 72 65 61 74 65 5f 4d 65 6e 75 73 0d 01 18 3d |Create_Menus...=| 00000220 20 6d 65 6e 75 24 3d 22 21 53 6f 72 74 5f 33 5c | menu$="!Sort_3\| 00000230 49 6e 66 6f 3e 49 6e 66 6f 5f 57 69 6e 64 6f 77 |Info>Info_Window| 00000240 25 5c 53 61 76 65 3e 53 61 76 65 5f 57 69 6e 64 |%\Save>Save_Wind| 00000250 6f 77 25 5c 51 75 69 74 22 0d 01 22 26 20 42 61 |ow%\Quit".."& Ba| 00000260 72 5f 4d 65 6e 75 25 3d a4 57 69 6d 70 5f 4d 65 |r_Menu%=.Wimp_Me| 00000270 6e 75 43 72 65 61 74 65 28 6d 65 6e 75 24 29 0d |nuCreate(menu$).| 00000280 01 2c 06 20 e1 0d 01 36 06 20 3a 0d 01 40 1b 20 |.,. ...6. :..@. | 00000290 dd 20 a4 45 76 65 6e 74 5f 4d 65 6e 75 28 77 69 |. .Event_Menu(wi| 000002a0 6e 64 6f 77 25 29 0d 01 4a 11 20 c8 8e 20 77 69 |ndow%)..J. .. wi| 000002b0 6e 64 6f 77 25 20 ca 0d 01 54 1f 20 c9 20 42 61 |ndow% ...T. . Ba| 000002c0 72 5f 57 69 6e 64 6f 77 25 20 3a 20 3d 42 61 72 |r_Window% : =Bar| 000002d0 5f 4d 65 6e 75 25 0d 01 5e 0b 20 7f 20 3a 20 3d |_Menu%..^. . : =| 000002e0 a3 0d 01 68 06 20 cb 0d 01 72 06 20 3a 0d 01 7c |...h. ...r. :..|| 000002f0 1f 20 dd 20 f2 45 76 65 6e 74 5f 4d 65 6e 75 43 |. . .Event_MenuC| 00000300 68 6f 69 63 65 28 6d 65 6e 75 25 29 0d 01 86 1d |hoice(menu%)....| 00000310 20 c8 8e 20 a4 57 69 6d 70 5f 4d 65 6e 75 43 68 | .. .Wimp_MenuCh| 00000320 6f 69 63 65 28 30 29 20 ca 0d 01 90 0a 20 c9 20 |oice(0) ..... . | 00000330 31 20 3a 0d 01 9a 0a 20 c9 20 32 20 3a 0d 01 a4 |1 :.... . 2 :...| 00000340 15 20 c9 20 33 20 3a 66 69 6e 69 73 68 65 64 25 |. . 3 :finished%| 00000350 3d b9 0d 01 ae 06 20 cb 0d 01 b8 06 20 e1 0d 01 |=..... ..... ...| 00000360 c2 06 20 3a 0d 01 cc 2b 20 dd 20 f2 45 76 65 6e |.. :...+ . .Even| 00000370 74 5f 57 69 6e 64 6f 77 43 6c 6f 73 65 28 77 69 |t_WindowClose(wi| 00000380 6e 64 6f 77 25 2c 62 75 74 74 6f 6e 73 25 29 0d |ndow%,buttons%).| 00000390 01 d6 06 20 e1 0d 01 e0 06 20 3a 0d 01 ea 2f 20 |... ..... :.../ | 000003a0 dd 20 f2 45 76 65 6e 74 5f 44 72 61 77 28 77 69 |. .Event_Draw(wi| 000003b0 6e 64 6f 77 25 2c 78 5f 6f 72 69 67 69 6e 25 2c |ndow%,x_origin%,| 000003c0 79 5f 6f 72 69 67 69 6e 25 29 0d 01 f4 06 20 e1 |y_origin%).... .| 000003d0 0d 01 fe 06 20 3a 0d 02 08 35 20 dd 20 f2 45 76 |.... :...5 . .Ev| 000003e0 65 6e 74 5f 4d 6f 75 73 65 43 6c 69 63 6b 28 77 |ent_MouseClick(w| 000003f0 69 6e 64 6f 77 25 2c 69 63 6f 6e 25 2c 62 75 74 |indow%,icon%,but| 00000400 74 6f 6e 25 2c 78 25 2c 79 25 29 0d 02 12 06 20 |ton%,x%,y%).... | 00000410 e1 0d 02 1c 06 20 3a 0d 02 26 2a 20 dd 20 f2 45 |..... :..&* . .E| 00000420 76 65 6e 74 5f 4b 65 79 50 72 65 73 73 28 77 69 |vent_KeyPress(wi| 00000430 6e 64 6f 77 25 2c 69 63 6f 6e 25 2c 6b 65 79 25 |ndow%,icon%,key%| 00000440 29 0d 02 30 06 20 e1 0d 02 3a 06 20 3a 0d 02 44 |)..0. ...:. :..D| 00000450 23 20 dd 20 f2 45 76 65 6e 74 5f 4c 6f 61 64 46 |# . .Event_LoadF| 00000460 69 6c 65 28 66 69 6c 65 24 2c 74 79 70 65 24 29 |ile(file$,type$)| 00000470 0d 02 4e 0f 20 c8 8e 20 74 79 70 65 24 20 ca 0d |..N. .. type$ ..| 00000480 02 58 22 20 20 c9 20 22 54 65 78 74 22 20 3a 20 |.X" . "Text" : | 00000490 f2 46 69 6c 65 5f 4c 6f 61 64 28 66 69 6c 65 24 |.File_Load(file$| 000004a0 29 0d 02 62 06 20 cb 0d 02 6c 06 20 e1 0d 02 76 |)..b. ...l. ...v| 000004b0 06 20 3a 0d 02 80 25 20 dd 20 f2 45 76 65 6e 74 |. :...% . .Event| 000004c0 5f 53 61 76 65 46 69 6c 65 28 66 69 6c 65 24 2c |_SaveFile(file$,| 000004d0 77 69 6e 64 6f 77 25 29 0d 02 8a 11 20 c8 8e 20 |window%).... .. | 000004e0 77 69 6e 64 6f 77 25 20 ca 0d 02 94 15 20 c9 20 |window% ..... . | 000004f0 53 61 76 65 5f 57 69 6e 64 6f 77 25 20 3a 0d 02 |Save_Window% :..| 00000500 9e 17 20 20 f2 46 69 6c 65 5f 53 6f 72 74 28 66 |.. .File_Sort(f| 00000510 69 6c 65 24 29 0d 02 a8 17 20 20 f2 46 69 6c 65 |ile$).... .File| 00000520 5f 53 61 76 65 28 66 69 6c 65 24 29 0d 02 b2 15 |_Save(file$)....| 00000530 20 20 f2 57 69 6d 70 5f 4d 65 6e 75 43 6c 6f 73 | .Wimp_MenuClos| 00000540 65 0d 02 bc 06 20 cb 0d 02 c6 06 20 e1 0d 02 d0 |e.... ..... ....| 00000550 06 20 3a 0d 02 da 1a 20 f4 20 2d 2d 2d 2d 2d 2d |. :.... . ------| 00000560 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 02 e4 |-------------...| 00000570 1a 20 f4 20 4e 6f 6e 2d 57 69 6d 70 20 70 72 6f |. . Non-Wimp pro| 00000580 63 65 64 75 72 65 73 0d 02 ee 1a 20 f4 20 2d 2d |cedures.... . --| 00000590 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000005a0 2d 0d 02 f8 07 20 20 3a 0d 03 02 18 20 dd 20 f2 |-.... :.... . .| 000005b0 46 69 6c 65 5f 4c 6f 61 64 28 66 69 6c 65 24 29 |File_Load(file$)| 000005c0 0d 03 0c 16 20 20 ea 20 46 25 2c 4c 69 6e 65 25 |.... . F%,Line%| 000005d0 2c 4c 69 6e 65 24 0d 03 16 11 20 20 46 25 3d 8e |,Line$.... F%=.| 000005e0 28 66 69 6c 65 24 29 0d 03 20 0d 20 20 4c 69 6e |(file$).. . Lin| 000005f0 65 25 3d 30 0d 03 2a 07 20 20 f5 0d 03 34 11 20 |e%=0..*. ...4. | 00000600 20 20 4c 69 6e 65 24 3d be 23 46 25 0d 03 3e 11 | Line$=.#F%..>.| 00000610 20 20 20 c8 8e 20 4c 69 6e 65 24 20 ca 0d 03 48 | .. Line$ ...H| 00000620 0b 20 20 20 c9 20 22 22 0d 03 52 0a 20 20 20 7f |. . ""..R. .| 00000630 20 3a 0d 03 5c 10 20 20 20 20 4c 69 6e 65 25 2b | :..\. Line%+| 00000640 3d 31 0d 03 66 29 20 20 20 20 f2 57 69 6d 70 5f |=1..f) .Wimp_| 00000650 57 69 6e 64 6f 77 41 6c 65 72 74 28 c3 28 4c 69 |WindowAlert(.(Li| 00000660 6e 65 25 29 2c 4c 69 6e 65 24 29 0d 03 70 08 20 |ne%),Line$)..p. | 00000670 20 20 cb 0d 03 7a 0c 20 20 fd 20 c5 23 46 25 0d | ...z. . .#F%.| 00000680 03 84 0a 20 20 d9 23 46 25 0d 03 8e 16 20 20 4e |... .#F%.... N| 00000690 6f 4f 66 4c 69 6e 65 73 25 3d 4c 69 6e 65 25 0d |oOfLines%=Line%.| 000006a0 03 98 3e 20 20 f2 57 69 6d 70 5f 57 69 6e 64 6f |..> .Wimp_Windo| 000006b0 77 41 6c 65 72 74 28 22 4e 75 6d 62 65 72 20 6f |wAlert("Number o| 000006c0 66 20 6c 69 6e 65 73 20 6f 66 20 64 61 74 61 22 |f lines of data"| 000006d0 2c c3 4e 6f 4f 66 4c 69 6e 65 73 25 29 0d 03 a2 |,.NoOfLines%)...| 000006e0 06 20 e1 0d 03 ac 06 20 3a 0d 03 b6 18 20 dd 20 |. ..... :.... . | 000006f0 f2 46 69 6c 65 5f 53 6f 72 74 28 66 69 6c 65 24 |.File_Sort(file$| 00000700 29 0d 03 c0 2a 20 20 f2 57 69 6d 70 5f 57 69 6e |)...* .Wimp_Win| 00000710 64 6f 77 41 6c 65 72 74 28 22 4d 6f 63 6b 20 53 |dowAlert("Mock S| 00000720 6f 72 74 22 2c 66 69 6c 65 24 29 0d 03 ca 06 20 |ort",file$).... | 00000730 e1 0d 03 d4 06 20 3a 0d 03 de 18 20 dd 20 f2 46 |..... :.... . .F| 00000740 69 6c 65 5f 53 61 76 65 28 66 69 6c 65 24 29 0d |ile_Save(file$).| 00000750 03 e8 2a 20 20 f2 57 69 6d 70 5f 57 69 6e 64 6f |..* .Wimp_Windo| 00000760 77 41 6c 65 72 74 28 22 4d 6f 63 6b 20 53 61 76 |wAlert("Mock Sav| 00000770 65 22 2c 66 69 6c 65 24 29 0d 03 f2 06 20 e1 0d |e",file$).... ..| 00000780 03 fc 05 20 0d 04 06 04 0d ff |... ......| 0000078a