Page 1 of 1

need help for IDT using masm

Posted: Sat Dec 09, 2006 9:36 am
by xavmoss
I want to ask ask how to declare IDT in protected mode in masm syntax.
And how to bound the code to interrupt that I have made, exception, and PIC. Thanks
what code can I use

Code: Select all


IDTDESC struc
  offset0_15	dw	?		; low word of handler offset
  selector0_15	dw	?		; segment selector
  zero_byte	db	0		; unused in this descriptor format
  access1	db	?		; access right
  offset16_31	dw	?		; high word of handler offset
IDTDESC ends


interrupt0	interrupt_descriptor	<int0,8,0,8eh,0>

or use this?

Code: Select all

IDT     	dq  0

interrupt0	dw int0h
		dw 8
		dw 0
		dw 8fh
		dw 0
And how to change the base address for INT? Is different than GDT or not?