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/z80/memset.s

      1         .area   _CODE
      2 
      3 ;; void *memset (void *s, int c, size_t n) __z88dk_callee;
      4 _memset::
      5         pop af
      6         pop hl
      7         pop de
      8         pop bc
      9         push af
     10 
     11         ld a, b
     12         or c
     13         ret z
     14 
     15         ld (hl), e
     16         dec bc
     17 
     18         ld a, b
     19         or c
     20         ret z
     21 
     22         push hl
     23         ld d, h
     24         ld e, l
     25         inc de
     26 
     27         ldir
     28         pop hl
     29         ret
     30 

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