User:MrMissingNo72/Item 0x6B arbitrary code execution: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Tags: Mobile edit Mobile web edit |
Tags: Mobile edit Mobile web edit |
||
Line 14:
* ld h, (b3)
* ld a, (b1)
* ld [hl], a
* ret
Example - 011559D0
* ld l, 59
* ld h, D0
* ld a, 15
* ld [hl], a
* ret
|
Latest revision as of 15:18, 13 July 2023
Item 0x6B executes CD35 when used, so it's better than 8F (0x5D) and 'd m (0x65). Before you use item 0x6B, make sure the bytes (C3, 22, D3) are at CD35.
Gameshark-like code
- Item 0x6B, any
- Master Ball, x99
- X-Accuracy, x(b2)
- Carbos, x(b3)
- Lemonade, x(b1)
- Item 0x77, x201
ASM instructions:
- ld l, (b2)
- ld h, (b3)
- ld a, (b1)
- ld [hl], a
- ret
Example - 011559D0
- ld l, 59
- ld h, D0
- ld a, 15
- ld [hl], a
- ret