PikalaxALT icon

Function8e814 efficiency edit

PikalaxALT | PRO | 10/20/15 12:18:42 PM UTC | 0 ⭐ | 5042 👁️ | Never ⏰ | []
Z80 Assembler |

0 B

|

None

|

0 👍

/

0 👎

; The function in the game is:
Function8e814: ; 8e814
    push hl
    push de
    push bc
    push af
    ld hl, wc300
    ld bc, $00c1
.loop
    ld [hl], $0
    inc hl
    dec bc
    ld a, c
    or b
    jr nz, .loop
    pop af
    pop bc
    pop de
    pop hl
    ret
 
; More efficient would be:
Function8e814_eff:
    push hl
    push bc
    push af
    ld hl, wc300
    ld c, $c1
    xor a
.loop
    ld [hli], a
    dec c
    jr nz, .loop
    pop af
    pop bc
    pop hl
    ret

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