meminitEEPROM  or  memsetEEPROM

Purpose: Initialize a range of EEPROM to a specific value.
Assumes: bPtrDest is valid
Passed:    R25:R24  BYTE *   bPtrStart the starting EEPROM address
R22  BYTE bValue data value to write to all BYTEs in the range
R21:R20  WORD wCount number of BYTEs to initialize to bValue
Returns: R25:R24  BYTE *   bPtrStart the caller's bPtrStart value (unmodified)
Alters: No Registers, only the EEPROM block referenced and the FLAGs
Example:  This example resets all the Operating System EEPROM configuration BYTEs, so each will be loaded with its default value upon bootup:
ResetAllEEConfig:
   LDI     R25, AHi_EESysVars     ; Load R25:R24 with the starting EEPROM
   LDI     R24, 0                 ;  address of (or pointer to) 0x0000
   LDI     R22, 0xFF              ; Set the data value to write to all BYTEs
   LDI     R21, 0                 ; Since count is < 256, zero the MSByte
   LDI     R20, 80                ; Number of EEPROM BYTEs used by MIRTOS
   JMP     AmeminitEEPROM         ; Do it; meminitEEPROM returns to our caller
Notes: The bPtrStart value is not checked for validity.
If wCount is zero, it exits immediately with no EEPROM change.
Dropin: 
(setup
code)
;   Setup for the meminitEEPROM() call:
; Passed:  R25:R24 BYTE * bPtrStart to the EEPROM starting address
;              R22 BYTE   bValue to write to all BYTEs in the range
;          R21:R20 WORD   wCount is the number of BYTEs to initialize
; Returns: R25:R24 BYTE * bPtrStart, the caller's bPtrStart value (unmodified)
; Alters:  No Registers, only the EEPROM block referenced and the FLAGs
Also see:  The memcpyEEPROM and SRAM meminit system routines.