• Moderator
    Kronos
    Posts: 2237 from 2003/2/24
    I am trying to setup a system that lets a LUA script call any given OS function (think about the LIBCALLS in AmigaBasic) and for this I would need to call the OS from C without involving any macros or compiler magic.

    This is what I thought to be the solution...

    (trying to open dos.libray)

    Code:


    TEXT DosName[] = "dos.library";
    REG_D0 = 0;
    REG_A0 = (ULONG) DosName;
    REG_A6 = SysBase;
    ULONG res = (*MyEmulHandle->EmulCallDirectOS)(-552);
    ULONG res1 = REG_A0;
    ULONG res2 = REG_D0;

    kprintf("aaa %x %x %x %x %xn",SysBase,res,res1,res2,DosName);


    ..but is obviously not.
  • »04.08.21 - 13:47
    Profile