KarolS / KarolS/millfork

Support identity table usage

Open
#129 2 comments 0 reactions 0 assignees View on GitHub
6502 compiler enhancement
Dominant language
Scala
Stars
279
Forks
21
PR merge metrics
No merged PRs in 30d

Description

There's an interesting 6502 assembly optimization where you put a 256-byte page aligned table in memory with each byte having the value of its index. Then you can make some pseudo-operations:
- ADC X with ADC table,X
- TXY with LDY table,X
- etc.
These are faster and smaller than doing it with a temp byte, so if they offset the cost of the table it can be worth it. Could such a feature (probably in the form of a flag) be added to the compiler?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.