IDT problems
Posted: Sat Dec 04, 2004 5:17 pm
Hi, I recently started working on the IDT and interrupts in my OS, but have been having some problems. I cannot seem to figure out why my code isn't working. Whenever I boot it it just restarts.
Here is the code:
Thanks for any help,
jka913
Here is the code:
Code: Select all
start:
mov eax,isr49
mov WORD [idt+0x49*8],ax??????;move low address
mov WORD [idt+0x49*8+2],SELECTOR???;move selector
mov WORD [idt+0x49*8+4],0x8E00
shr eax,16?????????;move high address into ax
mov WORD [idt+0x49*8+6],ax???;move high address
lidt [idt_pointer] ;load idt
int 0x49
jmp $
SELECTOR dw 0x10
idt:
resb 0x50*8 ;descriptor = 8 bytes, ints 0-49
end_idt:
idt_pointer:
dw end_idt - idt - 1
dd idt
isr49:
pusha???;\
push ds???; |
push es???; |push registers
push fs???; |
push gs???;/
mov ebx,0xB8000 ;0xB8000 = video memory
mov al,0x44??? ;0x44 = 'D'
mov BYTE [ebx],al ;print 'D'
pop gs??????;\
pop fs??????; |
pop es??????; |pop registers
pop ds??????; |
popa??????;/
iret
jka913