1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-29 03:51:35 +00:00
SixtyPical/HISTORY.md

228 lines
10 KiB
Markdown
Raw Normal View History

History of SixtyPical
=====================
0.18
----
* Syntactically, `goto` may only appear at the end of a block.
It need no longer be the final instruction in a routine,
as long as the type context is consistent at every exit.
* When the range of a location is known, `inc` and `dec`
on it will usually shift the known instead of invalidating it.
* `cmp` instruction can now perform a 16-bit unsigned comparison
of `word` memory locations and `word` literals (at the cost of
trashing the `a` register.)
* Fixed pathological memory use in the lexical scanner - should
be much less inefficient now when parsing large source files.
* Reorganized the examples in `eg/rudiments/` to make them
officially platform-agnostic and to state the expected output.
2018-08-26 13:35:28 +00:00
0.17
----
* `save X, Y, Z { }` now allowed as a shortcut for nested `save`s.
2018-09-07 14:35:42 +00:00
* If the name in a location expression isn't found in the symbol
table, a forward reference will _always_ be generated; and forward
references in _all_ operations will be resolved after parsing.
* As a consequence, trying to call or goto a non-routine-typed symbol
is now an analysis error, not a syntax error.
2018-09-14 12:14:32 +00:00
* Deprecated `routine foo ...` syntax has been removed.
2018-08-26 13:35:28 +00:00
* Split TODO off into own file.
* `sixtypical` no longer writes the compiled binary to standard
output. The `--output` command-line argument should be given
to get a compiled binary; otherwise only analysis is run.
* Internal cleanups, including a hierarchy of `Outputters`.
* All tests pass when `sixtypical` is run under Python 3.5.2.
2018-08-26 13:35:28 +00:00
0.16
----
2018-05-08 11:48:15 +00:00
* Added `save` block, which allows the named locations to be modified
arbitrarily inside the block, and automatically restored at the end.
* More thorough tests and justifications written for the case of
assigning a routine to a vector with a "wider" type.
* Support for `copy [ptra]+y, [ptrb]+y` to indirect LDA indirect STA.
* Support for `shl foo` and `shr foo` where `foo` is a byte storage.
* Support for `I a, btable + x` where `I` is `add`, `sub`, `cmp`,
`and`, `or`, or `xor`
* Support for `I btable + x` where `I` is `shl`, `shr`, `inc`, `dec`
2018-05-08 11:48:15 +00:00
* `or a, z`, `and a, z`, and `eor a, z` compile to zero-page operations
if the address of z < 256.
* Removed `--prelude` in favour of specifying both format and prelude
with a single option, `--output-format`. Documentation for same.
2018-03-27 11:36:33 +00:00
0.15
----
* Symbolic constants can be defined with the `const` keyword, and can
be used in most places where literal values can be used.
2018-03-28 13:52:16 +00:00
* Added `nop` opcode, which compiles to `NOP` (mainly for timing.)
* Accessing zero-page with `ld` and `st` generates zero-page opcodes.
* A `byte` or `word` table can be initialized with a list of constants.
* Branching and repeating on the `n` flag is now supported.
* The `--optimize-fallthru` option causes the routines of the program
to be re-ordered to maximize the number of cases where a `goto`'ed
routine can be simply "falled through" to instead of `JMP`ed to.
* `--dump-fallthru-info` option outputs the information from the
fallthru analysis phase, in JSON format, to stdout.
* Even without fallthru optimization, `RTS` is no longer emitted after
the `JMP` from compiling a final `goto`.
* Specifying multiple SixtyPical source files will produce a single
compiled result from their combination.
* Rudimentary support for Atari 2600 prelude in a 4K cartridge image,
and an example program in `eg/atari2600` directory.
2018-03-27 11:36:33 +00:00
0.14
----
2018-03-14 16:45:35 +00:00
* Added the so-called "open-faced `for` loop", which spans a loop
2018-03-26 13:44:54 +00:00
variable over a finite range, the end of which is fixed.
* "Tail position" is now more correctly determined for the purposes of
insisting that `goto` only appears in it.
2018-03-26 12:16:53 +00:00
* New `--origin` and `--output-format` options added to the compiler.
* Fixed bug when `--prelude` option was missing.
* Fixed bug when reporting line numbers of scanner-level syntax errors.
2018-03-26 12:16:53 +00:00
* Translated the small demo projects Ribos and "The PETulant Cursor" to
SixtyPical, and added them to the `eg/c64/` section of the repo.
2018-03-26 13:44:54 +00:00
* Added a `eg/vic20` example directory, with one VIC-20 example program.
0.13
----
* It is a static analysis error if it cannot be proven that a read or write
to a table falls within the defined size of that table.
* The reference analyzer's ability to prove this is currently fairly weak,
but it does exist:
* Loading a constant into a memory location means we know the range
is exactly that one constant value.
* `AND`ing a memory location with a value means the range of the
memory location cannot exceed the range of the value.
* Doing arithmetic on a memory location invalidates our knowledge
of its range.
* Copying a value from one memory location to another copies the
known range as well.
2018-03-06 14:15:53 +00:00
* Cleaned up the internals of the reference implementation (incl. the AST)
and re-organized the example programs in the `eg` subdirectory.
* Most errors produced by the reference implementation now include a line number.
* Compiler supports multiple preludes, specifically both Commodore 64 and
Commodore VIC-20; the `loadngo.sh` script supports both architectures too.
0.12
----
2018-02-12 16:40:53 +00:00
* `copy` is now understood to trash `a`, thus it is not valid to use `a` in `copy`.
To compensate, indirect addressing is supported in `ld` and `st`, for example,
as `ld a, [ptr] + y` and `st a, [ptr] + y`.
* Implements the "union rule for trashes" when analyzing `if` blocks.
* Even if we `goto` another routine, we can't trash an output.
2018-02-09 16:46:53 +00:00
* `static` storage locations local to routines can now be defined within routines.
2018-02-12 16:40:53 +00:00
* Small grammar changes that obviate the need for:
* the parentheses in type expressions like `vector (routine ...) table[256]`
* the `forward` keyword in forward references in source of `copy` instruction
* Fixed bug where `trash` was not marking the location as being virtually altered.
0.11
----
* Each table has a specified size now (although, bounds checking is not performed.)
* Initialized `byte table` values need not have all 256 bytes initialized.
2018-02-07 14:48:55 +00:00
* Syntax for types has changed. `routine` (with constraints) is a type, while
`vector` is now a type constructor (taking `routine`s only) and `table` is
also a type constructor. This permits a new `vector table` type.
2018-02-06 13:08:17 +00:00
* Added `typedef`, allowing the user to define type aliases for readability.
* Added `define name routine {...}` syntax; `routine name {...}` is now legacy.
2018-02-07 14:48:55 +00:00
* Ability to copy vectors and routines into vector tables, and vectors out of same.
* Removed the evaluator. The reference implementation only analyzes and compiles.
* Fixed bug where index register wasn't required to be initialized before table access.
* Fixed bug where trampolines for indirect calls weren't including a final `RTS`.
0.10
----
* Can `call` and `goto` routines that are defined further down in the source code.
* The `forward` modifier can also be used to indicate that the symbol being copied
in a `copy` to a vector is a routine that is defined further down in the source.
* Initialized `word` memory locations.
* Can `copy` a literal word to a word table.
* Subtract word (constant or memory location) from word memory location.
* `trash` instruction explicitly indicates a value is no longer considered meaningful.
* `copy []+y, a` can indirectly read a byte value into the `a` register.
* Initialized `byte table` memory locations.
* Fixed bug which was preventing `if` branches to diverge in what they initialized,
if it was already initialized when going into the `if`.
* Fixed a bug which was making it crash when trying to analyze `repeat forever` loops.
0.9
---
* Add word (constant or memory location) to word memory location.
* Add word to pointer (unchecked for now).
* Added `word table` type.
* Can `copy` from word storage location to word table and back.
* A `vector` can name itself in its `inputs` and `outputs` or `trashes` sets.
* Implementation: `--debug` shows some extra info during analysis.
* Fixed bug where `copy`ing literal word into word storage used wrong endianness.
* Fixed bug where every memory location was allocated 2 bytes of storage, regardless of type.
* Tests: use https://github.com/tcarmelveilleux/dcc6502 to disassemble code for comparison.
2017-11-21 11:13:21 +00:00
0.8
---
* Explicit word literals prefixed with `word` token.
* Can `copy` literals into user-defined destinations.
* Fixed bug where loop variable wasn't being checked at end of `repeat` loop.
2017-12-01 13:09:25 +00:00
* `buffer` and `pointer` types.
* `copy ^` syntax to load the addr of a buffer into a pointer.
* `copy []+y` syntax to read and write values to and from memory through a pointer.
2017-11-21 11:13:21 +00:00
2017-11-17 16:00:51 +00:00
0.7
---
* User-defined `byte` locations can be given an initial value.
* `word` type locations which can be defined and `copy`ed between.
* Can `copy` directly from one user-defined `byte` location to another.
2015-10-23 15:37:18 +00:00
0.6
---
* Added `routine` and `vector` types, and `copy` instruction.
* Both routines and vectors can declare `inputs`, `outputs`, and `trashes`,
and these must be compatible to assign a routine or vector to a vector.
2015-10-22 08:56:45 +00:00
* Added `goto` (tail call) instruction, jumps to routine or through vector.
2015-10-22 18:20:48 +00:00
* `call` can call a subroutine indirectly, via a vector.
2015-10-22 08:56:45 +00:00
* Routine name is now shown in analysis error messages.
2015-10-18 18:02:07 +00:00
0.5
---
* Added `byte table` type locations and indexed addressing (`+ x`, `+ y`).
2015-10-18 17:47:47 +00:00
* Integer literals may be given in hexadecimal.
2015-10-18 17:54:28 +00:00
* Line comments may be included in source code by prefixing them with `//`.
2015-10-18 15:34:18 +00:00
0.4
---
2015-10-18 15:34:18 +00:00
* Added `repeat` loops to the language, which can repeat until a flag
is set (or `not` set), or which can repeat `forever`.
* `if not` inverts the sense of the test.
* Added explicitly-addressed memory locations.
0.3
---
* Added external routine declarations.
* Added ability to compile to 6502 machine code and output a `PRG` file.
0.2
---
A complete reboot of SixtyPical 0.1. The reference implementation was
rewritten in Python. The language was much simplified. The aim was to get the
analysis completely right before adding more sophisticated and useful features
in future versions.
2015-10-18 15:34:18 +00:00
0.1
2015-10-18 12:55:40 +00:00
---
2015-10-18 15:34:18 +00:00
Initial inspired-but-messy version implemented in Haskell.