Laut Bascom-Hilfe braucht der Befehl Writeeeprom auch noch eine Angabe, wohin der Wert geschrieben werden soll.

WRITEEEPROM var , address

var
The name of the variable that must be stored
address
The address in the EEPROM where the variable must be stored.
Und das scheint bei Dir zu fehlen. Versuch´s doch mal so:
Code:
Dim H as Eram Byte
...
Do
...
If T > H then
  H = T
End if
...
Loop
Dann müsste es eigentlich klappen...