1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-01 12:41:30 +00:00
Commit Graph

95 Commits

Author SHA1 Message Date
Chris Pressey
5f8802b305 Arrange license info in repo to follow REUSE 3.0 convention. 2024-02-02 12:10:23 +00:00
Chris Pressey
92b1cfeefb Implement tail-call optimization. 2019-10-22 12:23:15 +01:00
Chris Pressey
44d97c33a2 Better generation of code at tail of routines. 2019-10-22 11:37:00 +01:00
Chris Pressey
2e2e80664e Forbid nested with interrupts blocks, and more refactoring. 2019-05-14 15:01:10 +01:00
Chris Pressey
3f666f4385 Add reset instruction; much refactoring. 2019-05-14 08:56:35 +01:00
Chris Pressey
b19267d3ba Checkpoint import of changes for version 0.19. 2019-04-08 11:50:54 +01:00
Chris Pressey
35a1053439 Support more modes on add and sub. 2018-12-12 10:34:25 +00:00
Chris Pressey
2803aa2d05 Add failing tests for add and sub on locations other than a. 2018-12-12 10:11:16 +00:00
Chris Pressey
d1a29709f2 Add example test program for cmp-against-literal-word. Fix it. 2018-12-12 09:09:45 +00:00
Chris Pressey
97e6e619ff cmp can compare against a literal word. 2018-12-12 09:01:46 +00:00
Chris Pressey
94ee042a1e Fix order of operands in word-sized cmp. 2018-11-27 13:12:55 +00:00
Chris Pressey
dcc944d732 If add and sub can work on words, then cmp can work on words too. 2018-11-23 23:00:41 +00:00
Chris Pressey
e74c7f2b31 Initial attempt at 16-bit compare. Not super well tested yet. 2018-11-23 22:09:28 +00:00
Chris Pressey
38119dbe29 Convert all tests to new syntax. 2018-09-07 22:55:54 +01:00
Chris Pressey
b63bcfcd2b Begin introducing shortcut syntax for nested saves. 2018-09-07 09:36:51 +01:00
Chris Pressey
4bba75857f --output cmdline argument, serialize() returns an array of bytes. 2018-09-06 16:18:41 +01:00
Chris Pressey
8091c45a9a Fix test which is misleading due to the way the appliance works. 2018-05-08 12:14:30 +01:00
Chris Pressey
4986454733 Support save'ing user-defined locations. 2018-04-25 13:27:47 +01:00
Chris Pressey
07541d7913 Compile code for saving a, x, or y on the stack. 2018-04-25 13:15:53 +01:00
Chris Pressey
89fa8361a8 Remove --prelude, reform and document --output-formats. 2018-04-23 13:18:01 +01:00
Chris Pressey
bc91ef1602 Compile byte-table add, sub, cmp, and, or, xor, shl, shr, inc, dec. 2018-04-18 16:32:12 +01:00
Chris Pressey
e565234d28 Support for shl foo and shr foo where foo is a byte storage. 2018-04-18 12:01:53 +01:00
Chris Pressey
3c7d95a724 Support for copy [ptra]+y, [ptrb]+y to indirect LDA indirect STA 2018-04-18 10:57:57 +01:00
Chris Pressey
70247e0e44 Generate zero-page code for and, or, and xor, when possible. 2018-04-17 17:58:26 +01:00
Chris Pressey
27df0d27db Optimize away RTS and JMP when possible. Fallthru stuff done. 2018-04-05 14:10:04 +01:00
Chris Pressey
fa1b0cfae1 Support branching and looping on the n flag. 2018-03-29 14:45:28 +01:00
Chris Pressey
b9fb26320c Add some failing tests for looping on the n flag. 2018-03-29 13:33:06 +01:00
Chris Pressey
ebe53f540c Fix bug when zero page address was $00. 2018-03-29 11:46:56 +01:00
Chris Pressey
eadf1eb4ae A byte or word table can be initialized with a list of constants. 2018-03-29 11:09:02 +01:00
Chris Pressey
2f513f7291 Initial support for initializing byte tables with list of bytes. 2018-03-29 10:45:18 +01:00
Chris Pressey
9b912de17c Accessing zero-page with ld and st generates zero-page opcodes. 2018-03-29 10:31:42 +01:00
Chris Pressey
1f992f8dbd Support of NOP opcode. 2018-03-28 14:52:16 +01:00
Chris Pressey
adb53f7a04 Almost compile for loops correctly. 2018-03-14 15:33:11 +00:00
Chris Pressey
72efecbb1a Support different preludes for different archs (c64 and vic20 now.) 2018-03-06 17:00:39 +00:00
Chris Pressey
f6fa1ec7d2 Remove need for forward keyword in forward reference in copy. 2018-02-12 15:59:20 +00:00
Chris Pressey
08ec0e46a3 Remove the need for parens in vector (routine ...) table type. 2018-02-12 14:53:49 +00:00
Chris Pressey
7a024f3062 Compile static storage location access. 2018-02-09 16:13:09 +00:00
Chris Pressey
71cded0297 Move compiler towards being able to compile access to statics. 2018-02-09 14:13:39 +00:00
Chris Pressey
ca1c877a60 Support indirect refs in st, e.g. st a, [ptr] + y. 2018-02-09 11:23:18 +00:00
Chris Pressey
34daad0e56 Make ld parse to a IndexedRef or IndirectRef (latter still todo.) 2018-02-08 11:04:11 +00:00
Chris Pressey
7c8f113c07 Properly store address (not contents) of routine into vector table. 2018-02-07 13:56:17 +00:00
Chris Pressey
6c1c1cb153 Include final RTS when emitting trampolines for indirect calls. 2018-02-07 11:11:14 +00:00
Chris Pressey
b4f5d60ad3 I think it should actually look like this! 2018-02-06 17:00:04 +00:00
Chris Pressey
ed1ed3eb5d Always analyze before compiling. 2018-02-06 16:14:44 +00:00
Chris Pressey
70ecd52e8a Retain some syntax compatibility: make table a postfix operator. 2018-02-06 11:34:21 +00:00
Chris Pressey
0be721667a Kind-of not-pretty syntax refactor to support adding typedefs. 2018-02-05 17:01:25 +00:00
Chris Pressey
bbd3a84c00 Retain silly 'name inside the type' syntax (a la C) for now. 2018-02-05 11:18:35 +00:00
Chris Pressey
a082aee001 NOt 100% sure it's correct, but it seems close. 2018-02-02 17:56:50 +00:00
Chris Pressey
b29716fccf Constraints for vector come immediately after the type expression. 2018-02-02 17:16:31 +00:00
Chris Pressey
548905dce4 Initialized byte tables need not have all 256 bytes initialized. 2018-02-02 16:31:23 +00:00