Search found 494 matches

by tvrfan
Thu Oct 29, 2015 9:21 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

...Also assume that somewhere there is a CALL 3695 instruction to get here... I think sailorbob's update clarified this to show how code might've entered your example. I just assumed the point of your example was NOT to educate people on the concept that CALL/SCALL does an implicit push to the stac...
by tvrfan
Thu Oct 29, 2015 2:31 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

TO jsa, from above post. That's good, but misses a few vital things. A couple of pointers - At the end you talk about a RET not being there. OK - please understand this was just a snippet inside the subroutine. It does do a RET later. Also assume that somewhere there is a CALL 3695 instruction to ge...
by tvrfan
Wed Oct 28, 2015 5:46 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

I have been staying out of mpaton/cgrey discussion so far, but I want to say I agree with mpaton in the important points - What I am trying to do is to help people UNDERSTAND. Believe me when we say this is actually hard to do. It needs study. Decipha did say about what the code snippet 0x3695 does ...
by tvrfan
Wed Oct 28, 2015 3:08 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

Playing devils advocate here.... You cannot know from that snippet of code at 0x3695 alone that the "pop 3a" instruction is pulling a prior caller's return address from the stack. The calling routine itself may have pushed a value onto the stack before calling 0x3695. You need to see what is happen...
by tvrfan
Tue Oct 27, 2015 10:02 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

Ok, that explains more about what it is doing. The CALL pushes a return address to the stack. However because you don't want to return to data, the code using the inline data is increment the pointer pushed by the CALL past the data section. So the RET pops off the stack the correct return address....
by tvrfan
Tue Oct 27, 2015 9:57 pm
Forum: EECGeeks
Topic: Why are there inline parameters ?
Replies: 20
Views: 10187

Re: Why are there inline parameters ?

Yes, R0 in usage is exactly like /dev/null. You can write to or read from it, and it will always be zero. OK, What I was trying to say was - In a compiler build, I find it very hard to believe it would ever JUMP to a subroutine instead of/as well as a CALL. The R0=POP; RET; is short-cutting over a s...
by tvrfan
Tue Oct 27, 2015 3:16 pm
Forum: EECGeeks
Topic: Why are there inline parameters ?
Replies: 20
Views: 10187

Re: Why are there inline parameters ?

