Exploring the visualization of 6502 opcodes
Go to file
2022-10-14 00:08:12 -04:00
.github/workflows regen 2022-09-07 10:39:54 -04:00
nescant/src define load and store 2022-09-07 11:25:35 -04:00
project sbt-scoverage 2.0.5 2022-10-13 10:21:02 -04:00
scratchpad/src and then 2022-10-14 00:08:12 -04:00
src define load and store 2022-09-07 11:25:35 -04:00
.gitignore
.scalafix.conf scalafix 2020-08-15 02:04:28 -04:00
.scalafmt.conf newline 2022-06-23 07:36:36 -04:00
build.sbt aggregate 2022-06-13 20:19:26 -04:00
Jenkinsfile add jenkinsfile 2019-11-30 01:52:25 -05:00
LICENSE Create LICENSE 2018-05-11 18:03:32 -04:00
README.md links 2022-08-02 23:41:34 -04:00
TODO.md todo 2022-09-11 21:51:44 -04:00

6502-opcodes

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
  • IndirectY: argument is an 8-bit address; find a value at this address; increment the value by Y

TODO - Nescant

  • mappings, enums, and bitfields are enums

TODO

  1. operand support should be derived from enum support
  • postfix operations to accumulator values
  • maybe implement define registry
  • register locking (i.e. disallow X writes during indexed traversal that uses X)
  • compiler optimization
    • 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

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

Elsewhere