News for hackers. Stuff that matters.
Re:AsmBB – a lightweight web forum engine written in assembl... by nineteen999 on Saturday January 13, 2024 @05:33PM (#38985319)
> x32 was more pleasant by far, since it only used the stack

Maybe I misunderstand you, but this is completely dependent on compiler, operating system etc, there are multiple calling conventions for x86-32, eg. cdecl, fastcall ...

https://en.wikipedia.org/wiki/X86_calling_conventions

Re:AsmBB – a lightweight web forum engine written in assembl... by pengaru on Saturday January 13, 2024 @07:20PM (#38986121)
Apologies, my experience is SysV-centric for amd64, as described here[0] under the Parameter Passing section, which is a clustrfuck compared to the simplicity of the 386 SysV ABI as described here[1]:

  > Argument words are pushed onto the stack in reverse order (that is, the
  > rightmost argument in C call syntax has the highest address), preserving the
  > stack’s word alignment. All incoming arguments appear on the stack, resid-
  > ing in the stack frame of the caller.
Both links were found @ https://wiki.osdev.org/System_V_ABI

[0] https://www.uclibc.org/docs/psABI-x86_64.pdf

[1] https://www.sco.com/developers/devspecs/abi386-4.pdf