[Nasm-bugs] [Bug 3392439] New: Missing operand size override prefix

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Mon Sep 11 05:40:47 PDT 2017


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

            Bug ID: 3392439
           Summary: Missing operand size override prefix
           Product: NASM
           Version: 2.13.xx
          Hardware: Other x86
                OS: Linux
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: yaniv.0x01 at gmail.com
                CC: gorcunov at gmail.com, hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: From OS distribution

Missing operand size override prefix (66) while using 2.13
(nasm-2.13.01-3.fc26.x86_64). Is OK while using 2.12
(asm-2.12-2.fc24.x86_64.rpm).


Object dump while using nasm-2.12 output
---------------------------------------------------------------

objdump -b binary -m i386 -Maddr32,data32 -D bios32.bin | less

bios32.bin:     file format binary


Disassembly of section .data:

00000000 <.data>:
       0:       66 b8 10 00             mov    $0x10,%ax
       4:       8e d8                   mov    %eax,%ds
       6:       8e c0                   mov    %eax,%es
       8:       8e d0                   mov    %eax,%ss
       a:       31 c0                   xor    %eax,%eax
       c:       66 a1 0e 04 00 00       mov    0x40e,%ax
      12:       c1 e0 04                shl    $0x4,%eax
      15:       05 64 01 00 00          add    $0x164,%eax
      1a:       8b 20                   mov    (%eax),%esp
      1c:       e8 16 22 00 00          call   0x2237
      21:       f4                      hlt    
      22:       eb fd                   jmp    0x21
      24:       ea 02 00 00 00 18 00    ljmp   $0x18,$0x2
      2b:       90                      nop
      2c:       90                      nop



Object dump while using nasm-2.13 output
---------------------------------------------------------------

objdump -b binary -m i386 -Maddr32,data32 -D bios32.bin | less

bios32.bin:     file format binary


Disassembly of section .data:

00000000 <.data>:
       0:       b8 10 00 8e d8          mov    $0xd88e0010,%eax
       5:       8e c0                   mov    %eax,%es
       7:       8e d0                   mov    %eax,%ss
       9:       66 31 c0                xor    %ax,%ax
       c:       a1 0e 04 66 c1          mov    0xc166040e,%eax
      11:       e0 04                   loopne 0x17
      13:       66 05 64 01             add    $0x164,%ax
      17:       00 00                   add    %al,(%eax)
      19:       66 67 8b 20             mov    (%bx,%si),%sp
      1d:       e8 25 22 f4 eb          call   0xebf42247
      22:       fd                      std    
      23:       66 ea 02 00 00 00       ljmpw  $0x0,$0x2
      29:       18 00                   sbb    %al,(%eax)
      2b:       90                      nop
      2c:       90                      nop



Source code
---------------------------------------------------------------

segment _TEXT class=CODE USE32 align=1 CPU=686
group DGROUP _TEXT


%include "defs.inc"


extern _entry
extern _directory_service
extern _pcibios_service


start:
    mov ax, DATA_SEGMENT_SELECTOR
    mov ds, ax
    mov es, ax
    mov ss, ax
    xor eax, eax
    mov ax, [(BDA_SEG << 4) + BDA_OFFSET_EBDA]
    shl eax, 4
    add eax, EBDA_PRIVATE_START + PRIVATE_OFFSET_PM_STACK_BASE
    mov esp, [eax]

    call _entry

.infloop:
    hlt
    jmp .infloop


global _ret_16
_ret_16:
    jmp dword CODE16_SEGMENT_SELECTOR:BACK_FROM_PM_START_ADDRESS

-- 
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