 | | Re: H8/300 Assembler/C interface
|
|
(...) Yeah, you are right. My bad. -Kekoa (25 years ago, 19-Apr-01, to lugnet.robotics.rcx)
|
| |
 | | RE: H8/300 Assembler/C interface
|
|
(...) 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 (...) (25 years ago, 19-Apr-01, to lugnet.robotics.rcx)
|
| |
 | | 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 (25 years ago, 18-Apr-01, to lugnet.robotics.rcx)
|
| |
 | | Re: H8/300 Assembler/C interface
|
|
(...) Somebody correct me if I'm wrong. I just compiled some programs to check this. I believe that maybe the *ROM* calling convection is as Ralph described, but almost definitely the GCC calling convention is: - r0, r1, r2 hold parameters from left (...) (25 years ago, 18-Apr-01, to lugnet.robotics.rcx)
|
| |
 | | RE: RCX+PC=Rubik's Cube Solver
|
|
(...) DUDE! These are unbelievable......I would never even consider doing something like this due to other time constraints like partners and kids. These are amazing - a must see and candidate for Site of the Week, no? Cheers, Ralph Hempel (25 years ago, 18-Apr-01, to lugnet.robotics, lugnet.robotics.rcx)
|