Page 1 of 1

SOLVED: FASM Problems No extenal calls in 16 bit

Posted: Sun Sep 23, 2007 8:16 pm
by frank
EDIT: Bluecode was right. Elf must not support 16 bit relocations. I ended up just putting call DWORD function and changing all of my returns to retd.

The following will not assemble no matter what I do to it unless I change it too 32 bit.

Code: Select all

format elf

USE16

extrn something

error:
    call something
The only thing I can do is change call something to call DWORD something and it will assemble but then it pushes a 32 bit return address on the stack. That wrecks havoc on my functions. The only other thing I can do is a lea ax, [something] then a call ax. Of course thats worthless when I'm trying to pass a value in ax.

Here is the output:

Code: Select all

flat assembler  version 1.67.23  (420814 kilobytes memory)
test1.asm [8]:
    call something
error: address sizes do not agree.

Posted: Mon Sep 24, 2007 5:26 am
by bluecode
Elf can not do 16bit relocations. That could be the problem.