Catalog · How the catalog works
comp_p65pas
6502 CPU command line Pascal compiler
- ★ 3 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
P65Pas 1.0.0
Cross-platform Pascal cross-compiler for 6502 CPU.
WARNING: This is not a stable version is a development version. For stable compiler go to https://github.com/t-edson/P65Pas
P65Pas is a command line Pascal compiler, which generates binary for the 6502 CPU.
The version of the compiler including a IDE is in https://github.com/t-edson/P65Pas
The P65Pas compiler includes optimization options so the code obtained is generally compact.
Installation
P65Pas doesn't need installation, and have not dependencies, except the commons of the operative system, where it's runnig.
To run, it's only needed to download the folder from GitHub. There is compiled binaries for Windows-64 version (P65Pas-win64.exe) and Ubuntu version (P65Pas-linux).
If it's required other platform, it needs to be compiled from the source code.
The folder includes the following files and directories:
- p65pas-win64.exe -> Executable of the Compiler for Windows.
- p65pas-linux -> Executable of the compiler for Linux.
- "/docs" -> Includes the documentation.
- "/samples" -> Sample programs.
- "/src" -> Source files.
- "/temp" -> Temporal folder.
- "/testcode65"-> Programs for test the compiler.
- "/units" -> Units included with the compiler .
Command line syntax
SYNTAX: p65pas <input file> <options>
COMPILING OPTIONS:
-Cn Compilation null. Do nothing. -Ca Do only the Analysis stage. -Cao Do Analysis and Optimization stage. -C Do the Complete compilation. DEFAULT option. -Cf Disable compiling FOR like REPEAT structure.
OPTIMIZATION OPTIONS: -Ov Reuse procedure local variables. -Or Optimize the RTS instruction in procedures. -Ou Removes unnecessary ASM instructions.
ASSEMBLER OPTIONS: -A0 Output in normal Assembler. -A1 Output in BASIC POKE's loader. -Ac Include commnents in ASM output. -Av Include variables information section. -Au Exclude unused variables in variable section. -An Include variable names in instructions. -Aa Include memory address in instructions.
OTHER OPTIONS: -Fu<path> Add a new path to the unit paths list. -Fo<path> Set the path of the output *.hex file. -Dn Disable output generated by directives
Language syntax
P65Pas works with a simplified version of the Pascal language, that has been adapted to work with limited resources small devices.
Currently, it only supports basic types.
A notable difference from the Pascal used by the compiler is that array literals are all defined using square brackets instead of parentheses, even when initializing constants.
For information about the syntax, check https://github.com/t-edson/P65Pas

