Yes @Jester and @ Michael Petch both are right my printf function was broken.I am using print_hex(cs) ... works fine where print_hex in vga.c is
// Outputs a hexadecimal number to the screen. void print_hex(uint32_t n) {
char hex_chars[] = "0123456789ABCDEF";
print("0x");
for (int i = 28; i >= 0; i -= 4) // process each nibble (4 bits)
{
putchar(hex_chars[(n >> i) & 0xF]);
}
}