Prev: AE36 Up: Map Next: AE56
AE46: Search through data looking for first non zero byte.
Used by the routines at Game_Main, Room_jvGambling and Inv_Update.
Input
STACK Ptr to data [Ptr to Data, size]
Output
Search_NonZero AE46 POP HL Get return address from stack. This holds data.
AE47 LD E,(HL) Get pointer.
AE48 INC HL
AE49 LD D,(HL)
AE4A INC HL
AE4B LD B,(HL) Get Byte count.
AE4C INC HL
AE4D PUSH HL
AE4E EX DE,HL
AE4F XOR A Look for the first byte that is not zero.
Search_NonZero_0 AE50 CP (HL)
AE51 RET NZ
AE52 INC HL
AE53 DJNZ Search_NonZero_0
AE55 RET
Prev: AE36 Up: Map Next: AE56