diff --git a/README.md b/README.md index b6006a1..74da5e3 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,40 @@ ProDOS path. #### HostFS Wildcards -... +Applecorn HostFS provides support for wildcards. The following wildcard +characters are used: + - `#` or `?` - matches any single character + - `*` - matches zero or more characters + +The HostFS tries to follow the same conventions as Acorn's ADFS, which +allows wildcards to be used in some cases to abbreviate long pathnames +and in others to specify a list of files to operate on at once. + +Like ADFS, HostFS commands accept several different types of file argument. +Following Acorn's convention, these may be described as follows: + - `` is an 'object specification'. This is a pathname without + any wildcard characters, as described in the previous section. + - `<*obspec*>` is an 'wildcard object specification'. This is a + pathname which may include the wildcard characters. If the + wildcard characters specified result in multiple matching objects, + the first one is used. + - `` is an 'list specification'. This is also a + pathname which may include the wildcard characters. However, if the + wildcard results in multiple matches, the command will operate + on all of these files. + - `` is a drive number. (For example, `:61`). + +Wildcards are expanded wherever they appear in the path with one +exception. For non-leaf nodes, the first match will be always be +substituted. In the case of `<*objspec*>` the first match for the leaf +node will always be used. However for `` all matches of the +leaf node will be operated upon. + +Examples: `:71/T*DIR/TEST??.TXT`, `*A*/FILES/C*/TEST*.TXT` + +Wildcards may also be used for `OSFILE` and `OSFIND` system calls, so +BASIC command like `LOAD""`, `CHAIN""`, `OPENIN""` and `OPENUP""` can +use wildcards to specify the file to open. ### Star Commands @@ -163,63 +196,75 @@ ProDOS path. lives in auxiliary memory, you can usually restart Applecorn by running it again and recover your program with `OLD`. -`*HELP` - Prints out information similar to the same command on the BBC micro. +`*HELP [topic]` - Prints out information similar to the same command on the BBC micro. Specifically it lists the version of Applecorn MOS and the name of the current language ROM. + - `*HELP` shows the version number and the language ROM in use. - `*HELP MOS` shows the available MOS star commands. - `*HELP HOSTFS` shows the available HostFS star commands. -`*CAT [dirpath]` (or `*. [dirpath]`) - Simple listing of the files in the +`*CAT [<*objspec*>]` (or `*. [*objspec*]`) - Simple listing of the files in the specified directory, or the current working directory ('current prefix') if no directory argument is given. -`*EX` - Detailed listing of files in the current directory showing load -address, length and permissions. +`*EX [<*objspec*>]` - Detailed listing of files in the current directory +showing the load address, length and permissions. `*EX` expects a directory +as an argument, for example `*EX :71/MYDIR`. -`*INFO` - ... +`*INFO []` - Displays the same detailed file listing as `*EX`, +but accepting a ``. `*INFO` expects a list of objects as an +argument, so `*INFO :71/MYDIR/*` would display the same info as the `*EX` +example above. -`*DIR dirpath` - Allows the current directory to be changed to any ProDOS -path. `*CD` and `*CHDIR` are synonyms for `*DIR`. +`*DIR <*objspec*>` - Allows the current directory to be changed to any ProDOS +path. `*CD` and `*CHDIR` are synonyms for `*DIR`. The argument is expected +to be a directory. -`*LOAD filepath SSSS` - Load file `filename` into memory at hex address +`*LOAD <*objspec*> SSSS` - Load file `<*objspec*>` into memory at hex address `SSSS`. If the address `SSSS` is omitted then the file is loaded to the address stored in its aux filetype. -`*SAVE filepath SSSS EEEE` - Save memory from hex address `SSSS` to hex -address `EEEE` into file `filepath`. The start address `SSSS` is -recorded in the aux filetype. +`*SAVE SSSS EEEE` - Save memory from hex address `SSSS` to hex +address `EEEE` into file ``. The start address `SSSS` is +recorded in the aux filetype. (Note, no wildcards when saving.) -`*RUN filepath` - Load file `filepath` into memory at the address stored +`*RUN <*objspec*>` - Load file `filepath` into memory at the address stored in its aux filetype and jump to to it. This is used for loading and -starting machine code programs. +starting machine code programs. You can also simply do `*<*objspec*>` or +`*/<*objspec*>` (the latter form is useful if the name is the same as that +of a ROM routine.) -`*DELETE pathname` - Delete file `pathname` from disk. This command -can also delete directories, provided they are empty. +`*DELETE ` - Delete file `` from disk. This command +can also delete directories, provided they are empty. No wildcards are +allowed. -`*DESTROY ` - ... +`*DESTROY ` - Deletes multiple files as specified by +``. For example, `*DESTROY PROJECT/*.ASM`. -`*RENAME oldpathname newpathname` - Rename file or directory `oldpathname` -to `newpathname`. +`*RENAME ` - Rename file or directory `` +to ``. No wildcards are allowed. -`*DRIVE :sd` - Switch to the specified physical drive. This is equivalent +`*DRIVE ` - Switch to the specified physical drive. This is equivalent to using `*DIR` but does not allow subdirectories to be specified. The working directory will be set to the volume directory corresponding to the physical device specified. -`*FREE :sd` - Shows blocks used and blocks free on the specified physical +`*FREE ` - Shows blocks used and blocks free on the specified physical device. -`*CDIR dirname` - create directory `dirname`. `*MKDIR` is a synonym. +`*CDIR ` - create directory `dirname`. `*MKDIR` is a synonym. -`*ACCESS attribs` - change file permisions. The string `attribs` +`*ACCESS attribs` - change file permisions. The string `attribs` can contain any of the following: - `R` - File is readable - `W` - File is writeable - `L` - File is locked against deletion, renaming and writing. +For example: `*ACCESS *.ASM WR` `*FX a[,x,y]` - invokes `OSBYTE` MOS calls. -`*OPT` - sets file system options. Currently does not do anything. +`*OPT` - sets file system options. `*OPT 255,x` may be used to enable or +disable debugging output. ## How to Build