implement first API asm_cons_putchar