* fixed GCC 4.4.0 mingw compilation:
[fw/sdcc] / as / xa51 / xa_rasm.l
old mode 100755 (executable)
new mode 100644 (file)
index 3f35c18..b72b9e0
@@ -1,19 +1,20 @@
 %{
-/* This file is part of Paul's XA51 Assembler, Copyright 1997,2002 Paul Stoffregen
- *
- * Paul's XA51 Assembler is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2.
- *
- * Paul's XA51 Assembler is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Foobar; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
+/* xa_rasm.l - This file is part of Paul's XA51 Assembler
+
+   Copyright 1997,2002 Paul Stoffregen (paul at pjrc dot com)
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 /* Author contact: paul@pjrc.com */
 
@@ -247,6 +248,14 @@ R[0-7]H            {LIST; yylval = (yytext[1] - '0') * 2 + 1 + BYTE_REG; return REG;}
                                        if (is_bit(lex_sym_name)) return BIT;
                                        if (is_reg(lex_sym_name)) return REG;
                                }
+                                if (p3) {
+                                 if (*operand[0]) {
+                                   // first one in use
+                                   strcpy (operand[1], yytext);
+                                 } else {
+                                   strcpy (operand[0], yytext);
+                                 }
+                                }
                                return WORD;
                        }
 [0-9]+\$               {