Skip to content

Commit

Permalink
poking at the broken timer interrupt handler again
Browse files Browse the repository at this point in the history
  • Loading branch information
akkartik committed Jun 30, 2021
1 parent f988878 commit f25b8e6
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions boot.subx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ idt_start:
# https://wiki.osdev.org/index.php?title=Interrupts&oldid=25102#Default_PC_Interrupt_Vector_Assignment

# entry 8: https://wiki.osdev.org/Programmable_Interval_Timer
timer-interrupt-handler/imm16 # target[0:16]
null-interrupt-handler/imm16 # target[0:16]
8/imm16 # segment selector (gdt_code)
00 # unused
8e # 1/p 00/dpl 0 1110/type/32-bit-interrupt-gate
Expand Down Expand Up @@ -360,24 +360,6 @@ $null-interrupt-handler:epilogue:
fb/enable-interrupts
cf/return-from-interrupt

timer-interrupt-handler:
# prologue
# Don't disable interrupts; the timer has the highest priority anyway,
# and this interrupt triggers extremely frequently.
fa/disable-interrupts
60/push-all-registers
9c/push-flags
# acknowledge interrupt
b0/copy-to-al 0x20/imm8
e6/write-al-into-port 0x20/imm8
31/xor %eax 0/r32/eax
$timer-interrupt-handler:epilogue:
# epilogue
9d/pop-flags
61/pop-all-registers
fb/enable-interrupts
cf/return-from-interrupt

keyboard-interrupt-handler:
# prologue
fa/disable-interrupts
Expand Down

0 comments on commit f25b8e6

Please sign in to comment.