diff --git a/assemble.c b/assemble.c index e161247..5cda79d 100644 --- a/assemble.c +++ b/assemble.c @@ -357,6 +357,7 @@ static int assemble( } sect_sp++; sect_stack[sect_sp] = current_pc->section; + dot_stack[sect_sp] = DOT; return 1; case P_RESTORE: @@ -365,6 +366,7 @@ static int assemble( return 0; } else { go_section(tr, sect_stack[sect_sp]); + DOT = dot_stack[sect_sp]; list_location(stack->top, DOT); if (!enabl_lsb) { lsb = get_next_lsb(); diff --git a/assemble_globals.c b/assemble_globals.c index 509797a..b8c724e 100644 --- a/assemble_globals.c +++ b/assemble_globals.c @@ -47,6 +47,7 @@ COND conds[MAX_CONDS]; /* Stack of recent conditions */ int last_cond; /* 0 means no stacked cond. */ SECTION *sect_stack[SECT_STACK_SIZE]; /* 32 saved sections */ +int dot_stack[SECT_STACK_SIZE]; /* 32 saved sections */ int sect_sp; /* Stack pointer */ char *module_name = NULL; /* The module name (taken from the 'TITLE'); */ diff --git a/assemble_globals.h b/assemble_globals.h index 372fd53..bc54277 100644 --- a/assemble_globals.h +++ b/assemble_globals.h @@ -57,6 +57,7 @@ extern COND conds[MAX_CONDS]; /* Stack of recent conditions */ extern int last_cond; /* 0 means no stacked cond. */ extern SECTION *sect_stack[SECT_STACK_SIZE]; /* 32 saved sections */ +extern int dot_stack[SECT_STACK_SIZE]; /* 32 saved sections */ extern int sect_sp; /* Stack pointer */ extern char *module_name; /* The module name (taken from the 'TITLE'); */