From: Robert Pengelly Date: Sun, 11 May 2025 16:05:49 +0000 (+0100) Subject: Bug fix X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=5b4ec32c8e5a08cfbb9b7ec8dbeaceac2f894f21;p=sasm.git Bug fix --- diff --git a/intel.c b/intel.c index c4c7c5a..432792d 100644 --- a/intel.c +++ b/intel.c @@ -4303,9 +4303,12 @@ static int match_template (char mnemonic_suffix) { suffix_check.no_qsuf = 1; break; - case INTEL_SUFFIX: + default: - suffix_check.no_intelsuf = 1; + if (instruction.suffix == INTEL_SUFFIX) { + suffix_check.no_intelsuf = 1; + } + break; } @@ -6214,14 +6217,14 @@ void machine_dependent_assemble_line (char *start, char *line) { operand_exprs_count = 0; - if (!(line = parse_instruction (line)) || parse_operands (start, &line)) { + if (!(line = parse_instruction (line))) { return; } mnemonic_suffix = instruction.suffix; - if (mnemonic_suffix != INTEL_SUFFIX) { - mnemonic_suffix = 0; + if (parse_operands (start, &line)) { + return; } /** diff --git a/lib.c b/lib.c index dd87125..c0025ba 100644 --- a/lib.c +++ b/lib.c @@ -86,7 +86,7 @@ static void _print_usage (void) { fprintf (stderr, "\n"); fprintf (stderr, " -f FORMAT Specify the format of object file (default elks-ia16)\n"); fprintf (stderr, " Supported formats are:\n"); - fprintf (stderr, " elks-ia16, elks-i386, binary,\n"); + fprintf (stderr, " elks-ia16, elks-i386,\n"); fprintf (stderr, " win32, win64\n"); fprintf (stderr, " -l FILE Print listings to file FILE.\n"); fprintf (stderr, " -o OBJFILE Name the object-file output OBJFILE (default a.out).\n");