Exploring the visualization of 6502 opcodes
Go to file
2020-11-08 12:35:10 -05:00
.bsp cats-core 2.2.0 2020-09-22 22:01:34 -04:00
factorio woo 2020-09-07 21:52:35 -04:00
nescant/src specify byte width 2020-08-28 12:31:13 -04:00
project cats 2.3.0-M2 2020-11-08 12:35:10 -05:00
src resource as named operand 2020-08-26 10:26:37 -04:00
.gitignore
.scalafix.conf scalafix 2020-08-15 02:04:28 -04:00
.scalafmt.conf fmt 2020-08-15 03:52:11 -04:00
build.sbt scalafix 2020-09-04 01:18:34 -04:00
factorio-basic.puml woo 2020-09-07 21:52:35 -04:00
factorio.puml woo 2020-09-07 21:52:35 -04:00
Jenkinsfile add jenkinsfile 2019-11-30 01:52:25 -05:00
LICENSE
out.html woo 2020-09-07 21:52:35 -04:00
README.md add todo 2020-08-28 12:43:48 -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