flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Linux ccall |
Author |
|
revolution 08 Nov 2019, 13:24
Where is the "Linux ccall" macro that you are referring to?
32-bit Linux, the OS, uses int 0x80 with register parameters. 64-bit Linux uses syscall. If you are interfacing to one of the C libraries or linking to some C sources then I thought 32-bit code didn't need any stack alignment. |
|||
08 Nov 2019, 13:24 |
|
ProMiNick 08 Nov 2019, 13:47
fasmg source import32.inc - definitions of ccall & cinvoke.
Isn`t *.SO files linux analog of *.DLL? they not have exports? for example X-window system used via int $80 & syscalls or via cinvoke? Actualy at the very begining of meeting with Linux windows-users expect to see how to interact with X-windows system, and only later how to interact with OS. Last edited by ProMiNick on 08 Nov 2019, 14:04; edited 1 time in total |
|||
08 Nov 2019, 13:47 |
|
Tomasz Grysztar 08 Nov 2019, 13:56
These macros have been simply copied from the libc version, which targets not just Linux and therefore needs to fullfill expectations of some other systems as well. I did not pay much attention to this specific use being Linux-only.
|
|||
08 Nov 2019, 13:56 |
|
st 09 Nov 2019, 07:58
I suppose the alignment depends on data passed to functions.
Quote: SYSTEM V APPLICATION BINARY INTERFACE Intel386 Architecture Processor Supplement Fourth Edition (March 19, 1997) Quote: System V Application Binary Interface Intel386 Architecture Processor Supplement Version 1.0 (February 3, 2015) However I do don think this is of actual interest nowadays as Linux tends to drop IA32 mode support. ProMiNick wrote: Actualy at the very begining of meeting with Linux windows-users expect to see how to interact with X-windows system, and only later how to interact with OS. As to me, I did not. I see no practical reason to program X with assembly when Fedora Gnome comes with Wayland. While I have implemented in asm an experimental memory manager with garbage collection, because I was doubt how to do some tricks in C. |
|||
09 Nov 2019, 07:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.