💾 Disk images can be found on the Releases page 💾
Build with ca65
Installation:
- Copy files from the floppy disk image to your Apple's hard disk, in a subdirectory e.g.
/HD/CMD - From BASIC.SYSTEM prompt, run:
PATH, e.g.-/HD/CMD/PATH, either fromSTARTUPor manually
After installation, the usage is:
PATH prefix - set search path(s) - colon delimited
PATH - view current search path(s)
cmdname - load and execute named CMD, if in PATH
- Once set, binary files of type
CMDin the specified directories can be invoked by name. - Supports multi-segment, colon-separated paths, e.g.
/hd/cmds:/hd2/more.cmds
Example:
] -/hd/cmd/path - install it
] PATH /hd/cmd:/h2/bin - set search path with two directories
] PATH - verify search path
/hd/cmd:/h2/bin
] BELL - will invoke /hd/cmd/BELL if present
] HELLO - will invoke /hd/cmd/HELLO if present
] ONLINE - will invoke /hd/cmd/ONLINE if present
Notes:
PATHcan be invoked as lower case (e.g.path /hd/cmd)- Commands can be invoked as lower case (e.g.
hello) - A relative
PATH(e.g.path bin) only works if an explicit prefix is set.- Note that if no prefix has been set, or if you run
prefix /, BASIC.SYSTEM will use the last accessed slot and drive and thePREFIXcommand will report that volume as a prefix even though it is empty.
- Note that if no prefix has been set, or if you run
Sample commands included:
HELLO- shows a short message, for testing purposesECHO- echoes back anything following the commandCD- likePREFIXbut accepts.., e.g.cd ../dirONLINE- lists online volumes (volume name, slot and drive)MEM- show memory stats for the BASIC environmentCOPY- copy a single file, e.g.copy /path/to/file,dstfileTYPE- show file contents (TXT, BAS, or BIN/other), e.g.type filenameTOUCH- apply current ProDOS date/time to a file's modification time, e.g.touch filenameDATE- prints the current ProDOS date and timeCHTYPE- change the type/auxtype of a file, e.g.chtype file,T$F1,A$1234T(type) andA(auxtype) are optional. If neither is specified, current types are shown.SandDarguments can be used to specify slot and drive.
CHTIME- change the modification date/time of a file, e.g.chtime file,A$1234,B$5678A(date) andB(time) are optional. If neither is specified, current values are shown.SandDarguments can be used to specify slot and drive.
BELL- emits the standard Apple II beepBUZZ- emits the ProDOS "nice little tone"HIDE/UNHIDE- sets / clears the "invisible" bit on a file, used in GS/OS Finder
Behavior of PATH:
- Search order when a command is typed:
- ProDOS BASIC.SYSTEM intrinsics (
CAT,PREFIX, etc) - BASIC keywords (
LIST,PRINT, etc) - CMD files in paths, in listed order
- ProDOS BASIC.SYSTEM intrinsics (
- Allocates a permanent buffer to store the code and path (2 pages)
- Applesoft BASIC commands are unaffected (but can't be CMD names)
- Commands with BASIC keywords as prefixes are allowed as long as the command continues with an alphabetic character. For example,
ONLINEis allowed despite conflicting with the valid BASIC statementONLINE GOTO10which is short forON LINE GOTO 10.
- Commands with BASIC keywords as prefixes are allowed as long as the command continues with an alphabetic character. For example,
Protocol for CMD files:
- CMD file is loaded at $4000 and invoked.
- $4000-$5FFF is assumed reserved for the CMD file and any buffers it needs.
- The command line will be present at $200 (
GETLNinput buffer). - Commands can use the BI parser for arguments. See
chtype.cmd.sfor an example. - Exit with
CLCthenRTSto return to the ProDOS BASIC prompt.- To signal an error,
LDAwith a BI error code, thenSECandRTS.
- To signal an error,