summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-26 18:19:19 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-26 18:19:19 +0000
commitd0e365d523ffb30fbc32e6a3d8dcb6958de8e617 (patch)
treeba92f3afa6c7420e57d7d3c207349619e3d35a5c /parser.c
parentb6469d3a8478cbe1a644e8c4c02262513b814dee (diff)
downloadnasm-d0e365d523ffb30fbc32e6a3d8dcb6958de8e617.tar.gz
nasm-d0e365d523ffb30fbc32e6a3d8dcb6958de8e617.tar.bz2
nasm-d0e365d523ffb30fbc32e6a3d8dcb6958de8e617.zip
Make "ABSOLUTE <label>" work again; code based on 0.97.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index 2c6df95..d0be7a4 100644
--- a/parser.c
+++ b/parser.c
@@ -19,6 +19,10 @@
#include "parser.h"
#include "float.h"
+extern int in_abs_seg; /* ABSOLUTE segment flag */
+extern long abs_seg; /* ABSOLUTE segment */
+extern long abs_offset; /* ABSOLUTE segment offset */
+
static long reg_flags[] = { /* sizes and special flags */
0, REG8, REG_AL, REG_AX, REG8, REG8, REG16, REG16, REG8, REG_CL,
REG_CREG, REG_CREG, REG_CREG, REG_CR4, REG_CS, REG_CX, REG8,
@@ -99,7 +103,7 @@ insn *parse_line (int pass, char *buffer, insn *result,
* Generally fix things. I think this is right as it is, but
* am still not certain.
*/
- ldef (result->label, location->segment,
+ ldef (result->label, in_abs_seg?abs_seg:location->segment,
location->offset, NULL, TRUE, FALSE, outfmt, errfunc);
}
}