REP #$30 ;>16-bit AXY LDA $7F837B ;>Index length of stripe image (to avoid overwriting previously used stripes) TAX LDA.w #%0000000001010000 ;\Header data (4 bytes) STA $7F837D,x ;| LDA.w #%0000011001000000 ;|>"0000" is 4 tiles, so the L bits should be 6 (4 tiles - 1 = 3, then times 2, which is 6, which is %110 in binary) STA $7F837D+2,x ;/ LDA #$3800 ;\1 unique tile: "0" STA $7F837D+4,x ;/ SEP #$20 ;>8-bit A LDA #$FF ;\Terminating byte (not counted in the length) STA $7F837D+6,x ;/ REP #$21 ;REP #$21 is 8-bit A with carry cleared TXA ;\Update length of stripe (2 bytes of tile data + 4 bytes of header = 6 bytes) ADC #$0006 ;| STA $7F837B ;/ SEP #$30 ;>8-bit AXY RTL |