To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1519
1518  |  1520
Subject: 
Re: How to call SCOUT ROM subroutine from NQC
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sat, 24 May 2003 05:27:23 GMT
Viewed: 
5175 times
  
In article <HFC38G.1BJw@lugnet.com>,
"Liem Peng Hong" <liemph@nais.ne.jp> wrote:

Dear members,
I would like to know how to call RDS SCOUT ROM subroutines from NQC.
The SCOUT ROM Subroutines are useful and may save much memory for SCOUT.

Thankyou in advance.

Liem PH

There isn't any built-in support for calling the ROM routines, but you
can probably hack together what you need.  You'll need to use "#pragma
reserve" to prevent NQC from assigning variables to the registers used
for parameter passing to the ROM routines.  Then you'll need to write
and "asm" statement that moves your desired parameters (which can come
from variables) into those registers and issues the bytecode to call the
routine.  The last section in the NQC Programmer's Guide provides some
explanation for "#pragma reserve" and "asm".  The Scout documentation
from Lego describes the ROM routines and what registers are used for
parameters.

Dave Baum



Message has 1 Reply:
  Re: How to call SCOUT ROM subroutine from NQC
 
Dear Dave Baum, Thank you for your reply. First of all, I enyoy your wonderful creation NQC very much. I also learn much from your EXTREME MINDSTORM book although it is dedicated to RCX rather than to RDS SCOUT. I successfully call almost all SCOUT (...) (21 years ago, 27-May-03, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  How to call SCOUT ROM subroutine from NQC
 
Dear members, I would like to know how to call RDS SCOUT ROM subroutines from NQC. The SCOUT ROM Subroutines are useful and may save much memory for SCOUT. Thankyou in advance. Liem PH (22 years ago, 23-May-03, to lugnet.robotics.rcx.nqc)

5 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