diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-10-04 03:46:29 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-10-04 05:04:04 -0600 |
| commit | f52299cf837951cbc1dc92fd0d084444ac3dc712 (patch) | |
| tree | 81db03717f1571d0e1e75f8de8d7915a0c7cb084 /demo/console.c | |
| parent | 3de2c7e7dd214f80b8b9cca575e42e0b1b08034d (diff) | |
demo: implement cache debug
Diffstat (limited to 'demo/console.c')
| -rw-r--r-- | demo/console.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demo/console.c b/demo/console.c index b35ace7..d2d13fa 100644 --- a/demo/console.c +++ b/demo/console.c @@ -48,7 +48,8 @@ static void print_hex(unsigned val, unsigned bits) if (bits > 32) bits = 32; - bits = bits & ~3; + bits = (bits + 3) & ~3; + do print_char(hex_digits[(val >> (bits -= 4)) & 0xf]); while (bits); |
