Skip to content

Instantly share code, notes, and snippets.

@deoxxa
Created January 3, 2015 00:21
Show Gist options
  • Save deoxxa/f973606cd3e868d1c268 to your computer and use it in GitHub Desktop.
Save deoxxa/f973606cd3e868d1c268 to your computer and use it in GitHub Desktop.
uint32_t add(uint32_t n[2]) {
80: 0f 93 push r16
82: 1f 93 push r17
84: fc 01 movw r30, r24
return n[0] + n[1];
86: 64 81 ldd r22, Z+4 ; 0x04
88: 75 81 ldd r23, Z+5 ; 0x05
8a: 86 81 ldd r24, Z+6 ; 0x06
8c: 97 81 ldd r25, Z+7 ; 0x07
8e: 00 81 ld r16, Z
90: 11 81 ldd r17, Z+1 ; 0x01
92: 22 81 ldd r18, Z+2 ; 0x02
94: 33 81 ldd r19, Z+3 ; 0x03
96: 60 0f add r22, r16
98: 71 1f adc r23, r17
9a: 82 1f adc r24, r18
9c: 93 1f adc r25, r19
}
9e: 1f 91 pop r17
a0: 0f 91 pop r16
a2: 08 95 ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment