SX Microcontroller Math Method

Increment / Decrement

General Purpose

Translated and optimized for the Scenix SX by James Newton

;from Dmitry Kiryashov
;inc
	mov	W, #1
	add	count0, W
	snb	C
	add	count1, W
;... {ed: repeat the last two lines for as wide a counter as is needed}

;dec
	mov	W, #1
	sub	count0, W
	sb	C
	sub	count1, W
;... {ed: repeat the last two lines for as wide a counter as is needed}