2 Copyright © 2010, The AROS Development Team. All rights reserved.
9 #include <aros/debug.h>
10 #include <aros/asmcall.h>
12 #include <exec/memory.h>
13 #include <proto/exec.h>
14 #include <dos/rdargs.h>
15 #include <dos/dosextens.h>
17 /*****************************************************************************
20 #include <proto/dos.h>
22 AROS_UFH2(ULONG
, Dos_BCPL_putpkt
,
24 AROS_UFHA(BSTR
, bdospacket
, D1
),
25 AROS_UFHA(struct DosLibrary
*, DOSBase
, A6
))
28 BCPL Vector offset 0xa8
38 *****************************************************************************/
42 D(struct Process
*me
= (struct Process
*)FindTask(NULL
);)
43 struct DosPacket
*dp
= BADDR(bdospacket
);
45 D(bug("BCPL putPkt: me->pr_MsgPort = %p\n", &me
->pr_MsgPort
));
46 D(bug("BCPL putPkt: me->pr_FileSystemTask = %p\n", me
->pr_FileSystemTask
));
47 D(bug("BCPL putPkt: me->pr_ConsoleTask = %p\n", me
->pr_ConsoleTask
));
48 #define DMP(x) D(bug("BCPL putPkt: dp->dp_%s = %p\n", #x, dp->dp_##x))
61 #define MMP(x) D(bug("BCPL putPkt: mn->mn_%s = %p\n", #x, dp->dp_Link->mn_##x))
70 dp
->dp_Link
->mn_Node
.ln_Name
= (char *)dp
;
71 dp
->dp_Link
->mn_Length
= sizeof(*dp
->dp_Link
);
73 D(bug("BCPL putPkt: Send to port %p, reply on port %p, DosPacket %p\n",
74 dp
->dp_Port
, &me
->pr_MsgPort
, dp
));
76 PutMsg(dp
->dp_Port
, dp
->dp_Link
);