Thread: 68k details
View Single Post
Old 10 November 2018, 13:39   #742
litwr
Registered User

 
Join Date: Mar 2016
Location: Ozherele
Posts: 164
Quote:
Originally Posted by meynaf View Post
But you cannot say C is nice while in the same time saying C++ is ugly : the syntax is exactly the same !
I agree with plasmab that C++ is superb but for a lazy mind it is easier to say it is ugly and do nothing instead of big studying. Let's look at a piece of my recent C++ real-time coding

Code:
if (this->config.wsReSubscribe && this->connReSubscribeFreeTsQueue.size() //resubscribe
               && ((tsQueueIt = [&]{
                   auto it = this->connReSubscribeFreeTsQueue.begin();
                   for (; it != this->connReSubscribeFreeTsQueue.end(); ++it){
                        if (this->connReadyById.find(it->second) == this->connReadyById.end())
                             continue;
                        if (it->first > base::microtime()) return this->connReSubscribeFreeTsQueue.end();
                        if (gotNoTimeout.find(it->second) != gotNoTimeout.end()) return it;
                   }
                   return it;}()) != this->connReSubscribeFreeTsQueue.end())) {

            int connId = tsQueueIt->second;
            this->connReSubscribeFreeTsQueue.erase(tsQueueIt);
Could you imagine such text in C? It is a completely new level. C++ is really hard, things like boost require years to become familiar. Life is hard too.

Quote:
Originally Posted by meynaf View Post
Did you know 68k can do the same, and without the shortcomings ? ...
68k requires special relocatable code for this. It looks like you have become tired of the discussion, you miss your arguments, don't provide proofs, etc. However it is eventually close to its end. I have got some new information about 68k and it is a pleasure. Indeed 68k is a bit clumsy, not so independent and strong as x86 or ARM but it was anyway one of the best with its unique specific beauty. It sounds like 68k code density can be the best in many cases - I thought it is much worse and I was wrong with it.

This discussion inspires me to write a piece of coding for my old iron Amiga-friend. I hope to find some spare time for it. Thanks.

Quote:
Originally Posted by Kalms View Post
You are correct in that 68000 does not support table[offset1+offset2] in a PC-relative manner. 8088 does support that operation out of the box.
Thank you very much again for your so descriptive comments. Indeed 68k is at least 50% better than 8088. It has its advantages, x86 has its own. My point about relocatable code is clear enough, it is only subset of not relocatable. You can't use some 68k addressing with it. You have to replace some instructions with slower and sometime larger equivalents. 8088 on the contary can use all its capabilities with any code limited in size of 64 KB (+192 KB for data) and get free relocatability for it.

Indeed 68000 is better for large program than 8086. But such programs were rather rare for the 80s and 80386 provided the way for convenient coding without segmentation.

Last edited by litwr; 10 November 2018 at 14:11.
litwr is offline  
 
Page generated in 0.04188 seconds with 11 queries