git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/libc/asm/sm83/abs.s

      1         .module abs
      2 
      3         .area   _HOME
      4 
      5 ; int abs(int)
      6 _abs::
      7         ld  a, d
      8         ld  b, a
      9         ld  c, e
     10         add a
     11         ret nc
     12         xor a
     13         sub c
     14         ld  c, a
     15         ld  a, #0
     16         sbc b
     17         ld  b, a
     18         ret

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.