GPT handler detects V86 mode; Interrupt printing fixes
This commit is contained in:
8
print.c
8
print.c
@@ -1,24 +1,16 @@
|
||||
#include "print.h"
|
||||
|
||||
__attribute((__always_inline__))
|
||||
__attribute((__no_caller_saved_registers__))
|
||||
char nibbleToHex(uint8_t n) {
|
||||
return n > 9 ? (n - 10) + 'A' : n + '0';
|
||||
}
|
||||
__attribute((__always_inline__))
|
||||
__attribute((__no_caller_saved_registers__))
|
||||
void printByte(uint8_t v, uint16_t *buff) {
|
||||
*(char *)&buff[0] = nibbleToHex((v >> 4) & 0xF);
|
||||
*(char *)&buff[1] = nibbleToHex(v & 0xF);
|
||||
}
|
||||
__attribute((__always_inline__))
|
||||
__attribute((__no_caller_saved_registers__))
|
||||
void printWord(uint16_t v, uint16_t *buff) {
|
||||
printByte(v >> 8, buff);
|
||||
printByte(v, &buff[2]);
|
||||
}
|
||||
__attribute((__always_inline__))
|
||||
__attribute((__no_caller_saved_registers__))
|
||||
void printDword(uint32_t v, uint16_t *buff) {
|
||||
printWord(v >> 16, buff);
|
||||
printWord(v, &buff[4]);
|
||||
|
Reference in New Issue
Block a user