I am doing assembly after a long time. Need some guidance -
To load HX register from RAM,
I do LDHX ram. This should load (ram) to X and (ram+1) to H
I am trying to write code for a clock. I increment "RTCSEC" . When the value is 30d, that's equal to 30seconds.
At every 30secs, I increment RTCMIN. When RTCMIN is 120, I increment RTCHR. If the RTCMIN is not equal to 120, the code branches to incRTCMIN.
Is this correct?
cmp #$1E ; 30 seconds
What to put here???
incRTCMIN: clr RTCSEC
cmp #$78 ; 120 mins make an hour (since 30 secs make a min)