Everything I've done from the very beginning has always resulted in an Empty Buffer message ...
Until, I sent just an empty 'main()' for lack of a better term in C, Mode3680 responded with success (ack).
We kinda flipped to the code Antus posted and it again is back to a Buffer Empty message ...
Nothing since has responded with success, I'm sure it's just not liking something about the code.
My goal here is simply to see the ack from the 3680 ... As I did with the simple C routine.
The assembly of the simple C was simply a start and an rts ...
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
absolutely you need an rts. the compiler will give you one for free as it builds the program from from the c syntax and you have a function, thus you have an rts. the asm will not.
Ok the short loop (0xA count), survived, and got the ack.
A test is out extending the loop count, and I'm going to keep extending it as long as we keep getting an ack, at least until I'm sure it's beyond the COP timeout.
I like to eat one bite at a time ...
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
c is like a asm macro language. rts is the opcode to return. the processor executes one opcode after the next. c and asm are not different, but as the implementer the C does some things for you - that means the ret and maybe pushing and poping registers to preserve them. Optimised C will take the push and pop out if they are not require. Un-optimised C probably doesnt. . I dont consider C source and Asm source a different approach, the result is the same. Just the asm is simpler to get exactly what your looking for. An empty function in C should be close to just a ret. Tough you need to disaseemble to know for sure. It might push and pop some registers as well, whereas asm will be more efficient and push and pop nothing by default as that is on the author of the code to do just whats needed. In this case, just ret, will leave the registers untouched. And perhaps that is part of this. Perhaps you do need to push and pop registers around your code. If you are using d0, maybe push it on entry and pop it before rts. I wish I had a pcm here to test with. To know for sure disasm the working C, reassemble it in asm then cut it back until you find out what makes the difference. then you know.
I wish I had one here as well ... Called my supplier, doesn't have one, has a 2004 Trailblazer 4.2L, we do not know if it's a P12, they say they are not interchangeable, but heck that could just mean it has the wrong firmware/calibrations.
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Gampy wrote:I wish I had one here as well ... Called my supplier, doesn't have one, has a 2004 Trailblazer 4.2L, we do not know if it's a P12, they say they are not interchangeable, but heck that could just mean it has the wrong firmware/calibrations.
a number of them come up on ebay searching for 12597521 but by the time I convert to $au and add another $60usd for postage, and consider its quoting 2 months to get here, it doesnt seem worth it for something which is just fun and games to me. I'll never use one of these on a car or on a project Still interested to see if we can get some results though.