	ORG 64
ARR:	DD 10, 22, 12, 33, 2220, 0

	addi	t0, x0, ARR		;; t0 = ARR
	addi	t1, x0, 0		;; t1 = 0 /* counter */

loop:	ld	t2, 0(t0)		;; t2 = t0[0]
	beq	t2, x0, ENDARR		;; if (t2==0) goto ENDARR
	addi	t1, t1, 1		;; t1++
	addi	t0, t0, 8		;; t0 += 8
	beq	x0, x0, loop		;; jump to loop

ENDARR:
	ecall	x0, t1, 0
	ebreak	x0, x0, 0
