Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Processors who's stack grows up
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 50 of 54 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Anton Erasmus  
View profile  
 More options Jan 6 2005, 5:02 am
Newsgroups: comp.arch.embedded, comp.realtime
From: Anton Erasmus <nob...@spam.prevent.net>
Date: Thu, 06 Jan 2005 12:02:42 +0200
Local: Thurs, Jan 6 2005 5:02 am
Subject: Re: Processors who's stack grows up
On 5 Jan 2005 20:29:28 GMT, Al <alnew...@hotmail.com> wrote:

[Snipped]

>I've worked with Nucleus source code on many occasions and have had no
>problems regarding readability :-) Conditionals can be easily stripped with
>a preprocessor, so I don't generally worry.

[Snipped]

Regarding the point above. Normally when using a preprocessor to strip
out the conditional code. It expands everything. Is there an option or
other tool that will only strip out the conditionals ?  

Regards
   Anton Erasmus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wouter van Ooijen (www.voti.nl)  
View profile  
 More options Jan 6 2005, 11:09 am
Newsgroups: comp.arch.embedded, comp.realtime
From: wou...@voti.nl (Wouter van Ooijen (www.voti.nl))
Date: Thu, 06 Jan 2005 16:09:22 GMT
Local: Thurs, Jan 6 2005 11:09 am
Subject: Re: Processors who's stack grows up

>PIC and 8051 I think.  Don't suppose you are interested in these those.

PICs (at least the 12-bit and 14-bit cores) don't have a memory-mapped
stack, so whether they grow up or down is invisible and hence
irrelevant.

Wouter van Ooijen

-- ------------------------------------
http://www.voti.nl
Webshop for PICs and other electronics
http://www.voti.nl/hvu
Teacher electronics and informatics


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
www.FreeRTOS.org  
View profile  
 More options Jan 6 2005, 11:17 am
Newsgroups: comp.arch.embedded, comp.realtime
From: "www.FreeRTOS.org" <noem...@given.com>
Date: Thu, 06 Jan 2005 16:17:27 GMT
Local: Thurs, Jan 6 2005 11:17 am
Subject: Re: Processors who's stack grows up

"Wouter van Ooijen (www.voti.nl)" <wou...@voti.nl> wrote in message
news:41dd6283.156976680@news.xs4all.nl...

> >PIC and 8051 I think.  Don't suppose you are interested in these those.

> PICs (at least the 12-bit and 14-bit cores) don't have a memory-mapped
> stack, so whether they grow up or down is invisible and hence
> irrelevant.

The Microchip PIC18 C compiler uses the POSTINC/POSTDEC registers to effect
a stack and frame.

Regards,

http://www.FreeRTOS.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Colvin  
View profile  
 More options Jan 6 2005, 1:34 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Alex Colvin <al...@TheWorld.com>
Date: Thu, 6 Jan 2005 18:34:40 +0000 (UTC)
Local: Thurs, Jan 6 2005 1:34 pm
Subject: Re: Processors who's stack grows up

>> Because I need it to work on any processor. *ANY* processor.
>> Even those that don't exist yet ;-)

Such as my paper design for a balanced-ternary number system
reconfigurable array processor? Which is unlikely to ever exist.

--
        mac the naïf


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kaiser  
View profile  
 More options Jan 7 2005, 8:07 am
Newsgroups: comp.arch.embedded, comp.realtime
From: bitbuc...@invalid-domain-see-sig.nil (Robert Kaiser)
Date: 7 Jan 2005 13:07:42 GMT
Local: Fri, Jan 7 2005 8:07 am
Subject: Re: Processors who's stack grows up
In article <1105005503.c2e7c4d716c50ca8103adc1a6645169f@teranews>,
        Anton Erasmus <nob...@spam.prevent.net> writes:

> On 5 Jan 2005 20:29:28 GMT, Al <alnew...@hotmail.com> wrote:

> [Snipped]

