magnetism_025

by daizodeevon

Game: SMW

Description: Magnetism except slower

Magnetism:
	LDA $14
	AND #$03
	BEQ +
	RTL
+
	LDX #$0B
.loop
	JSL .set
.mid
	SEP #$20
	DEX
	BPL .loop
	BRA .return
.set
	LDA $14E0,x
	XBA
	LDA $E4,x
	REP #$20
	CMP $94
	BEQ .mid
	BCC .moveright
	BCS .moveleft
.moveright
	CLC : ADC #$0001
	BRA .finish
.moveleft
	SEC : SBC #$0001
.finish
	SEP #$20
	STA $E4,x
	XBA
	STA $14E0,x
	BRA .mid
.return:
	RTL
back to listings