Pokemon RBY were programmed in the era of C and converted to readable Binary, just as most retail level Gameboy games were done before the introduction of C++ and several non-universal "trade secret" coding languages became the norm.
source: decompilation records from old emulator rips.
Edit: just specifying because I wasn't thorough when I stated it earlier. After gen one, game freak was using more advanced writing techniques based off of C and C++, but they are technically trade secrets meant to hinder piracy.
So in short, gen 2 used C and C++ essentials formed the core for the games since, with GF having their in house formative mutation of the software kept in secret for privacy requirements.
I admit, though, that I'm not able to find many margins regarding Gen VI.