/    Sign up×
Community /Pin to ProfileBookmark

About making software in C/C++, future cpu’s and some advice.

A friend of mine showed me a press release giving some info about some cpu’s that are apparently coming soon. Granted the article does seem somewhat over zealous in stating the brilliance of these things and the orientation is a little on the video games side, but it still got me thinking about developing applications in the future.

I still haven’t even touched on C in any real way yet so I still have many very simple questions that remain unanswered. I didn’t plan on getting round to anything like C for another year or so yet, but like I said, this article got me thinking.

The main question that has always never quite sat right in my head is about the cpu’s and the many varied C compilers. As it states in the article and as is very strongly impled from any documentation of software you want to install, an application needs to be built in a particular certain way to make sure it actually works on the machine. The thing is though, I can’t quite balance in my head, the information stating you have to write your source in a certain way to make sure it works on a certain processor with the information that seems to imply that a compiler performs its duty in two ways. Firstly to change your source from human readable C into computer executable binary and secondly to tailor the binary output to make sure it works with the cpu and maximises performance on the cpu. That’s why we get updated new compilers isn’t it? To make binaries for new cpu’s and to improve performance on existing cpu’s?

The article states that some special tailoring of code, maybe even re-training may be required for making applications on such processors. Is this just over zealous hype-mongering or ya think it might be a good idea for me to do what I’ve been doing so far and just screw the old ways and start by learning the new ways so as to prevent re-learning everything I only just learned? I learned php5, mysql and front end web design on the same basis of screw the old and prepare for the new. What ya think might be the best policy on this one?

Any general info and advice on how to approach C when I get up to it considering the info in the article? Like I said, I probably won’t be properly learning C for another 12 months or so yet (I’m currently going hell-for-leather just to get out a decent CMS in php), but I just wanna make sure I don’t spend months looking at the wrong stuff when I do decide to make a start.

The article in question: [url]http://forums.gengaming.com/index.php?showtopic=542&st=0&#entry4541[/url]

to post a comment
Full-stack Developer

4 Comments(s)

Copy linkTweet thisAlerts:
@ray326Feb 09.2005 — Unless there is some special kind of parallel processing involved then you don't have to do anything but write good, valid C. As you guessed, the C compiler targeting the new CPU is responsible for emitting the appropriate code, optimized as required. BTW, knowing C is a definite advantage regardless of what the next hot thing is. A C compiler is one step removed from a macro-assembler so you have to really understand how computers (in general and your target computer specifically) "work" to be good at C.
Copy linkTweet thisAlerts:
@MstrBobFeb 09.2005 — [font=trebuchet ms][COLOR=royalblue][i]Originally posted by ray326 [/i]

[B]Unless there is some special kind of parallel processing involved then you don't have to do anything but write good, valid C. As you guessed, the C compiler targeting the new CPU is responsible for emitting the appropriate code, optimized as required. BTW, knowing C is a definite advantage regardless of what the next hot thing is. A C compiler is one step removed from a macro-assembler so you have to really understand how computers (in general and your target computer specifically) "work" to be good at C. [/B][/QUOTE]


Most definately C and C++ are very low level languages, as I'm finding out with C++. Well, what do you expect, OS's are written in these languages. If C or C++ is written OS - independant, then one can use different compilers for different OS's to compile it specifically for that OS. For instance, if you write a program, and you've got a compiled version for Windows, you can provide the source code if it's generic enough and people on say, Linux, can use their compiler and the compiler will suit it to work with the OS. [/COLOR][/font]
Copy linkTweet thisAlerts:
@Stephen_PhilbinauthorFeb 09.2005 — Aye. The "having to know computers" bit is the reason I'm waiting a while before I make a start. This threads/threading business I keep hearing about for example. It's sounds like an absurd name for a process in a computer, but I suppose it'll no doubt make more sense when I learn about it. Which bits of "how a computer works" should I be learning about though? I mean where do I begin? I don't wanna go barking up the wrong tree by spending weeks reading about the finer points of ram or power consumption or whatever only to find it has barely anything to do with what I need to know.
Copy linkTweet thisAlerts:
@ray326Feb 10.2005 — With C, the OS interface is in the standard (std) libraries. The only compiler dependency is the targe CPU.
This threads/threading business I keep hearing about for example. It's sounds like an absurd name for a process in a computer, but I suppose it'll no doubt make more sense when I learn about it.[/QUOTE] No doubt. Suffice it to say for now that a "process" is multi-tasking at the OS level, a "thread" is multi-tasking at the "process" level. Sometimes the terms "heavy weight" and "light weight" are used to describe them, too.
I don't wanna go barking up the wrong tree by spending weeks reading about the finer points of ram or power consumption or whatever only to find it has barely anything to do with what I need to know.[/QUOTE]
What I'm taking about is how the processor works. What it really means to call a subroutine, passing parameters or what the processor's language really is and does or what happens at the CPU level when a hardware interrupt request happens on the bus. Embedded systems are a lot more fun than business applications. ?
×

Success!

Help @Stephen_Philbin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...