79077236

Date: 2024-10-11 07:53:56
Score: 1.5
Natty:
Report link

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]);
}

}

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Jester
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: baponkar