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
|
70247e0e44
|
Generate zero-page code for and, or, and xor, when possible.
|
2018-04-17 17:58:26 +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
|
fa1b0cfae1
|
Support branching and looping on the n flag.
|
2018-03-29 14:45:28 +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
|
96fbe03ce7
|
Make compilation tests pass.
|
2018-03-14 16:27:33 +00:00 |
|
Chris Pressey
|
adb53f7a04
|
Almost compile for loops correctly.
|
2018-03-14 15:33:11 +00:00 |
|
Chris Pressey
|
9ad34ed34f
|
Refine the AST classes even more.
|
2018-03-06 10:43:23 +00:00 |
|
Chris Pressey
|
8a7e3aaebb
|
Flatten more.
|
2018-03-05 15:32:08 +00:00 |
|
Chris Pressey
|
1180d2fe2a
|
Attempt to flatten the code for generating code for copy .
|
2018-03-05 15:22:47 +00:00 |
|
Chris Pressey
|
c194808e64
|
Label the various cases for compiling a copy instruction.
|
2018-03-05 13:23:09 +00:00 |
|
Chris Pressey
|
c85159a9c0
|
Start trying to clean up the code for compiling copy .
|
2018-03-05 12:34:24 +00:00 |
|
Chris Pressey
|
0a83d90515
|
Tighten structure of AST more.
|
2018-03-05 12:13:15 +00:00 |
|
Chris Pressey
|
5fa8c69bd2
|
Don't fudge the name of IndexRefs; dig in to find the ref's name.
|
2018-02-13 17:17:27 +00:00 |
|
Chris Pressey
|
7a024f3062
|
Compile static storage location access.
|
2018-02-09 16:13:09 +00:00 |
|
Chris Pressey
|
52fb1dc6b9
|
Inch toward compiling statics.
|
2018-02-09 14:44:41 +00:00 |
|
Chris Pressey
|
71cded0297
|
Move compiler towards being able to compile access to statics.
|
2018-02-09 14:13:39 +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
|
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
|
7c8f113c07
|
Properly store address (not contents) of routine into vector table.
|
2018-02-07 13:56:17 +00:00 |
|
Chris Pressey
|
6c1c1cb153
|
Include final RTS when emitting trampolines for indirect calls.
|
2018-02-07 11:11:14 +00:00 |
|
Chris Pressey
|
43b3a088b0
|
Use a vector table in the demo game.
|
2018-02-06 15:03:59 +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
|
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
|
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 copy ing 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 |
|