Added code to prevent FAR from being used with a register
authorDebbie Wiles <debs@dwiles.demon.co.uk>
Tue, 4 Jun 2002 19:31:24 +0000 (19:31 +0000)
committerDebbie Wiles <debs@dwiles.demon.co.uk>
Tue, 4 Jun 2002 19:31:24 +0000 (19:31 +0000)
parser.c

index d0be7a4..5ca49fa 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -494,6 +494,11 @@ insn *parse_line (int pass, char *buffer, insn *result,
            bracket = FALSE;           /* placate optimisers */
        }
 
+       if((result->oprs[operand].type & FAR) && !mref)
+       {
+           error (ERR_NONFATAL, "invalid use of FAR operand specifier");
+       }
+
        value = evaluate (stdscan, NULL, &tokval,
                          &result->oprs[operand].opflags,
                          critical, error, &hints);