NASM - The Netwide Assembler

NASM Forum => Example Code => Topic started by: nobody on February 09, 2009, 06:57:30 AM

Title: how to call dword [oldptr] in nasm
Post by: nobody on February 09, 2009, 06:57:30 AM
I'm trying to convert a TASM source file containing all 8086 code to NASM format but I'm having a problem trying to convert this TASM line of code, this is the output from the assembly listing file:

Code: [Select]
304 0211  FF 1E 0242r                    call    dword ptr oldptr

330 0242  0000 0000              oldptr  dw      0,0

With BITS 16 and CPU 8086 set in my nasm sources and trying to use:

Code: [Select]
call    dword [oldptr]

Results in:

error: no instruction for this cpu level

What syntax do I need to generate the equivalent 8086 machine code of 'FF 1E HHHH' ?
Title: Re: how to call dword [oldptr] in nasm
Post by: nobody on February 09, 2009, 07:58:22 AM
After some more experimenting I managed to find the solution:

Code: [Select]
442 00000211 FF1E[4202]                      call    far [oldptr]

330 0242  0000 0000              oldptr  dw      0,0