But when the bochs(emulator that i'm using) executes the instruction: lidt idt_48; It go crazy. The next instructions do not correspond with the code.
For example, the next one of lidt is mov bp, 0x0133.
What can be wrong?
Code that I'm trying to execute:
Code: Select all
cli;
pushl %eax;
movl $0x011, %eax;
movl %eax,%cr0;
movl $0,%eax
movl %eax,%cr3;
popl %eax;
lgdt gdt_48;
ljmp $0x10,$jj;
jj:
mov $0x18,%ax;
mov %ax,%ds
mov %ax,%es
mov %ax,%fs
mov %ax,%gs
lidt idt_48;
pushl %eax;
movl $0, %eax;
movl %eax,%cr0;
popl %eax;
ljmp $0,$jumping;
jumping:
mov $0x0,%ax;
mov %ax,%ds
mov %ax,%es
mov %ax,%fs
mov %ax,%gs
mov $0x80b0,%ax
mov %ax,%sp;
sti;
movb $2, %ah;
movb $0x1,%al;
movb $1,%dh;
movb $0x80,%dl;
movb $1,%cl;
movb $1,%ch;
movw $0x7f00,%bx;
movw $0x0,%si;
movw %si,%es;
pushw %dx;
pushw %cx;
pushw %bx;
pushw %ax;
int $0x13;