Tree @16450e0 (Download .tar.gz)
SixtyPical
SixtyPical is a very low-level programming language, similar to 6502 assembly, with static analysis through abstract interpretation.
In practice, this means it catches things like
- you forgot to clear carry before adding something to the accumulator
- a subroutine that you call trashes a register you thought was preserved
and suchlike.
It is a work in progress, currently at the proof-of-concept stage.
The current released version of SixtyPical is 0.5. The current development version of SixtyPical, unreleased as of this writing, is 0.6-PRE.
Documentation
- Design Goals — coming soon.
- SixtyPical specification
- SixtyPical history
- Literate test suite for SixtyPical syntax
- Literate test suite for SixtyPical execution
- Literate test suite for SixtyPical analysis
- Literate test suite for SixtyPical compilation
- 6502 Opcodes used/not used in SixtyPical
TODO
For 0.6:
call
vector (generates an JSR to a trampoline that does indirect JMP.)goto
(tail call) a routine or a vector.- A more involved demo for the C64 — one that sets up an interrupt?
For 0.7:
word
type.trash
instruction.- zero-page memory locations.
- indirect addressing.
At some point...
interrupt
routines.- add line number (or at least routine name) to error messages.
- 6502-mnemonic aliases (
sec
,clc
) - other handy aliases (
eq
forz
, etc.) - have
copy
instruction able to copy a constant to a user-def mem loc, etc. - add absolute addressing in shl/shr, absolute-indexed for add, sub, etc.
- check and disallow recursion.
Commit History
@16450e06d52e3b4728945b0bbab4b9dfa65012a9
git clone https://git.catseye.tc/SixtyPical/
- Compile goto's. Chris Pressey 8 years ago
- Refactor Analyzer. Get analysis tests passing once again. Chris Pressey 8 years ago
- Attempt to analyze `goto`. Looks like it'll need some rewriting. Chris Pressey 8 years ago
- Add missing example source Chris Pressey 8 years ago
- Recast Evaluator as an object. Handle `goto` inside it. Chris Pressey 8 years ago
- Syntax for `goto`. Chris Pressey 8 years ago
- I kind of forgot that indirect JSR needs a trampoline first :/ Chris Pressey 8 years ago
- Fix compiler. All tests pass once again. Chris Pressey 8 years ago
- Unbreak evaluator, but break compiler b/c change in parser. Chris Pressey 8 years ago
- Parse indirect calls, but break evaluator. Chris Pressey 8 years ago