mirror of
https://github.com/catseye/SixtyPical.git
synced 2025-02-10 08:30:38 +00:00
Expand on a note in the TODO.
This commit is contained in:
parent
b47cfc7b91
commit
ff5d635307
@ -41,22 +41,38 @@ Documentation
|
||||
TODO
|
||||
----
|
||||
|
||||
`byte buffer` and `pointer` types. Basically, a `buffer` is a table that can
|
||||
### `byte buffer` and `pointer` types
|
||||
|
||||
Basically, a `buffer` is a table that can
|
||||
be longer than 256 bytes, and a `pointer` is an address within a buffer.
|
||||
A `pointer` is implemented as a zero-page memory location, and accessing the
|
||||
buffer pointed to is implemented with indirect addressing. We will likely
|
||||
need a new instruction for this, or at least a mode, and it will likely
|
||||
trash the `x` register, and it will likely be unchecked, at least to start.
|
||||
Basically, this is to allow us to write to the `byte buffer[2048]` known as
|
||||
"the screen".
|
||||
buffer pointed to is implemented with "indirect indexed" addressing, as in
|
||||
|
||||
`word table` and `vector table` types.
|
||||
LDA ($02), Y
|
||||
|
||||
`low` and `high` address operators (turn `word` type into `byte`.) Possibly.
|
||||
We will likely have a new mode of `copy` for this, like
|
||||
|
||||
Save registers on stack or in memory (this preserves them = not trashed).
|
||||
copy 100, p + y
|
||||
|
||||
And at some point...
|
||||
where `p` is a user-defined storage location of `pointer` type, and `+ y`
|
||||
is mandatory (and you can/should set it to zero yourself if you want.)
|
||||
|
||||
This instruction will likely be unchecked, at least to start. Basically,
|
||||
this is to allow us to write to the `byte buffer[2048]` known as "the screen",
|
||||
(and doing that is valuable enough that we can sacrifice checking, for now.)
|
||||
|
||||
### `word table` and `vector table` types
|
||||
|
||||
### `low` and `high` address operators
|
||||
|
||||
To turn `word` type into `byte`.
|
||||
|
||||
### save registers on stack
|
||||
|
||||
This preserves them, so semantically, they can be used even though they
|
||||
are trashed inside the block.
|
||||
|
||||
### And at some point...
|
||||
|
||||
* initialized `byte table` memory locations
|
||||
* always analyze before executing or compiling, unless told not to
|
||||
|
Loading…
x
Reference in New Issue
Block a user