Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Original :
- ld hl, $A420
- ld d, $D8
- ld a, b
- sub [hl]
- ld [hl], b
- ld hl, $AD69
- add [hl]
- ld [hli], a
- ret nc
- inc [hl]
- rst $00
- Result :
- add sp, $9E ; sp = $DF53, PP move 3 of 28th (?) Pokémon
- pop hl ; PP moves 1 and 2
- pop de ; PP move 3, only d matters
- ld sp, hl
- pop hl ; ld hl, $A420
- push de ; Perform ld a, d
- or $50 ; Padding w/ terminator
- pop af ; Reminds me of something... hm.
- sub [hl]
- push af
- call LoadToHL ; Increments hl but who cares
- or a ; Padding
- or $50 ; Padding & terminator
- pop af
- pop hl ; ld hl, $A420
- add [hl]
- call LoadToHL+1
- di ; Padding
- di
- ld d, b ; Terminator
- call nc, IncAtHL ; Condition inverted by second LoadToHL
- rst $00
- LoadToHL:
- ld a, d
- ld [hli], a
- ccf ; Used to complement the carry of the second addition
- ret
- IncAtHL:
- inc [hl]
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement