C101 (1990 E30) X20 (1993-1995 E36) 1990 325i/is/ix/ic C101 to 93-95 E36 X20
Pin # Purpose Pin # Color Purpose C101 X20 Purpose
1 Alternator + 1 - - 1 25 Alternator +
2 Oil Level Sensor pin 3 (BU/WT) 2 - - 2 Note 3 Oil Level Sensor pin 3 (BU/WT)
3 - 3 BR/GR Transmission Control (EGS) 3 - unused
4 CLT sensor (cluster) 4 SW/BL A/C Compressor Relay 4 12 CLT sensor (cluster)
5 Oil Pressure Switch 5 SW/GR Normal Speed relay (AC) 5 23 Oil Pressure Switch
6 O2 relay (Fuse 9 15a) 6 VI/GR Climate Control Module 6 Note 4 O2 relay (Fuse 9 15a)
7 Ignition Switch 7 SW/VI Starter Immobilization (OBC) 7 21 Ignition Switch
8 Econometer (MPG) 8 GR Check Engine/SI Indicator 8 24 Econometer (MPG)
9 RPM (to cluster) 9 - Oil Temp (M3 only) 9 20 RPM (to cluster)
10 Oil Level Sensor pin 1 (BU/YL) 10 BL/GE Reverse Light Switch (no EGS) 10 Note 3 Oil Level Sensor pin 1 (BU/YL)
11 SI Reset 11 BR/GE CLT Temp (cluster) 11 19 SI Reset
12 Check Engine Light 12 BR/VI CLT Temp (cluster) 12 8 Check Engine Light
13 Fuel Pump Relay 13 GN/VI FP Relay 13 13 Fuel Pump Relay
14 VSS (from cluster) 14 SW/WS VSS (from cluster) 14 14 VSS (from cluster)
15 Unloader Relay 15 SW/GN Unloader Relay 15 15 Unloader Relay
16 SRS / Diagnostics pin #6 16 WS/GE Data Link (Diagnostics pin 15) 16 17 SRS / Diagnostics pin #6
17 ABS Communication (ix) 17 WS/VI Data Link (Diagnostics pin 20) 17 Note 1 ABS Communication (ix)
18 Ignition Switch (Starter) 18 SW/GE Ignition Switch (Starter) 18 18 Ignition Switch (Starter)
19 Oil Temp (M3 only) 19 WS/GN SI reset (Diagnostics pin 7) 19 9 Oil Temp (M3 only)
20 ABS Relay (1990+ cars) 20 SW RPM (to cluster) 20 C101 #6, Note 2 ABS Relay (1990+ cars)
21 GN Ignition switch Bold: required connection
22 GN/WS Reverse Light Switch (no EGS) Hot at run/start?
23 BR/GR Oil Pressure Switch Note 1:
24 WS/SW Econometer (MPG) 325ix ABS communication - the ABS computer monitors wheel speed sensors, engine load, RPM, TPS, etc, to detect excessive engine "compression braking".  If so, it tells Motronic 1.1/1.3 to regulate the ICV & retard timing, preventing wheel lockup due to lifting the throttle on low-traction surfaces (ice).  GND with 1k+ resistor to preserve ABS function (10/1990 ix).  X20 #6 (ECU #64) and X20 #7 (ECU #66) are both uneeded connections from the X20 to the ECU, but can conflict with the diagnostics port.
25 BL Alternator +
E36 Wire colors:
BL Blue Blau
BR  Brown Braun
GE Yellow Gelb
GN Green Grun
GR Gray Grau
OR Orange Orange Note 2:
RS Pink Rosarot Connect C101 Pin 20 to switched +12v power source such as the E36 main relay;  I suggest a jumper to C101 #6 (15a fuse) - it only needs to trip the relay, pump +12v comes from the main power distribution directly from the battery.
RT Red Rot
SW Black Schwarz
VI Violet Violet
WS White Weiss
TR Transparent Note 3:
When using the M50 harness on an M20, the M20 level sensor will need to be connected to the C101.  I suggest removing the oil level sensor wiring from the engine harness C101 side, and moving it to your new C101 harness, reusing the original pins. 
BR/GR: Brown with Gray stripe, etc
Suggested Pins:
C101 (body) C101 (engine) Purpose
2 2 Oil Level Sensor pin 3 (BU/WT)
10 10 Oil Level Sensor pin 1 (BU/YL)
Note 4:
I do not believe you need to connect C101 #6 to anything - the E36 O2 relay is powered within the engine harness itself (See the ETM for 93-95 E36, 1210.13-00 and 1210.13-04)
However, if you want to retain diagnostics ability (I do not), connecting X20 #22 to C101 #6 will power Diagnostics #16.