4 | 4 |
|
5 | 5 |
**SixtyPical** is a [very low-level](#very-low-level) programming language
|
6 | 6 |
supporting a [sophisticated static analysis](#sophisticated-static-analysis).
|
7 | |
|
8 | 7 |
Its reference compiler can generate [efficient code](#efficient-code) for
|
9 | |
[several 6502-based platforms](#target-platforms) while catching many
|
|
8 |
several 6502-based [target platforms](#target-platforms) while catching many
|
10 | 9 |
common mistakes at compile-time, reducing the time spent in debugging.
|
11 | 10 |
|
12 | 11 |
Quick Start
|
|
14 | 13 |
|
15 | 14 |
Make sure you have Python (2.7 or 3.5+) installed. Then
|
16 | 15 |
clone this repository and put its `bin` directory on your
|
17 | |
executable search path. Then run:
|
|
16 |
executable search path. Then you can run:
|
18 | 17 |
|
19 | 18 |
sixtypical
|
20 | 19 |
|
|
83 | 82 |
Unlike most languages, in SixtyPical the programmer must manage memory very
|
84 | 83 |
explicitly, selecting the registers and memory locations to store all data in.
|
85 | 84 |
So, unlike a C compiler such as [cc65][], a SixtyPical compiler doesn't need
|
86 | |
to generate code to handle stack management or register spilling. This results
|
87 | |
in smaller (and thus faster) programs.
|
|
85 |
to generate code to handle [call stack management][] or [register allocation][].
|
|
86 |
This results in smaller (and thus faster) programs.
|
88 | 87 |
|
89 | 88 |
The flagship demo, a minigame for the Commodore 64, compiles to
|
90 | 89 |
a **930**-byte `.PRG` file.
|
|
94 | 93 |
The reference implementation can analyze and compile SixtyPical programs to
|
95 | 94 |
6502 machine code formats which can run on several 6502-based 8-bit architectures:
|
96 | 95 |
|
97 | |
* [Commodore 64][] -- examples in [eg/c64/](eg/c64/)
|
98 | |
* [Commodore VIC-20][] -- examples in [eg/vic20/](eg/vic20/)
|
99 | |
* [Atari 2600][] -- examples in [eg/atari2600/](eg/atari2600/)
|
100 | |
* [Apple II series][] -- examples in [eg/apple2/](eg/apple2/)
|
|
96 |
* [Commodore 64][]
|
|
97 |
* [Commodore VIC-20][]
|
|
98 |
* [Atari 2600][]
|
|
99 |
* [Apple II series][]
|
|
100 |
|
|
101 |
For example programs for each of these, see [eg/README.md](eg/README.md).
|
101 | 102 |
|
102 | 103 |
Documentation
|
103 | 104 |
-------------
|
|
116 | 117 |
* [Output formats supported by `sixtypical`](doc/Output%20Formats.md)
|
117 | 118 |
* [TODO](TODO.md)
|
118 | 119 |
|
|
120 |
[effect system]: https://en.wikipedia.org/wiki/Effect_system
|
|
121 |
[abstractly interprets]: https://en.wikipedia.org/wiki/Abstract_interpretation
|
|
122 |
[call stack management]: https://en.wikipedia.org/wiki/Call_stack
|
|
123 |
[register allocation]: https://en.wikipedia.org/wiki/Register_allocation
|
119 | 124 |
[VICE]: http://vice-emu.sourceforge.net/
|
120 | 125 |
[cc65]: https://cc65.github.io/
|
121 | 126 |
[Commodore 64]: https://en.wikipedia.org/wiki/Commodore_64
|