Removed IRQ support from TGI drivers.
All but one TGI drivers didn't use IRQs. Especially when the TGI driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure. The one driver using IRQs (the graphics driver for the 160x102x16 mode on the Lynx) now uses a library reference to set up a JMP to its IRQ handler.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
.import tgi_libref
|
||||
.importzp ptr1
|
||||
.interruptor tgi_irq ; Export as IRQ handler
|
||||
|
||||
.include "tgi-kernel.inc"
|
||||
.include "tgi-error.inc"
|
||||
@@ -81,7 +80,6 @@ tgi_line: jmp $0000
|
||||
tgi_bar: jmp $0000
|
||||
tgi_textstyle: jmp $0000
|
||||
tgi_outtext: jmp $0000
|
||||
tgi_irq: .byte $60, $00, $00 ; RTS plus two dummy bytes
|
||||
|
||||
; Driver header signature
|
||||
.rodata
|
||||
@@ -144,20 +142,13 @@ _tgi_install:
|
||||
dex
|
||||
bpl @L3
|
||||
|
||||
; Install the IRQ vector if the driver needs it.
|
||||
|
||||
lda tgi_irq+2 ; Check high byte of IRQ vector
|
||||
beq @L4 ; Jump if vector invalid
|
||||
lda #$4C ; Jump opcode
|
||||
sta tgi_irq ; Activate IRQ routine
|
||||
|
||||
; Initialize some other variables
|
||||
|
||||
lda #$00
|
||||
@L4: ldx #csize-1
|
||||
@L5: sta cstart,x ; Clear error/mode/curx/cury/...
|
||||
ldx #csize-1
|
||||
@L4: sta cstart,x ; Clear error/mode/curx/cury/...
|
||||
dex
|
||||
bpl @L5
|
||||
bpl @L4
|
||||
|
||||
rts
|
||||
|
||||
@@ -206,9 +197,6 @@ _tgi_uninstall:
|
||||
|
||||
jsr tgi_uninstall ; Allow the driver to clean up
|
||||
|
||||
lda #$60 ; RTS opcode
|
||||
sta tgi_irq ; Disable IRQ entry point
|
||||
|
||||
; Clear driver pointer and error code
|
||||
|
||||
tgi_clear_ptr:
|
||||
|
||||
Reference in New Issue
Block a user