>>I've worked with Nucleus source code on many occasions and have had no
>>problems regarding readability :-) Conditionals can be easily stripped with
>>a preprocessor, so I don't generally worry.

> [Snipped]

> Regarding the point above. Normally when using a preprocessor to strip
> out the conditional code. It expands everything. Is there an option or
> other tool that will only strip out the conditionals ?  

I'm using a tool called 'preparser' which comes from the isdn4linux
community, see:

http://www.isdn4linux.de/cgi-bin/viewcvs.cgi/isdn/README.preparser?re...

Apparently the sourcecode is not online, but the author says he'll send
it upon request.

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kaiser  
View profile  
 More options Jan 7 2005, 8:32 am
Newsgroups: comp.arch.embedded, comp.realtime
From: bitbuc...@invalid-domain-see-sig.nil (Robert Kaiser)
Date: 7 Jan 2005 13:32:13 GMT
Local: Fri, Jan 7 2005 8:32 am
Subject: Re: Processors who's stack grows up
In article <41dabc9...@solnews.wv.mentorg.com>,
        "Adam Messer" <adam_mes...@mentor.com> writes:

> We have a fair amount of code
> in our system that accommodates stacks that grow up. If we can't find a
> reasonable number of processors who's stack does grow up we will remove that
> code.

The MIPS processor doesn't really have a notion of a stack (and I
suspect this applies to some other RISC architectures as well).
It is up to the compiler to implement a stack and so a compiler
writer can choose to let the stack grow up or down. However, I'm not
aware of any MIPS compilers that actually let the stack grow up.

Rob

--
Robert Kaiser                     email: rkaiser AT sysgo DOT com
SYSGO AG                          http://www.elinos.com
Klein-Winternheim / Germany       http://www.sysgo.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Reilly  
View profile  
 More options Jan 7 2005, 6:41 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Andrew Reilly <andrew-newsp...@areilly.bpc-users.org>
Date: Sat, 08 Jan 2005 10:41:59 +1100
Local: Fri, Jan 7 2005 6:41 pm
Subject: Re: Processors who's stack grows up

On Fri, 07 Jan 2005 14:32:13 +0000, Robert Kaiser wrote:
> In article <41dabc9...@solnews.wv.mentorg.com>,
>    "Adam Messer" <adam_mes...@mentor.com> writes:
>> We have a fair amount of code
>> in our system that accommodates stacks that grow up. If we can't find a
>> reasonable number of processors who's stack does grow up we will remove that
>> code.

> The MIPS processor doesn't really have a notion of a stack (and I
> suspect this applies to some other RISC architectures as well).
> It is up to the compiler to implement a stack and so a compiler
> writer can choose to let the stack grow up or down. However, I'm not
> aware of any MIPS compilers that actually let the stack grow up.

I've never used one, but I believe that the normal convention for
HP-PA under HP-UX is for stacks to grow upwards.

--
Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Thompson  
View profile  
 More options Jan 9 2005, 10:35 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Dave Thompson <david.thomps...@worldnet.att.net>
Date: Mon, 10 Jan 2005 03:35:45 GMT
Local: Sun, Jan 9 2005 10:35 pm
Subject: Re: Processors who's stack grows up
On Tue, 04 Jan 2005 21:26:40 GMT, CBFalconer <cbfalco...@yahoo.com>
wrote:

> Adam Messer wrote:

> > I am the lead engineer on the Nucleus Plus RTOS. One of my coworkers
> > asked me if I knew any processors that had a stack that grows up.
<snip>

> The HP3000.

And, for completeness, an architecture that was if not quite descended
from at least inspired by the HP 3000, Tandem^WCompaq^WHP NonStop,
which was still built and sold as recently as IIRC 1992, and userland
software for which is still supported in emulation on the successor
TNS/R systems since Tandem shops tend to be very slow to change their
business-critical applications. But the OS now is all 'native' MIPS
with downward stack, and even in the days of TNS hardware no one with
sense would have bought it to run a non-Tandem OS and throw away the
fault-tolerance and support features they paid a hefty premium for.

