• Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    This question is due to a 68k based Texas Instruments calculator program that I am trying to adapt to run on environments that are more familiar to me.

    The main problem I'm having is that it mixes 68k assembly into the C source file. While I'm confident enough to remove various TI system calls, the dependency on a 68k target has prevented me from being able to recompile my attempted modifications.

    Alternately, can vbcc handle mixed 68k assembly and C? If so, it doesn't seem to like the gcc method of doing this.

    This is the simplest example of a mixed source function from the program:

    Code:
    static inline unsigned long bswap32(unsigned long v) {
    asm("rol.w #8,%[dst]nt"
    "swap %[dst]nt"
    "rol.w #8,%[dst]"
    : [dst] "+d" (v)
    :
    : "cc");
    return v;
    }

    Clipboard01.jpg

    btw Why does the forum Code feature clobber indentation and backslashes?
    PPC assembly ain't so bad... ;)
  • »11.06.15 - 23:20
    Profile Visit Website