Umm not sure if you mean 77 316? Im not sure there was a 77 318. Either way if there was it will most definatly swap with out a problem. They both have the same M10 motor with the same getrag 5sp overdrive tranny. They also have the early CIS system with the K-jet. Most if not all e21 parts 77-83 are interchangeble minus some suspension, and interior parts. But either of the M10's whether it be the 2.0L or the 1.8L are the same, just a little difference with the crank and head/intake system...
<img src='http://e21.tricord.cjb.net/members/cjpix/bim1_050204.jpg' border='0' alt='user posted image' />