Also, equally irrelevantly, the PDP-10 doesn't have any "hardware"
stack for interrupts, but can use any GPR (except R0? I forget) as a
pointer to an upward-growing and (optionally) length-checked stack.
According to the folks in alt.sys.pdp10 there are actually a few clone
hardware systems still in use, as well as rather more folks using
(several) emulators, but again those systems are kept in existence
(only) to run old software and they wouldn't want to run Nucleus.

- David.Thompson1 at worldnet.att.net


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Heinz Saathoff  
View profile  
 More options Jan 10 2005, 5:00 am
Newsgroups: comp.arch.embedded, comp.realtime
From: Heinz Saathoff <hs...@despammed.com>
Date: Mon, 10 Jan 2005 11:00:28 +0100
Local: Mon, Jan 10 2005 5:00 am
Subject: Re: Processors who's stack grows up
Hello,

Robert Kaiser wrote...
> The MIPS processor doesn't really have a notion of a stack (and I
> suspect this applies to some other RISC architectures as well).
> It is up to the compiler to implement a stack and so a compiler
> writer can choose to let the stack grow up or down.

If the MIPS doen't have a notion of a stack, do they have call/ret
instructions? What about interrupts? The interrupted location must be
saved somewhere.

- Heinz


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tauno Voipio  
View profile  
 More options Jan 10 2005, 6:31 am
Newsgroups: comp.arch.embedded, comp.realtime
From: Tauno Voipio <tauno.voi...@iki.fi.NOSPAM.invalid>
Date: Mon, 10 Jan 2005 11:31:25 GMT
Local: Mon, Jan 10 2005 6:31 am
Subject: Re: Processors who's stack grows up

Heinz Saathoff wrote:
> Hello,

> Robert Kaiser wrote...

>>The MIPS processor doesn't really have a notion of a stack (and I
>>suspect this applies to some other RISC architectures as well).
>>It is up to the compiler to implement a stack and so a compiler
>>writer can choose to let the stack grow up or down.

> If the MIPS doen't have a notion of a stack, do they have call/ret
> instructions? What about interrupts? The interrupted location must be
> saved somewhere.

In RISC processors it is a common method to have
special registers which save the interrupted state,
including the return location.

As an example, in ARM processors there are saved
PSR and exception state link registers to save
the previous processor status and return location.

The interrupt handler software may decide to still
save the state into a stack, but it is then entirely
managed by the software handler.

--

Tauno Voipio
tauno voipio (at) iki fi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicholas O. Lindan  
View profile  
 More options Jan 10 2005, 4:51 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: "Nicholas O. Lindan" <s...@sig.com>
Date: Mon, 10 Jan 2005 21:51:37 GMT
Local: Mon, Jan 10 2005 4:51 pm
Subject: Re: Processors who's stack grows up
"Heinz Saathoff" <hs...@despammed.com> wrote

> Robert Kaiser wrote...
> > The MIPS processor doesn't really have a notion of a stack (and I
> > suspect this applies to some other RISC architectures as well).
> If the MIPS doen't have a notion of a stack, do they have call/ret
> instructions? What about interrupts? The interrupted location must be
> saved somewhere.

They get younger every year ...

http://www.cs.clemson.edu/~mark/subroutines.html

The stack, as in "SP->memory", in a non-Burroughs* machine
(see below) is a recent circa 1970 creation.  

