Mercurial > hg > Members > kono > os9 > sbc09
diff os9/mc09/mc2.c @ 106:6566b9f47f4a
asm macro fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 29 Dec 2018 18:29:06 +0900 |
parents | 6eef99bb4771 |
children | c4e909f21b25 |
line wrap: on
line diff
--- a/os9/mc09/mc2.c Sat Dec 29 12:25:26 2018 +0900 +++ b/os9/mc09/mc2.c Sat Dec 29 18:29:06 2018 +0900 @@ -2813,15 +2813,11 @@ ++filep; *(chptr = linebuf) = '\0'; } - else if (macroeq("asm")) - { if (asmf) error(MCERR); - asmf = 1; - getline(); - while (asmf) - { printf("%s",linebuf); - getline(); - } - } + else if (macroeq("asm")) + { if (asmf) error(MCERR); + asmf = 2; lineno--; glineno--; + chptr = ";;"; + } else if (macroeq("endasm")) { if (!asmf) error(MCERR); asmf = 0; @@ -2830,6 +2826,14 @@ getline(); else error(MCERR); } + if (asmf==2) asmf=1; /* return ";" to get correct macro alignment */ + else if (asmf==1) { + while (asmf) + { printf("%s",linebuf); + getline(); + } + } + } macroeq(s)