From Glitch City Laboratories
The Recover glitch, Softboiled glitch or Rest glitch is an oversight existing in the first generation of main-handheld Pokémon games. The glitch was fixed within the game engines of Pokémon Stadium for the Nintendo 64 and later game releases.
The moves Recover, Softboiled and Rest will fail if the difference between the user's current and maximum HP is 255, 511 or any other integer which can be represented in the hexadecimal format XXFF
If the difference in the amount of the Pokémon's current and full HP (the one using the move Recover, Softboiled or Rest) is one of the integers mentioned above, the game will state that its hitpoints are already full and the move will fail.