In order to correctly polar align a telescope (so that it can accurately track the movement of the stars) a popular method is to use a 'polarscope' which requires knowledge of the current position of polaris, which moves around the true north pole in a small circle.

I had assumed that all one needed to know was its right ascension, which is added to the sidereal time MOD 24 hours. This is correct, but I did not know that Polaris' RA is changing rapidly, by 21 minutes since New Year 2000, and about 4 1/2 hours by 2100. Obviously this is a large enough drift that it needs to be taken into account - the polarscope reticule is marked in 1-hour divisions and can be estimated to about 10 minutes.

A plot of RA against year shows that it can be closely approximated by the equation (using just the last two year digits):

RA = 0.0092 * year^2 + 1.0998 * Year + 150.57

But, an accuracy of just 3-4 minutes is plenty for good polar alignment with a polarscope. This means we can approximate it easily using simple integer multiplication and right-shift division. Here's my solution, there are probably better ones but this is good enough. Note the use of the carry for rounding and that the final big division (by 128) is left to the end to retain accuracy.

;Calculate RA of Polaris given year in minutes ;RA = 150 +(year/8 + year) * (year+128)/128 give an accuracy of no worse than 3 minutes POLARIS_RA: lds temp,DATE+2 ;Put current year in temp1 mov temp1,temp lsr temp1 lsr temp1 lsr temp1 ;year/8 mov temp2,temp1 brcc SKIP55 inc temp2 ;round SKIP55: add temp2,temp ;year/8+2 ldi temp1,128 add temp1,temp mul temp1,temp2 lsr R1 ror R0 lsr R1 ror R0 lsr R1 ror R0 lsr R1 ror R0 lsr R1 ror R0 lsr R1 ror R0 lsr R1 ror R0 brcc SKIP56 inc R0 ;round SKIP56: ldi temp1,150 ;add offset clr temp2 add temp1,R0 ;Ra in minutes in Temp1:temp2 adc temp2,R1 ret