I am trying to implement a boot-loader for x86. The initial version just uses the BIOS interrupt call to print "Hello" on the screen. I am using QEmu along with GDB for going through my code sequentially.
Here is a snippet of the code
Code: Select all
mov ah, 0x0e
mov al, 'H'
int 0x10
mov al, 'e'
The boot-loader starts from address 0x07c00.
From what I understood, the BIOS sets up the Interrupt Descriptor table from address 0x0 till 0x3ff (1024 bytes). The IDT has 256 32bit entries, each entry specifies 16bit segment and 16bit offset which is the address of the Interrupt service routine.
Thus , when I execute
I should jump to the address pointed by the 17th entry in the IDT. When I checked the contents of the memory 0x10, it contained the following data " 0xf000ff53", so the program should jump to the location 0xfff53 but I found that it instead jumps to 0xc4c71 after executing the
instruction
Why is this happening??