]> git.sur5r.net Git - cc65/blobdiff - libsrc/runtime/condes.s
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
[cc65] / libsrc / runtime / condes.s
index 2a2692a7be51bd9f376da21a60eaf63d52d22b5d..c94e41252285292f8aac50e6d28e80ba0f05e6d3 100644 (file)
 
         .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