Subject:
|
Re: Spybotics to RCX message
|
Newsgroups:
|
lugnet.robotics.spybotics
|
Date:
|
Thu, 16 Jan 2003 03:06:58 GMT
|
Viewed:
|
6695 times
|
| |
| |
Just erased 3 lines of reply now that I've remembered my basic
assembly stuff ... boy it's been a while.
Yes, that sounds like the right thing to do.
Just curious, I haven't installed the Mindstorms SDK since I try to
minimize what all I've installed. Is there any way to get the LASM
output from a Mindscirpt program by simply running something or do I
really need to do the full install?
On Wed, 15 Jan 2003 16:25:36 GMT, "Mark Riley" <markril@hotmail.com>
wrote:
> Hey cool, Mark, this is really going to be useful!
>
> I've noticed that when MindScript generates a call to
> the SendRCXMessage subroutine, it always pops the
> calling parameters off the stack. For example, this
> MindScript code:
>
> SendRCXMessage(5)
>
> generates this LASM:
>
> push 2,5
> calls 37 ;SendRCXMessage
> pop 1
>
> You might want to try adding something like the
> following line to the end of your routine(s):
>
> asm { 0x01, 1 }; // pop 1
>
> You probably wouldn't notice a nything odd until
> the stack underflowed. I think 80 stack parameters
> or so is the limit before there's a problem (i.e. the
> task is terminated).
>
> Cheers,
>
> Mark (the other one)
>
> "Mark Ferris" <markdf2001@yahoo.com> wrote:
>
> > The following NQC code will define a routine to send a message to the
> > RCX or Scout:
> >
> > // Sends an RCX PBMessage to RCX or Scout
> > // nMessage = 1 - 255
> > __nolist void SendRCXMessage (const int nMessage)
> > {
> > asm { 0xe3, &nMessage };
> > asm { 0x17, 37 };
> > }
> >
> >
> > I'm busy making API .nqh files to get access to the ROM subroutines.
> > So far I have them divided into utility functions (such as the one
> > above) that do not need any of the ROM defined variables and engine
> > functions, which do . The engine functions implement the game engine
> > that the Spybots progam uses. Lots of useful stuff there. I have a
> > lot more calls already defined, I just have to test them more before
> > posting them. I thought I'd just jump in and post this one because I
> > remember the statement being made at one point that it might not be
> > possible to send a standard RCX message out from a Spybot.
>
>
|
|
Message is in Reply To:
| | Re: Spybotics to RCX message
|
| Hey cool, Mark, this is really going to be useful! I've noticed that when MindScript generates a call to the SendRCXMessage subroutine, it always pops the calling parameters off the stack. For example, this MindScript code: SendRCXMessage(5) (...) (22 years ago, 15-Jan-03, to lugnet.robotics.spybotics)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|