# readcalendar writecalendar ASCIIBCD  

L readcalendar			# offset in A, red in A
	AND 0x7f to A
	send byte $calendar		# need delay? Examples don't.
	recieve byte $(($calendar+1))
					return


L writecalendar			# offset in A, byte to write in B
	AND 0x7f to A
        send byte $calendar
	= B to A
        send byte $(($calendar+1))
				return


L ASCIIBCD		# append 2 digit (one byte) BCD to a string as ASCII
			# 2-digit BCD byte in A, string in DI
			# DI is left pointing at next string vacancy
	= A to B
	downshift 4 to B
	AND 15 to B
	+ 0x30 to B
	= byte B to @ DI
	1+ DI
	AND 15 to A
	+ 0x30 to A
	= byte A to @ DI
	1+ DI
			return


