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

96 Commits

Author SHA1 Message Date
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
Chris Pressey
19a196f765 Compile copy[]+y. 2017-11-24 16:56:55 +00:00
Chris Pressey
c8c69a2a7d Fix problem with test case, and with serializing as zero page. 2017-11-24 13:42:14 +00:00
Chris Pressey
e41dd1aa01 Attempt to add Zero Page addressing; the emitter may need rethink. 2017-11-24 13:09:10 +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
42438dd97f Beginning of: buffers and pointers. 2017-11-24 11:30:20 +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
Chris Pressey
563aaeba47 Remove low/high byte operators until I've thought about it more. 2017-11-17 15:54:50 +00:00
Chris Pressey
9d6ca0b2b4 Low and high address operators, parsing and execution thereof. 2016-06-16 11:10:43 -05:00
Chris Pressey
e2daa33dc5 Compile copy byte to byte and word to word. 2016-06-16 11:10:03 -05:00
Chris Pressey
fc8c85e670 word types, with syntax and analysis thereof 2016-06-16 11:08:57 -05:00
Chris Pressey
007c81acad Split scanner off from parser module, into own module. 2016-06-16 11:04:03 -05:00
Chris Pressey
7b1ee60a73 Initial value for locations: changed syntax, executes, compiles. 2016-06-16 11:03:31 -05:00
Chris Pressey
b5763e84b4 Constants (such as routines) cannot be given in call-constraints. 2015-10-22 20:01:02 +01:00
Chris Pressey
0d3ac8c247 {Low,High}AddressByte emittables to fix copy, make indirect call! 2015-10-22 16:20:10 +01:00
Chris Pressey
0b2b5d904e Implement indirect JSRs with trampolines in theory; doesn't work. 2015-10-22 15:45:16 +01:00
Chris Pressey
0361016e4c Bring the rest of the tests up to date with the new names. 2015-10-22 09:48:26 +01:00
Chris Pressey
cc433e9c64 Try to improve error messages, thus breaking many unit tests. 2015-10-21 19:43:44 +01:00
Chris Pressey
45310b8f9c It's getting a little chaotic. Needs better error messages! 2015-10-21 17:05:49 +01:00
Chris Pressey
16450e06d5 Compile goto's. 2015-10-21 15:51:52 +01:00
Chris Pressey
bb6ad5d3cf Refactor Analyzer. Get analysis tests passing once again. 2015-10-21 15:45:14 +01:00
Chris Pressey
49d07cee5f Attempt to analyze goto. Looks like it'll need some rewriting. 2015-10-21 11:41:52 +01:00
Chris Pressey
6e0ca3838e Recast Evaluator as an object. Handle goto inside it. 2015-10-20 14:39:32 +01:00
Chris Pressey
be76b9a00d Syntax for goto. 2015-10-20 14:10:33 +01:00
Chris Pressey
16649042cb I kind of forgot that indirect JSR needs a trampoline first :/ 2015-10-20 13:15:21 +01:00
Chris Pressey
f16cb75677 Fix compiler. All tests pass once again. 2015-10-20 12:53:07 +01:00