2 Copyright © 1995-2016, The AROS Development Team. All rights reserved.
5 Desc: Macros to make calling ARexx library querying functions portable
9 #ifndef AROS_REXXCALL_M68K_H
10 #define AROS_REXXCALL_M68K_H
12 /* Some macros to make ARexx portable to non-m68k platforms */
13 #define RexxCallQueryLibFunc(rexxmsg, libbase, offset, retargstringptr) \
15 int _offset=abs(offset)/6; \
16 AROS_LVO_CALL2(ULONG, \
17 AROS_LCA(struct RexxMsg *, rexxmsg, A0), \
18 AROS_LCA(STRPTR *, retargstringptr, A1), \
19 struct Library *, libbase, _offset, rexxcall); \
22 /* ARexx Query Functions return their arguments in BOTH
25 #define AROS_AREXXLIBQUERYFUNC(f,m,lt,l,o,p) \
26 AROS_UFP3(ULONG, p##_##f##_wrapper, \
27 AROS_UFPA(struct RexxMsg *, m, A0), \
28 AROS_UFPA(STRPTR *, _retargstringptr, A1), \
29 AROS_UFHA(lt, l, A6)); \
31 ".global " #p "_" #o "_" #f "\n" \
32 #p "_" #o "_" #f ":\n" \
33 "jsr " #p "_" #f "_wrapper \n" \
36 AROS_UFH3(ULONG, p##_##f##_wrapper, \
37 AROS_UFHA(struct RexxMsg *, m, A0), \
38 AROS_UFHA(STRPTR *, _retargstringptr, A1), \
39 AROS_UFHA(lt, l, A6)) { AROS_USERFUNC_INIT
40 #define AROS_AREXXLIBQUERYFUNC_END \
43 #define ReturnRexxQuery(rc,arg) \
44 *_retargstringptr = arg; \