#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA638_A31E_A31M_A35E_A35M_X31J_AU1E_AU2E_AU2F_AU2G_AU3E
extern FTL_LIBRARY* PRIM_08_Library_Open();

FTL_LIBRARY* G9003_MEM1base;


MEM1_09_EmptyFunction(
)
{
        asm {
                movea.l G9003_MEM1base(a5),a0
                movea.l -0x24(a0),a1
                jmp     (a1)
        }
}
MEM1_04_CopyBytes(
)
{
        asm {
                movea.l G9003_MEM1base(a5),a0
                movea.l -0x10(a0),a1
                jmp     (a1)
        }
}
MEM1_05_ClearBytes(
)
{
        asm {
                movea.l G9003_MEM1base(a5),a0
                movea.l -0x14(a0),a1
                jmp     (a1)
        }
}
MEM1_06_Allocate(
)
{
        asm {
                movea.l G9003_MEM1base(a5),a0
                movea.l -0x18(a0),a1
                jmp     (a1)
        }
}
MEM1_07_Free(
)
{
        asm {
                movea.l G9003_MEM1base(a5),a0
                movea.l -0x1C(a0),a1
                jmp     (a1)
        }
}
MEM1_08_Available(
)
{
        asm {
                movea.l G9003_MEM1base(a5),a0
                movea.l -0x20(a0),a1
                jmp     (a1)
        }
}

FTL_LIBRARY* F9006_OpenMEM1(P9006_i_MinimumVersion)
int16_t P9006_i_MinimumVersion;
{
        if (P9006_i_MinimumVersion <= 2) {
                G9003_MEM1base = PRIM_08_Library_Open(FTL_MEM1, (long)P9006_i_MinimumVersion);
        }
        return G9003_MEM1base;
}

long F9007_CloseMEM1(P9007_l_)
long P9007_l_;
{
        if (P9007_l_) {
                PRIM_09_Library_Close(FTL_MEM1);
        }
}
#endif
