inline assembly in c for VGA Video mode
Posted: Sun Apr 26, 2015 12:42 pm
Hi,
I wrote a program for enabling VGA video mode by
Problem is that , it is throwing error for
The command I used:
Why is this happening? My PC is 64 bit i5-3G.
I wrote a program for enabling VGA video mode by
Code: Select all
void enable_vgaVideo()
{
__asm__("mov %ah,0x0;");
__asm__("mov %al, 0x13;");
__asm__("int 0x10;");
__asm__("ret;");
}
Problem is that , it is throwing error for
Code: Select all
__asm__("int 0x10;");
Code: Select all
/tmp/cczSu1bD.s: Assembler messages:
/tmp/cczSu1bD.s:49: Error: operand size mismatch for `int'
/tmp/cczSu1bD.s:86: Error: operand size mismatch for `int'
The command I used:
Code: Select all
i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra