On Sep 11, 2006, at 12:11 AM, woodelf wrote:
I was reading
the C language spec (C99) and I got to wondring:
are/were there C implementations that had no stack, or a rising
stack? There's a falling stack in every implementation I've seen, but
the spec doesn't require it.
Most machines that did not have a stack, like a PDP-8 or other larger
machines from that era never did have that problem since C was never
ported to them to my knowlege. Cross compilers to new-ish
micro-controlers
may have limitations is the only examples I can think of.
The only machine with a rising stack that I know of was a 18 bit CPLD
computer
design I was planning to build with 4 registers - sp,ac,pc,ix.
+offset+<sp:0000>, -offset+<sp:sp>.
Since I am now planning to build a 12/24 bit cpu, I can use a real
register
for global-static variables. I am taking a RISC idea of a 0 constant
register
for abs static variables.
The Intel MCS51 architecture has a rising stack, and there are
several C compilers available for it.
-Dave
--
Dave McGuire
Cape Coral, FL