3 ms·
The original goal of C was to allow writing programs in a platform independent way, i.e. without having to write different code for different arches. Also, the
by est31 6y ago
The original goal of C was to allow writing programs in a platform independent way, i.e. without having to write different code for different arches.
Also, there is no inline assembly support in standard C, just in various compilers.
- saagarjha 6y agoInterestingly, C++ does have an asm declaration.
- est31 6y agoIt exists, but the meaning is implementation defined. https://eel.is/c++draft/dcl.asm https://eel.is/c++draft/dcl.asm
- phkahler 6y ago>> The original goal of C was to allow writing programs in a platform independent way, i.e. without having to write different code for different arches. I think it was meant to be a portable language, not to let you write portable code. With the size of standard types being machine dependent you couldn't write completely portable code, but you could write C on a lot of hardware. It's like how 8 bit computers all had BASIC but weren't compatible. If you knew one it was easy to get going on another because at some level it was all BASIC.