Advertisement
sci4me

spu0 is_even (uses modulo)

Jun 12th, 2015
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. is_even:
  2. ldi r1 2
  3. jsr mod
  4. ldi r0 0
  5. ldi r1 0
  6. beq r0 r2 is_even_true
  7. ldi r2 0
  8. rts
  9. is_even_true:
  10. ldi r2 1
  11. rts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement