When you define Prolog clauses for global predicates as being of foreign language, those predicates may be called from foreign languages. They will have parameter access and entry and exit code, including register preservation, as for the language specified.
Example:predicate called from .pro in C language
/* Program hello_p.pro */
global predicates
char prohello_msg(string) - (i) language c
hello_c - language c
clauses
prohello_msg(S,C) :-
write(S," (press any key)"), readchar(C).
goal
prohello_msg("Hello from Prolog"),
hello_c.
The global predicate prohello_msg is now accessible from C and can be called just like any other C function: