官术网_书友最值得收藏!

C++ as an embedded language

Around 1983 when C++ had just been conceived and got its name, popular personal computer systems for a general audience, as well as businesses, had specifications like ones listed in the following table:

 

Now compare these computer systems to a recent 8-bit microcontroller (MCU) such as the AVR ATMega 2560 with the following specifications:

  • 16 MHz clock speed
  • 8 KB RAM
  • 256 KB ROM (program)
  • 4 KB ROM (data)

The ATMega 2560 was launched in 2005 and is among the more powerful 8-bit MCUs available nowadays. Its features stack up favorably against the 1980s computer systems, but on top of that the MCU does not rely on any external memory components.

The MCU core clock speed is significantly faster these days thanks to improved silicon IC manufacturing processes which also provide smaller chip sizes, high throughput, and thus lower cost and what's more, 1980s architectures commonly took 2 to 5 clock cycles to retrieve, decode, execute an instruction and store the result as opposed to the single-cycle execution performance of the AVR.

Current MCU (Static) RAM limitations are mostly due to cost and power constraints yet can be easily circumvented for most MCUs using external RAM chips, along with adding low-cost flash-based or other mass storage devices.

Systems like the Commodore 64 (C64) were routinely programmed in C, in addition to the built-in BASIC interpreter (in a built-in ROM). A well-known C development environment for the Commodore 64 was Power C published by Spinnaker:

Power C was one brand of productivity software aimed at C developers. It came on a single, double-sided floppy disk and allowed you to write C code in an editor, then compile it with the included compiler, linker, header files, and libraries to produce executables for the system.

Many more of such compiler collections existed back then, targeting a variety of systems, showing the rich ecosystem that existed for software development. Among these, C++ was of course a newcomer. The first edition of Stroustrup's The C++ Programming Language was only being published in 1985, yet initially without a solid implementation of the language to go with it.

Commercial support for C++ however began to appear rapidly, with major development environments such as Borland C++ 1.0 being released in 1987 and updated to 2.0 in 1991. Development environments like these got used in particular on the IBM PC and its myriad of clones where no preferred development language such as BASIC existed.

While C++ began its life as an unofficial standard in 1985, it wasn't until 1989 and the release of the The C++ Programming Language in its second edition as an authoritative work that C++ reached roughly the level of features equal to what would first be then standardized by an ISO working group as ISO/IEC 14882:1998, commonly known as C++98. Still it can be said that C++ saw significant development and adoption before the advent of the Motorola 68040 in 1990 and Intel 486DX in 1992, which bumped processing power above the 20 MIPS mark.

Now that we have considered early hardware specifications and the evolution of C++ alongside C and other languages of the time intended to be used on the relatively limited systems that existed back then, it seems plausible that C++ is more than capable of running on such hardware, and by extension on modern-day microcontrollers. However, it also seems necessary to ask to what extent the complexity added to C++ since then has impacted memory or computing performance requirements.

主站蜘蛛池模板: 土默特右旗| 柘城县| 萨嘎县| 泽普县| 绥中县| 芦溪县| 伊川县| 乐陵市| 汕头市| 临海市| 高要市| 丽江市| 渝中区| 东台市| 阿尔山市| 牡丹江市| 新野县| 油尖旺区| 漯河市| 九龙县| 巴彦淖尔市| 深圳市| 洪湖市| 定结县| 商都县| 伊川县| 新安县| 舞钢市| 惠州市| 潞西市| 云安县| 收藏| 景宁| 申扎县| 类乌齐县| 白朗县| 灵川县| 景德镇市| 长泰县| 绍兴县| 阜城县|