Skip to content

Instantly share code, notes, and snippets.

@shawnnapora
shawnnapora / euler_0001.asm
Last active July 30, 2022 06:40
Euler problem 1 on ATTiny85
; 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