Hello,
For small HC908 devices, such as the QY4(A), you should consider using the in-built ROM resident routines, specifically to erase and program flash data memory. You will find that this may make life much easier. Refer to AN2874 and AN2635 for details.
To handle a total of 128 bytes of non-volatile data, this will occupy two 64-byte flash pages. However, when using the ROM routines, the maximum number of bytes that may be programmed for a single call is limited to a single row of 32 bytes. The ROM routines make use of a RAM buffer to hold the data to be programmed, and this must start at a specific location. If a whole row is to be programmed, the buffer will occupy 32 bytes, plus four additional bytes.
Regards,
Mac