Guides:TMless 0x1500 ACE (JP): Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
Line 318: Line 318:
E1 filler
E1 filler
E1 pop hl ; Entry point of execution
E1 pop hl ; Entry point of execution
C3 88 DB jp nc, $DB88
C3 83 DB jp nc, $DB83
</pre>
</pre>


This address corresponds with the 6th character of box #4's name. Once it arrives here, the first 4 box names will be executed as follows:
This address corresponds with the 1st character of box #4's name. Once it arrives here, the first 4 box names will be executed as follows:


<pre>
<pre>
Line 336: Line 336:
3E C3 ld a, $C3 ; a = $C3
3E C3 ld a, $C3 ; a = $C3
32 ldd (hl), a
32 ldd (hl), a
C6 0B add $0B ; a = $CE
D6 8B sub $8B ; a = $38
50 ld d, b
50 ld d, b


Box 3: $DB7A
Box 3: $DB7A
EA 86 D8 ld(wItems), a
EA A1 DB ld($DBA1), a
EA B1 DB ld($DBB1), a
D6 96 sub $96 ; a = $38
D6 D1 sub $D1 ; a = $67, Carry flag set
EA A1 DB
50 ld d, b
50 ld d, b


Box 4: $DB83
Box 4: $DB83
30 E3 jr nc, .boxNameStart
EA B1 DB ld($DBB1), a
87 add a ; a = $CE
EA 86 D8 ld(wItems), a
E1 pop hl
E1 pop hl
C9 ret
C9 ret
30 DE jr nc, .boxNameStart
50 ld d, b
50 ld d, b
</pre>
</pre>