To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 1216
1215  |  1217
Subject: 
RE: H8/300 Assembler/C interface
Newsgroups: 
lugnet.robotics.rcx
Date: 
Fri, 20 Apr 2001 22:44:15 GMT
Viewed: 
1327 times
  
One more question for Kekoa before I'm done...

The RCX ROM routines take a parameter in r6, with additional
params on the stack. Return value is in r6 too.

Are all other registers considered volatile through the
call, or do the ROM routines save registers they clobbber?

I've always assumed that they save r4, r5, alter r6, and preserve
the SP (r7) Are r0-r3 volatile or preserved in the ROM?

Last question, I promise.

Cheers, Ralph



Message has 1 Reply:
  Re: H8/300 Assembler/C interface
 
(...) A brief review of the ROM disassembly seems to indicate the routines in ROM save r0-r5 if necessary. For example, the routine at 070c saves all registers. Like you said, parameters are passed in r6 with extra parameters on the stack. The (...) (23 years ago, 20-Apr-01, to lugnet.robotics.rcx)

Message is in Reply To:
  H8/300 Assembler/C interface
 
Does anyone know offhand what the calling convention between C/C++ and H8/300 assembler is using the GNU tools? The assumptions I'm making are as follows: R7 is the stack pointer R6 is the first (leftmost) parameter passed and the result R0-5 are (...) (23 years ago, 18-Apr-01, to lugnet.robotics.rcx)

20 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