If I correctly understand what you are trying to do, then am sorry to say that it never will work. BIOS interrupts only operate in real mode, and since you appear to be using GCC as your compiler (based on the
inline assembly syntax you are using), the system isn't going to be in real mode.
GCC cannot target real mode at all - it only produces 32-bit protected mode or 64-bit long mode object code - meaning that if the code in question is running at all, it has to be running in p-mode, meaning the BIOS is useless to you without either dropping back to real mode (which means the generated C code won't run) or using virtualization or emulation to run real mode code (and again, the C code generated by that compiler won't run in that sandbox, making the BIOS call impossible.
Now, I could be mistaken here; you might be using a real mode compiler with a similar inline assembly syntax, for example. But based on what I am seeing, there won't be any way to make this work as it is.
usually, my recommendation is to write a set of basic routines that write directly to the video text buffer, as described in the wiki pages
Text UI,
Printing To Screen, and
Text Mode Cursor (I would also recommend reading
VESA Video Modes and
How do I set a graphics mode, but I suspect you already have). It not all that much more work, really, and given the limitations of the BIOS text handling, it is something you would need to do eventually anyway.
However, looking back over your posting history, I am pretty sure you have already done that before (since you had functions for printing strings when you were working on the PS/2 keyboard handler and when you asked about V86 mode), which leads me to the question of, why did you want to use the BIOS here?
Also, just out of curiosity, what boot loader are you using? Presumably, if you had rolled your own loader, you knew you were in p-mode, but if you were using (for example) GRUB, well, we do get people who didn't realize that GRUB boots into protected mode before. I am pretty sure (based on your previous posts) that you
do know you are in p-mode, but didn't know GCC didn't compile for real mode, but I definitely would like more information here.