5. (4 points) A computer uses the following interfacing protocol for the keyboard: when the end use types a character on the keyboard, the keyboard controller waits until the LSB of its 8-bit status regs (label keybd.status) becomes 1, updates the data register (label keybd.data) with the of the typed character, resets the LSB of kevbd.status to 0, and then activates the inte The interrupt causes program control to transfer to the system call layer, w current process' context. calls the keyboard interrupt service routine (ISR) of the key driver. The keyboard ISR reads the character from keybd.dat A designer wrote the follo from the keyboard controller. Identify two fatal bugs (i.e., bugs that r the IO t ts 8-bit status registe which, after saving th board device a and then sets the status bit to 1. wing keyboard ISR (for the MIPS-I architecture) for reading the characte make this ISR fail to implemen ransfer protocol specified) in this device driver and correct the ISR to fix the two bugs. # Keyboard ISR # $vo returns the character read from keyboard ktext # Make subsequent allocations in kernel text section keybd.isr to, keybd.status 1b andi $t1, $t0, 1 beq $t1, Szero, keybd.ior lb $vO, keybd.data keybd.set: Sto, keybd.atatus 1b andi $t1, $to, 1 beq $t1, keybd.set jr $ra # Return to calling OS routine 5. (4 points) A computer uses the following interfacing protocol for the keyboard: when the end use types a character on the keyboard, the keyboard controller waits until the LSB of its 8-bit status regs (label keybd.status) becomes 1, updates the data register (label keybd.data) with the of the typed character, resets the LSB of kevbd.status to 0, and then activates the inte The interrupt causes program control to transfer to the system call layer, w current process' context. calls the keyboard interrupt service routine (ISR) of the key driver. The keyboard ISR reads the character from keybd.dat A designer wrote the follo from the keyboard controller. Identify two fatal bugs (i.e., bugs that r the IO t ts 8-bit status registe which, after saving th board device a and then sets the status bit to 1. wing keyboard ISR (for the MIPS-I architecture) for reading the characte make this ISR fail to implemen ransfer protocol specified) in this device driver and correct the ISR to fix the two bugs. # Keyboard ISR # $vo returns the character read from keyboard ktext # Make subsequent allocations in kernel text section keybd.isr to, keybd.status 1b andi $t1, $t0, 1 beq $t1, Szero, keybd.ior lb $vO, keybd.data keybd.set: Sto, keybd.atatus 1b andi $t1, $to, 1 beq $t1, keybd.set jr $ra # Return to calling OS routine