GDT_SEG segment para public use16 'DATA' ;----------------------------------------------------------------------------- ; GDT -- Not all descriptors are used by this program, but will be needed by ; future demonstrations. ;----------------------------------------------------------------------------- GDT_386 label fword GDT_PTR Descriptor <> ;----------------------------------------------------------------------------- ; Code segment and code segment as data ;----------------------------------------------------------------------------- SEL_CPL0CS equ $-GDT_386 GDT_CPL0CS Descriptor <-1,,,9bh,0,> ; CS Descriptor ;----------------------------------------------------------------------------- ; Data segment and 4G data segment ;----------------------------------------------------------------------------- SEL_CPL0DS equ $-GDT_386 GDT_CPL0DS Descriptor <-1,,,93h,0,> ; DS Descriptor SEL_CPL0DS4G equ $-GDT_386 GDT_CPL0DS4G Descriptor <-1,,,093h,8fh,0>; DS Descriptor ;----------------------------------------------------------------------------- ; Stack segment and real mode stack segment ;----------------------------------------------------------------------------- SEL_RMSS equ $-GDT_386 GDT_RMSS Descriptor <-1,,,093h,0,> ; SS Descriptor SEL_CPL0SS equ $-GDT_386 GDT_CPL0SS Descriptor <-1,,,93h,40h,> ; SS Descriptor ;----------------------------------------------------------------------------- ; Code segment for USE32 interrupts and Data segment pointing to IDT ;----------------------------------------------------------------------------- SEL_IDTCS equ $-GDT_386 GDT_IDTCS Descriptor <-1,,,9bh,40h,> ; CS Descriptor SEL_IDTDS equ $-GDT_386 GDT_IDTDS Descriptor <-1,,,93h,00h,> ; CS Descriptor ;----------------------------------------------------------------------------- ; TSS entry, and Data segment pointing to TSS ;----------------------------------------------------------------------------- SEL_TSS386 equ $-GDT_386 GDT_TSS386 Descriptor SEL_TSSDS equ $-GDT_386 GDT_TSSDS Descriptor <-1,,,93h,0,> ; DS Descriptor GDT_Len equ ($-GDT_386) - 1 GDT_SEG ENDS IDT_SEG segment para public use16 'DATA' ;----------------------------------------------------------------------------- ; Interrupt descriptor table ;----------------------------------------------------------------------------- IDT_386 INT_Desc 256 dup (); INT00-INTFF IDT3_Len equ $-IDT_386 org 13 * 8 IDT0D INT_Desc ; INT0d IDT_SEG ENDS TSS_SEG segment para public use16 'DATA' ;----------------------------------------------------------------------------- ; TSS ;----------------------------------------------------------------------------- TSS_386 TSS_Struct <> IR_MAP db 20h dup (0) ; interrupt map IOP_MAP db (10000h / 8) dup (0) ; IO permission map TSS_Len equ ($-TSS_386) - 1 TSS_SEG ENDS DS4G segment at 0 ;----------------------------------------------------------------------------- ; Segment at 0 ;----------------------------------------------------------------------------- org 0ffh * 4 RMINT255 dd ? DS4G ENDS