flat assembler
Message board for the users of flat assembler.
Index
> Linux > [Solved] Command Line arguments ordering? |
Author |
|
revolution 21 Dec 2014, 15:37
Show all the associated code. If you leave stuff out we can't be sure what is happening.
|
|||
21 Dec 2014, 15:37 |
|
system error 21 Dec 2014, 15:42
BTW, atoi is for null-terminated string conversion. So there should be no problem converting integers from the arguments since they are all null-terminated anyway.
One more thing, I tried adding a third argument and at first it works regardless of the order they appear in the source. But then (I don't know how) it's back to the old problem. I smell inconsistency here. |
|||
21 Dec 2014, 15:42 |
|
system error 21 Dec 2014, 15:48
revo... here's part of atoi:
Code: atoi: push rcx push rbx push r8 push r9 push rdx push r15 ... ... syscall .out: mov rax,r9 pop r15 pop rdx pop r9 pop r8 pop rbx pop rcx ret There's just one syscall in there and nothing else. Its a leaf. It takes RDI as argument and returns RAX. That's about it. |
|||
21 Dec 2014, 15:48 |
|
system error 21 Dec 2014, 17:05
nvm, I figured it out myself. stupid mistake
thanks anyway revo |
|||
21 Dec 2014, 17:05 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.