This is a minor bit of information that anyone modding spells will find useful. Again, this was just sitting around, and I figured I should share it.
The determination of what spells can be used in battle is performed whenever the equipped commands change. This code can be found at C2/E6E0, and is relatively straight-forward. The code loops over the character's equipped abilities, sets the level for each magic type, and then saves this data in three bytes per character (see below). There is special handling for Red and X-Magic that sets both the White and Black magic levels. This data is saved to 7E/053D-3F and copied to 7E/203D-3F for use in battle.
7E053D XX 1st Player Sword/White Display
7E053E XX 1st Player Black/Dimen Display
7E053F XX 1st Player Summon/Misc Display
(Layout borrowed from samurai goroh's FFV document)
This data is further parsed in battle menus at a beefy bit of code that starts (I think) at C2/4287. I haven't quite deciphered it yet, but the basic mechanism of action is that the spell level (7E/203D-F) and learned spells (7E/0950) mask the spells you can't cast.
The determination of what spells can be used out of battle is contained in a three byte lookup table starting at C0/EEF4. I have not verified everything, but the data format appears to be as follows: Spell Number/Index, Magic Type, Row * 3. I do not know if the second and third bytes actually perform any function. It's very simple: if the Spell Number is in this list, it can be cast outside of battle.