Betrag bestimmen bei Subtraktion:

Beispiel: c = |a-b| 
also bei a=10 und b=6  ---> c=4 
und bei  a=6 und  b=10 ---> c=4

Code:


            sec
		lda a
		sbc b
		bcs weiter
		sbc #0
		eor #$ff
	weiter  sta c