Using inline assembly and int10h AH=13h to print messages
Posted: Mon Mar 05, 2018 8:29 pm
I am trying to use the BIOS (interrupt 0x10 AH=0x13) to print a message to the screen, but it does not work.
The color is correctly printed but the text does not appear.
Here is my function so far:
I call this function like so:
I don't use inline assembly often, so any help would be appreciated.
Here is what the result looks like so far:
The color is correctly printed but the text does not appear.
Here is my function so far:
Code: Select all
void __attribute__((noinline)) printa(const char* s, uint8_t x, uint8_t y, uint8_t color) {
__asm__ __volatile__ ("int $0x10" : : "a"(0x1301), "b"(color), "c"(strlen(s)), "d"((uint16_t)x << 8 | y), "bp"(s));
}
Code: Select all
printa("asdfasdfasdfasd", 5, 5, 0x14);
Here is what the result looks like so far: