diff --git a/docs/usage.md b/docs/usage.md index af65bfd..3b92cf2 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -5,8 +5,8 @@ Syntax: mp .pas [options] -ipath: Add the folder to the unit include path -define: Define the symbol --cpu: Specify the CPU mode: 6502 (default), 65c02, 65816 -target: Specify the target platform: a8 (default), c4p, c64, neo, raw, x16 +-cpu: Specify the CPU mode: 6502 (default), 65c02, 65816 -code:
Specify the memory start address for the code -data:
Specify the memory start address for variables and arrays -stack:
Specify the memory start address for the software stack (64 bytes required) @@ -16,7 +16,11 @@ Syntax: mp .pas [options] ``` The unit include path must contain the **Mad-Pascal** folder `lib` which contains the standard Pascal libraries. -Additional optional standard libraries are in the `blib`, `dlib` and `wlib` folders. +During startup, **Mad-Pascal** looks for the `lib` folder in the same folder that also contains the **Mad-Pascal** executable. +If the `lib` is not found, it will try again with the first and second parent folders. +This way, you do not have to specify the `-ipath` parameter when using the standard folder structure. +Additional optional standard libraries are in the `blib`, `dlib`, and `wlib` folders. +They must be added explicitly using the `-ipath` parameter if they are required. mp.exe example.pas -ipath:\lib -ipath:\blib @@ -30,16 +34,16 @@ The `-target` option supports the following values for the target platform: The `-diag` option activates the generation of an additional `*.txt` file with information about all used variables, procedures, and functions. -The default output file name is `.a65`. It must be assembled using **Mad-Assembler**. The assembler include path must contain the **Mad-Pascal** assembler base folder using, for example: +The default output file name is `.a65`. It must be assembled using **Mad-Assembler**. The assembler include path must contain the **Mad-Pascal** assembler base folder, using, for example: mads example.a65 -x -i:\base -Using the `-x` option to **Exclude unreferenced procedures** is mandatory. It ensures that only the used parts of the libraries are compiled and the resulting **MOS 6502** object code has the minimum size. +Using the `-x` option to **Exclude unreferenced procedures** is mandatory. It ensures that only the used parts of the libraries are compiled, and the resulting **MOS 6502** object code has the minimum size. ## Exit Codes 0 = No errors occurred, the output files were created correctly - 2 = Errors occurred, and compiling was aborted - 3 = Wrong parameters were specified, and compiling was not started + 2 = Errors occurred, and compilation was aborted + 3 = Wrong parameters were specified, and compilation was not started Warning messages issued by **Mad-Pascal** do not affect the exit code.