]> git.sur5r.net Git - cc65/commitdiff
no TGI_ERR_NO_MEM or TGI_ERR_NO_IOCB anymore: replaced by TGI_ERR_NO_RES
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 15 Nov 2009 14:55:14 +0000 (14:55 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 15 Nov 2009 14:55:14 +0000 (14:55 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4469 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/atari_tgi_common.inc

index 9e952099f6c7a7b69c2b3643deb337f13bcbb908..3b716a632b1b0421cc72a5044141ab2bad55c92c 100644 (file)
@@ -168,9 +168,10 @@ search: tax
        sub     #$10
        bcs     search
 
-       ; No free IOCB
-       lda     #TGI_ERR_NO_IOCB
-       jmp     exit
+       ; Not enough resources available (free IOCB or memory)
+       ; enter with C cleared!
+nores: lda     #TGI_ERR_NO_RES
+       bcc     exit
 
 found: ; Check if enough RAM is available
        lda     #0
@@ -179,14 +180,10 @@ found:    ; Check if enough RAM is available
        lda     RAMTOP
        sbc     #>mem_needed
        cmp     APPMHI + 1
-       bcc     nomem
+       bcc     nores
        bne     switch
        cpy     APPMHI
-       bcs     switch
-
-       ; No memory
-nomem: lda     #TGI_ERR_NO_MEM
-       jmp     exit
+       bcc     nores                   ; not enough memory
 
        ; Switch into graphics mode
 switch:        lda     #OPEN