> My guess is that you are either using a bad compiler
True. I have been a little confused lately. Can hardly even put together two
words in english without making a mess of it :-)
Looking at the clockcount for a loop and call on an intel 486 tells me that
it should be rather quick.
The loop with jump takes 4 clocks and a far indirect call should be 17. That
is some 21 clocks.
Enter takes 17 and leave is 5. All in all that is 43 clocks.
Given a clock rate of 2.5GHz it should take 0,0000172s.. if the system was
doing nothing else. Is this correct? I have been away from theese
calculations for too long. Been on adventure in the land of RAD.
If the emulator should be faster, the call, enter and leave could be trimmed
away and replaces with a far jump to the opcode handler, and a far jump back
into the decoder routine. All in all I would say that the previously
mentioned PIC processor should be emulatable with no more than 100 clocks pr
opcode.. and that is generous! If we assume I have ten of those running,
that would eat up 1GHz, and plenty would be left.
There is an issue I know sadly little about. How much power does a standard
workstation XP installation drain? Given 2.5GHz, how much can I assume to be
able to grab for myself if no other user applications are running? Can I
simply divide by cpu usage as win xp displays it?
By the way. To make you all laugh for a few minutes. I was trying to get
this running quickly with delegates in c#.net. The problem with that is that
I do not know the IL assembler mnemonics that it compiles to, and that
everything is in objects which leaves little control on the low level. My
second problem was that somewhere along the line, I turned my brain off, and
forgot anything lowleverl I know.
*hrmf* well.... *blush* hehe
By the way.. I have now been looking for a few hours on and off for
specifics about the opcodes on the newer amd and intel cpus. There is a lot
of comerciel stuff arround, but I cant seem to find much about the details.
Which opcodes there are, what they do, and how many clocks they take under
which conditions. I am sure the details is out there somewhere, but as I
said..I cant find it. If one of you have a more or less direct link into the
amd/intel directory containing this, I would very much like a pointer.
Thanks for any help in advance :-)