To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 580
579  |  581
Subject: 
Re: Spirit.OCX & Starting a Program
Newsgroups: 
lugnet.robotics
Date: 
Mon, 16 Nov 1998 14:16:05 GMT
Original-From: 
Paul Haas <paulh@hamjudo.com%Spamcake%>
Viewed: 
2277 times
  
On Mon, 16 Nov 1998, Dave Baum wrote:


Brett Carver wrote:
Dave Baum wrote:
Since task 0 is the task activated by the "Run" button, you can run a
program by using StartTask(0).  You can select which program to run
with the SelectProgram() command.

Is it possible to do this from within a running program?

As far as I know, you can't set and start a different program from within
another program.  Execution stops when you switch programs, so the
following start task instruction will never get reached.

Doesn't the mysterious opcode d2 allow you to do that?  Or am I missing
something?

}}Date: Sun, 25 Oct 1998 15:35:08 -0800 (PST)
}}From: Kekoa Proudfoot <kekoa@Graphics.Stanford.EDU>
}}To: Lego Robotics <lego-robotics@crynwr.com>
}}Subject: Re: Ram map touch-ups and bytecode values

}}Speaking of extra opcodes.  Opcode d2 is interesting - but I have no idea
}}what it's useful for.  It takes a big endian short (call it "data") as
}}input and does the following:

}}   if (data & 0x0008)
       [ 20 important but unrelated lines of code removed. ]
}}   set motor handler activate bit (bit 0x80 of cc01)
}}
}}   if (data != last d2 data (cd1e))
}}      last d2 data (cd1e) = data
}}      switch (data)
     [6 more unrelated lines of code removed]
}}          case 0x0200:
}}             stop all tasks, current program (ccc4) = 0, run program
}}          case 0x0400:
}}             stop all tasks, current program (ccc4) = 1, run program
}}          case 0x0800:
}}             stop all tasks, current program (ccc4) = 2, run program
}}          case 0x1000:
}}             stop all tasks, current program (ccc4) = 3, run program
}}          case 0x2000:
}}             stop all tasks, current program (ccc4) = 4, run program
}}          case 0x4000:
}}             stop all tasks
}}          case 0x8000:
}}             play two high pitch beeps
}}
}}WTF????  Why?  The only thing I can think of is maybe this is used for
}}testing.
}}
}}-Kekoa
}}

--
paulh@hamjudo.com  http://www.hamjudo.com
The April 97 WebSight magazine describes me as "(presumably) normal".



Message has 1 Reply:
  Re: Spirit.OCX & Starting a Program
 
(...) It does seem to have the correct behavior for both setting and starting a program. My earlier description of the d2 opcode was a bit brief. Reviewing my notes, the "stop all tasks, set current program, run program" pseudocode is really: stop (...) (26 years ago, 16-Nov-98, to lugnet.robotics)

Message is in Reply To:
  Re: Spirit.OCX & Starting a Program
 
(...) Yep, that's exactly what I meant. Dave (26 years ago, 16-Nov-98, to lugnet.robotics)

7 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
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
10 hours ago
Custom Search

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