"Corn" more properly refers to any cereal grain, which includes things like wheat, barley, oats, and rye.
The crop known technically as "maize" used to be called "Indian corn" and in North America that eventually got shortened to just "corn."
the word corn originally just meant any kind of kernel, be it gunpowder, salt, or grain.
As a rule of thumb, in contexts such as you describe, "corn" may be read as "wheat" or similar cereal crops. The term was used to refer to cultivated grains for quite some time before the "discovery" of the New World vegetable.