This is a very simple version:
.SECTION P, CODE, ALIGN=4
.MACRO SYSCALL NUM, NAME
.export \NAME
\NAME:
mov.l #h'0000\NUM, r0
mov.l #h'80020070, r1
jmp @r1
nop
.ENDM
SYSCALL 01F9, _print
SYSCALL 1863, _locate
.end
void print(const unsigned char *str, int type, int zero);
void Print(const unsigned char *str);
void PrintRev(const unsigned char *str);
void
Print(const unsigned char *str)
{
print(str, 0, 0);
return;
}
void
PrintRev(const unsigned char *str)
{
print(str, 1, 0);
return;
}