Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Falcon DSP MOD replay (Pure C)
Posted by: saulot Nov,12.2012-02:19 

Calling convention isn't tricky at all. If AHCC is PureC compatible then all c function parameters are passed to m68k registers directly (there should be PureC doc file explaining that. I think that PureC archive from rg.atari.org will have it). So all data are passed to d0-d7 registers, pointers are slapped to a0-a6 (I think that's from left to right order, it isn't hard to figure it out with debugger). Floats are packed to fpu registers directly too (if it was enabled).
Everything that doesn't fit in registers goes on stack. If function will be declared with cdecl, then all parameters as far i remember goes on stack (,but this sucks).
I've made small PureC library for CT60(http://nokturnal.pl/home/atari/ct60lib), so there you can see how interfacing between C and m68k asm can be done. This is also done in GODLIB.







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Falcon DSP MOD replay (Pure C) Simon Sunnyboy / Paradize Nov,11.2012-13:37
  Re: Falcon DSP MOD replay (Pure C) ggn Nov,11.2012-20:42
    Re: Falcon DSP MOD replay (Pure C) AdamK Nov,11.2012-22:24
    Re: Falcon DSP MOD replay (Pure C) Simon Sunnyboy / Paradize Nov,12.2012-18:24
  Re: Falcon DSP MOD replay (Pure C) saulot Nov,12.2012-02:19
    Re: Falcon DSP MOD replay (Pure C) saulot Nov,12.2012-02:26
      Re: Falcon DSP MOD replay (Pure C) Simon Sunnyboy / Paradize Nov,12.2012-18:26
        Re: Falcon DSP MOD replay (Pure C) ggn Nov,13.2012-17:16
          Re: Falcon DSP MOD replay (Pure C) Simon Sunnyboy / Paradize Nov,13.2012-18:19
          Re: Falcon DSP MOD replay (Pure C) mikro Nov,13.2012-19:26
            Re: Falcon DSP MOD replay (Pure C) ggn Nov,13.2012-23:39


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson