1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-22 01:32:13 +00:00
Commit Graph

181 Commits

Author SHA1 Message Date
Chris Pressey
76ec7224cd Add failing tests for gotos inside runtime-context-making blocks. 2018-04-25 13:38:54 +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
80c46485f1 Saving anything except a trashes a. 2018-04-25 13:06:11 +01:00
Chris Pressey
1410989b2c Merge branch 'develop-0.16' of https://github.com/catseye/SixtyPical into save-block 2018-04-23 13:18:59 +01:00
Chris Pressey
89fa8361a8 Remove --prelude, reform and document --output-formats. 2018-04-23 13:18:01 +01:00
Chris Pressey
8df16d7a2a Another passing test which is a little surprising. 2018-04-20 14:35:41 +01:00
Chris Pressey
0f41857b39 Add two simple tests for save. Surprisingly, they both pass. 2018-04-20 13:36:08 +01:00
Chris Pressey
4d1f9d0f3c First cut at implementing save. Only the most basic tests though. 2018-04-19 13:18:52 +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
5fcbfa1d21 Analyze reads and updates of tables. 2018-04-18 15:45:47 +01:00
Chris Pressey
0c22944afc Able to parse, but not yet able to analyze, other table accesses. 2018-04-18 14:21:03 +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
4f28f43bde The existing analysis is actually sufficient. Document why this is. 2018-04-18 10:25:23 +01:00
Chris Pressey
f9c3b56246 Work out routine-vector type compatibility, w/ one failing test. 2018-04-18 10:13:15 +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
475584769d Add more test cases. 2018-04-06 14:08:09 +01:00
Chris Pressey
a5d946734a Add more tests. Apparently our algorithm does not do a good job. 2018-04-06 13:24:04 +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
2ca843ece7 Begin hooking the fallthru analysis up to the compilation phase. 2018-04-05 10:52:14 +01:00
Chris Pressey
ac24f98dd3 Vastly simplify the fallthru analysis algorithm. 2018-04-05 09:57:14 +01:00
Chris Pressey
7fa54f53cb Serialize main first. However, this could use a fresh approach. 2018-04-04 17:55:59 +01:00
Chris Pressey
9c68b6a7e0 Serialize routines with in() sets first, and in the right order. 2018-04-04 17:49:50 +01:00
Chris Pressey
cab84b8ebe Change the serialization format to be (hopefully) clearer. 2018-04-04 17:05:48 +01:00
Chris Pressey
b1bcc21ffc Go slightly further with the serialization. 2018-04-04 16:22:14 +01:00
Chris Pressey
30e839033c First cut at serialization of fallthru-optimized routines. 2018-04-04 15:09:48 +01:00
Chris Pressey
448849ac4b Successfully break cycle. 2018-04-04 14:01:17 +01:00
Chris Pressey
50433ac860 Find cycles in fallthru map. Try to break them; not right, yet. 2018-04-04 13:37:32 +01:00
Chris Pressey
d883816298 --optimize-fallthru and --dump-fallthru-info options. 2018-04-04 11:54:50 +01:00
Chris Pressey
2be4406964 Flesh out and describe the fallthru optimization algorithm. 2018-04-04 10:15:06 +01:00
Chris Pressey
8f1e35fb39 Add some tests, some failing, for expected fallthru maps. 2018-03-29 16:44:06 +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
3f0e36a67c Add symbolic constants. 2018-03-27 12:36:33 +01:00
Chris Pressey
b91c3ed2f1 Add three more tests. Ensure they pass. 2018-03-26 17:40:43 +01:00
Chris Pressey
ceaae962d5 Make tests pass. Add two more tests towards completeness of spec. 2018-03-26 12:48:57 +01:00
Chris Pressey
d88757c32b Rudimentarily document for; add failing test cases for it. 2018-03-23 17:13:46 +00:00
Chris Pressey
adb53f7a04 Almost compile for loops correctly. 2018-03-14 15:33:11 +00:00
Chris Pressey
b79059faa4 Two seperate words looks better. 2018-03-14 09:51:24 +00:00
Chris Pressey
b073fe54a0 Tests for the downto variant too. 2018-03-13 17:49:48 +00:00
Chris Pressey
7a3b52dc1e More correct determination of tail position for purposes of goto. 2018-03-13 17:00:49 +00:00
Chris Pressey
5f62de11c2 Add failing test for multiple gotos that are all in tail position. 2018-03-13 13:33:30 +00:00
Chris Pressey
f73a2313bd Add some failing tests for analyzing "for". 2018-03-08 17:17:49 +00:00
Chris Pressey
d815e05e0c Syntax for "open-faced for loop". 2018-03-08 16:54:12 +00:00