| Deutsch English Français Italiano |
|
<c0e894f1e2a4f551cb6d117cc00525ba@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: Stacks, was Segments Date: Sun, 19 Jan 2025 18:28:40 +0000 Organization: Rocksolid Light Message-ID: <c0e894f1e2a4f551cb6d117cc00525ba@www.novabbs.org> References: <vdlgl9$3kq50$2@dont-email.me> <vmbd4n$3v6su$3@paganini.bofh.team> <vmbi6u$3js5u$1@dont-email.me> <04876fc002ab019a74c78113a36622f3@www.novabbs.org> <vmf5vv$2cse$1@gal.iecc.com> <lv18qpFjhe9U1@mid.individual.net> <vmj9hh$2bkbs$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="173736"; mail-complaints-to="usenet@i2pn2.org"; posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU"; User-Agent: Rocksolid Light X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71 X-Rslight-Site: $2y$10$hKvkRFGFG1Te/XdpDYVzEOxGCugXJBwCFGL3SnWTS44XLdcToWJfK X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 2039 Lines: 18 On Sun, 19 Jan 2025 16:33:53 +0000, David Brown wrote: > > A two-stack setup can be used in C too. (The C standards don't require > a stack at all.) On the AVR microcontroller, it is not uncommon for C > implementations to work with a dual stack, since it does not have any > kind of "[SP + n]" or "[SP + r]" addressing modes, but it /does/ have an > "[Y + n]" addressing mode using an index register. > > Two stacks are also pretty much required for FORTH. > > The use of a dual stack could also significantly improve the security of > systems by separating call/return addresses from data. In My 66000 the code cannot read/write that other stack with LD and ST instructions. It can only be accessed by ENTER (stores) and EXIT (LDs). The mapping PTE is marked RWE = 000. So, while you can still overrun buffers, you cannot damage the call/ return stack or the preserved registers !!