You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

int.asm 2.2 KiB

15 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. extern idt_default_int,idt_int0, idt_int1, idt_int2, idt_int3, idt_int4, idt_int5, idt_int6, idt_int7, idt_int8, idt_int9, idt_int10, idt_int11, idt_int12, idt_int13, idt_int14, idt_int15, idt_int16, idt_int17, idt_int18, idt_irq0, kbd_int, idt_irq2, idt_irq3, idt_irq4, idt_irq5, idt_irq6, idt_irq7, idt_irq8
  2. global default_int, k_int0, k_int1, k_int2, k_int3, k_int4, k_int5, k_int6, k_int7, k_int8, k_int9, k_int10, k_int11, k_int12, k_int13, k_int14, k_int15, k_int16, k_int17, k_int18, k_irq0, k_irq1, k_irq2, k_irq3, k_irq4, k_irq5, k_irq6, k_irq7, k_irq8
  3. default_int:
  4. call idt_default_int ; Call C function
  5. mov al,0x20 ; End Of Interruption
  6. out 0x20,al ; Send EOI to PIC
  7. iret
  8. k_int0:
  9. call idt_int0
  10. mov al,0x20
  11. out 0x20,al
  12. iret
  13. k_int1:
  14. call idt_int1
  15. mov al,0x20
  16. out 0x20,al
  17. iret
  18. k_int2:
  19. call idt_int2
  20. mov al,0x20
  21. out 0x20,al
  22. iret
  23. k_int3:
  24. call idt_int3
  25. mov al,0x20
  26. out 0x20,al
  27. iret
  28. k_int4:
  29. call idt_int4
  30. mov al,0x20
  31. out 0x20,al
  32. iret
  33. k_int5:
  34. call idt_int5
  35. mov al,0x20
  36. out 0x20,al
  37. iret
  38. k_int6:
  39. call idt_int6
  40. mov al,0x20
  41. out 0x20,al
  42. iret
  43. k_int7:
  44. call idt_int7
  45. mov al,0x20
  46. out 0x20,al
  47. iret
  48. k_int8:
  49. call idt_int8
  50. mov al,0x20
  51. out 0x20,al
  52. iret
  53. k_int9:
  54. call idt_int9
  55. mov al,0x20
  56. out 0x20,al
  57. iret
  58. k_int10:
  59. call idt_int10
  60. mov al,0x20
  61. out 0x20,al
  62. iret
  63. k_int11:
  64. call idt_int11
  65. mov al,0x20
  66. out 0x20,al
  67. iret
  68. k_int12:
  69. call idt_int12
  70. mov al,0x20
  71. out 0x20,al
  72. iret
  73. k_int13:
  74. call idt_int13
  75. mov al,0x20
  76. out 0x20,al
  77. iret
  78. k_int14:
  79. call idt_int14
  80. mov al,0x20
  81. out 0x20,al
  82. iret
  83. k_int15:
  84. call idt_int15
  85. mov al,0x20
  86. out 0x20,al
  87. iret
  88. k_int16:
  89. call idt_int16
  90. mov al,0x20
  91. out 0x20,al
  92. iret
  93. k_int17:
  94. call idt_int17
  95. mov al,0x20
  96. out 0x20,al
  97. iret
  98. k_int18:
  99. call idt_int18
  100. mov al,0x20
  101. out 0x20,al
  102. iret
  103. k_irq0:
  104. call idt_irq0
  105. mov al,0x20
  106. out 0x20,al
  107. iret
  108. k_irq1:
  109. call kbd_int
  110. mov al,0x20
  111. out 0x20,al
  112. iret
  113. k_irq2:
  114. call idt_irq2
  115. mov al,0x20
  116. out 0x20,al
  117. iret
  118. k_irq3:
  119. call idt_irq3
  120. mov al,0x20
  121. out 0x20,al
  122. iret
  123. k_irq4:
  124. call idt_irq4
  125. mov al,0x20
  126. out 0x20,al
  127. iret
  128. k_irq5:
  129. call idt_irq5
  130. mov al,0x20
  131. out 0x20,al
  132. iret
  133. k_irq6:
  134. call idt_irq6
  135. mov al,0x20
  136. out 0x20,al
  137. iret
  138. k_irq7:
  139. call idt_irq7
  140. mov al,0x20
  141. out 0x20,al
  142. iret
  143. k_irq8:
  144. call idt_irq8
  145. mov al,0x20
  146. out 0x20,al
  147. iret