For cheats in this game, use the DOS utility DEBUG.
First backup your game to be edited, then type the
following from the DOS prompt:
ren fire.exe cheater.cht
For invulnerability, type:
e 30cb eb 8
For infinite magic,
e 201a 90 90 90 90 90 90
Then rename CHEATER.CHT back to its previous name.