mirror of
https://github.com/cc65/cc65.git
synced 2024-11-03 10:07:02 +00:00
8b0c3d3425
Added an interrupt entry point for the drivers. Rewrote tgi_unload to avoid problems with the tgi_drv pointer. git-svn-id: svn://svn.cc65.org/cc65/trunk@3284 b7a2c559-68d2-44c3-8de9-860c34a00d81
37 lines
740 B
ArmAsm
37 lines
740 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 21.06.2002
|
|
;
|
|
; void __fastcall__ tgi_unload (void);
|
|
; /* Unload the currently loaded driver. */
|
|
|
|
|
|
.include "tgi-kernel.inc"
|
|
.include "tgi-error.inc"
|
|
.include "modload.inc"
|
|
|
|
|
|
_tgi_unload:
|
|
|
|
lda _tgi_drv
|
|
ora _tgi_drv
|
|
beq no_driver ; No driver
|
|
|
|
lda _tgi_drv
|
|
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
|
|
|
|
no_driver:
|
|
lda #<TGI_ERR_NO_DRIVER
|
|
sta _tgi_error
|
|
rts
|
|
|
|
|