The traditional method (like we got traditions in computer design)
of returning from subroutines was by forming a linked list.  Sometimes
by such subtle methods as writing a JMP instruction to the caller's
"return-to" address at the end of the called subroutine - remember
all code was in core ("RAM" for the young'ns) - this method is
not recommended for recursion.

IBM (?) came up with the idea of linking registers rather than
using code modification when subroutines are called.

Register linkage re-appeared in the TI-9900 micro (others?) and some
modern primitive instruction set micros as MIPS (above).

* The early Burroughs machines are a must see:

http://www.cs.virginia.edu/brochure/images/manuals/b5000/descrip/desc...

A machine designed to run Algol, c. 1958.

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
Remove spaces etc. to reply: n o lindan at net com dot com
psst.. want to buy an f-stop timer? nolindan.com/da/fstop/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Heinz Saathoff  
View profile  
 More options Jan 11 2005, 7:42 am
Newsgroups: comp.arch.embedded, comp.realtime
From: Heinz Saathoff <hs...@despammed.com>
Date: Tue, 11 Jan 2005 13:42:57 +0100
Local: Tues, Jan 11 2005 7:42 am
Subject: Re: Processors who's stack grows up

Nicholas O. Lindan wrote...
> "Heinz Saathoff" <hs...@despammed.com> wrote
> > If the MIPS doen't have a notion of a stack, do they have call/ret
> > instructions? What about interrupts? The interrupted location must be
> > saved somewhere.

> They get younger every year ...

Or you get older every year ;-)

> http://www.cs.clemson.edu/~mark/subroutines.html

> The stack, as in "SP->memory", in a non-Burroughs* machine
> (see below) is a recent circa 1970 creation.  

Yes, I'm too young to know that (was 10 years old that year).
Thank's for this historic infos.

- Heinz


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Wesseling  
View profile  
 More options Jan 15 2005, 10:23 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: f...@securityaudit.val.newsbank.net (Dick Wesseling)
Date: Sun, 16 Jan 2005 03:23:32 -0000
Local: Sat, Jan 15 2005 10:23 pm
Subject: Re: Processors who's stack grows up
In article <JNCEd.3322$KJ2....@newsread3.news.atl.earthlink.net>,
        "Nicholas O. Lindan" <s...@sig.com> writes:

> The traditional method (like we got traditions in computer design)
> of returning from subroutines was by forming a linked list.  Sometimes
> by such subtle methods as writing a JMP instruction to the caller's
> "return-to" address at the end of the called subroutine -

That would require the caller to know the end of the subroutine.

You are probably referring to the CDC. It would write a jump back
to the caller at the *first* word of the callee and begin execution
at the 2nd word.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Stewart  
View profile  
 More options Jan 15 2005, 10:27 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Jim Stewart <jstew...@jkmicro.com>
Date: Sat, 15 Jan 2005 19:27:22 -0800
Local: Sat, Jan 15 2005 10:27 pm
Subject: Re: Processors who's stack grows up

Dick Wesseling wrote:
> In article <JNCEd.3322$KJ2....@newsread3.news.atl.earthlink.net>,
>    "Nicholas O. Lindan" <s...@sig.com> writes:

>>The traditional method (like we got traditions in computer design)
>>of returning from subroutines was by forming a linked list.  Sometimes
>>by such subtle methods as writing a JMP instruction to the caller's
>>"return-to" address at the end of the called subroutine -

> That would require the caller to know the end of the subroutine.

> You are probably referring to the CDC. It would write a jump back
> to the caller at the *first* word of the callee and begin execution
> at the 2nd word.

I believe a pdp 8 did the same thing.  The
return was an indirect jump to the first word.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Grant Edwards  
View profile  
 More options Jan 15 2005, 10:29 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Grant Edwards <gra...@visi.com>
Date: 16 Jan 2005 03:29:31 GMT
Local: Sat, Jan 15 2005 10:29 pm
Subject: Re: Processors who's stack grows up
On 2005-01-16, Dick Wesseling <f...@securityaudit.val.newsbank.net> wrote:

>> The traditional method (like we got traditions in computer design)
>> of returning from subroutines was by forming a linked list.  Sometimes
>> by such subtle methods as writing a JMP instruction to the caller's
>> "return-to" address at the end of the called subroutine -

