Driver Routines - CompactProgrammer/MicroSYS GitHub Wiki

This describes the two routines a driver uses: load and execute.

Load

The load routine is called for the driver to save the regist and prepare for the execute routine. When this routine is called, the registers important to the driver should be saved somewhere in the memory allocated for it. The routine is not responsible for restoring the registers to their original values when done, MicroSYS handles it.

Execute

The execute routine is called for executing the command requested. MicroSYS will not send information like the command or pointer to the buffer, because the load routine should've saved this information. The routine is not responsible for restoring the registers to their original values when done, MicroSYS handles it.