ASM_fastcall Function (Macro)

system.h

void ASM_fastcall (void *base_addr);

Calls a subroutine located on absolute address.

ASM_fastcall calls an assembly subroutine located at absolute address base_addr. As ASM_fastcall is a macro, not a function, base_addr need not to be a pointer. It can also be an unsigned (long) integer. In fact,

ASM_fastcall (base_addr);
is the same as
((void(*)(void))(base_addr)) ();
but much more readable. It performs just a "jsr" to base_addr; it does not perform any relocation of relocatable items (to do this, see EX_patch).

ASM_fastcall assumes that called subroutine will not destroy any registers. If this assumption is not valid, use ASM_call instead. In fact, if you are not very sure about behaviour of called subroutine, it is highly recommended to avoid ASM_fastcall and to use ASM_call. In releases of TIGCCLIB prior to 2.1, ASM_call does exactly what ASM_fastcall does in this release.

Note: This function should be used with great care, because on HW2 calculators a stupid protection device does not allow that the program counter may be on arbitrary place, except if some special precausions are performed. Anyway, this function is not designed for common use: it is intended for very experienced system programmers. Don't use it if you don't know very well what are you doing!


Used by: ASM_call