> That would require the caller to know the end of the subroutine.

> You are probably referring to the CDC. It would write a jump back
> to the caller at the *first* word of the callee and begin execution
> at the 2nd word.

I remember that from the days not so long ago when the UofMinn
used to torture students by making them program on a 6600.  I
always wondered how one did recursion or re-entrancy on a 6600,
but the professor who taught that class wasn't really up on
modern stuff like that.  He had also never heard of passing
parameters by value.

--
Grant Edwards                   grante             Yow!  YOW!! The land of the
                                  at               rising SONY!!
                               visi.com            


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicholas O. Lindan  
View profile  
 More options Jan 16 2005, 11:36 am
Newsgroups: comp.arch.embedded, comp.realtime
From: "Nicholas O. Lindan" <s...@sig.com>
Date: Sun, 16 Jan 2005 16:36:19 GMT
Local: Sun, Jan 16 2005 11:36 am
Subject: Re: Processors who's stack grows up
"Dick Wesseling" <f...@securityaudit.val.newsbank.net> wrote

> "Nicholas O. Lindan" <s...@sig.com> writes:

> > by such subtle methods as writing a JMP instruction to the caller's
> > "return-to" address at the end of the called subroutine -

> That would require the caller to know the end of the subroutine.

And?  The caller has to know the entry point, yah?  Knowing the
exit point is somehow interdict?

> You are probably referring to the CDC.

No, I am not.  Why, because as you so state:

> [A CDC mainframe] would write a jump back
> to the caller at the *first* word of the callee and begin execution
> at the 2nd word

This was an improvement, for modern day dilettantes.

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
Remove spaces etc. to reply: n o lindan at net com dot com
psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Wright  
View profile  
 More options Jan 16 2005, 2:01 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Simon Wright <si...@pushface.org>
Date: 16 Jan 2005 19:01:06 +0000
Local: Sun, Jan 16 2005 2:01 pm
Subject: Re: Processors who's stack grows up

Jim Stewart <jstew...@jkmicro.com> writes:
> I believe a pdp 8 did the same thing.  The return was an indirect
> jump to the first word.

Yes,

SUBR:   +0
        ...
        JMP I SUBR

(we only had ASR33s, no idea if PAL III would have accepted lower
case!)

--
Simon Wright                               100% Ada, no bugs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicholas O. Lindan  
View profile  
 More options Jan 16 2005, 3:41 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: "Nicholas O. Lindan" <s...@sig.com>
Date: Sun, 16 Jan 2005 20:41:34 GMT
Local: Sun, Jan 16 2005 3:41 pm
Subject: Re: Processors who's stack grows up

"Dick Wesseling" <f...@securityaudit.val.newsbank.net> wrote:
> "Nicholas O. Lindan" <s...@sig.com> writes:

> > The

"A traditional ..." would have been a better choice of words.

> > traditional method (like we got traditions in computer design)
> > of returning from subroutines was by forming a linked list.  Sometimes
> > by such subtle methods as writing a JMP instruction to the caller's
> > "return-to" address at the end of the called subroutine -

> That would require the caller to know the end of the subroutine.

> You are probably referring to the CDC. It would write a jump back
> to the caller at the *first* word of the callee and begin execution
> at the 2nd word.

I should not these methods are all software implementations.  Where
the return address and parameters are stored in older [and some newer]
machines is a matter of software convention.

Whirlwind, CDC, PDP-8 ... methods can be used on [almost] any processor.
PPP [People who Program Pics] know of even more bizarre methods.

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
Remove spaces etc. to reply: n o lindan at net com dot com
psst.. want to buy an f-stop timer? nolindan.com/da/fstop/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tauno Voipio  
View profile  
 More options Jan 16 2005, 4:29 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Tauno Voipio <tauno.voi...@iki.fi.NOSPAM.invalid>
