From 859e8dbb1fc4421b80d125bd8716478aff620568 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Tue, 19 May 2015 21:17:15 +0200 Subject: [PATCH] List macro calls with the location of DOT Like MACRO V05.05. --- assemble.c | 2 ++ listing.c | 12 ++++++++++++ listing.h | 4 ++++ 3 files changed, 18 insertions(+) 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);