mirror of
https://github.com/cc65/cc65.git
synced 2025-02-24 09:29:07 +00:00
Renamed __IRQFUNC_xxx -> __INTERRUPTOR_xxx
git-svn-id: svn://svn.cc65.org/cc65/trunk@3189 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e6b456a8a6
commit
cfef8e1e0d
@ -9,7 +9,7 @@
|
|||||||
.import zerobss
|
.import zerobss
|
||||||
.import push0, callmain
|
.import push0, callmain
|
||||||
.import RESTOR, BSOUT, CLRCH
|
.import RESTOR, BSOUT, CLRCH
|
||||||
.import __IRQFUNC_COUNT__
|
.import __INTERRUPTOR_COUNT__
|
||||||
.import __RAM_START__, __RAM_SIZE__
|
.import __RAM_START__, __RAM_SIZE__
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
@ -88,8 +88,8 @@ L1: lda sp,x
|
|||||||
|
|
||||||
jsr initlib
|
jsr initlib
|
||||||
|
|
||||||
; Set the bank for the file name to our execution bank. We must do this,
|
; Set the bank for the file name to our execution bank. We must do this,
|
||||||
; *after* calling constructors, because some of them may depend on the
|
; *after* calling constructors, because some of them may depend on the
|
||||||
; original value of this register.
|
; original value of this register.
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
@ -97,7 +97,7 @@ L1: lda sp,x
|
|||||||
|
|
||||||
; If we have IRQ functions, chain our stub into the IRQ vector
|
; If we have IRQ functions, chain our stub into the IRQ vector
|
||||||
|
|
||||||
lda #<__IRQFUNC_COUNT__
|
lda #<__INTERRUPTOR_COUNT__
|
||||||
beq NoIRQ1
|
beq NoIRQ1
|
||||||
lda IRQVec
|
lda IRQVec
|
||||||
ldx IRQVec+1
|
ldx IRQVec+1
|
||||||
@ -118,7 +118,7 @@ NoIRQ1: jsr callmain
|
|||||||
; chained it.
|
; chained it.
|
||||||
|
|
||||||
_exit: pha ; Save the return code on stack
|
_exit: pha ; Save the return code on stack
|
||||||
lda #<__IRQFUNC_COUNT__
|
lda #<__INTERRUPTOR_COUNT__
|
||||||
beq NoIRQ2
|
beq NoIRQ2
|
||||||
lda IRQInd+1
|
lda IRQInd+1
|
||||||
ldx IRQInd+2
|
ldx IRQInd+2
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.import zerobss, push0
|
.import zerobss, push0
|
||||||
.import callmain
|
.import callmain
|
||||||
.import RESTOR, BSOUT, CLRCH
|
.import RESTOR, BSOUT, CLRCH
|
||||||
.import __IRQFUNC_COUNT__
|
.import __INTERRUPTOR_COUNT__
|
||||||
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
|
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
@ -79,7 +79,7 @@ L1: lda sp,x
|
|||||||
|
|
||||||
; If we have IRQ functions, chain our stub into the IRQ vector
|
; If we have IRQ functions, chain our stub into the IRQ vector
|
||||||
|
|
||||||
lda #<__IRQFUNC_COUNT__
|
lda #<__INTERRUPTOR_COUNT__
|
||||||
beq NoIRQ1
|
beq NoIRQ1
|
||||||
lda IRQVec
|
lda IRQVec
|
||||||
ldx IRQVec+1
|
ldx IRQVec+1
|
||||||
@ -100,7 +100,7 @@ NoIRQ1: jsr callmain
|
|||||||
; chained it.
|
; chained it.
|
||||||
|
|
||||||
_exit: pha ; Save the return code on stack
|
_exit: pha ; Save the return code on stack
|
||||||
lda #<__IRQFUNC_COUNT__
|
lda #<__INTERRUPTOR_COUNT__
|
||||||
beq NoIRQ2
|
beq NoIRQ2
|
||||||
lda IRQInd+1
|
lda IRQInd+1
|
||||||
ldx IRQInd+2
|
ldx IRQInd+2
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
.import push0, callmain
|
.import push0, callmain
|
||||||
.import __CHARRAM_START__, __CHARRAM_SIZE__, __VIDRAM_START__
|
.import __CHARRAM_START__, __CHARRAM_SIZE__, __VIDRAM_START__
|
||||||
.import __BSS_RUN__, __BSS_SIZE__, __EXTZP_RUN__
|
.import __BSS_RUN__, __BSS_SIZE__, __EXTZP_RUN__
|
||||||
.import __IRQFUNC_COUNT__
|
.import __INTERRUPTOR_COUNT__
|
||||||
.import scnkey, UDTIM
|
.import scnkey, UDTIM
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
@ -428,7 +428,7 @@ ccopy2: lda __VIDRAM_START__,y
|
|||||||
; Call module constructors, enable chained IRQs afterwards.
|
; Call module constructors, enable chained IRQs afterwards.
|
||||||
|
|
||||||
jsr initlib
|
jsr initlib
|
||||||
lda #.lobyte(__IRQFUNC_COUNT__*2)
|
lda #.lobyte(__INTERRUPTOR_COUNT__*2)
|
||||||
sta irqcount
|
sta irqcount
|
||||||
|
|
||||||
; Enable interrupts
|
; Enable interrupts
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.import callirq_y, initlib, donelib
|
.import callirq_y, initlib, donelib
|
||||||
.import push0, callmain
|
.import push0, callmain
|
||||||
.import __BSS_RUN__, __BSS_SIZE__, __EXTZP_RUN__
|
.import __BSS_RUN__, __BSS_SIZE__, __EXTZP_RUN__
|
||||||
.import __IRQFUNC_COUNT__
|
.import __INTERRUPTOR_COUNT__
|
||||||
.import scnkey, UDTIM
|
.import scnkey, UDTIM
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
@ -349,7 +349,7 @@ Z4: jmp Init
|
|||||||
; Call module constructors, enable chained IRQs afterwards.
|
; Call module constructors, enable chained IRQs afterwards.
|
||||||
|
|
||||||
Init: jsr initlib
|
Init: jsr initlib
|
||||||
lda #.lobyte(__IRQFUNC_COUNT__*2)
|
lda #.lobyte(__INTERRUPTOR_COUNT__*2)
|
||||||
sta irqcount
|
sta irqcount
|
||||||
|
|
||||||
; Enable interrupts
|
; Enable interrupts
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
.import callirq_y, initlib, donelib
|
.import callirq_y, initlib, donelib
|
||||||
.import push0, callmain, zerobss
|
.import push0, callmain, zerobss
|
||||||
.import __IRQFUNC_COUNT__
|
.import __INTERRUPTOR_COUNT__
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
.include "plus4.inc"
|
.include "plus4.inc"
|
||||||
@ -87,7 +87,7 @@ L1: lda sp,x
|
|||||||
; Initialize irqcount, which means that from now own custom linked in IRQ
|
; Initialize irqcount, which means that from now own custom linked in IRQ
|
||||||
; handlers (via condes) will be called.
|
; handlers (via condes) will be called.
|
||||||
|
|
||||||
lda #.lobyte(__IRQFUNC_COUNT__*2)
|
lda #.lobyte(__INTERRUPTOR_COUNT__*2)
|
||||||
sta irqcount
|
sta irqcount
|
||||||
|
|
||||||
; Push arguments and call main()
|
; Push arguments and call main()
|
||||||
@ -147,9 +147,9 @@ IRQ: cld ; Just to be sure
|
|||||||
bne dobreak
|
bne dobreak
|
||||||
|
|
||||||
; It's an IRQ and RAM is enabled. If we have handlers, call them. We will use
|
; It's an IRQ and RAM is enabled. If we have handlers, call them. We will use
|
||||||
; a flag here instead of loading __IRQFUNC_COUNT__ directly, since the condes
|
; a flag here instead of loading __INTERRUPTOR_COUNT__ directly, since the
|
||||||
; function is not reentrant. The irqcount flag will be set/reset from the main
|
; condes function is not reentrant. The irqcount flag will be set/reset from
|
||||||
; code, to avoid races.
|
; the main code, to avoid races.
|
||||||
|
|
||||||
ldy irqcount
|
ldy irqcount
|
||||||
beq @L1
|
beq @L1
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
.export callirq
|
.export callirq
|
||||||
.export callirq_y ; Same but with Y preloaded
|
.export callirq_y ; Same but with Y preloaded
|
||||||
|
|
||||||
.import __IRQFUNC_TABLE__, __IRQFUNC_COUNT__
|
.import __INTERRUPTOR_TABLE__, __INTERRUPTOR_COUNT__
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
@ -35,13 +35,13 @@
|
|||||||
.data
|
.data
|
||||||
|
|
||||||
callirq:
|
callirq:
|
||||||
ldy #.lobyte(__IRQFUNC_COUNT__*2)
|
ldy #.lobyte(__INTERRUPTOR_COUNT__*2)
|
||||||
callirq_y:
|
callirq_y:
|
||||||
dey
|
dey
|
||||||
lda __IRQFUNC_TABLE__,y
|
lda __INTERRUPTOR_TABLE__,y
|
||||||
sta jmpvec+2 ; Modify code below
|
sta jmpvec+2 ; Modify code below
|
||||||
dey
|
dey
|
||||||
lda __IRQFUNC_TABLE__,y
|
lda __INTERRUPTOR_TABLE__,y
|
||||||
sta jmpvec+1 ; Modify code below
|
sta jmpvec+1 ; Modify code below
|
||||||
sty index+1 ; Modify code below
|
sty index+1 ; Modify code below
|
||||||
jmpvec: jsr $FFFF ; Patched at runtime
|
jmpvec: jsr $FFFF ; Patched at runtime
|
||||||
|
@ -22,9 +22,9 @@ FEATURES {
|
|||||||
count = __DESTRUCTOR_COUNT__;
|
count = __DESTRUCTOR_COUNT__;
|
||||||
# condes functions with type 2 are called in the interrupt
|
# condes functions with type 2 are called in the interrupt
|
||||||
CONDES: segment = RODATA,
|
CONDES: segment = RODATA,
|
||||||
type = 2,
|
type = interruptor,
|
||||||
label = __IRQFUNC_TABLE__,
|
label = __INTERRUPTOR_TABLE__,
|
||||||
count = __IRQFUNC_COUNT__;
|
count = __INTERRUPTOR_COUNT__;
|
||||||
}
|
}
|
||||||
SYMBOLS {
|
SYMBOLS {
|
||||||
__STACKSIZE__ = $800; # 2K stack
|
__STACKSIZE__ = $800; # 2K stack
|
||||||
|
@ -22,9 +22,9 @@ FEATURES {
|
|||||||
count = __DESTRUCTOR_COUNT__;
|
count = __DESTRUCTOR_COUNT__;
|
||||||
# condes functions with type 2 are called in the interrupt
|
# condes functions with type 2 are called in the interrupt
|
||||||
CONDES: segment = RODATA,
|
CONDES: segment = RODATA,
|
||||||
type = 2,
|
type = interruptor,
|
||||||
label = __IRQFUNC_TABLE__,
|
label = __INTERRUPTOR_TABLE__,
|
||||||
count = __IRQFUNC_COUNT__;
|
count = __INTERRUPTOR_COUNT__;
|
||||||
}
|
}
|
||||||
SYMBOLS {
|
SYMBOLS {
|
||||||
__STACKSIZE__ = $800; # 2K stack
|
__STACKSIZE__ = $800; # 2K stack
|
||||||
|
@ -31,9 +31,9 @@ FEATURES {
|
|||||||
label = __DESTRUCTOR_TABLE__,
|
label = __DESTRUCTOR_TABLE__,
|
||||||
count = __DESTRUCTOR_COUNT__;
|
count = __DESTRUCTOR_COUNT__;
|
||||||
CONDES: segment = RODATA,
|
CONDES: segment = RODATA,
|
||||||
type = 2,
|
type = interruptor,
|
||||||
label = __IRQFUNC_TABLE__,
|
label = __INTERRUPTOR_TABLE__,
|
||||||
count = __IRQFUNC_COUNT__;
|
count = __INTERRUPTOR_COUNT__;
|
||||||
}
|
}
|
||||||
SYMBOLS {
|
SYMBOLS {
|
||||||
__STACKSIZE__ = $781; # ~2K stack
|
__STACKSIZE__ = $781; # ~2K stack
|
||||||
|
@ -30,9 +30,9 @@ FEATURES {
|
|||||||
count = __DESTRUCTOR_COUNT__;
|
count = __DESTRUCTOR_COUNT__;
|
||||||
# condes functions with type 2 are called in the interrupt
|
# condes functions with type 2 are called in the interrupt
|
||||||
CONDES: segment = RODATA,
|
CONDES: segment = RODATA,
|
||||||
type = 2,
|
type = interruptor,
|
||||||
label = __IRQFUNC_TABLE__,
|
label = __INTERRUPTOR_TABLE__,
|
||||||
count = __IRQFUNC_COUNT__;
|
count = __INTERRUPTOR_COUNT__;
|
||||||
}
|
}
|
||||||
SYMBOLS {
|
SYMBOLS {
|
||||||
__STACKSIZE__ = $800; # 2K stack
|
__STACKSIZE__ = $800; # 2K stack
|
||||||
|
@ -22,9 +22,9 @@ FEATURES {
|
|||||||
count = __DESTRUCTOR_COUNT__;
|
count = __DESTRUCTOR_COUNT__;
|
||||||
# condes functions with type 2 are called in the interrupt
|
# condes functions with type 2 are called in the interrupt
|
||||||
CONDES: segment = RODATA,
|
CONDES: segment = RODATA,
|
||||||
type = 2,
|
type = interruptor,
|
||||||
label = __IRQFUNC_TABLE__,
|
label = __INTERRUPTOR_TABLE__,
|
||||||
count = __IRQFUNC_COUNT__;
|
count = __INTERRUPTOR_COUNT__;
|
||||||
}
|
}
|
||||||
SYMBOLS {
|
SYMBOLS {
|
||||||
__STACKSIZE__ = $800; # 2K stack
|
__STACKSIZE__ = $800; # 2K stack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user