Home » Archimedes archive » Acorn User » AU 1995-10.adf » !Direct » Director/!Director/Menus/Files/Filetypes

Director/!Director/Menus/Files/Filetypes

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 » Acorn User » AU 1995-10.adf » !Direct
Filename: Director/!Director/Menus/Files/Filetypes
Read OK:
File size: 03D6 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
    1REM >Director:Menus.Files.FileTypes
    2
    3REM This makes a menu of all the file types
    4*Set Director$Menu FileTypes
    5
    6ON ERROR: ON ERROR OFF: ERROR ERR,REPORT$+" at "+STR$ERL
    7
    8DIM from% 256
    9DIM block% 256
   10XOS_ReadVarVal=FNswi_number("XOS_ReadVarVal")
   11Menu=FNswi_number("Director_Menu")
   12EndMenu=FNswi_number("Director_EndMenu")
   13Option=FNswi_number("Director_Option")
   14Command=FNswi_number("Director_Command")
   15Dash=FNswi_number("Director_Dash")
   16
   17$from%="File$Type_*"
   18
   19SYS Menu,"<Director$Menu> -temp"
   20
   21context%=0
   22REPEAT
   23  SYS XOS_ReadVarVal,from%,block%,256,context%,3 TO ,,len%,context%;flags%
   24  ok%=len%>0 AND (flags% AND 1)=0
   25  IF ok% THEN
   26    block%?len%=13
   27    type$=""
   28    FOR i%=10 TO 12
   29      type$+=CHR$(context%?i%)
   30    NEXT i%
   31    SYS Option,""""+$block%+""" -sprite small_"+type$
   32    SYS Command,"SetType <Path> "+$block%
   33  ENDIF
   34UNTIL NOT ok%
   35
   36SYS EndMenu
   37
   38
   39END
   40
   41DEF FNswi_number(name$)
   42  SYS "OS_SWINumberFromString",,name$ TO A%
   43=A%
%� >Director:Menus.Files.FileTypes

-� This makes a menu of all the file types
 *Set Director$Menu FileTypes

 � �: � � �: � �,�$+" at "+Þ

� from% 256
	� block% 256

0XOS_ReadVarVal=�swi_number("XOS_ReadVarVal")
%Menu=�swi_number("Director_Menu")
+EndMenu=�swi_number("Director_EndMenu")

)Option=�swi_number("Director_Option")
+Command=�swi_number("Director_Command")
%Dash=�swi_number("Director_Dash")

$from%="File$Type_*"

#ș Menu,"<Director$Menu> -temp"

context%=0
�
L  ș XOS_ReadVarVal,from%,block%,256,context%,3 � ,,len%,context%;flags%
!  ok%=len%>0 � (flags% � 1)=0

  � ok% �
    block%?len%=13
    type$=""
    � i%=10 � 12
      type$+=�(context%?i%)
    � i%
8    ș Option,""""+$block%+""" -sprite small_"+type$
 ,    ș Command,"SetType <Path> "+$block%
