]> git.sur5r.net Git - cc65/commitdiff
Implementation for the .IFPxx commands was missing
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 28 Nov 2000 20:55:12 +0000 (20:55 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 28 Nov 2000 20:55:12 +0000 (20:55 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@489 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/condasm.c

index 77fdc075873ee68be8f06bc03708cd026a3f4cc7..5d6fbe157627ab3f2e0febaaa7532fd4f49325db 100644 (file)
 
 
 
+/* ca65 */
 #include "error.h"
 #include "expr.h"
+#include "instr.h"
 #include "nexttok.h"
 #include "symtab.h"
 #include "condasm.h"
@@ -308,7 +310,7 @@ void DoConditionals (void)
                break;
 
            case TOK_IFNBLANK:
-               D = AllocIf (".IFNBLANK", 1);
+               D = AllocIf (".IFNBLANK", 1);
                NextTok ();
                if (IfCond) {
                    SetIfCond (D, Tok != TOK_SEP);
@@ -351,17 +353,35 @@ void DoConditionals (void)
                        SetIfCond (D, !SymIsRef (SVal));
                        NextTok ();
                    }
-               }
+               }
                IfCond = GetCurrentIfCond ();
                break;
 
            case TOK_IFP02:
+                       D = AllocIf (".IFP02", 1);
+               NextTok ();
+               if (IfCond) {
+                   SetIfCond (D, GetCPU() == CPU_6502);
+               }
+               IfCond = GetCurrentIfCond ();
                break;
 
            case TOK_IFP816:
+               D = AllocIf (".IFP816", 1);
+               NextTok ();
+               if (IfCond) {
+                           SetIfCond (D, GetCPU() == CPU_65816);
+               }
+               IfCond = GetCurrentIfCond ();
                break;
 
            case TOK_IFPC02:
+               D = AllocIf (".IFPC02", 1);
+               NextTok ();
+               if (IfCond) {
+                           SetIfCond (D, GetCPU() == CPU_65C02);
+               }
+               IfCond = GetCurrentIfCond ();
                break;
 
            case TOK_IFREF: