Page 9 of 14
Re: slightly OT: a simple Benchmark
Posted: Mon Jul 09, 2018 11:36 pm
by BillO
Sorry for the delay - I cooked a curry rubbed leg of lamb for supper and did not want to miss it.
Anyway, some strange behavior, but some confirming results. For cases E and F, the call returned with a "Synatx Error" report in the CALL(37268) line, so those were timed with a stop watch.
I'm not sure where the problem is coming from. Perhaps $DE to $EE are not as 'unused' as I am led to believe from the EhBASIC source file. Chromatix, what is the exit point in your program? There is some unusual syntax in there and I am having trouble pinpointing exactly what is going on - not being familiar with that assembler. If I could find the exit point I could put in instructions to stop the clock so I don't have to rely on an error free return to BASIC to do it.
Anyway, here are the results:
Code: Select all
A = 0.022
B = 0.038
C = 0.63
D = 1.97
E ~ 4.48
F ~ 214.3
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 12:01 am
by Chromatix
There are three exit points, each marked with an RTS instruction - and those are the only uses of RTS. They closely follow the FoundGapS, FoundGapL and NoResult labels.
I use JMP where a relative branch is insufficient. This means the code isn't relocatable; you need to assemble the code for the actual load address. By default that's $4000, but 37268 is $9194 (did you mean 32768?). But the timing results look like you're assembling and calling it correctly - it'd jump to hyperspace otherwise.
It's possible that EhBASIC is interpreting the contents of registers and status flags on return. I don't know the details of that.
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 12:15 am
by BillO
Yes, I meant 32768 ($8000). That's were my ROM starts so that's where I put it.
Okay - I'll put start code in a $8000 and stop code in just before each of the JSR instructions. That should give very accurate results.
Edit: I have no issues running the assembler or the linker, just those labels that have '@' before them were giving me a headache. However, now I've read they are 'local' labels. BNE * is not something I've seen before either... you live another day, you learn another thing...
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 1:26 am
by BillO
Okay, more interesting stuff.
The machine timed E = 4.434, but the machine timed F is now 226.9. I ran it several times and get the same number. Go figure.
So here is the label for the Jaguar:
Code: Select all
A = 0.022
B = 0.038
C = 0.632
D = 1.965
E = 4.434
F ~ 226.9
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 1:58 am
by Chromatix
Yep, local labels are extremely useful on the 6502, and on other CPUs where you have to do a lot of branching to implement any kind of conditional logic. It means you can use labels like "@NoCarry" or "@Bit5" independently in different parts of your code, just so long as there's a global label between them for disambiguation.
I think "*" is a common assembly shortcut for the PC of the current instruction, and you can of course add or subtract from that to give a PC-relative address. The 6502 however encodes relative addresses from the address of the *following* instruction, so "BNE *" is encoded with an offset of -2 ($FE). I also used "*+6" in one of the division routines to avoid proliferating labels.
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 7:29 pm
by Druzyek
That would be amusing if nothing else. I'm slightly more interested in the 16MHz "Jaguar".
Here it is. What would you like to know about it?
Ooh, now that's a sharp-looking little beast. I don't see a thread for it on the forum here - did you design it?
We
discussed adding a Projects forum at one point, but it never came about. It would be very convenient to have a separate forum where each thread was one project and showed off what the project could do (not questions about making the project work, just a place to show them off). BillO could just give one link and everything you need to know about Jaguar would be there. Every electronics forum I've ever visited has this feature but this one. Is it time to rediscuss the idea?
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 7:34 pm
by BigEd
There's a Hardware forum... I wouldn't have thought you'd lose very much, if any, audience if you covered both hardware and software aspects in the one thread. If you thought you might, you could always post a link in the Programming forum.
In a very busy forum you need lots of categories but I don't think that applies here. In fact with more categories you might find some posts would lose audience.
Can you, or anyone, shed any light on why anyone might feel reluctant to start a new thread?
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 8:14 pm
by BillO
I'm good either way, but a 'completed projects' forum is really a different audience. Also, projects tend to get scrolled off the screen pretty quickly in the hardware forum where many threads relating to chips, connectors, hardware problems, ideas, etc... are opened and discussed. While they may relate to projects, they are not in and of themselves - projects.
It would take a while to find any number of projects in the hardware thread if you wanted to search around for successful ideas to include in your own. So I think its not so much opening another thread, as you'd have to do that regardless of whether you want to highlight your project in a 'completed projects' forum or a hardware forum.
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 8:24 pm
by BigEd
It is, in any case, Mike's call. But he's previously been reluctant to create new sub forums. One possible reason is that they will be there forever, so if they turn out not to get a lot of use, they are just clutter.
If there were a few project threads, Garth could (for example) maintain a sticky thread which acted as an index. (There have been project threads, and some of them have been very long.)
Certainly, if you want people to be aware of something you're making, I'd say you have more chance if you start a thread off than if you don't!
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 8:28 pm
by BillO
Certainly, if you want people to be aware of something you're making, I'd say you have more chance if you start a thread off than if you don't!
Noted. I am getting to it in my case, it's just a busy time for me right now. In fact, I have two completed projects to write up. The Jaguar and the Vixen.
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 8:32 pm
by BigEd
Sounds good!
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 10:37 pm
by GARTHWILSON
Certainly, if you want people to be aware of something you're making, I'd say you have more chance if you start a thread off than if you don't!
Anyone can also list their projects in their signature lines. These can be links to forum topics or posts, or elsewhere. Having your own website is good too, giving more freedom as to what you can do with it.
Re: slightly OT: a simple Benchmark
Posted: Tue Jul 10, 2018 10:53 pm
by BillO
Certainly, if you want people to be aware of something you're making, I'd say you have more chance if you start a thread off than if you don't!
Anyone can also list their projects in their signature lines. These can be links to forum topics or posts, or elsewhere. Having your own website is good too, giving more freedom as to what you can do with it.
Good idea

Re: slightly OT: a simple Benchmark
Posted: Wed Jul 11, 2018 4:12 am
by barrym95838
Good idea

Yeah, I've been meaning to do that for a while too.
Re: slightly OT: a simple Benchmark
Posted: Wed Jul 11, 2018 6:16 am
by BigEd
(Just one note about signature lines: I've seen elsewhere it can make searching quite difficult when someone has interesting keywords in every post they make... also to note, like banner ads and sidebar ads, I find myself subconsciously skipping signatures, so I don't even see them.)