Input Output (I/O)#
The way a machine receives input and gives output.
Polling#
Constantly looping an instruction checking if there is an input
Interrupt#
Input signals the computer to stop what its doing and read the input.
Incoming interrupt suspends instruction stream
Look up the vector (function address) of a handler in an interrupt vector table stored within the CPU
Perform a
jal
to handlerSave PC in Machine Exception Program Counter (MEPC) register
Handler run on current stack and returns on finish