_rom_call Function (Macro Constructor)

default.h

#define _rom_call(type,args,index) (_rom_call_concat (type, args, 0x##index, _ROM_CALL_##index))

Constructs a function definition for a TIOS ROM call.

_rom_call uses _rom_call_addr to get a void pointer to the location in memory where the function is stored, and then casts this pointer to a temporarily defined "pointer to function" type.

To avoid argument prescan of index, _rom_call_addr cannot be used directly, but instead another macro has to be used, which has been called _rom_call_addr_concat.


See also: _rom_call_attr, _rom_call_hack, _rom_call_addr