2002-06-21 13:28:51 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 21.06.2002
|
|
|
|
;
|
|
|
|
; void __fastcall__ tgi_unload (void);
|
|
|
|
; /* Unload the currently loaded driver. */
|
|
|
|
|
|
|
|
|
|
|
|
.include "tgi-kernel.inc"
|
2004-11-07 11:30:26 +00:00
|
|
|
.include "tgi-error.inc"
|
2002-06-21 13:28:51 +00:00
|
|
|
.include "modload.inc"
|
|
|
|
|
|
|
|
|
2004-11-07 11:30:26 +00:00
|
|
|
_tgi_unload:
|
2002-06-21 13:28:51 +00:00
|
|
|
|
2004-11-07 11:30:26 +00:00
|
|
|
lda _tgi_drv
|
|
|
|
ora _tgi_drv
|
|
|
|
beq no_driver ; No driver
|
2002-06-21 13:28:51 +00:00
|
|
|
|
|
|
|
lda _tgi_drv
|
2004-11-07 11:30:26 +00:00
|
|
|
pha
|
|
|
|
lda _tgi_drv+1
|
|
|
|
pha ; Save pointer to driver
|
|
|
|
|
|
|
|
jsr _tgi_uninstall ; Uninstall the driver
|
|
|
|
|
|
|
|
pla
|
|
|
|
tax
|
|
|
|
pla
|
|
|
|
jmp _mod_free ; Free the driver
|
2002-06-21 13:28:51 +00:00
|
|
|
|
2004-11-07 11:30:26 +00:00
|
|
|
no_driver:
|
|
|
|
lda #<TGI_ERR_NO_DRIVER
|
|
|
|
sta _tgi_error
|
|
|
|
rts
|
2002-06-21 13:28:51 +00:00
|
|
|
|
|
|
|
|