git @ Cat's Eye Technologies SixtyPical / 5c3c560
Refine documentation. Chris Pressey 3 years ago
2 changed file(s) with 32 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
6565
6666 ### And at some point...
6767
68 * `const`s, that can be used in defining the size of tables, etc
68 * `const`s that can be used in defining the size of tables, etc.
6969 * Remove the need for `forward` and `vector () table` (make grammar changes)
7070 * Tests, and implementation, ensuring a routine can be assigned to a vector of "wider" type
7171 * Check that the buffer being read or written to through pointer, appears in approporiate inputs or outputs set.
72 (Associate each pointer with the buffer it points into.)
73 * `static` pointers -- currently not possible because pointers must be zero-page, thus `@`, thus uninitialized.
7274 * `interrupt` routines -- to indicate that "the supervisor" has stored values on the stack, so we can trash them.
73 * error messages that include the line number of the source code
74 * add absolute addressing in shl/shr, absolute-indexed for add, sub, etc.
75 * automatic tail-call optimization (could be tricky, w/constraints?)
76 * possibly `ld x, [ptr] + y`, possibly `st x, [ptr] + y`
75 * Error messages that include the line number of the source code.
76 * Add absolute addressing in shl/shr, absolute-indexed for add, sub, etc.
77 * Automatic tail-call optimization (could be tricky, w/constraints?)
78 * Possibly `ld x, [ptr] + y`, possibly `st x, [ptr] + y`.
7779 * Maybe even `copy [ptra] + y, [ptrb] + y`, which can be compiled to indirect LDA then indirect STA!
78
79 Things it will not do
80 ---------------------
81
82 (this will be moved to a FAQ document at some point)
83
84 * Check that a vector is initialized before it's called.
85 * Check for recursive calls, or prevent bad things happening because of recursive calls.
86 (You can always recursively call yourself through a vector.)
2525 The intent is not to make it absolutely impossible to make such errors,
2626 just harder.
2727
28 ### Things it will Not Do ###
29
30 To emphasize the point, the intent is not to make it impossible to make
31 data-usage (and other) errors, just harder.
32
33 Here are some things SixtyPical will not try to detect or prevent you
34 from doing:
35
36 * Check that a vector is initialized before it's called.
37 * Check that the stack has enough room on it.
38 * Prevent bad things happening (e.g. clobbering a static storage
39 location) because of a recursive call. (You can always recursively
40 call yourself through a vector.)
41 * Check that reads and writes to a buffer are in bounds. (This may
42 happen someday, but it's difficult. It's more likely that this
43 will happen for tables, than for buffers.)
44
45 At one point I wanted to do a call-tree analysis to find sets of
46 routines that would never be called together (i.e. would never be on
47 the call stack at the same time) and allow any static storage locations
48 defined within them to occupy the same addresses, i.e. allow storage
49 to be re-used across these routines. But, in the presence of vectors,
50 this becomes difficult (see "Prevent bad things happening", above.)
51 Also, it would usually only save a few bytes of storage space.
52
2853 ### Some Background ###
2954
3055 The ideas in SixtyPical came from a couple of places.