git @ Cat's Eye Technologies SixtyPical / ff5d635
Expand on a note in the TODO. Chris Pressey 4 years ago
1 changed file(s) with 26 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
4040 TODO
4141 ----
4242
43 `byte buffer` and `pointer` types. Basically, a `buffer` is a table that can
43 ### `byte buffer` and `pointer` types
44
45 Basically, a `buffer` is a table that can
4446 be longer than 256 bytes, and a `pointer` is an address within a buffer.
4547 A `pointer` is implemented as a zero-page memory location, and accessing the
46 buffer pointed to is implemented with indirect addressing. We will likely
47 need a new instruction for this, or at least a mode, and it will likely
48 trash the `x` register, and it will likely be unchecked, at least to start.
49 Basically, this is to allow us to write to the `byte buffer[2048]` known as
50 "the screen".
48 buffer pointed to is implemented with "indirect indexed" addressing, as in
5149
52 `word table` and `vector table` types.
50 LDA ($02), Y
5351
54 `low` and `high` address operators (turn `word` type into `byte`.) Possibly.
52 We will likely have a new mode of `copy` for this, like
5553
56 Save registers on stack or in memory (this preserves them = not trashed).
54 copy 100, p + y
5755
58 And at some point...
56 where `p` is a user-defined storage location of `pointer` type, and `+ y`
57 is mandatory (and you can/should set it to zero yourself if you want.)
58
59 This instruction will likely be unchecked, at least to start. Basically,
60 this is to allow us to write to the `byte buffer[2048]` known as "the screen",
61 (and doing that is valuable enough that we can sacrifice checking, for now.)
62
63 ### `word table` and `vector table` types
64
65 ### `low` and `high` address operators
66
67 To turn `word` type into `byte`.
68
69 ### save registers on stack
70
71 This preserves them, so semantically, they can be used even though they
72 are trashed inside the block.
73
74 ### And at some point...
5975
6076 * initialized `byte table` memory locations
6177 * always analyze before executing or compiling, unless told not to