base:decrease_x_register_by_more_than_1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
base:decrease_x_register_by_more_than_1 [2017-03-29 08:01] – [Fill sprite with vertical pattern (containing $ff, $7f, $3f)] shrydar | base:decrease_x_register_by_more_than_1 [2017-03-30 12:44] (current) – ftc | ||
---|---|---|---|
Line 12: | Line 12: | ||
</ | </ | ||
- | This procedure takes 8 cycles (and 5 bytes in mem). If the value of the carry flag is always known at this point in the code, it can be removed and the snippet would then take 6 cycles (and 4 bytes in mem). However, there is another way to do it. You can use the illegal opcode SBX (sometimes called AXS). It operates like this: | + | This procedure takes 8 cycles (and 5 bytes in mem). If the value of the carry flag is always known at this point in the code, the SEC instruction |
- AND X with A and put result in X | - AND X with A and put result in X |
base/decrease_x_register_by_more_than_1.1490767285.txt.gz · Last modified: 2017-03-29 08:01 by shrydar