Basic input-Output system BIOS overview
The hard disk operating system DOS is built on the BIOS, through the BIOS to manipulate the hardware, such as DOS call BIOS display I/O program completion input display, call print I/O to complete the printout
Typically, applications should invoke DOS-provided system functions to complete input and output or other operations, which are not only easy to implement, but also least hardware-dependent, but sometimes DOS does not provide a service, so DOS implementations cannot be used
In other words, the BIOS is closer to the hardware than DOS
Keyboard input:
Keyboard Interrupt Handlers
When the user presses the key, the keyboard interface will get a scan code on the keyboard that represents the key, and an interrupt request, if the interrupt request is allowed (bit 1 of the interrupt mask Word is 0) and the CPU is in an interrupt state, then the CPU will normally interrupt the request, because the keyboard interrupt type is scheduled to 9. So the CPU responds to the keyboard interrupt, is transferred to the 9th interrupt handler, we call the 9th interrupt handler as a keyboard interrupt handler
The keyboard interrupt handler first obtains the scan code which represents the key from the keyboard interface, then determines the keyboard which the user presses according to the scan code and makes the corresponding processing finally notifies the interrupt controller to terminate and realizes the interrupt return
We have simply divided the keyboard into 5 types, character keyboards (letters, numbers and symbols) function keys (such as F1 and PgUp) control keys (Ctrl,alt and left and right shift) dual-state keyboard (Numlock,caps Lock) Special request keyboard (print Screen) keyboard interrupt handler for five kinds of keyboard processing methods are as follows
If the user presses a dual-state keyboard, then set the flag bit, after the grade on the system requirements to change the status of the LED indicator