asm: use a macro for functions