Memory layout

| 0x59 | B1 / B2 | T | A | |——|———–|—–|—–|

Arguments

Description

Removes a quantity of an item from the inventory. Either the item is removed explicitly with values, in which case B1 and B2 are zero, or the item type and quantity are retrieved from memory. In this case, bank B1 and address T retrieve the item type, whilst bank B2 and address A retrieve the quantity to remove.