Aargh. (was Re: Now what?)

G. Scott Ponton gscottp at ix.netcom.com
Thu May 27 04:39:25 GMT 1999


This is a good one. I used to do some assembly level programming a very long
time ago. It was on 6500 micros. As far as I remember the 68000 series stuff
is the same basic code with the addition of 16 bit "long" word and
registers. Obviously the opps to make them work are included in that. I am
fairly certain from the coding I have seen the proccessors used in the GM
ECM/PCM are based in the same.

Mike makes some very good points. But without discounting him I think what
Shannen and most of the rest of us want to do it to be able to understand
the proccess at a different level. So I'm going to put my .02$ in here as
well.

IMHO the way to learn programming of the "banging the iron" variety you
first need to know what you want to accomplish. Do you want to crunch
numbers? Move data? read and write to memory? The "instructions" (nemonics)
in the data manuals give you all of the different ways you can do this.
Motorola is actually at least 100 times easier to program in assembly that
the eqivelent Intel stuff. There are no page boundaries in the code to worry
about. All the "jumps" are direct or indirect. Yada yada yada. I forgot what
I was intending to do.!!

The easiest way to program is to "just do it".  For the systems we are
trying to program we need to know where the different "addresses are in the
"machine" and what they do. We need to know what "value" to "broadcast" in
order to make things happen. One thing to keep in mind. Most of these were
programmed using some kind of "higher level" language. What this means to
you is that sometimes the code won't make any sense. The higher language
usually uses equations to do the math. You anter the equation and it
"converts" it to the instructions to do the math at assembly level.
Converting it (dis-assembling it) back is a very tedious and boring job.
Sure you can look at the instructions and say well its adding these two
numbers and oring those etc. but the original equation may not become
visable for 100 or more dis-assembled instructions. Personally I hate trying
to "reverse engineer" code. For me it is easier to just write my own. But I
have done it.

The place to start is to ID all the subroutines. These are all the
"standalone" programs that added together makeup the entire thing. Once you
have them IDed it is somewhat easier to tell what theyt are for. Just run
each sub and see what it does. How do you do that you ask?  The easiest way
is with a "developement system" in other words a bench ECM which has been
modified so you can stop it at any point in the program then "single step"
it through the routine you are investigating. As you are single stepping
through the program you "just" watch the outputs and the inputs to see what
is happening at the real world end of the "system." Sounds easy doesn't it?
LOL When you find a routine that doesn't output anything you "assume" it is
a memory or input call and try changing all the inputs until you find one
that changes some part of the sequence. After awhile you'll get pretty good
at picking out the different calls and what they are doing or where they are
coming and going to.

This leads me to my problem and why I originally joined this list. It has
been 15 years since I did any programming. I have already pretty much come
back up to speed on it but .............. I am for sure havinf problems with
the interface to the PCM. As this is what I am really interested in (the
late model OBDII stuff) it is all I have been consentrating on. Once I
figure out how to talk to the blasted thing I should be fine. Also it
probably has to do with a distinct lack of experience dealing with serial
data streams. All I ever programmed was parrallel data. So ................
I can help all of you to a point if you have questions about a particular
string of instructions or a subroutine. What it is doing etc. Is there
someone out there who can help me?

   I have a pretty good collection of ECM/PCMs at the shop. I am pretty sure
it covers from C3 to P6. Also have some CIS-Lamda systems and Later Digital
Bosch stuff.  May even still have some of the Jetronic stuff "laying around.
The place has gotten pretty "messy" lately with all I have going at once. I
should be able to build a bench unit with the single step addons for any of
the ECMs you want to work with. If you are interested I need some help there
too to reduse the start up time. Which ECM? What chip (proccessor) are we
going to work with?

Scott




More information about the Gmecm mailing list