diff --git a/assemble.c b/assemble.c index 46390be..bbc3bc9 100644 --- a/assemble.c +++ b/assemble.c @@ -35,7 +35,7 @@ static int check_eol( return 1; } - report(stack->top, "Junk at end of line ('%c')", *cp); + report(stack->top, "Junk at end of line ('%c')\n", *cp); return 0; } @@ -1375,7 +1375,7 @@ static int assemble( store_word(stack->top, tr, 2, word); mode_extension(tr, &mode, stack->top); } - return 1; + return CHECK_EOL; case OC_2GEN: /* Two general addressing modes */ { diff --git a/tests/test-float.lst.ok b/tests/test-float.lst.ok index ac52262..f314f7d 100644 --- a/tests/test-float.lst.ok +++ b/tests/test-float.lst.ok @@ -143,7 +143,9 @@ 120 000420 172127 140263 addd #-1.4,ac1 ; as float 121 122 ; TODO: let parser check for junk at end of line +test-float.mac:123: ***ERROR Junk at end of line ('5') 123 000424 170627 000002 absf #2.5 ; bad: operand is destination +test-float.mac:124: ***ERROR Junk at end of line ('5') 124 000430 170527 000002 tstd #2.5 ; bad: operand is considered FDST by the arch handbook 125 000434 174027 000002 stf ac0,#2.5 ; bad: junk at end of line 126 000440 174027 000002 stf ac0,#2 ; doesn't makes sense but MACRO11 allows it