Prev: BAB4 Up: Map Next: BAD8
BACE: Get the length of a string
Used by the routine at BA6E.
Input
HL The address of the current string
B On exit, returns the length
BACE LD B,$00 Set B to 0.
BAD0 LD A,(HL) Get the byte pointed to by HL.
BAD1 CP $FF Is it FF?
BAD3 RET Z Return if it is.
BAD4 INC B Otherwise increase the count.
BAD5 INC HL Move forward to the next part of the string and repeat.
BAD6 JR $BAD0
Prev: BAB4 Up: Map Next: BAD8