From: ol.sc Date: Thu, 14 Feb 2013 16:48:05 +0000 (+0000) Subject: Save some bytes by sharing the code doing the actual vector setting. Note: Jumping... X-Git-Tag: V2.14~85 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e5823d43d8a167348a00d995531d9096ec63ef5;p=cc65 Save some bytes by sharing the code doing the actual vector setting. Note: Jumping from segemnt INIT to segment CODE is okay while the other way wouldn't be. git-svn-id: svn://svn.cc65.org/cc65/trunk@5989 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/atmos/irq.s b/libsrc/atmos/irq.s index 4f0227361..c022eccd4 100644 --- a/libsrc/atmos/irq.s +++ b/libsrc/atmos/irq.s @@ -18,11 +18,7 @@ initirq: stx IRQInd+2 lda #IRQStub - sei - sta IRQVec - stx IRQVec+1 - cli - rts + jmp setvec ; ------------------------------------------------------------------------ @@ -31,7 +27,7 @@ initirq: doneirq: lda IRQInd+1 ldx IRQInd+2 - sei +setvec: sei sta IRQVec stx IRQVec+1 cli diff --git a/libsrc/c128/irq.s b/libsrc/c128/irq.s index aad467968..d468eeaaa 100644 --- a/libsrc/c128/irq.s +++ b/libsrc/c128/irq.s @@ -20,11 +20,7 @@ initirq: stx IRQInd+2 lda #IRQStub - sei - sta IRQVec - stx IRQVec+1 - cli - rts + jmp setvec ; ------------------------------------------------------------------------ @@ -33,7 +29,7 @@ initirq: doneirq: lda IRQInd+1 ldx IRQInd+2 - sei +setvec: sei sta IRQVec stx IRQVec+1 cli diff --git a/libsrc/c16/irq.s b/libsrc/c16/irq.s index 81549cb6e..224f5745d 100644 --- a/libsrc/c16/irq.s +++ b/libsrc/c16/irq.s @@ -18,11 +18,7 @@ initirq: stx IRQInd+2 lda #IRQStub - sei - sta IRQVec - stx IRQVec+1 - cli - rts + jmp setvec ; ------------------------------------------------------------------------ @@ -31,7 +27,7 @@ initirq: doneirq: lda IRQInd+1 ldx IRQInd+2 - sei +setvec: sei sta IRQVec stx IRQVec+1 cli diff --git a/libsrc/c64/irq.s b/libsrc/c64/irq.s index bab462458..64e80c18e 100644 --- a/libsrc/c64/irq.s +++ b/libsrc/c64/irq.s @@ -18,11 +18,7 @@ initirq: stx IRQInd+2 lda #IRQStub - sei - sta IRQVec - stx IRQVec+1 - cli - rts + jmp setvec ; ------------------------------------------------------------------------ @@ -31,7 +27,7 @@ initirq: doneirq: lda IRQInd+1 ldx IRQInd+2 - sei +setvec: sei sta IRQVec stx IRQVec+1 cli diff --git a/libsrc/pet/irq.s b/libsrc/pet/irq.s index 5effd7097..64a29ea35 100644 --- a/libsrc/pet/irq.s +++ b/libsrc/pet/irq.s @@ -18,11 +18,7 @@ initirq: stx IRQInd+2 lda #IRQStub - sei - sta IRQVec - stx IRQVec+1 - cli - rts + jmp setvec ; ------------------------------------------------------------------------ @@ -31,7 +27,7 @@ initirq: doneirq: lda IRQInd+1 ldx IRQInd+2 - sei +setvec: sei sta IRQVec stx IRQVec+1 cli diff --git a/libsrc/vic20/irq.s b/libsrc/vic20/irq.s index c6bc137fa..6e5099e4a 100644 --- a/libsrc/vic20/irq.s +++ b/libsrc/vic20/irq.s @@ -18,11 +18,7 @@ initirq: stx IRQInd+2 lda #IRQStub - sei - sta IRQVec - stx IRQVec+1 - cli - rts + jmp setvec ; ------------------------------------------------------------------------ @@ -31,7 +27,7 @@ initirq: doneirq: lda IRQInd+1 ldx IRQInd+2 - sei +setvec: sei sta IRQVec stx IRQVec+1 cli