User Tools

Site Tools


base:decrease_x_register_by_more_than_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
base:decrease_x_register_by_more_than_1 [2017-03-29 08:01]
shrydar [Fill sprite with vertical pattern (containing $ff, $7f, $3f)]
base:decrease_x_register_by_more_than_1 [2017-03-30 12:44] (current)
ftc
Line 12: Line 12:
 </​code>​ </​code>​
  
-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 ​can be removed and the snippet would then take 6 cycles (and 4 bytes). However, there is another way to do it. You can use the illegal opcode SBX (sometimes called AXS). It operates like this:
  
   - 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.txt ยท Last modified: 2017-03-30 12:44 by ftc