@Jose
Why? I took care to have them receive the arguments as described in the RawDoFmt docs.
I didn't see that at least...
/* Count nr. of times it's called (= string size) */
void CountChrs (char ch, LONG *StringSize)
{ ++*StringSize;
}
void CpyChr (char ch, char *dest)
{ *dest++ = ch;
}
How does that make sure 'ch' is in D0 and 'StringSize'/'dest' in A3?
This is something you'd have to do:
/* Count nr. of times it's called (= string size) */
#if defined(__GNUC__) && defined(mc68000)
void CountChrs (char ch __asm("d0"), LONG *StringSize __asm("a3"))
#elif defined(__SASC)
void __asm CountChrs (register __d0 char ch, register __a3 LONG *StringSize)
#else
#error unsupported compiler/cpu combo
#endif
{ ++*StringSize;
}
#if defined(__GNUC__) && defined(mc68000)
void CpyChr (char ch __asm("d0"), char *dest __asm("a3"))
#elif defined(__SASC)
void __asm CpyChr (register __d0 char ch, register __a3 char *dest)
#else
#error unsupported compiler/cpu combo
#endif
{ *dest++ = ch;
}
Now you perhaps understand why I prefer direct UWORD arrays instead of trying to trick the compiler into doing the right thing (tm)...
I tried to explain it
in the other thread.
I'm on 68K so &dest+1 shouldn't be a problem here.
It isn't.