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 | Last revisionBoth sides next revision | ||
base:decrease_x_register_by_more_than_1 [2017-03-04 22:14] – [Decreasing the X register by more than 1] monte_carlos | base:decrease_x_register_by_more_than_1 [2017-03-29 08:01] – [Fill sprite with vertical pattern (containing $ff, $7f, $3f)] shrydar | ||
---|---|---|---|
Line 43: | Line 43: | ||
====== Examples ====== | ====== Examples ====== | ||
- | ===== Fill sprite with vertical pattern (containing $ff, $7f, $3f) ===== | + | ===== Fill sprite with vertical pattern (containing $ff, $bf, $7f, $3f) ===== |
< | < | ||
Line 52: | Line 52: | ||
lda #yy | lda #yy | ||
sta spr+o1,x | sta spr+o1,x | ||
- | lda #$ff or $7f or $3f | + | lda #$ff or $bf or $7f or $3f |
sta spr+o2,x | sta spr+o2,x | ||
axs#3 | axs#3 | ||
Line 60: | Line 60: | ||
where o0,o1,o2 is an excluding choice of {0,1,2}. | where o0,o1,o2 is an excluding choice of {0,1,2}. | ||
- | On one column of the sprite a must contain $ff, $7f or $3f, because if it is anded with the value of the x reg, x must be contained. As x runs from 60 to 0 (where 63 is $3f) this is only the case for these three values. | + | On one column of the sprite a must contain $ff, $bf, $7f or $3f, because if it is anded with the value of the x reg, x must be preserved. As x runs from 60 to 0 (where 63 is $3f) this is only the case for these four values. |
===== Info on SBX/AXS on external sites ===== | ===== Info on SBX/AXS on external sites ===== | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// |
base/decrease_x_register_by_more_than_1.txt · Last modified: 2017-03-30 12:44 by ftc