OK, I can accept that.
In some respects C is a horrid language and there are a number of things I wish were different.
OK, I can accept that.
In some respects C is a horrid language and there are a number of things I wish were different.
Then your programs must not have had much constant data.
You need pragmas, or something equivalent in practice, if you have significant amounts of constant data (e.g. strings, lookup tables, menu structures). The C run time system has to copy all such into RAM in order for it to be accessed as data. Most "harvard" processors these days seem to be microcontrollers, which have comparatively little RAM to begin with. It would be much better if constant data can be left in ROM.
An alternative is for the compiler to embed extra information into pointers, indicating whether the pointer is to "data" or "program" space. But this makes the code slow and bulky, since each pointer has to be interpreted at runtime.
This is the main problem with the AVR IMHO. It is much nicer working with the newer ARM microcontrollers.
In article , snipped-for-privacy@yahoo.com wrote: [....]
I wouldn't characterize the PIC as "reduced" instruction set for the same reason as I wouldn't say a PDP-8 was a RISC machine. They are both "very simple processors" out of the need to keep the number of transistors low.
while
No you don't. PIIs had the L2 on the backside of the bus, on the cartridge. The original Pentiums (socket 5/7) had SRAMs on the board.
You are *SO* wrong.
You'd better study Computer Architecture 101 a bit harder.
1960s.
Nope.
All current High-end CPUs.
At least S/370 ->
All the compilers above recognises "const" which is standard C to mean constant data and will optimise them away into a look-up table in program memory/ROM. No pragmas needed.
No, they do not. In the case of AVR gcc, look at avr-libc, there is a whole infrastructure of "program space" macros and functions that are required in order to achieve this. If you do not use these, and stick to standard C, then the linker will put the constant data in the data section, which will be copied to RAM by the c startup.
No, the ability to pass and return structures was added into Unix Version 7 C. Along with the enumeration type.
_Recent Changes to C_, November 15, 1978, Page 277, Unix Programmers Manul, V.2
1979, 1983, Bell Telephone Laboratories Holt Reinhart and WilsonThere was a warning that the PDP-11 version didn't handle reentrancy within an interrupt properly, though.
Mark Zenier snipped-for-privacy@eskimo.com Googleproofaddress(account:mzenier provider:eskimo domain:com)
Have something to add? Share your thoughts — no account required.
Ask the community — no account required