[Nasm-bugs] [Bug 3392404] New: idiv: no way to specify imm8 or imm16 (apparently)

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Fri Apr 28 05:13:06 PDT 2017


https://bugzilla.nasm.us/show_bug.cgi?id=3392404

            Bug ID: 3392404
           Summary: idiv: no way to specify imm8 or imm16 (apparently)
           Product: NASM
           Version: 2.12.xx
          Hardware: All
                OS: All
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: eekee57 at fastmail.fm
                CC: gorcunov at gmail.com, hpa at zytor.com, nasm-bugs at nasm.us

idiv puts results in different registers depending on the size of its operands,
and there appears to be no way to specify whether an immediate operand is 8 or
16 bits. i'm writing for real mode 8086. i need to specify a 16-bit immediate
operand to idiv, but of the operand size specifiers i am aware of (see
#3392403), all combinations result in an error:

        idiv word 10d
swapcaps.asm:67: error: invalid combination of opcode and operands

        idiv word, 10d
swapcaps.asm:67: error: expression syntax error

        idiv 10d word
swapcaps.asm:67: error: comma, colon, decorator or end of line expected after
operand

        idiv 10d, word
swapcaps.asm:67: error: expression syntax error

        word idiv 10d
swapcaps.asm:67: error: label or instruction expected at start of line

        o16 idiv 10d
swapcaps.asm:67: error: invalid combination of opcode and operands

        idiv o16 10d
swapcaps.asm:67: error: expression syntax error

        idiv o16, 10d
swapcaps.asm:67: error: expression syntax error


i wasn't really expecting o16 to work, i just tried it out of desperation.

perhaps the operation i want is nasm's default, but i would prefer to specify
it explicitly.

i'm using nasm 2.12.02, precompiled for dos.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list