PATH command for Apple II ProDOS
Go to file
Joshua Bell b81f7b3ecb Allow prefixes which as BASIC tokens 2020-06-07 08:02:08 -07:00
.gitignore wip 2019-01-07 19:36:25 -08:00
.travis.yml Build: Use cc65's make avail 2019-09-22 21:34:34 -07:00
Makefile Allow prefixes which as BASIC tokens 2020-06-07 08:02:08 -07:00
README.md Allow prefixes which as BASIC tokens 2020-06-07 08:02:08 -07:00
bell.cmd.s Don't require CLC, fix BELL, handle spaces in ECHO 2019-01-09 16:09:58 -08:00
echo.cmd.s Don't require CLC, fix BELL, handle spaces in ECHO 2019-01-09 16:09:58 -08:00
hello.cmd.s Don't require CLC, fix BELL, handle spaces in ECHO 2019-01-09 16:09:58 -08:00
online.cmd.s Allow prefixes which as BASIC tokens 2020-06-07 08:02:08 -07:00
package.sh Allow prefixes which as BASIC tokens 2020-06-07 08:02:08 -07:00
path.s Allow prefixes which as BASIC tokens 2020-06-07 08:02:08 -07:00
prodos.inc Added VOLS command 2020-06-06 19:03:20 -07:00

README.md

CMD executable PATH for ProDOS's BASIC.SYSTEM

Build Status

💾 Disk images can be found on the Releases page 💾

Build with ca65

Installation:

  • Copy target to ProDOS disk
  • From BASIC.SYSTEM prompt, run: -PATH from STARTUP (or by hand)

Usage:

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 CMD in the specified directories can be invoked by name.

  • CMD file is loaded at $4000 and invoked; should return (rts) on completion.
  • The command line will be present at $200 (GETLN input buffer).
  • Supports multi-segment, colon-separated paths, e.g. /hd/cmds:/hd2/more.cmds

Example:

] -/hd/path              - install it
] PATH /hd/cmds:/h2/bin  - set PATH
] PATH                   - verify path
/hd/cmds
] BELL                   - will invoke /hd/cmds/BELL if present
] HELLO                  - will invoke /hd/cmds/HELLO if present
] ONLINE                 - will invoke /hd/cmds/ONLINE if present

Notes:

  • 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
  • Allocates a permanent buffer to store the code and path (2 pages)
  • PATH can be invoked as lower case (e.g. path /DISK/CMDS)
  • Commands can be invoked as lower case (e.g. hello)
  • 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, ONLINE is allowed despite conflicting with the valid BASIC statement ONLINE GOTO10 which is short for ON LINE GOTO 10.

Sample commands included:

  • BELL - beeps the speaker
  • HELLO - shows a short message
  • ONLINE - lists online volumes (volume name, slot and drive)