2 ; Ullrich von Bassewitz, 2002-11-29
4 ; unsigned char __fastcall__ joy_unload (void);
5 ; /* Unload the currently loaded driver. */
8 .include "joy-kernel.inc"
9 .include "joy-error.inc"
10 .include "modload.inc"
19 pha ; Save pointer to driver
21 beq no_driver ; No driver
25 jsr _joy_uninstall ; Uninstall the driver
29 pla ; Get pointer to driver
30 jsr _mod_free ; Free the driver
31 jmp return0 ; Return JOY_ERR_OK
35 pla ; Remove pushed junk
36 lda #JOY_ERR_NO_DRIVER