Frank,
It's challenging, but with a little work you should be able to see the flat above the starter and get a number. When you find the number, post it up and we'll show you how to determine the engine origin. You're looking for a 7-digit number like an early VIN.
It is possible there is no number -- some factory remanufactured engines do not have a number.
The particular car it came from is less important than how it has been configured now. In simple terms, the M30 is the Mr. Potato Head of engines -- there are many possible combinations of blocks, heads, cranks, cams, injection systems, yada, yada. A block marked 3.5 could be a relatively low-pro engine from an early 5 series, or a Euro L block good for over 200 hp in stock form. The block in my '75 e12 was marked 3.3, but it was actually a built 3.5 putting out upwards of 240hp. To the layman it looks just like the 190hp 2.8 in my e9.
Check the head as well -- look on the intake side near the front, you should find some casting marks with a circular pattern and a 2-digit year.
Cheers,