
; Program starts here
;--------
Start		call	Ram_init	;set variables to nice values
		call	Port_init	;set port directions
		call	Timer_init	;start timer based interrupt
;--------
; Done initializing, start the endless loop.
;--------
;
Circle					;begin the big loop
;
;--------
; detect falling edge on PORTA,4 to determine rotary index
; calculate rotation period and store in period_dup
; compare with working period(period_calc) and adjust if way different
;--------
		call	Check_index
;--------
; check display state and change if needed
;--------
		call	Display_now
;--------
; check keyboard and adjust time
;--------
		call	Check_keys
;--------
; check minute flag and increment time if a minute has passed
;--------
		call	Keep_time
;--------
; gentlemen, that's a clock, keep it rolling
;--------
		goto	Circle		;you heard the man, get going!
		end
;--------
; end of file
;--------