Date: Sun, 16 Jan 2005 21:29:17 GMT
Local: Sun, Jan 16 2005 4:29 pm
Subject: Re: Processors who's stack grows up

Nicholas O. Lindan wrote:

> Whirlwind, CDC, PDP-8 ... methods can be used on [almost] any processor.
> PPP [People who Program Pics] know of even more bizarre methods.

Plenty of the PIC bizarrities are directly from the minis
of the sixties: PDP-8, HP-2116, Honeywell DDP-312 and
DDP-516 & co.

----

The method of storing the return address at the
subroutine entry location and starting the execution
at the next instruction was an industry standard
in the minis of those times. The notable exceptions
were Data General Nova and Digital PDP-11 which
stored the return address in a register.

--

Tauno Voipio
tauno voipio (at) iki fi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Wesseling  
View profile  
 More options Jan 16 2005, 9:29 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: f...@securityaudit.val.newsbank.net (Dick Wesseling)
Date: Mon, 17 Jan 2005 02:29:44 -0000
Local: Sun, Jan 16 2005 9:29 pm
Subject: Re: Processors who's stack grows up
In article <7KwGd.698$Rs....@newsread3.news.atl.earthlink.net>,
        "Nicholas O. Lindan" <s...@sig.com> writes:

> "Dick Wesseling" <f...@securityaudit.val.newsbank.net> wrote
>> "Nicholas O. Lindan" <s...@sig.com> writes:

>> > by such subtle methods as writing a JMP instruction to the caller's
>> > "return-to" address at the end of the called subroutine -

>> That would require the caller to know the end of the subroutine.

> And?  The caller has to know the entry point, yah?  Knowing the
> exit point is somehow interdict?

I figure that having to know both the entry point and the exit
point is twice as much work as having to know the entry point
only, but ...

>> You are probably referring to the CDC.

> No, I am not.  Why, because as you so state:

>> [A CDC mainframe] would write a jump back
>> to the caller at the *first* word of the callee and begin execution
>> at the 2nd word

> This was an improvement, for modern day dilettantes.

.. I stand corrected

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Wesseling  
View profile  
 More options Jan 16 2005, 9:32 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: f...@securityaudit.val.newsbank.net (Dick Wesseling)
Date: Mon, 17 Jan 2005 02:32:36 -0000
Local: Sun, Jan 16 2005 9:32 pm
Subject: Re: Processors who's stack grows up
In article <41e9df9b$0$82339$a1866...@visi.com>,
        Grant Edwards <gra...@visi.com> writes:

> I remember that from the days not so long ago when the UofMinn
> used to torture students by making them program on a 6600.  I
> always wondered how one did recursion or re-entrancy on a 6600,

That was done in software. The prelude of the called function would
save the value written by the return jump on the (software) stack.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mc  
View profile  
 More options Jan 16 2005, 4:56 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: "mc" <mc_no_s...@uga.edu>
Date: Sun, 16 Jan 2005 16:56:34 -0500
Local: Sun, Jan 16 2005 4:56 pm
Subject: Re: Processors who's stack grows up
"Tauno Voipio" <tauno.voi...@iki.fi.NOSPAM.invalid> wrote in message

news:N0BGd.698$ar4.124@read3.inet.fi...

> The method of storing the return address at the
> subroutine entry location and starting the execution
> at the next instruction was an industry standard
> in the minis of those times. The notable exceptions
> were Data General Nova and Digital PDP-11 which
> stored the return address in a register.

Interesting.  I knew of the Control Data XJ (Exchange Jump).

In those days there was almost no recursion.  As recently as 1980, recursion
was an "advanced" technique that ordinary programmers weren't expected to
master.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Keinanen  
View profile  
 More options Jan 19 2005, 3:34 am
Newsgroups: comp.arch.embedded, comp.realtime
From: Paul Keinanen <keina...@sci.fi>
Date: Wed, 19 Jan 2005 10:34:30 +0200
Local: Wed, Jan 19 2005 3:34 am
Subject: Re: Processors who's stack grows up

