diff --git a/assemble.c b/assemble.c index d3c1ab5..af274f3 100644 --- a/assemble.c +++ b/assemble.c @@ -250,6 +250,8 @@ static int assemble( free(label); + list_location(stack->top, DOT); + macstr = expandmacro(stack->top, (MACRO *) op, ncp); stack_push(stack, macstr); /* Push macro expansion diff --git a/listing.c b/listing.c index a5dc295..00187b2 100644 --- a/listing.c +++ b/listing.c @@ -139,6 +139,18 @@ void list_word( } +/* Print just a line with the address to the listing file */ + +void list_location( + STREAM *str, + unsigned addr) +{ + if (dolist()) { + list_fit(str, addr); + } +} + + /* reports errors */ void report( diff --git a/listing.h b/listing.h index c9139a5..6071aab 100644 --- a/listing.h +++ b/listing.h @@ -51,6 +51,10 @@ void list_value( STREAM *str, unsigned word); +void list_location( + STREAM *str, + unsigned word); + void list_source( STREAM *str, char *cp);