daily pastebin goal
16%
SHARE
TWEET

getKey (24 bytes, 370cc)

Zeda Oct 13th, 2015 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getkey:
  2. ;;Returns L,B,A=0, z flag set if no key is pressed
  3. ;;22cc+60G+24R
  4. ;;R is on [1,8]
  5. ;;G is on [1,7]
  6. ;;avg: 370cc
  7. ;;24 bytes
  8.     ld bc,$FE01
  9.     xor a
  10. loop:
  11.     out (c),b
  12.     add a,$20
  13.     sla b
  14.     ret nc
  15.     in l,(c)
  16.     inc l
  17.     jr z,loop
  18.     rrca
  19.     rrca
  20.     inc a
  21.     rr l
  22.     jr nc,$-3
  23.     ret
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top