To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 257
256  |  258
Subject: 
Re: signals / legOS internals
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 23 Jun 1999 00:52:53 GMT
Viewed: 
1056 times
  
Lou Sortman  <theball@bigfoot.com> wrote:
I was rolling along, planning this out, then it occurred to me that
local (to the function) variables are on the stack above the stack
pointer.  That means that pushing anything on the stack asynchronously
is going to toast those variables.  It  makes me wonder why that doesn't
happen whenever OC1A happens.

The stack pointer must always always always point at the bottom of the
stack data area, i.e. to the last valid data item on the stack.  As a
consequence, push val (or mov.w val,@-r7) never overwrites data.

When an interrupt occurs, the first thing that happens is that two data
values are pushed onto the stack.  See pp. 68-71 and Fig 4-5 of the
hardware manual for more details.

-Kekoa



Message has 2 Replies:
  Re: signals / legOS internals
 
(...) Reading this again, I should mention that pushing things on the stack asynchronously is fine, as long as the stack pointer is always in the right place, which is why it must always always always point to the location I mentioned (and seemingly (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)
  Re: signals / legOS internals
 
(...) When you define a bunch of local variables (more than fit in available registers), where are they? Unless you happen to know the answer, I may have to do some more experimenting. Admittedly, it has been awhile, but the last time I was heavy (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  signals / legOS internals
 
Peek-a-boo! I've been banging my head against this a bit and thought I'd see if any of you can shove me in the right direction. I am trying to implement signals in legOS. The problem is that a signal can happen at any time. I know how to make that (...) (25 years ago, 23-Jun-99, to lugnet.robotics.rcx.legos)

32 Messages in This Thread:









Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR