From 282fa7725993c9b0b0d2bb0977c124f11abea1fd Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 8 Mar 2016 13:51:57 +0000 Subject: Wildcard for args, EX changes and CP/M test. + Added '*' wildcard for macro arguments + Allow 'EX' with parameters reversed on the Z80 + Added simple CP/M example test. + Added some files to gitignore --- src/macro.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src/macro.c') diff --git a/src/macro.c b/src/macro.c index 03891c2..3e0ce2b 100644 --- a/src/macro.c +++ b/src/macro.c @@ -390,9 +390,29 @@ char *MacroPlay(Macro *macro) } else { - num[in_num] = 0; - AddArg(str, macro, atoi(num)); - in_num = -1; + if (in_num == 0 && line[rd] == '*') + { + int f; + + rd++; + + for(f = 0; f < macro->argc; f++) + { + if (f > 0) + { + VarcharAddChar(str, ','); + } + + AddArg(str, macro, f); + } + in_num = -1; + } + else + { + num[in_num] = 0; + AddArg(str, macro, atoi(num)); + in_num = -1; + } } } else if (in_arg != -1) -- cgit v1.2.3