diff --git a/kaneton/machine/architecture/ia32/educational/handler.c b/kaneton/machine/architecture/ia32/educational/handler.c index bbb53d8..2ba0913 100644 --- a/kaneton/machine/architecture/ia32/educational/handler.c +++ b/kaneton/machine/architecture/ia32/educational/handler.c @@ -31,15 +31,8 @@ void handler(int num) event_get(num, &irs); irs->handler.routine(irs->id, irs->data); } -} -void handler_err(int err, int num) -{ - o_event *irs; - - if (event_exist(num) == ERROR_TRUE) - { - event_get(num, &irs); - irs->handler.routine(irs->id, irs->data); - } + if (num >= ARCHITECTURE_IDT_IRQ_BASE && + num < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE) + platform_pic_acknowledge(num - ARCHITECTURE_IDT_IRQ_BASE); } diff --git a/kaneton/machine/architecture/ia32/educational/idt_wrappers.S b/kaneton/machine/architecture/ia32/educational/idt_wrappers.S index 13dd15d..35b1d40 100644 --- a/kaneton/machine/architecture/ia32/educational/idt_wrappers.S +++ b/kaneton/machine/architecture/ia32/educational/idt_wrappers.S @@ -10,6 +10,12 @@ idt_wrapper_0: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $0 call handler pop %ebx @@ -31,6 +37,12 @@ idt_wrapper_1: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $1 call handler pop %ebx @@ -52,6 +64,12 @@ idt_wrapper_2: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $2 call handler pop %ebx @@ -73,6 +91,12 @@ idt_wrapper_3: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $3 call handler pop %ebx @@ -94,6 +118,12 @@ idt_wrapper_4: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $4 call handler pop %ebx @@ -115,6 +145,12 @@ idt_wrapper_5: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $5 call handler pop %ebx @@ -136,6 +172,12 @@ idt_wrapper_6: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $6 call handler pop %ebx @@ -157,6 +199,12 @@ idt_wrapper_7: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $7 call handler pop %ebx @@ -178,10 +226,14 @@ idt_wrapper_8: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $8 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -189,6 +241,7 @@ idt_wrapper_8: pop %es pop %ds popa + add $4, %esp sti iret @@ -201,6 +254,12 @@ idt_wrapper_9: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $9 call handler pop %ebx @@ -222,10 +281,14 @@ idt_wrapper_10: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $10 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -233,6 +296,7 @@ idt_wrapper_10: pop %es pop %ds popa + add $4, %esp sti iret @@ -245,10 +309,14 @@ idt_wrapper_11: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $11 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -256,6 +324,7 @@ idt_wrapper_11: pop %es pop %ds popa + add $4, %esp sti iret @@ -268,10 +337,14 @@ idt_wrapper_12: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $12 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -279,6 +352,7 @@ idt_wrapper_12: pop %es pop %ds popa + add $4, %esp sti iret @@ -291,10 +365,14 @@ idt_wrapper_13: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $13 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -302,6 +380,7 @@ idt_wrapper_13: pop %es pop %ds popa + add $4, %esp sti iret @@ -314,10 +393,14 @@ idt_wrapper_14: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $14 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -325,6 +408,7 @@ idt_wrapper_14: pop %es pop %ds popa + add $4, %esp sti iret @@ -337,6 +421,12 @@ idt_wrapper_15: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $15 call handler pop %ebx @@ -358,6 +448,12 @@ idt_wrapper_16: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $16 call handler pop %ebx @@ -379,10 +475,14 @@ idt_wrapper_17: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $17 - push $0 - call handler_err - pop %ebx + call handler pop %ebx pop %ss pop %gs @@ -390,6 +490,7 @@ idt_wrapper_17: pop %es pop %ds popa + add $4, %esp sti iret @@ -402,6 +503,12 @@ idt_wrapper_18: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $18 call handler pop %ebx @@ -423,6 +530,12 @@ idt_wrapper_19: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $19 call handler pop %ebx @@ -444,6 +557,12 @@ idt_wrapper_20: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $20 call handler pop %ebx @@ -465,6 +584,12 @@ idt_wrapper_21: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $21 call handler pop %ebx @@ -486,6 +611,12 @@ idt_wrapper_22: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $22 call handler pop %ebx @@ -507,6 +638,12 @@ idt_wrapper_23: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $23 call handler pop %ebx @@ -528,6 +665,12 @@ idt_wrapper_24: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $24 call handler pop %ebx @@ -549,6 +692,12 @@ idt_wrapper_25: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $25 call handler pop %ebx @@ -570,6 +719,12 @@ idt_wrapper_26: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $26 call handler pop %ebx @@ -591,6 +746,12 @@ idt_wrapper_27: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $27 call handler pop %ebx @@ -612,6 +773,12 @@ idt_wrapper_28: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $28 call handler pop %ebx @@ -633,6 +800,12 @@ idt_wrapper_29: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $29 call handler pop %ebx @@ -654,6 +827,12 @@ idt_wrapper_30: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $30 call handler pop %ebx @@ -675,6 +854,12 @@ idt_wrapper_31: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $31 call handler pop %ebx @@ -696,6 +881,12 @@ idt_wrapper_32: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $32 call handler pop %ebx @@ -717,6 +908,12 @@ idt_wrapper_33: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $33 call handler pop %ebx @@ -738,6 +935,12 @@ idt_wrapper_34: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $34 call handler pop %ebx @@ -759,6 +962,12 @@ idt_wrapper_35: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $35 call handler pop %ebx @@ -780,6 +989,12 @@ idt_wrapper_36: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $36 call handler pop %ebx @@ -801,6 +1016,12 @@ idt_wrapper_37: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $37 call handler pop %ebx @@ -822,6 +1043,12 @@ idt_wrapper_38: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $38 call handler pop %ebx @@ -843,6 +1070,12 @@ idt_wrapper_39: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $39 call handler pop %ebx @@ -864,6 +1097,12 @@ idt_wrapper_40: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $40 call handler pop %ebx @@ -885,6 +1124,12 @@ idt_wrapper_41: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $41 call handler pop %ebx @@ -906,6 +1151,12 @@ idt_wrapper_42: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $42 call handler pop %ebx @@ -927,6 +1178,12 @@ idt_wrapper_43: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $43 call handler pop %ebx @@ -948,6 +1205,12 @@ idt_wrapper_44: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $44 call handler pop %ebx @@ -969,6 +1232,12 @@ idt_wrapper_45: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $45 call handler pop %ebx @@ -990,6 +1259,12 @@ idt_wrapper_46: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $46 call handler pop %ebx @@ -1011,6 +1286,12 @@ idt_wrapper_47: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $47 call handler pop %ebx @@ -1032,6 +1313,12 @@ idt_wrapper_48: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $48 call handler pop %ebx @@ -1053,6 +1340,12 @@ idt_wrapper_49: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $49 call handler pop %ebx @@ -1074,6 +1367,12 @@ idt_wrapper_50: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $50 call handler pop %ebx @@ -1095,6 +1394,12 @@ idt_wrapper_51: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $51 call handler pop %ebx @@ -1116,6 +1421,12 @@ idt_wrapper_52: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $52 call handler pop %ebx @@ -1137,6 +1448,12 @@ idt_wrapper_53: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $53 call handler pop %ebx @@ -1158,6 +1475,12 @@ idt_wrapper_54: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $54 call handler pop %ebx @@ -1179,6 +1502,12 @@ idt_wrapper_55: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $55 call handler pop %ebx @@ -1200,6 +1529,12 @@ idt_wrapper_56: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $56 call handler pop %ebx @@ -1221,6 +1556,12 @@ idt_wrapper_57: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $57 call handler pop %ebx @@ -1242,6 +1583,12 @@ idt_wrapper_58: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $58 call handler pop %ebx @@ -1263,6 +1610,12 @@ idt_wrapper_59: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $59 call handler pop %ebx @@ -1284,6 +1637,12 @@ idt_wrapper_60: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $60 call handler pop %ebx @@ -1305,6 +1664,12 @@ idt_wrapper_61: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $61 call handler pop %ebx @@ -1326,6 +1691,12 @@ idt_wrapper_62: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $62 call handler pop %ebx @@ -1347,6 +1718,12 @@ idt_wrapper_63: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $63 call handler pop %ebx @@ -1368,6 +1745,12 @@ idt_wrapper_64: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $64 call handler pop %ebx @@ -1389,6 +1772,12 @@ idt_wrapper_65: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $65 call handler pop %ebx @@ -1410,6 +1799,12 @@ idt_wrapper_66: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $66 call handler pop %ebx @@ -1431,6 +1826,12 @@ idt_wrapper_67: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $67 call handler pop %ebx @@ -1452,6 +1853,12 @@ idt_wrapper_68: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $68 call handler pop %ebx @@ -1473,6 +1880,12 @@ idt_wrapper_69: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $69 call handler pop %ebx @@ -1494,6 +1907,12 @@ idt_wrapper_70: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $70 call handler pop %ebx @@ -1515,6 +1934,12 @@ idt_wrapper_71: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $71 call handler pop %ebx @@ -1536,6 +1961,12 @@ idt_wrapper_72: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $72 call handler pop %ebx @@ -1557,6 +1988,12 @@ idt_wrapper_73: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $73 call handler pop %ebx @@ -1578,6 +2015,12 @@ idt_wrapper_74: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $74 call handler pop %ebx @@ -1599,6 +2042,12 @@ idt_wrapper_75: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $75 call handler pop %ebx @@ -1620,6 +2069,12 @@ idt_wrapper_76: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $76 call handler pop %ebx @@ -1641,6 +2096,12 @@ idt_wrapper_77: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $77 call handler pop %ebx @@ -1662,6 +2123,12 @@ idt_wrapper_78: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $78 call handler pop %ebx @@ -1683,6 +2150,12 @@ idt_wrapper_79: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $79 call handler pop %ebx @@ -1704,6 +2177,12 @@ idt_wrapper_80: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $80 call handler pop %ebx @@ -1725,6 +2204,12 @@ idt_wrapper_81: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $81 call handler pop %ebx @@ -1746,6 +2231,12 @@ idt_wrapper_82: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $82 call handler pop %ebx @@ -1767,6 +2258,12 @@ idt_wrapper_83: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $83 call handler pop %ebx @@ -1788,6 +2285,12 @@ idt_wrapper_84: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $84 call handler pop %ebx @@ -1809,6 +2312,12 @@ idt_wrapper_85: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $85 call handler pop %ebx @@ -1830,6 +2339,12 @@ idt_wrapper_86: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $86 call handler pop %ebx @@ -1851,6 +2366,12 @@ idt_wrapper_87: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $87 call handler pop %ebx @@ -1872,6 +2393,12 @@ idt_wrapper_88: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $88 call handler pop %ebx @@ -1893,6 +2420,12 @@ idt_wrapper_89: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $89 call handler pop %ebx @@ -1914,6 +2447,12 @@ idt_wrapper_90: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $90 call handler pop %ebx @@ -1935,6 +2474,12 @@ idt_wrapper_91: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $91 call handler pop %ebx @@ -1956,6 +2501,12 @@ idt_wrapper_92: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $92 call handler pop %ebx @@ -1977,6 +2528,12 @@ idt_wrapper_93: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $93 call handler pop %ebx @@ -1998,6 +2555,12 @@ idt_wrapper_94: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $94 call handler pop %ebx @@ -2019,6 +2582,12 @@ idt_wrapper_95: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $95 call handler pop %ebx @@ -2040,6 +2609,12 @@ idt_wrapper_96: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $96 call handler pop %ebx @@ -2061,6 +2636,12 @@ idt_wrapper_97: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $97 call handler pop %ebx @@ -2082,6 +2663,12 @@ idt_wrapper_98: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $98 call handler pop %ebx @@ -2103,6 +2690,12 @@ idt_wrapper_99: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $99 call handler pop %ebx @@ -2124,6 +2717,12 @@ idt_wrapper_100: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $100 call handler pop %ebx @@ -2145,6 +2744,12 @@ idt_wrapper_101: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $101 call handler pop %ebx @@ -2166,6 +2771,12 @@ idt_wrapper_102: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $102 call handler pop %ebx @@ -2187,6 +2798,12 @@ idt_wrapper_103: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $103 call handler pop %ebx @@ -2208,6 +2825,12 @@ idt_wrapper_104: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $104 call handler pop %ebx @@ -2229,6 +2852,12 @@ idt_wrapper_105: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $105 call handler pop %ebx @@ -2250,6 +2879,12 @@ idt_wrapper_106: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $106 call handler pop %ebx @@ -2271,6 +2906,12 @@ idt_wrapper_107: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $107 call handler pop %ebx @@ -2292,6 +2933,12 @@ idt_wrapper_108: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $108 call handler pop %ebx @@ -2313,6 +2960,12 @@ idt_wrapper_109: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $109 call handler pop %ebx @@ -2334,6 +2987,12 @@ idt_wrapper_110: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $110 call handler pop %ebx @@ -2355,6 +3014,12 @@ idt_wrapper_111: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $111 call handler pop %ebx @@ -2376,6 +3041,12 @@ idt_wrapper_112: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $112 call handler pop %ebx @@ -2397,6 +3068,12 @@ idt_wrapper_113: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $113 call handler pop %ebx @@ -2418,6 +3095,12 @@ idt_wrapper_114: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $114 call handler pop %ebx @@ -2439,6 +3122,12 @@ idt_wrapper_115: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $115 call handler pop %ebx @@ -2460,6 +3149,12 @@ idt_wrapper_116: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $116 call handler pop %ebx @@ -2481,6 +3176,12 @@ idt_wrapper_117: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $117 call handler pop %ebx @@ -2502,6 +3203,12 @@ idt_wrapper_118: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $118 call handler pop %ebx @@ -2523,6 +3230,12 @@ idt_wrapper_119: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $119 call handler pop %ebx @@ -2544,6 +3257,12 @@ idt_wrapper_120: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $120 call handler pop %ebx @@ -2565,6 +3284,12 @@ idt_wrapper_121: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $121 call handler pop %ebx @@ -2586,6 +3311,12 @@ idt_wrapper_122: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $122 call handler pop %ebx @@ -2607,6 +3338,12 @@ idt_wrapper_123: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $123 call handler pop %ebx @@ -2628,6 +3365,12 @@ idt_wrapper_124: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $124 call handler pop %ebx @@ -2649,6 +3392,12 @@ idt_wrapper_125: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $125 call handler pop %ebx @@ -2670,6 +3419,12 @@ idt_wrapper_126: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $126 call handler pop %ebx @@ -2691,6 +3446,12 @@ idt_wrapper_127: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $127 call handler pop %ebx @@ -2712,6 +3473,12 @@ idt_wrapper_128: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $128 call handler pop %ebx @@ -2733,6 +3500,12 @@ idt_wrapper_129: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $129 call handler pop %ebx @@ -2754,6 +3527,12 @@ idt_wrapper_130: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $130 call handler pop %ebx @@ -2775,6 +3554,12 @@ idt_wrapper_131: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $131 call handler pop %ebx @@ -2796,6 +3581,12 @@ idt_wrapper_132: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $132 call handler pop %ebx @@ -2817,6 +3608,12 @@ idt_wrapper_133: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $133 call handler pop %ebx @@ -2838,6 +3635,12 @@ idt_wrapper_134: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $134 call handler pop %ebx @@ -2859,6 +3662,12 @@ idt_wrapper_135: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $135 call handler pop %ebx @@ -2880,6 +3689,12 @@ idt_wrapper_136: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $136 call handler pop %ebx @@ -2901,6 +3716,12 @@ idt_wrapper_137: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $137 call handler pop %ebx @@ -2922,6 +3743,12 @@ idt_wrapper_138: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $138 call handler pop %ebx @@ -2943,6 +3770,12 @@ idt_wrapper_139: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $139 call handler pop %ebx @@ -2964,6 +3797,12 @@ idt_wrapper_140: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $140 call handler pop %ebx @@ -2985,6 +3824,12 @@ idt_wrapper_141: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $141 call handler pop %ebx @@ -3006,6 +3851,12 @@ idt_wrapper_142: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $142 call handler pop %ebx @@ -3027,6 +3878,12 @@ idt_wrapper_143: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $143 call handler pop %ebx @@ -3048,6 +3905,12 @@ idt_wrapper_144: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $144 call handler pop %ebx @@ -3069,6 +3932,12 @@ idt_wrapper_145: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $145 call handler pop %ebx @@ -3090,6 +3959,12 @@ idt_wrapper_146: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $146 call handler pop %ebx @@ -3111,6 +3986,12 @@ idt_wrapper_147: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $147 call handler pop %ebx @@ -3132,6 +4013,12 @@ idt_wrapper_148: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $148 call handler pop %ebx @@ -3153,6 +4040,12 @@ idt_wrapper_149: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $149 call handler pop %ebx @@ -3174,6 +4067,12 @@ idt_wrapper_150: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $150 call handler pop %ebx @@ -3195,6 +4094,12 @@ idt_wrapper_151: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $151 call handler pop %ebx @@ -3216,6 +4121,12 @@ idt_wrapper_152: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $152 call handler pop %ebx @@ -3237,6 +4148,12 @@ idt_wrapper_153: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $153 call handler pop %ebx @@ -3258,6 +4175,12 @@ idt_wrapper_154: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $154 call handler pop %ebx @@ -3279,6 +4202,12 @@ idt_wrapper_155: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $155 call handler pop %ebx @@ -3300,6 +4229,12 @@ idt_wrapper_156: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $156 call handler pop %ebx @@ -3321,6 +4256,12 @@ idt_wrapper_157: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $157 call handler pop %ebx @@ -3342,6 +4283,12 @@ idt_wrapper_158: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $158 call handler pop %ebx @@ -3363,6 +4310,12 @@ idt_wrapper_159: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $159 call handler pop %ebx @@ -3384,6 +4337,12 @@ idt_wrapper_160: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $160 call handler pop %ebx @@ -3405,6 +4364,12 @@ idt_wrapper_161: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $161 call handler pop %ebx @@ -3426,6 +4391,12 @@ idt_wrapper_162: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $162 call handler pop %ebx @@ -3447,6 +4418,12 @@ idt_wrapper_163: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $163 call handler pop %ebx @@ -3468,6 +4445,12 @@ idt_wrapper_164: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $164 call handler pop %ebx @@ -3489,6 +4472,12 @@ idt_wrapper_165: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $165 call handler pop %ebx @@ -3510,6 +4499,12 @@ idt_wrapper_166: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $166 call handler pop %ebx @@ -3531,6 +4526,12 @@ idt_wrapper_167: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $167 call handler pop %ebx @@ -3552,6 +4553,12 @@ idt_wrapper_168: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $168 call handler pop %ebx @@ -3573,6 +4580,12 @@ idt_wrapper_169: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $169 call handler pop %ebx @@ -3594,6 +4607,12 @@ idt_wrapper_170: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $170 call handler pop %ebx @@ -3615,6 +4634,12 @@ idt_wrapper_171: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $171 call handler pop %ebx @@ -3636,6 +4661,12 @@ idt_wrapper_172: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $172 call handler pop %ebx @@ -3657,6 +4688,12 @@ idt_wrapper_173: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $173 call handler pop %ebx @@ -3678,6 +4715,12 @@ idt_wrapper_174: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $174 call handler pop %ebx @@ -3699,6 +4742,12 @@ idt_wrapper_175: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $175 call handler pop %ebx @@ -3720,6 +4769,12 @@ idt_wrapper_176: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $176 call handler pop %ebx @@ -3741,6 +4796,12 @@ idt_wrapper_177: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $177 call handler pop %ebx @@ -3762,6 +4823,12 @@ idt_wrapper_178: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $178 call handler pop %ebx @@ -3783,6 +4850,12 @@ idt_wrapper_179: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $179 call handler pop %ebx @@ -3804,6 +4877,12 @@ idt_wrapper_180: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $180 call handler pop %ebx @@ -3825,6 +4904,12 @@ idt_wrapper_181: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $181 call handler pop %ebx @@ -3846,6 +4931,12 @@ idt_wrapper_182: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $182 call handler pop %ebx @@ -3867,6 +4958,12 @@ idt_wrapper_183: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $183 call handler pop %ebx @@ -3888,6 +4985,12 @@ idt_wrapper_184: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $184 call handler pop %ebx @@ -3909,6 +5012,12 @@ idt_wrapper_185: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $185 call handler pop %ebx @@ -3930,6 +5039,12 @@ idt_wrapper_186: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $186 call handler pop %ebx @@ -3951,6 +5066,12 @@ idt_wrapper_187: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $187 call handler pop %ebx @@ -3972,6 +5093,12 @@ idt_wrapper_188: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $188 call handler pop %ebx @@ -3993,6 +5120,12 @@ idt_wrapper_189: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $189 call handler pop %ebx @@ -4014,6 +5147,12 @@ idt_wrapper_190: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $190 call handler pop %ebx @@ -4035,6 +5174,12 @@ idt_wrapper_191: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $191 call handler pop %ebx @@ -4056,6 +5201,12 @@ idt_wrapper_192: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $192 call handler pop %ebx @@ -4077,6 +5228,12 @@ idt_wrapper_193: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $193 call handler pop %ebx @@ -4098,6 +5255,12 @@ idt_wrapper_194: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $194 call handler pop %ebx @@ -4119,6 +5282,12 @@ idt_wrapper_195: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $195 call handler pop %ebx @@ -4140,6 +5309,12 @@ idt_wrapper_196: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $196 call handler pop %ebx @@ -4161,6 +5336,12 @@ idt_wrapper_197: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $197 call handler pop %ebx @@ -4182,6 +5363,12 @@ idt_wrapper_198: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $198 call handler pop %ebx @@ -4203,6 +5390,12 @@ idt_wrapper_199: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $199 call handler pop %ebx @@ -4224,6 +5417,12 @@ idt_wrapper_200: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $200 call handler pop %ebx @@ -4245,6 +5444,12 @@ idt_wrapper_201: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $201 call handler pop %ebx @@ -4266,6 +5471,12 @@ idt_wrapper_202: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $202 call handler pop %ebx @@ -4287,6 +5498,12 @@ idt_wrapper_203: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $203 call handler pop %ebx @@ -4308,6 +5525,12 @@ idt_wrapper_204: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $204 call handler pop %ebx @@ -4329,6 +5552,12 @@ idt_wrapper_205: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $205 call handler pop %ebx @@ -4350,6 +5579,12 @@ idt_wrapper_206: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $206 call handler pop %ebx @@ -4371,6 +5606,12 @@ idt_wrapper_207: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $207 call handler pop %ebx @@ -4392,6 +5633,12 @@ idt_wrapper_208: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $208 call handler pop %ebx @@ -4413,6 +5660,12 @@ idt_wrapper_209: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $209 call handler pop %ebx @@ -4434,6 +5687,12 @@ idt_wrapper_210: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $210 call handler pop %ebx @@ -4455,6 +5714,12 @@ idt_wrapper_211: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $211 call handler pop %ebx @@ -4476,6 +5741,12 @@ idt_wrapper_212: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $212 call handler pop %ebx @@ -4497,6 +5768,12 @@ idt_wrapper_213: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $213 call handler pop %ebx @@ -4518,6 +5795,12 @@ idt_wrapper_214: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $214 call handler pop %ebx @@ -4539,6 +5822,12 @@ idt_wrapper_215: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $215 call handler pop %ebx @@ -4560,6 +5849,12 @@ idt_wrapper_216: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $216 call handler pop %ebx @@ -4581,6 +5876,12 @@ idt_wrapper_217: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $217 call handler pop %ebx @@ -4602,6 +5903,12 @@ idt_wrapper_218: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $218 call handler pop %ebx @@ -4623,6 +5930,12 @@ idt_wrapper_219: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $219 call handler pop %ebx @@ -4644,6 +5957,12 @@ idt_wrapper_220: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $220 call handler pop %ebx @@ -4665,6 +5984,12 @@ idt_wrapper_221: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $221 call handler pop %ebx @@ -4686,6 +6011,12 @@ idt_wrapper_222: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $222 call handler pop %ebx @@ -4707,6 +6038,12 @@ idt_wrapper_223: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $223 call handler pop %ebx @@ -4728,6 +6065,12 @@ idt_wrapper_224: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $224 call handler pop %ebx @@ -4749,6 +6092,12 @@ idt_wrapper_225: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $225 call handler pop %ebx @@ -4770,6 +6119,12 @@ idt_wrapper_226: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $226 call handler pop %ebx @@ -4791,6 +6146,12 @@ idt_wrapper_227: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $227 call handler pop %ebx @@ -4812,6 +6173,12 @@ idt_wrapper_228: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $228 call handler pop %ebx @@ -4833,6 +6200,12 @@ idt_wrapper_229: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $229 call handler pop %ebx @@ -4854,6 +6227,12 @@ idt_wrapper_230: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $230 call handler pop %ebx @@ -4875,6 +6254,12 @@ idt_wrapper_231: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $231 call handler pop %ebx @@ -4896,6 +6281,12 @@ idt_wrapper_232: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $232 call handler pop %ebx @@ -4917,6 +6308,12 @@ idt_wrapper_233: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $233 call handler pop %ebx @@ -4938,6 +6335,12 @@ idt_wrapper_234: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $234 call handler pop %ebx @@ -4959,6 +6362,12 @@ idt_wrapper_235: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $235 call handler pop %ebx @@ -4980,6 +6389,12 @@ idt_wrapper_236: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $236 call handler pop %ebx @@ -5001,6 +6416,12 @@ idt_wrapper_237: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $237 call handler pop %ebx @@ -5022,6 +6443,12 @@ idt_wrapper_238: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $238 call handler pop %ebx @@ -5043,6 +6470,12 @@ idt_wrapper_239: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $239 call handler pop %ebx @@ -5064,6 +6497,12 @@ idt_wrapper_240: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $240 call handler pop %ebx @@ -5085,6 +6524,12 @@ idt_wrapper_241: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $241 call handler pop %ebx @@ -5106,6 +6551,12 @@ idt_wrapper_242: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $242 call handler pop %ebx @@ -5127,6 +6578,12 @@ idt_wrapper_243: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $243 call handler pop %ebx @@ -5148,6 +6605,12 @@ idt_wrapper_244: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $244 call handler pop %ebx @@ -5169,6 +6632,12 @@ idt_wrapper_245: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $245 call handler pop %ebx @@ -5190,6 +6659,12 @@ idt_wrapper_246: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $246 call handler pop %ebx @@ -5211,6 +6686,12 @@ idt_wrapper_247: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $247 call handler pop %ebx @@ -5232,6 +6713,12 @@ idt_wrapper_248: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $248 call handler pop %ebx @@ -5253,6 +6740,12 @@ idt_wrapper_249: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $249 call handler pop %ebx @@ -5274,6 +6767,12 @@ idt_wrapper_250: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $250 call handler pop %ebx @@ -5295,6 +6794,12 @@ idt_wrapper_251: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $251 call handler pop %ebx @@ -5316,6 +6821,12 @@ idt_wrapper_252: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $252 call handler pop %ebx @@ -5337,6 +6848,12 @@ idt_wrapper_253: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $253 call handler pop %ebx @@ -5358,6 +6875,12 @@ idt_wrapper_254: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $254 call handler pop %ebx @@ -5379,6 +6902,12 @@ idt_wrapper_255: push %fs push %gs push %ss + mov $0x10, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss push $255 call handler pop %ebx diff --git a/kaneton/machine/architecture/ia32/educational/idt_wrappers.S.sh b/kaneton/machine/architecture/ia32/educational/idt_wrappers.S.sh index 9b1df77..51c1182 100755 --- a/kaneton/machine/architecture/ia32/educational/idt_wrappers.S.sh +++ b/kaneton/machine/architecture/ia32/educational/idt_wrappers.S.sh @@ -22,16 +22,16 @@ do echo " push %fs" >> $FILEOUT echo " push %gs" >> $FILEOUT echo " push %ss" >> $FILEOUT - echo " push \$$i" >> $FILEOUT - if [ $i -eq 8 ] || [ $i -eq 17 ] || ( [ $i -ge 10 ] && [ $i -lt 15 ]) - then - echo " push \$0" >> $FILEOUT - echo " call handler_err" >> $FILEOUT - echo " pop %ebx" >> $FILEOUT - else - echo " call handler" >> $FILEOUT - fi + echo " mov \$0x10, %ax" >> $FILEOUT + echo " mov %ax, %ds" >> $FILEOUT + echo " mov %ax, %es" >> $FILEOUT + echo " mov %ax, %fs" >> $FILEOUT + echo " mov %ax, %gs" >> $FILEOUT + echo " mov %ax, %ss" >> $FILEOUT + + echo " push \$$i" >> $FILEOUT + echo " call handler" >> $FILEOUT echo " pop %ebx" >> $FILEOUT echo " pop %ss" >> $FILEOUT echo " pop %gs" >> $FILEOUT @@ -39,6 +39,10 @@ do echo " pop %es" >> $FILEOUT echo " pop %ds" >> $FILEOUT echo " popa" >> $FILEOUT + if [ $i -eq 8 ] || [ $i -eq 17 ] || ( [ $i -ge 10 ] && [ $i -lt 15 ]) + then + echo " add \$4, %esp" >> $FILEOUT + fi echo " sti" >> $FILEOUT echo " iret" >> $FILEOUT echo "" >> $FILEOUT diff --git a/kaneton/machine/architecture/ia32/educational/include/handler.h b/kaneton/machine/architecture/ia32/educational/include/handler.h index c694a25..1ddf6dd 100644 --- a/kaneton/machine/architecture/ia32/educational/include/handler.h +++ b/kaneton/machine/architecture/ia32/educational/include/handler.h @@ -55,8 +55,6 @@ void handler(int num); -void handler_err(int err, int num); - /* * eop diff --git a/kaneton/machine/glue/ibm-pc.ia32/educational/event.c b/kaneton/machine/glue/ibm-pc.ia32/educational/event.c index 4022256..a365727 100644 --- a/kaneton/machine/glue/ibm-pc.ia32/educational/event.c +++ b/kaneton/machine/glue/ibm-pc.ia32/educational/event.c @@ -39,8 +39,8 @@ d_event glue_event_dispatch = NULL, glue_event_enable, glue_event_disable, - NULL, - NULL, + glue_event_reserve, + glue_event_release, glue_event_initialize, NULL }; @@ -65,6 +65,28 @@ t_error glue_event_disable(void) MACHINE_LEAVE(); } +t_error glue_event_reserve(i_event id, + t_type type, + u_event_handler h, + t_data data) +{ + if (id >= ARCHITECTURE_IDT_IRQ_BASE && + id < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE) + platform_pic_enable(id - ARCHITECTURE_IDT_IRQ_BASE); + + + MACHINE_LEAVE(); +} + +t_error glue_event_release(i_event id) +{ + if (id >= ARCHITECTURE_IDT_IRQ_BASE && + id < ARCHITECTURE_IDT_IRQ_SIZE + ARCHITECTURE_IDT_IRQ_BASE) + platform_pic_disable(id - ARCHITECTURE_IDT_IRQ_BASE); + + MACHINE_LEAVE(); +} + t_error glue_event_initialize(void) { t_uint16 i; diff --git a/kaneton/machine/glue/ibm-pc.ia32/educational/include/event.h b/kaneton/machine/glue/ibm-pc.ia32/educational/include/event.h index bda8938..f41583d 100644 --- a/kaneton/machine/glue/ibm-pc.ia32/educational/include/event.h +++ b/kaneton/machine/glue/ibm-pc.ia32/educational/include/event.h @@ -79,6 +79,13 @@ t_error glue_event_enable(void); t_error glue_event_disable(void); +t_error glue_event_reserve(i_event id, + t_type type, + u_event_handler h, + t_data data); + +t_error glue_event_release(i_event id); + t_error glue_event_initialize(void);