...A9L DEFINITELY has some stuff which I reckon has to be hand coded, as it violates every known principle of structured programming (like doing a JMP to a subroutine, 'C' compiler wouldn't do that kind of trick), and a (RET, Reg 0) . I'll let our learners try to figure out what that does..... I do...
by tvrfan
Tue Oct 27, 2015 2:46 pm
Forum: EECGeeks
Topic: Why are there inline parameters ?
Replies: 20
Views: 10187

Re: Why are there inline parameters ?

...for inline params, the value on the stack is an ADDRESS, and that address may be odd, because opcodes have different byte sizes... This is why the extraction of the inline params is always byte by byte.....even if the param is a word... I'm confused by this. I wasn't aware that every inline para...
by tvrfan
Tue Oct 27, 2015 2:25 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

Sorry but no..... not the right focus. The WHY is very important. You have the mechanism 'sort of' right, but not enough of the picture. (Oops, I should say that 3695 is the start of a subroutine) Clue - This is to do with inline params in subroutines, and belongs in this thread. Not only the A9L bu...
by tvrfan
Tue Oct 27, 2015 3:24 am
Forum: EECGeeks
Topic: 1985 Intel Microcontroller Handbook
Replies: 9
Views: 5688

Re: 1985 Intel Microcontroller Handbook

The one I have is titled

8XC196Kx, 8XC196Jx,87C196CA Microcontroller Family User’s Manual

and has reference

June 1995 Order Number 272258-002

on bottom of first page.

it's a pdf, but even zipped it's still bigger than the 2MB limit.....
by tvrfan
Mon Oct 26, 2015 11:23 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

if you go through the routine youll see where the stack is popped and scratch register is incremented to get to the parameters after the call And whilst we are on the 'training' mode, have a look at this snippet from A9L, and tell me what it does......because you really DO need to understand this k...
by tvrfan
Mon Oct 26, 2015 11:16 pm
Forum: EECGeeks
Topic: word address requirements ?
Replies: 7
Views: 5104

Re: word address requirements ?

you will see code in 8061 that loads words a byte at a time A case in point ? cc,38 pop R38 R38 = pop(); b2,3b,3c ldb R3c,[R38++] R3c = [R38++]; b2,3b,3d ldb R3d,[R38++] R3d = [R38++]; c8,38 push R38 push(R38); As I said in other thread, the reason for this is as follows. In code, there is no guara...
by tvrfan
Mon Oct 26, 2015 11:00 pm
Forum: EECGeeks
Topic: Why are there inline parameters ?
Replies: 20
Views: 10187

Re: Why are there inline parameters ?

But remember that for inline params, the value on the stack is an ADDRESS, and that address may be odd, because opcodes have different byte sizes... This is why the extraction of the inline params is always byte by byte.....even if the param is a word. Having done a lot of 'C' code, the way those in...
by tvrfan
Sun Oct 25, 2015 2:43 pm
Forum: EECGeeks
Topic: 1985 Intel Microcontroller Handbook
Replies: 9
Views: 5688

Re: 1985 Intel Microcontroller Handbook

I used the '80196 user manual' a lot to start with. Don't bother much now. Doesn't have 8065 extensions, and much stuff not relevant. BUT hugely useful for the basics and contains excellent explanations in opcodes and adressing chapters. It's a pdf and too big to post here, but available on web also...
by tvrfan
Sat Oct 24, 2015 2:47 pm
Forum: EECGeeks
Topic: Looking up a 2D table; How to recognize the code
Replies: 17
Views: 9225

Re: Looking up a 2D table; How to recognize the code

Here is a M$ doc one I got from somewhere a long time ago 8061 and 8065.
by tvrfan
Sat Oct 17, 2015 11:17 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

YES, When a subroutine is CALLed, the address where it returns to is pushed onto the stack..... Excellent.
so the RET uses the stack to get back to the next instruction after the call.

Next.....

So if there are data parameters after the CALL opcode, where will they be, and how do you get at them ??
by tvrfan
Sat Oct 17, 2015 11:07 pm
Forum: EECGeeks
Topic: Looking up a 2D table; How to recognize the code
Replies: 17
Views: 9225

Re: Looking up a 2D table; How to recognize the code

In case it helps anyone, when I first looked at this (the code), I actually visualised in my head a spreadsheet like or matrix structure, with 11 X 11 (or whatever) cells, or dots, where the exact input values intersect. Then when the two input values each fall between their data points, and where t...
by tvrfan
Sat Oct 17, 2015 3:42 pm
Forum: EECGeeks
Topic: Inline parameters(arguments)
Replies: 67
Views: 25082

Re: Inline parameters(arguments)

Hopefully the posts will get moved from "who is disassembling..." thread, but if not, please hop across and read those posts from mpaton jsa, and me amongst the thread.
by tvrfan
Sat Oct 17, 2015 3:34 pm
Forum: EECGeeks
Topic: Looking up a 2D table; How to recognize the code
Replies: 17
Views: 9225

Re: Looking up a 2D table; How to recognize the code

I'm not going to post the answer, but as I'm inclined to give a little clue, I will say the way the the Ford code INTERPOLATES (look that up, it's a clue) on a 2D lookup (often called a table) and their use of non-linear values is actually very clever. No not in an obfuscated way, but simple, clever...
by tvrfan
Sat Oct 17, 2015 3:25 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

I sent you 2 emails about it; have you changed emails since the last gmail one I had for you? And I believe I sent you a PM, but evidently I'm not too competent at PMs. ...<snip> ... You've not kept up, please use the BL zip file I posted for a Windoze BL disassembler that works. OK. haven't change...
by tvrfan
Sat Oct 17, 2015 2:07 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

Michael, I can't get the BL disassembler to do anything but seg violate !! Which is VERY annoying..... Anyway, this thread has given me a good kick up the rear end to get SAD improved and released again - and it DOES have a purely manual setting. (I know we discussed the issue9s0 of just how automat...
by tvrfan
Sat Oct 17, 2015 1:53 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

More, without giving it away, as I want you guys to learn. That A9L snippet isn't just wrong at 7289..... the other error is more subtle and harder to spot, but it's still right there.....however spotting the more obvious one still helps. jsa you are on the right path......well done so far...... Sub...
by tvrfan
Fri Oct 16, 2015 9:37 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

Here is a quick example of what we are calling inline parameters. (apologies to mpaton already, for me giving out free data again...) The high level equivalent would be where a subroutine is defined with params as in 'C' (Tech - Yes, I know, this isn't technically accurate, but it will do for explan...
by tvrfan
Thu Oct 15, 2015 11:37 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

found BL dis. and can't get it to read any files....Argghhh!!!!! (compiled with gcc in Linux) OK, drop to SAD, even though it's a bit broken at the moment...... How to do this without giving stuff away..... I see a set of base regs indicating data starts at c000. I see RAM base regs too, but I won't...
by tvrfan
Thu Oct 15, 2015 10:11 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

Mike, Snippets taken from above, so as to continue conversation.... Original BL is fine Andy. Mine is indeed modded from there. It is at revision 154 from there. OK, I'll dig it out and have a go - will try SAD as well SAD Directives - Yes, I am TRYING to make it fully auto, but realistically accept...
by tvrfan
Thu Oct 15, 2015 1:58 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

Mike, OK, I just need to check - I have an original BL disassembler, but I'm not sure if yours is modded from there. If you have an updated one you want me to use, then let me know, otherwise I'll recompile my original saved one, and try it out. Not trying to be a pain, just to make sure what I'm do...
by tvrfan
Wed Oct 14, 2015 11:18 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

My A9L HSO table is .... sym 22a6 "InjTTab" struct 22a6 2355 :R N: Y O +3 : Y D 2c5 N: Y O +2 : W : W | R N: Y O +3 : Y D 2c5 N: Y O +2 : W Which means first entry is word pointer (check for sym name), followed by 3 bytes, followed by offset into 2c5 RAM table, followed by 2 words, then newline (the...
by tvrfan
Wed Oct 14, 2015 11:05 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

Yep, we've discussed this before, from different angles... Mike, sorry if I wasn't clear...... What I thought I was responding with was what would be good to perhaps include in a 'base' disassembler (I.e. mostly manual directive driven, like the BL one), and when I said 'harder' I meant from the aut...
by tvrfan
Wed Oct 14, 2015 6:25 pm
Forum: EECGeeks
Topic: Who is disassembling 8061 or 8065 code?
Replies: 93
Views: 46252

Re: Who is disassembling 8061 or 8065 code?

Micheal, Obviously I'm going to be more in the 'automatic' point of view, but here are some thoughts.... all of which should be argued for or against, this is my input for discussion, and a couple of questions, if you don't mind ! From your list, There are some things which can be included very easi...
by tvrfan
Thu Oct 08, 2015 2:13 pm
Forum: EECGeeks
Topic: Question about timing algorythm
Replies: 11
Views: 6593

Re: Question about timing algorythm

Er...to be honest I haven't thought about this in terms of degree errors.....hmmmm......I'm thinking about times And Yes, I do remember something about leading AND trailing edge of the timing PIP being used. From a programming point of view, on a 4 cyl engine, then there is a 'tick' every 90 crank d...