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

122 Commits

Author SHA1 Message Date
Chris Pressey
0be721667a Kind-of not-pretty syntax refactor to support adding typedefs. 2018-02-05 17:01:25 +00:00
Chris Pressey
15072eff52 The evaluator doesn't add much and keeps falling behind; remove it. 2018-02-05 13:17:23 +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
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
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
eb1974eb8a Vector tables can be parsed. 2018-02-02 17:18:25 +00:00
Chris Pressey
b29716fccf Constraints for vector come immediately after the type expression. 2018-02-02 17:16:31 +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
f9dc730f88 copy []+y, a to indirectly read byte into the a register. 2017-12-13 16:11:02 +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
75cc1f6b25 Factor out utility method for selecting addressing mode. 2017-12-13 12:14:26 +00:00
Chris Pressey
f87bcf5ee4 Initial work on initialized byte tables. 2017-12-12 16:41:49 +00:00
Chris Pressey
50390b0787 Can copy a literal word to a word table. 2017-12-12 16:04:59 +00:00
Chris Pressey
63f75a26b4 Initialized word type memory locations. 2017-12-12 15:34:51 +00:00
Chris Pressey
4854077cce Correctly analyze repeat { ... } forever loops. 2017-12-12 15:18:59 +00:00
Chris Pressey
0194d37bbd forward modifier on location expression, instead of assign. 2017-12-12 14:23:34 +00:00
Chris Pressey
b7b28830d7 Introducing a new pseudo-opcode is rarely an elegant solution. 2017-12-12 14:09:17 +00:00
Chris Pressey
dbbd99ffe5 Change how backpatching instructions is implemented. 2017-12-12 13:54:35 +00:00
Chris Pressey
19dd089a03 Allow call and goto routines defined further down in the source. 2017-12-12 13:17:00 +00:00
Chris Pressey
45bc4bd0a0 Tighten assumption when comparing LocationRefs. 2017-12-12 12:54:16 +00:00
Chris Pressey
60df162625 Refactor: common method to backpatch labels. 2017-12-12 12:51:19 +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
ec2e051518 Constraint sets may only contain labels, which are resolved late. 2017-12-11 17:49:02 +00:00
Chris Pressey
2216fcec17 copy from word storage to word table and back, indexed by x or y. 2017-12-11 12:02:48 +00:00
Chris Pressey
b86e7491d5 Copy word to word table. 2017-12-11 11:43:53 +00:00
Chris Pressey
bef1aba8ce Do not assume every label refers to a word-sized chunk of memory. 2017-12-11 10:42:42 +00:00
Chris Pressey
404f8c72a3 We really need to review how storage location labels are emitted. 2017-12-08 16:59:31 +00:00
Chris Pressey
84ca6c4e96 Break the ground where we need to implement word table read/write. 2017-12-08 15:53:18 +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
ad8e0647a4 Use right endianness when copying literal word into storage. 2017-12-07 16:49:43 +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
a4fd0e590b Adding a word memory location to another word memory location. 2017-12-07 13:15:21 +00:00
Chris Pressey
92525fd482 Adding a constant word to a memory location. 2017-12-07 12:48:56 +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