prodos-path/README.md

46 lines
1.6 KiB
Markdown
Raw Normal View History

2019-01-10 07:54:22 +00:00
# CMD executable PATH for ProDOS's BASIC.SYSTEM
2019-01-07 00:44:54 +00:00
2019-10-01 04:04:44 +00:00
[![Build Status](https://travis-ci.org/a2stuff/prodos-path.svg?branch=master)](https://travis-ci.org/a2stuff/prodos-path)
2020-03-14 17:35:53 +00:00
💾 Disk images can be found on the [Releases](https://github.com/a2stuff/prodos-path/releases) page 💾
2019-01-07 00:44:54 +00:00
Build with [ca65](https://cc65.github.io/doc/ca65.html)
Installation:
* Copy target to ProDOS disk
2019-01-07 01:23:56 +00:00
* From BASIC.SYSTEM prompt, run: `-PATH` from STARTUP (or by hand)
2019-01-07 00:44:54 +00:00
Usage:
```
2019-01-10 05:20:16 +00:00
PATH prefix - set search path(s) - colon delimited
2019-01-10 07:54:22 +00:00
PATH - view current search path(s)
cmdname - load and execute named CMD, if in PATH
2019-01-07 00:44:54 +00:00
```
2019-01-10 05:20:16 +00:00
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.
2019-01-08 07:11:00 +00:00
* The command line will be present at $200 (`GETLN` input buffer).
2019-01-10 07:54:22 +00:00
* Supports multi-segment, colon-separated paths, e.g. `/hd/cmds:/hd2/more.cmds`
2019-01-07 01:23:56 +00:00
Example:
```
] -/hd/path - install it
2019-01-10 05:20:16 +00:00
] PATH /hd/cmds:/h2/bin - set PATH
2019-01-07 01:23:56 +00:00
] PATH - verify path
/hd/cmds
] BELL - will invoke /hd/cmds/BELL if present
2019-01-08 07:11:00 +00:00
] HELLO - will invoke /hd/cmds/HELLO if present
2019-01-07 01:23:56 +00:00
```
2019-01-07 00:44:54 +00:00
Notes:
2019-01-10 05:20:16 +00:00
* Allocates a permanent buffer to store the code and path (2 pages)
2019-01-07 01:23:56 +00:00
* Can be invoked as lower case (e.g. `path ...`)
2019-01-08 07:11:00 +00:00
* Applesoft BASIC commands are unaffected (but can't be CMD names)
2019-01-10 07:54:22 +00:00
* Search order when a command is typed:
* ProDOS BASIC.SYSTEM intrinsics (`CAT`, `PREFIX`, etc)
* AppleSoft keywords (`LIST`, `PRINT`, etc)
* CMD files in paths, in listed order