1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-07-03 17:29:33 +00:00
Commit Graph

52 Commits

Author SHA1 Message Date
Chris Pressey
548905dce4 Initialized byte tables need not have all 256 bytes initialized. 2018-02-02 16:31:23 +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
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
84ca6c4e96 Break the ground where we need to implement word table read/write. 2017-12-08 15:53:18 +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
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
22cc7bfc11 Support copy'ing a word constant to a word location. Joystick eg. 2017-11-20 15:18:21 +00:00
Chris Pressey
e2daa33dc5 Compile copy byte to byte and word to word. 2016-06-16 11:10:03 -05:00
Chris Pressey
7b1ee60a73 Initial value for locations: changed syntax, executes, compiles. 2016-06-16 11:03:31 -05: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
16450e06d5 Compile goto's. 2015-10-21 15:51:52 +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
Chris Pressey
2dc4dd988e Parse indirect calls, but break evaluator. 2015-10-20 09:33:30 +01:00
Chris Pressey
98524e931a Vector and routine types are constructors with constraints now. 2015-10-19 18:18:06 +01:00
Chris Pressey
04de73d04d Solve this by defining an Offset emittable. 2015-10-19 08:55:47 +01:00
Chris Pressey
e3fe337730 Interesting dead end we've got ourselves into here. 2015-10-18 23:31:17 +01:00
Chris Pressey
645079f03a Implement 'with interrupts off'. 2015-10-18 23:15:40 +01:00
Chris Pressey
a9bd8a3714 Indexed access, + x / + y, at least for LDA and STA.
--HG--
rename : eg/screen.60p => eg/screen1.60p
2015-10-18 18:32:20 +01:00
Chris Pressey
e1cf162a5b Refs have types. 2015-10-18 17:23:01 +01:00
Chris Pressey
522c771208 Add explicitly-addressed memory locations. 2015-10-18 16:22:36 +01:00
Chris Pressey
49e42af953 Implement if not and repeat forever. 2015-10-18 15:32:28 +01:00
Chris Pressey
c5998ed240 Compile repeat loops. 2015-10-18 13:55:40 +01:00
Chris Pressey
070ffacf69 Don't generate code for empty else blocks. 2015-10-17 18:25:54 +01:00
Chris Pressey
b6bb64528f Implement compiling if, but we need relative addressing first. 2015-10-17 16:34:02 +01:00
Chris Pressey
479b484313 Compile the rest of the instructions. 2015-10-17 16:17:35 +01:00
Chris Pressey
e62fd85ccf Compile access of defined memory locations. 2015-10-17 15:46:28 +01:00
Chris Pressey
a3160a5166 Call defined routines. 2015-10-17 15:23:00 +01:00
Chris Pressey
643a48a2c5 Compiler object, labels, compile 'call'... It prints 'A'! 2015-10-17 15:06:50 +01:00
Chris Pressey
2ffff3bbdb Make extern routines survive analysis. 2015-10-17 14:54:28 +01:00
Chris Pressey
5b429adfd9 6502 opcodes are Emittables. Can compile simple programs now! 2015-10-17 11:08:25 +01:00