diff --git a/assemble.c b/assemble.c index 2708984..2a1569f 100644 --- a/assemble.c +++ b/assemble.c @@ -1122,11 +1122,10 @@ static int assemble( case P_ASCIZ: case P_ASCII: { - EX_TREE *value; - do { cp = skipwhite(cp); - if (*cp == '<' || *cp == '^') { + if (*cp == '<') { + EX_TREE *value; /* A byte value */ value = parse_unary_expr(cp, 0); cp = value->cp; diff --git a/tests/test-asciz.lst.ok b/tests/test-asciz.lst.ok index c89685d..ea9e9ad 100644 --- a/tests/test-asciz.lst.ok +++ b/tests/test-asciz.lst.ok @@ -43,7 +43,10 @@ test-asciz.mac:20: ***ERROR Invalid expression test-asciz.mac:20: ***ERROR Invalid expression 20 000076 000000 000000 000000 .asciz :###: ; syntax error: colon not allowed 000104 000000 - 20 + 21 000106 043 043 043 .asciz ^###^ ; previous versions of this macro11 + 000111 000 + 22 ; used ^/.../ quoting as an extension; however this should be ^...^. + 22 Symbol table @@ -54,4 +57,4 @@ Symbol table Program sections: . ABS. 000000 000 (RW,I,GBL,ABS,OVR,NOSAV) - 000106 001 (RW,I,LCL,REL,CON,NOSAV) + 000112 001 (RW,I,LCL,REL,CON,NOSAV) diff --git a/tests/test-asciz.mac b/tests/test-asciz.mac index bb71638..9faeabd 100644 --- a/tests/test-asciz.mac +++ b/tests/test-asciz.mac @@ -18,3 +18,5 @@ SOH = 1 .asciz =###= ; syntax error: assignment .asciz :SOH: ; syntax error: colon not allowed .asciz :###: ; syntax error: colon not allowed + .asciz ^###^ ; previous versions of this macro11 + ; used ^/.../ quoting as an extension; however this should be ^...^.