1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-29 05:29:34 +00:00
Commit Graph

77 Commits

Author SHA1 Message Date
Chris Pressey
bda0202dee Confirm that AND clips the range and INC/DEC invalidate it. 2018-03-06 15:42:12 +00:00
Chris Pressey
1eaec602e3 The exception object now contains an AST node, renders name. 2018-03-06 14:39:47 +00:00
Chris Pressey
42cbd73a20 Show line numbers in static analysis errors (clumsily.) 2018-03-06 13:13:18 +00:00
Chris Pressey
9ad34ed34f Refine the AST classes even more. 2018-03-06 10:43:23 +00:00
Chris Pressey
0a83d90515 Tighten structure of AST more. 2018-03-05 12:13:15 +00:00
Chris Pressey
42c4bed36e Make tests pass. 2018-02-16 15:46:55 +00:00
Chris Pressey
0e0a3d552a Implement Context.copy_range(), ranges for constants. Progress! 2018-02-14 16:35:19 +00:00
Chris Pressey
0687da80d5 Some headway on context.assert_in_range(). 2018-02-14 15:54:57 +00:00
Chris Pressey
2897a04718 Get and set top of range of a location. Make AND do this to A reg. 2018-02-14 15:13:35 +00:00
Chris Pressey
ab33331924 Associate a range with each meaningful storage location in context. 2018-02-14 13:31:03 +00:00
Chris Pressey
e9d9c717bb More statics in demo game. 2018-02-09 16:57:49 +00:00
Chris Pressey
55331e9c54 Statics are always writeable. Statics are always meaningful. 2018-02-09 13:35:59 +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
a7365731ca Even if we goto another routine, we can't trash an output. 2018-02-08 16:37:40 +00:00
Chris Pressey
b20b664748 Implement the "union rule for trashes" when analyzing if blocks. 2018-02-08 14:04:51 +00:00
Chris Pressey
3f1f3bf16e Set a location as touched when trashed with a trash instruction. 2018-02-08 13:43:06 +00:00
Chris Pressey
f92e1f15bf Tired: copy [ptr]+y, a. Wired: ld a, [ptr]+y. 2018-02-08 11:58:24 +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
ed1ed3eb5d Always analyze before compiling. 2018-02-06 16:14:44 +00:00
Chris Pressey
43b3a088b0 Use a vector table in the demo game. 2018-02-06 15:03:59 +00:00
Chris Pressey
c12a76e106 Make assertions more robust, in hopes of hunting down bugs. 2018-02-06 09:52:01 +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
20c824743e Fix table access bug where index wasn't required to be initialized. 2018-02-05 12:35:19 +00:00
Chris Pressey
11d6c08369 In fact the 'src' should never (I think?) be 'touched'. 2018-02-05 12:08:33 +00:00
Chris Pressey
7dfd2cfe0c Allow copying a routine directly into a vector table. 2018-02-05 12:04:28 +00:00
Chris Pressey
13e6654088 Executable types are compatible with other executable types. 2018-02-02 17:48:57 +00:00
Chris Pressey
0fff8e4f0a Begin to implement vector tables, stuck at a type equality problem. 2018-02-02 17:45:07 +00:00
Chris Pressey
4abedc0442 Centralize helper, use it elsewhere. 2018-02-02 17:05:15 +00:00
Chris Pressey
548905dce4 Initialized byte tables need not have all 256 bytes initialized. 2018-02-02 16:31:23 +00:00
Chris Pressey
d69766afbe Marginally more informative error message. 2017-12-14 11:54:39 +00:00
Chris Pressey
1d8f1af964 Fix bug in copy []+y, a. "Hero" no longer leaves a trail. 2017-12-13 17:00:21 +00:00
Chris Pressey
b477c5e786 Don't trash a in copy if a is the dest of the copy, for now. 2017-12-13 16:18:36 +00:00
Chris Pressey
c7861d375c trash indicates a value is no longer considered meaningful. 2017-12-13 15:23:06 +00:00
Chris Pressey
5f535c963e Subtract word (constant or memory location) from word memory location. 2017-12-13 14:07:59 +00:00
Chris Pressey
50390b0787 Can copy a literal word to a word table. 2017-12-12 16:04:59 +00:00
Chris Pressey
4854077cce Correctly analyze repeat { ... } forever loops. 2017-12-12 15:18:59 +00:00
Chris Pressey
8dc44673fa LocationRefs are equal if names/type are; this needed __str__ tho. 2017-12-12 12:45:47 +00:00
Chris Pressey
e46c6f6c6e Improve error messaging yet more. Game kind of has game states now. 2017-12-12 09:59:43 +00:00
Chris Pressey
82e33ab476 Improve error messaging when constraints are exceeded. 2017-12-12 09:42:16 +00:00
Chris Pressey
aa5e4119da Copy indexed location to location. All tests pass again. 2017-12-08 15:07:15 +00:00
Chris Pressey
689ed37f2e Beginnings of implementing word tables. One test still fails. 2017-12-08 13:41:48 +00:00
Chris Pressey
75cf18d3a2 Add word (constant or memory loc) to pointer (unchecked for now). 2017-12-07 14:14:43 +00:00
Chris Pressey
cf679b293a Ability to --debug analysis. Make 16-bit addition test pass. 2017-12-07 11:49:15 +00:00
Chris Pressey
97d00637d2 Initial work on adding 16-bit constants to a 16-bit location. 2017-12-07 11:31:46 +00:00
Chris Pressey
d84566a880 Write stored values, and read values, through pointers. 2017-12-01 13:52:56 +00:00
Chris Pressey
32389e4422 Require that the program does ^buf to get at the address of buf. 2017-12-01 12:36:58 +00:00
Chris Pressey
a95cbb0f47 Introduce IndirectRef and use it instead of adhoc 'copy[]+y' opcode. 2017-12-01 11:44:40 +00:00
Chris Pressey
c91574186b First pass of buffer, pointer, copy b, [p] + y, indirect indexed. 2017-11-24 12:35:36 +00:00
Chris Pressey
c33e6ef0e9 Assert that the loop variable is meaningful in repeat. Unit test. 2017-11-20 16:39:39 +00:00
Chris Pressey
22cc7bfc11 Support copy'ing a word constant to a word location. Joystick eg. 2017-11-20 15:18:21 +00:00