Skip to content

Instantly share code, notes, and snippets.

@bambuchaAdm
Created May 19, 2015 01:18
Show Gist options
  • Select an option

  • Save bambuchaAdm/9ecbb409e119381ba5e9 to your computer and use it in GitHub Desktop.

Select an option

Save bambuchaAdm/9ecbb409e119381ba5e9 to your computer and use it in GitHub Desktop.
rjmp main
numbers:
.DB 70 96 -70 -96 -126 30 126 -6 -2 -5
main:
ldi ZH, HIGH(2*numbers)
ldi ZL, LOW(2*numbers)
loop:
ld R20, Z+
ld R21, Z+
add R20, R21
rjmp loop
ldi R1, HIGH(-317)
ldi R0, LOW(-317)
ldi R3, HIGH(271)
ldi R2, LOW(271)
; (R3, R2) - (R1, R0)
sub R2, R0
sbc R3, R1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment