6502-opcodes/README.md

45 lines
2.0 KiB
Markdown
Raw Normal View History

2022-12-01 11:37:17 +00:00
# firepower
2020-08-12 03:04:23 +00:00
## Addressing modes
* Immediate: a value literal
* ZeroPage: argument is an 8-bit address to the zero page
* ZeroPageX: argument is an 8-bit address to the zero page, incremented by X without carry
* ZeroPageY: argument is an 8-bit address to the zero page, incremented by Y without carry
* Absolute: argument is an 16-bit address
* AbsoluteX: argument is an 16-bit address, incremented by X with carry
* AbsoluteY: argument is an 16-bit address, incremented by Y with carry
* Indirect: argument an address (A); the effective value is an address (B) stored at that address (A); used only by Jump
* IndirectX: argument is an 8-bit address; find a value at this address incremented by the value X
2020-08-15 17:52:05 +00:00
* IndirectY: argument is an 8-bit address; find a value at this address; increment the value by Y
2020-08-28 06:18:25 +00:00
## TODO - Nescant
2020-08-28 16:43:48 +00:00
- mappings, enums, and bitfields are enums
2020-08-15 17:52:05 +00:00
## TODO
2020-08-21 09:12:26 +00:00
1. operand support should be derived from enum support
2020-08-15 17:52:05 +00:00
- postfix operations to accumulator values
2020-08-17 23:19:43 +00:00
- maybe implement define registry
- register locking (i.e. disallow X writes during indexed traversal that uses X)
- compiler optimization
2020-08-20 23:25:36 +00:00
- when writing multiple, 16-bit address literals to memory, they may share the same high byte. if all writes are done by bouncing off the accumulator, you can save instructions by using the accumulator for the high byte once and writing multiple times
- articulate AST as different from ASM stream
- register locking (transactions) via phantom types
2022-05-16 15:44:47 +00:00
## Mutation tracking
- If the injected scope is local to the caller (and not reused), then it is also local to the called method, and can be rendered as a local val declaration
2022-08-03 03:41:30 +00:00
## Elsewhere
- [Easy 6502](https://skilldrick.github.io/easy6502/)
- [Annotated Snake6502](https://gist.github.com/wkjagt/9043907)
2024-01-04 19:24:43 +00:00
- [Ultimate Commodore 64 Reference - 6502](https://www.pagetable.com/c64ref/6502/)
2022-12-07 19:19:44 +00:00
## Colophon
`firepower` can be abbreviated as `fp`, just like `functional programming`. And it is a reference to one of Mario's abilities in Super Mario Bros, an NES classic.