> Your second question, LDAB #$40, is the instruction that will initialize CGRAM. $40 corresponds to first row of 5x8 pixel map. So, $40~$47 for 8 rows. Last row is 00 for cursor.

Um, sorry I'm being thick. Where's the instruction that writes to $40~47?