Sfoglia il codice sorgente

+ only allow the first operand to be a condition

git-svn-id: branches/z80@44886 -
nickysn 5 anni fa
parent
commit
6e1dd417cf
1 ha cambiato i file con 10 aggiunte e 12 eliminazioni
  1. 10 12
      compiler/z80/raz80asm.pas

+ 10 - 12
compiler/z80/raz80asm.pas

@@ -2219,6 +2219,16 @@ Unit raz80asm;
         { Zero operand opcode ?  }
         if actasmtoken in [AS_SEPARATOR,AS_END] then
           exit;
+        { Condition (e.g. 'NC' in 'JP NC, label') }
+        if actasmtoken=AS_CONDITION then
+          begin
+            instr.condition:=actasmcond;
+            Consume(AS_CONDITION);
+            if actasmtoken in [AS_SEPARATOR,AS_END] then
+              exit;
+            if actasmtoken=AS_COMMA then
+              Consume(AS_COMMA);
+          end;
         { Read Operands }
         repeat
           case actasmtoken of
@@ -2227,18 +2237,6 @@ Unit raz80asm;
             AS_SEPARATOR :
               break;
 
-            { Condition (e.g. 'NC' in 'JP NC, label') }
-            AS_CONDITION:
-              begin
-                instr.condition:=actasmcond;
-                Consume(AS_CONDITION);
-                if actasmtoken=AS_COMMA then
-                  Consume(AS_COMMA);
-                { Zero operand opcode ?  }
-                if actasmtoken in [AS_SEPARATOR,AS_END] then
-                  exit;
-              end;
-
             { Operand delimiter }
             AS_COMMA :
               begin