So i was reading a source code of a bootloader that uses 2 custom ISR ( interrupt service routine ) one for the IRQ0 (the Programmable Interval Timer tick) and the other for the IRQ1 (keyborad), and the first line of the ISR for IRQ0 is int 0x70, i searched for a while about this int and i found that it has something to do with CMOS-RTC, but from osdev :
The RTC keeps track of the date and time, even when the computer's power is off.
so that means that the RTC is system independent so why would i fire this int ?
Also i noticed something strange, the ISR for IRQ0 does not send a End-Of-Interrupt signal, however the boodloader is working fine and the keyboard interrupts are handled fine. but if remove that specific line (int 0x70) the keyboard interrupts gets ignored and i will need to add instructions to send the End-Of-Interrupt signal before every iret in the ISR ( has quite a few, it has some local labels each one have its iret the execution flow is transferred to this labels after such conditions) given the size limit of the bootloader (510bytes + magic word) did the author use this trick to omit using instructions sized ~6 bytes to send End-Of-Interrupt signal or it is just a coincidence and the int 0x70 is used for something else ?
what does int 0x70 do, and why whould i need it when creating my own ISR for IRQ0 ?
the code is something like this:
;; es is set to 0
;; edit the IVT
cli
mov [es:0x08*4], word pit_isr
mov [es:0x08*4+2], cs
mov [es:0x09*4], word keyboard_isr
mov [es:0x09*4+2], cs
sti
[...]
keyboard_isr:
do_isr_stuffs
[....]
;; send end of interrupt signal:
mov al, 0x61
out 0x20, al
pit_isr:
.tick_rtc:
int 0x70
.label_one:
do_stuff
[....]
iret
.label_two:
do_stuff
[....]
iret
[...]
iret