!  �
"� � ok%
#
$ș EndMenu
%
&
'�
(
)� �swi_number(name$)
*-  ș "OS_SWINumberFromString",,name$ � A%
+=A%
�
00000000  0d 00 01 25 f4 20 3e 44  69 72 65 63 74 6f 72 3a  |...%. >Director:|
00000010  4d 65 6e 75 73 2e 46 69  6c 65 73 2e 46 69 6c 65  |Menus.Files.File|
00000020  54 79 70 65 73 0d 00 02  04 0d 00 03 2d f4 20 54  |Types.......-. T|
00000030  68 69 73 20 6d 61 6b 65  73 20 61 20 6d 65 6e 75  |his makes a menu|
00000040  20 6f 66 20 61 6c 6c 20  74 68 65 20 66 69 6c 65  | of all the file|
00000050  20 74 79 70 65 73 0d 00  04 20 2a 53 65 74 20 44  | types... *Set D|
00000060  69 72 65 63 74 6f 72 24  4d 65 6e 75 20 46 69 6c  |irector$Menu Fil|
00000070  65 54 79 70 65 73 0d 00  05 04 0d 00 06 20 ee 20  |eTypes....... . |
00000080  85 3a 20 ee 20 85 20 87  3a 20 85 20 9f 2c f6 24  |.: . . .: . .,.$|
00000090  2b 22 20 61 74 20 22 2b  c3 9e 0d 00 07 04 0d 00  |+" at "+........|
000000a0  08 0f de 20 66 72 6f 6d  25 20 32 35 36 0d 00 09  |... from% 256...|
000000b0  10 de 20 62 6c 6f 63 6b  25 20 32 35 36 0d 00 0a  |.. block% 256...|
000000c0  30 58 4f 53 5f 52 65 61  64 56 61 72 56 61 6c 3d  |0XOS_ReadVarVal=|
000000d0  a4 73 77 69 5f 6e 75 6d  62 65 72 28 22 58 4f 53  |.swi_number("XOS|
000000e0  5f 52 65 61 64 56 61 72  56 61 6c 22 29 0d 00 0b  |_ReadVarVal")...|
000000f0  25 4d 65 6e 75 3d a4 73  77 69 5f 6e 75 6d 62 65  |%Menu=.swi_numbe|
00000100  72 28 22 44 69 72 65 63  74 6f 72 5f 4d 65 6e 75  |r("Director_Menu|
00000110  22 29 0d 00 0c 2b 45 6e  64 4d 65 6e 75 3d a4 73  |")...+EndMenu=.s|
00000120  77 69 5f 6e 75 6d 62 65  72 28 22 44 69 72 65 63  |wi_number("Direc|
00000130  74 6f 72 5f 45 6e 64 4d  65 6e 75 22 29 0d 00 0d  |tor_EndMenu")...|
00000140  29 4f 70 74 69 6f 6e 3d  a4 73 77 69 5f 6e 75 6d  |)Option=.swi_num|
00000150  62 65 72 28 22 44 69 72  65 63 74 6f 72 5f 4f 70  |ber("Director_Op|
00000160  74 69 6f 6e 22 29 0d 00  0e 2b 43 6f 6d 6d 61 6e  |tion")...+Comman|
00000170  64 3d a4 73 77 69 5f 6e  75 6d 62 65 72 28 22 44  |d=.swi_number("D|
00000180  69 72 65 63 74 6f 72 5f  43 6f 6d 6d 61 6e 64 22  |irector_Command"|
00000190  29 0d 00 0f 25 44 61 73  68 3d a4 73 77 69 5f 6e  |)...%Dash=.swi_n|
000001a0  75 6d 62 65 72 28 22 44  69 72 65 63 74 6f 72 5f  |umber("Director_|
000001b0  44 61 73 68 22 29 0d 00  10 04 0d 00 11 18 24 66  |Dash")........$f|
000001c0  72 6f 6d 25 3d 22 46 69  6c 65 24 54 79 70 65 5f  |rom%="File$Type_|
000001d0  2a 22 0d 00 12 04 0d 00  13 23 c8 99 20 4d 65 6e  |*".......#.. Men|
000001e0  75 2c 22 3c 44 69 72 65  63 74 6f 72 24 4d 65 6e  |u,"<Director$Men|
000001f0  75 3e 20 2d 74 65 6d 70  22 0d 00 14 04 0d 00 15  |u> -temp".......|
00000200  0e 63 6f 6e 74 65 78 74  25 3d 30 0d 00 16 05 f5  |.context%=0.....|
00000210  0d 00 17 4c 20 20 c8 99  20 58 4f 53 5f 52 65 61  |...L  .. XOS_Rea|
00000220  64 56 61 72 56 61 6c 2c  66 72 6f 6d 25 2c 62 6c  |dVarVal,from%,bl|
00000230  6f 63 6b 25 2c 32 35 36  2c 63 6f 6e 74 65 78 74  |ock%,256,context|
00000240  25 2c 33 20 b8 20 2c 2c  6c 65 6e 25 2c 63 6f 6e  |%,3 . ,,len%,con|
00000250  74 65 78 74 25 3b 66 6c  61 67 73 25 0d 00 18 21  |text%;flags%...!|
00000260  20 20 6f 6b 25 3d 6c 65  6e 25 3e 30 20 80 20 28  |  ok%=len%>0 . (|
00000270  66 6c 61 67 73 25 20 80  20 31 29 3d 30 0d 00 19  |flags% . 1)=0...|
00000280  0d 20 20 e7 20 6f 6b 25  20 8c 0d 00 1a 16 20 20  |.  . ok% .....  |
00000290  20 20 62 6c 6f 63 6b 25  3f 6c 65 6e 25 3d 31 33  |  block%?len%=13|
000002a0  0d 00 1b 10 20 20 20 20  74 79 70 65 24 3d 22 22  |....    type$=""|
000002b0  0d 00 1c 14 20 20 20 20  e3 20 69 25 3d 31 30 20  |....    . i%=10 |
000002c0  b8 20 31 32 0d 00 1d 1f  20 20 20 20 20 20 74 79  |. 12....      ty|
000002d0  70 65 24 2b 3d bd 28 63  6f 6e 74 65 78 74 25 3f  |pe$+=.(context%?|
000002e0  69 25 29 0d 00 1e 0c 20  20 20 20 ed 20 69 25 0d  |i%)....    . i%.|
000002f0  00 1f 38 20 20 20 20 c8  99 20 4f 70 74 69 6f 6e  |..8    .. Option|
00000300  2c 22 22 22 22 2b 24 62  6c 6f 63 6b 25 2b 22 22  |,""""+$block%+""|
00000310  22 20 2d 73 70 72 69 74  65 20 73 6d 61 6c 6c 5f  |" -sprite small_|
00000320  22 2b 74 79 70 65 24 0d  00 20 2c 20 20 20 20 c8  |"+type$.. ,    .|
00000330  99 20 43 6f 6d 6d 61 6e  64 2c 22 53 65 74 54 79  |. Command,"SetTy|
00000340  70 65 20 3c 50 61 74 68  3e 20 22 2b 24 62 6c 6f  |pe <Path> "+$blo|
00000350  63 6b 25 0d 00 21 07 20  20 cd 0d 00 22 0b fd 20  |ck%..!.  ...".. |
00000360  ac 20 6f 6b 25 0d 00 23  04 0d 00 24 0e c8 99 20  |. ok%..#...$... |
00000370  45 6e 64 4d 65 6e 75 0d  00 25 04 0d 00 26 04 0d  |EndMenu..%...&..|
00000380  00 27 05 e0 0d 00 28 04  0d 00 29 18 dd 20 a4 73  |.'....(...).. .s|
00000390  77 69 5f 6e 75 6d 62 65  72 28 6e 61 6d 65 24 29  |wi_number(name$)|
000003a0  0d 00 2a 2d 20 20 c8 99  20 22 4f 53 5f 53 57 49  |..*-  .. "OS_SWI|
000003b0  4e 75 6d 62 65 72 46 72  6f 6d 53 74 72 69 6e 67  |NumberFromString|
000003c0  22 2c 2c 6e 61 6d 65 24  20 b8 20 41 25 0d 00 2b  |",,name$ . A%..+|
000003d0  07 3d 41 25 0d ff                                 |.=A%..|
000003d6