Re: Problem with fasm



suchi_01 wrote:
Hi Frank,
I am sorry i was not clear about the environment. The code
(assembly language function) is called during boot time by a
bootsector code (after enabling protected mode). I am successful in
calling the function but it does not return back to the C code back
(ie., next line after the call in C Code). At boot time there is no
elf loader and it is difficult to point it to where it has to return.
Mysteriously, using global in nasm does the stuff!

Very mysterious. I'm still not sure where the C code begins and ends, but in any case, the call puts a return address on the stack. If it finds your assembly function, the "ret" ought to return to the same place, whether it was generated by Nasm or Fasm. Possible issue with "bitness"?

If all else fails, converting Fasm source to Nasm shouldn't be too difficult... but you really shouldn't have to!

Best,
Frank

.