Update TODO
Chris Pressey
6 years ago
0 | 0 | TODO for SixtyPical |
1 | 1 | =================== |
2 | 2 | |
3 | ### `low` and `high` address operators | |
3 | ### 16-bit `cmp` | |
4 | 4 | |
5 | To turn `word` type into `byte`. | |
5 | This is because we don't actually want `low` and `high` address operators | |
6 | that turn `word` type into `byte`. | |
6 | 7 | |
7 | Trying to remember if we have a compelling case for this or now. The best I can think | |
8 | of is for implementing 16-bit `cmp` in an efficient way. Maybe we should see if we | |
9 | can get by with 16-bit `cmp` instead though. | |
8 | This is because this immediately makes things harder (that is, effectively | |
9 | impossible) to analyze. | |
10 | 10 | |
11 | The problem is that once a byte is extracted, putting it back into a word is awkward. | |
12 | The address operators have to modify a destination in a special way. That is, when | |
13 | you say `st a, >word`, you are updating `word` to be `word & $ff | a << 8`, somelike. | |
14 | Is that consistent with `st`? Well, probably it is, but we have to explain it. | |
15 | It might make more sense, then, for it to be "part of the operation" instead of "part of | |
16 | the reference"; something like `st.hi x, word`; `st.lo y, word`. Dunno. | |
11 | 16-bit `cmp` also benefits from some special differences between `cmp` | |
12 | and `sub` on 6502, so it would be nice to capture them. | |
17 | 13 | |
18 | 14 | ### Save values to other-than-the-stack |
19 | 15 | |
31 | 27 | Check that the buffer being read or written to through pointer, appears in appropriate |
32 | 28 | inputs or outputs set. |
33 | 29 | |
34 | In the analysis, when we obtain a pointer, we need to record, in contect, what buffer | |
30 | In the analysis, when we obtain a pointer, we need to record, in context, what buffer | |
35 | 31 | that pointer came from. |
36 | 32 | |
37 | 33 | When we write through that pointer, we need to set that buffer as written. |
72 | 68 | More generally, define a block as having zero or one `goto`s at the end. (and `goto`s cannot |
73 | 69 | appear elsewhere.) |
74 | 70 | |
75 | If a block ends in a `call` can that be converted to end in a `goto`? Why not? I think it can. | |
76 | The constraints should iron out the same both ways. | |
71 | If a block ends in a `call` can that be converted to end in a `goto`? Why not? I think it can, | |
72 | if the block is in tail position. The constraints should iron out the same both ways. | |
77 | 73 | |
78 | 74 | And - once we have this - why do we need `goto` to be in tail position, strictly? |
79 | 75 | As long as the routine has consistent type context every place it exits, that should be fine. |
85 | 81 | One such library routine might be an `interrupt routine` type for various architectures. |
86 | 82 | Since "the supervisor" has stored values on the stack, we should be able to trash them |
87 | 83 | with impunity, in such a routine. |
84 | ||
85 | ### Line numbers in analysis error messages | |
86 | ||
87 | For analysis errors, there is a line number, but it's the line of the routine | |
88 | after the routine in which the analysis error occurred. Fix this. |