mirror of
https://github.com/cc65/cc65.git
synced 2026-04-25 06:17:58 +00:00
Move initialization code into the init segment
git-svn-id: svn://svn.cc65.org/cc65/trunk@3404 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -20,17 +20,17 @@
|
||||
|
||||
.macpack cpu
|
||||
|
||||
.code
|
||||
|
||||
; --------------------------------------------------------------------------
|
||||
; Initialize library modules
|
||||
|
||||
.segment "INIT"
|
||||
|
||||
.proc initlib
|
||||
|
||||
ldy #<(__CONSTRUCTOR_COUNT__*2)
|
||||
ldy #<(__CONSTRUCTOR_COUNT__*2)
|
||||
beq exit
|
||||
lda #<__CONSTRUCTOR_TABLE__
|
||||
ldx #>__CONSTRUCTOR_TABLE__
|
||||
lda #<__CONSTRUCTOR_TABLE__
|
||||
ldx #>__CONSTRUCTOR_TABLE__
|
||||
jmp condes
|
||||
exit: rts
|
||||
|
||||
@@ -40,13 +40,16 @@ exit: rts
|
||||
; --------------------------------------------------------------------------
|
||||
; Cleanup library modules
|
||||
|
||||
.code
|
||||
|
||||
.proc donelib
|
||||
|
||||
ldy #<(__DESTRUCTOR_COUNT__*2)
|
||||
beq initlib::exit
|
||||
beq exit
|
||||
lda #<__DESTRUCTOR_TABLE__
|
||||
ldx #>__DESTRUCTOR_TABLE__
|
||||
jmp condes
|
||||
exit: rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user