; -------------------------------------------------
; Delays
; -------------------------------------------------
delay1s:		push	R15
				mov		R15, 10
loop1s:			call 	delay100ms		
				dec		R15
				jnz		loop1s
				pop		R15
				ret

delay100ms:		push	R15
				mov		R15, 10
loop100ms:		call 	delay10ms		
				dec		R15
				jnz		loop100ms
				pop		R15
				ret
			
delay10ms:		push	R15
				mov		R15, 10
loop10ms:		call	delay1ms		
				dec		R15
				jnz		loop10ms
				pop		R15
				ret
		
delay1ms:		push	R15
				mov		R15, 10
loop1ms:		call	delay100us
				dec		R15
				jnz		loop1ms
				pop		R15
				ret

delay100us:		push	R15
				mov		R15, 10
loop100us:		call	delay10us
				dec		R15
				jnz		loop100us
				pop		R15
				ret

delay10us:		push	R15
				mov		R15, 99
loop10us:		nop
				nop
				nop
				dec		R15
				jnz		loop10us
				pop		R15
				ret

delay1us:		push	R15
				mov		R15, 9
loop1us:		nop
				nop
				nop
				dec		R15
				jnz		loop1us
				pop		R15
				ret
				
; -------------------------------------------------
