SOLVED: FASM Problems No extenal calls in 16 bit

Programming, for all ages and all languages.
Post Reply
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

SOLVED: FASM Problems No extenal calls in 16 bit

Post 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.
Last edited by frank on Mon Sep 24, 2007 6:18 pm, edited 1 time in total.
User avatar
bluecode
Member
Member
Posts: 202
Joined: Wed Nov 17, 2004 12:00 am
Location: Germany
Contact:

Post by bluecode »

Elf can not do 16bit relocations. That could be the problem.
Post Reply