I've been practising assembly for a while now, and I came across a video on YouTube that teaches you how to make a bootloader. Whilst watching the video, the question arose in my mind as to what an "int" is. I began to search and found out that it is an abbreviation for an interrupt. It came to my mind that "What are Interrupts?". Again, I searched and began to develop an understanding. However, I am curious as to how interrupts are made and how they are generated?... Do manufacturers make their own interrupts? Or what?
Note: I'm assuming "old 80x86 with BIOS" as I think it's the most likely, and it covers most of the cases anyway.
What are Interrupts?
In general; an interrupt is something that causes a control flow change (to an interrupt handler) that is triggered by a certain event (often, triggered by hardware outside the CPU). In other words, it's something that interrupts normal execution. However, the ability to interrupt the currently executing code when it's not expecting it (e.g. based on an external signal) requires the ability to ensure that the state of the interrupted software doesn't get messed up and can be restored; and the mechanism/s used to ensure the state of the interrupted software doesn't get messed up is often recycled for other things (that software can/does except).
Interrupts can be split into 3 categories:
IRQs. These are used by devices to ask for attention. Each designer of a device decides what their device uses its IRQ/s for. Typically there's also some kind of IRQ controller involved to convert signals (from devices) into a format that the CPU understands and give them an interrupt number.
Exceptions. These are designed by the people that designed the CPU (e.g. Intel) or an extension to a CPU; and indicate when software tried to do something that the CPU either can't or won't allow (e.g. division by zero, accessing memory that currently can't be accessed, software attempting to do something that requires permissions it doesn't have, etc)
Software interrupts. These were used as a kind of API that software can use to ask other software to do something. Who designed them depends on which API (e.g. Microsoft designed the interface MS-DOS uses, Linux kernel developers designed the int 0x80
API in early Linux, etc). For the old BIOS; originally it was designed by IBM (and then reverse engineered and cloned by others); but over the years different groups created standards to extend the original BIOS; like "int 0x13 extensions" (to bypass the "max. disk size" limitations of the old "CHS" functions), "El Toritio bootable CD specification" (to add functions to use CDs to emulate floppy and hard disks and manage them), "VESA BIOS extensions" (to make super-VGA/higher resolution video cards easier for software to use), etc. Most of these BIOS extensions came from firmware/BIOS creators (e.g. Phoenix), industry groups/committees/standardization bodies (e.g. VESA, PCI special interest group, etc), or hardware manufacturers (e.g. Intel).