I'm honestly shocked that this actually is the calling convention for printf().
Indeed, I didn't think anyone uses stacks these days.
I just checked my development boxes:
Platform(compiler) format (char*) the number (int)
x86_64(GCC) %rsi %edx
x86_64(Intel, Clang) %rdi %esi
IBM(GCC, XLC) %r4 %r3
Solaris(Sun) %o0 %o1
CPU registers as expected.
Jackson Marie wrote:
I am? Using VS2005 (Visual Studio 2005). It's really old, right?
Assembly languages are different on every platform, and the syntax for inserting them into C++ programs is different on every compiler. It's not that VS2005 is old, it's that you need to read its documentation or find someone who uses inline assembly in Visual Studio specifically,
I want to get into assembly, thres amazing raspberry Pi guides...im gonna mess with everything that plugs into computers, change error codes yooh name it
@DeXecipher, is that a comment about Pi? If not, I'll have to say you're wrong. To write most programs in assembly you don't need more knowledge about computer architecture that in any other language. Note, operating systems and etc. are not included in "most programs".
Of course, that does not apply if you were talking about writing good code...
@hamsterman You cant write assembly without knowing the word size for the architecture and the size of a byte and the type of addressing and modes that the architecture uses. Depending on the assembly language you cant even effectively program if you dont know what a register is or a stack is. Tutorials only take you so far.
Edit: Instead of great in depth architecture i really mean the basics, what an interrupt is, what a register is and how to access main memory for reading and writing data (interrupts).