This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. | |
; Find the sum of all the multiples of 3 or 5 below 1000. | |
.include "tn85def.inc" | |
.def counter_lR = r24 ; adiw works against r24+ | |
.def counter_hR = r25 | |
.def zeroR = r1 ; so we can carry with adc since there's no adic | |
.def threeR = r18 | |
.def fiveR = r19 |