On Sun, 16 Jan 2005 16:56:34 -0500, "mc" <mc_no_s...@uga.edu> wrote:
>"Tauno Voipio" <tauno.voi...@iki.fi.NOSPAM.invalid> wrote in message
>news:N0BGd.698$ar4.124@read3.inet.fi...

>> The method of storing the return address at the
>> subroutine entry location and starting the execution
>> at the next instruction was an industry standard
>> in the minis of those times. The notable exceptions
>> were Data General Nova and Digital PDP-11 which
>> stored the return address in a register.

While it is technically correct to say that PDP-11 stored in the
return address in a register and it was also used extensively in some
older code when using R0 .. R5 as the link register, in which case it
was easy to use the link register to access the in-line parameters.
However, some compiler generated code pushed the parameters on the SP
stack and then called the subroutine, using the PC as the link
register, which effectively pushed the return address on top of the
stack, thus creating a pure stack architecture.

>Interesting.  I knew of the Control Data XJ (Exchange Jump).

>In those days there was almost no recursion.  As recently as 1980, recursion
>was an "advanced" technique that ordinary programmers weren't expected to
>master.

IMHO, recursion is highly overrated, some people even want to convert
a simple loop to a recursion :-).

Languages which were commonly used in 1960/70, such as Cobol and
Fortran did not even support recursion. This caused some problems in
some very rare cases .e.g. when evaluating complex arithmetic
expressions with complex function parameter list, but it is
definitively doable, while of course this would be easier to do with
recursion.

In high reliability systems (which are often discussed in these
newsgroups), it is not acceptable that the thread/process stack would
_ever_ overflow. If recursion is used on such systems, there must be a
well defined absolute maximum number of recursions that can occur, in
order to fit into the allocated stack.

For instance walking through a binary tree with a recursive routine is
nice, but what if the binary tree is due to the creation order
actually a simple linear linked list, then the levels of recursions is
the same as the number of elements in the linked list. With a large
stack frame in the recursive routine, the stack size requirement can
be larger than the size of the linked list.

Thus, in order to use a recursive binary tree routine, some
precautions must be done to reorganise (balance) the tree to avoid
such pathological cases as the binary tree becoming a linear linked
list, before calling the recursive binary tree walker routine.

Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Everett M. Greene  
View profile  
 More options Jan 19 2005, 12:27 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: moja...@mojaveg.iwvisp.com (Everett M. Greene)
Date: Wed, 19 Jan 2005 09:27:34 PST
Local: Wed, Jan 19 2005 12:27 pm
Subject: Re: Processors who's stack grows up

Fortran not supporting recursion is an industry myth
probably a side-effect of early implementation techniques.
There is nothing in the ANSI Fortran standard which
precludes a stack-oriented implementation thus allowing
recursion.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Grant Edwards  
View profile  
 More options Jan 19 2005, 1:02 pm
Newsgroups: comp.arch.embedded, comp.realtime
From: Grant Edwards <gra...@visi.com>
Date: 19 Jan 2005 18:02:49 GMT
Local: Wed, Jan 19 2005 1:02 pm
Subject: Re: Processors who's stack grows up
On 2005-01-19, Everett M. Greene <moja...@mojaveg.iwvisp.com> wrote:

>>>In those days there was almost no recursion.  As recently as
>>>1980, recursion was an "advanced" technique that ordinary
>>>programmers weren't expected to master.

>> IMHO, recursion is highly overrated, some people even want to
>> convert a simple loop to a recursion :-).

Recursion aside, it's re-entrancy that really matters. I
suppose if the OS doesn't support multiple processes, then that
doesn't matter either.

--
Grant Edwards                   grante             Yow!  It's OKAY -- I'm an
                                  at               INTELLECTUAL, too.
                               visi.com            


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 26 - 50 of 54 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »