Created
May 19, 2015 01:18
-
-
Save bambuchaAdm/9ecbb409e119381ba5e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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