Subject:
|
RE: H8/300 Assembler/C interface
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Thu, 19 Apr 2001 00:11:42 GMT
|
Viewed:
|
1487 times
|
| |
| |
> Also:
>
> - caller cleans up parameters on stack
> - stack pointer is r7
>
> The caller must clean up stack parameters b/c the return address is pushed
> after parameters are.
Not necessarily, that's why I'm asking. If the caller cleans up the stack,
then the function just does an RTS and the caller adjusts the stack
because it knows how much stuff was pushed on. For programs with
lots of calls, this generates extra code.
If you write assembler for the RCX, and I know Kekoa does, then your
function has to copy the return address to a register, clean
up the stack and then JMP through the register to the return address.
ANyways, thanks for clearing this up, Kekoa, and it looks like
I'll need to do some M4 magic to be able to generate assembler I
can use in pbForth and GCC.
Cheers, Ralph
|
|
Message has 1 Reply:
Message is in Reply To:
| | Re: H8/300 Assembler/C interface
|
| (...) Also: - caller cleans up parameters on stack - stack pointer is r7 The caller must clean up stack parameters b/c the return address is pushed after parameters are. -Kekoa (24 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
|
|
|
|