MASM32 Downloads
Perhaps. After making use of argc, argv etc. if we need itDid you already try main args ?
I'm not against ABI . I simply wanted to show you that rsp at main entry contains meaningful info.
....code main: and rsp, -16 invoke printf,CStr("argc = %d ",10), [rdi] ; [rsp]...
I agree. It makes sense how to work with labels as entry point . Now what if you want to pass real argc and argv to gtk_init not just nulls.How would you do it?
gtk_init takes 2 parameters: argc and argvIn the gtk1 example nullPtr's were used . That's why I asked you . I know about online GNOME docs I perfectly can use it. Well , let's stop for today. Thanks for your time and efforts
public mainputs proto :PTRexit proto :DWORDprintf proto :PTR, :VARARGstrlen proto :PTR.dataargcount db "count %d",10,0passedargs db "%s",10,0.codemain: push r12 push r13 push r14 and rsp, -16 mov r13d, edi mov r14, [rsi] invoke printf, offset argcount, r13d xor r12, r12 .while r12<r13 invoke printf, offset passedargs, r14 invoke strlen, r14 add r14,rax inc r14 inc r12 .endw pop r14 pop r13 pop r12 invoke exit, 0end main
BTW do we really need to push all those registers on main entry?