The item underflow glitch (event method) was discovered by MrWint. It allows the player to obtain an inventory of 255 items (see expanded items pack). This method will only work with the main inventory and not the stored PC inventory (unlike the later documented dry underflow glitch).
To activate this glitch, the player needs, in their first two item slots :
(Any cheap item)x any qty
(Any item)x 255
Moreover, the player must have an item removable by an event (a drink for the Saffron guards, a fossil, etc.) NOTE : it is not recommended to have other items than these in your bag.
The player should open their item inventory, and toss their first item until the Item menu stops "responding".
Then the player should remove an item from their inventory with an event. Then, opening the item pack allows the player to scroll past slot 20. This allows the player to edit unrelated portions of the memory as if they were items.
ExplanationWhen the first item stack is tossed, the game decreases the owned item counter (located at hex:D31C) by 1. It then makes the item x255 erase the item tossed. But because dec:255 equals hex:FF and the game considers FF as the ending marker, the 255 items aren't overwritten, nor the following ones.
The process repeats until the item counter reaches 0, which makes the first item act as the Cancel button. Then giving out an item makes the game decrease the item counter once more, which underflows to hex:FF. The player can then access 255 items, which is far beyond the normal limit.
Methods to obtain x255 stack
Using MissingNo.1) Encounter a MissingNo. (e.g. with old man glitch, Trainer escape glitch, CoolTrainer♀ glitch) to add 128 to the sixth item quantity (if less than 127).
For Pokémon Yellow:
Unstable MissingNo. will not freeze the game if encountered for the first time after a wiped save file with Up+Select+B and if no other glitch Pokémon sprite was viewed. More reliably, the double Trainer escape glitch with Level 80 Starmie can be used (video) to encounter a Fossil/Ghost MissingNo., which will not freeze the game. Alternatively though more difficult, the player may perform the Ditto glitch sub-glitch of the Trainer escape glitch by having Ditto Transform into a Pokémon with 182, 183, 184 Special.
2) Either encounter MissingNo. again or catch it with the sixth item quantity as x127 to get the x255 stack. Note this will not work when catching the MissingNo. if the item used to catch it was the sixth and a Poké Ball x127, therefore items like X Special are more desirable (also in this case, because X Special can be used for Celadon looping map glitch)