quedaria asi:
ASM:
call @main ; Devuelve en la RAM = $1 si el pokemon es compatible (si no esta en la tabla)
ret
@main
ld a, (ScriptVar)
ld hl, $noTMHMPkmnTable-1
call @loop
jr nc, @goToNext
ld a,$1
ld (ScriptVar),a
ret
@goToNext
ld a,$0
ld (ScriptVar),a
ret
@loop
inc hl
cp a,(hl)
jr z, @resetCarry
cp a, $FF
jr nz, @loop
scf ; set carry flag. executed when the end of the table is reached.
ret
@resetCarry
and a,a ; reset carry flag
ret