how to implement setjmp and longjmp using inline #asm in a naked function on amd64 and i386. Describes the #Microsoft-Windows #calling-convention. #Wellons
how to build #Microsoft-Windows programs without CRT (libc) using MSVC or GCC, using your own mainCRTStartup or WinMainCRTStartup function, which you shouldn’t declare with __stdcall, and which should exit with TerminateProcess. Compile with cc -nostdlib example.c -lkernel32 with GCC. Also you have to deal with stack probing to commit stack pages unless you preallocate a big stack with -Xlinker --stack=0x200000,0x200000 or something, or avoid stack frames over 4K. #Wellons
The #Microsoft-Windows #ARM #asm ABI. It really does require that r11 always be a frame pointer! But then it softens that to a recommendation. It doesn’t seem to explain the IT/ITE/ITTE limitation mentioned in Raymond Chen’s blog post; possibly it’s gone?
on 02023-07-13Raymond Chen’s #ARM #asm #tutorial introduces #Thumb. The #Microsoft-Windows ABI only lets you conditionalize a single instruction with IT! You can’t use ITE, ITTE, ITEE, etc., at all there, because it doesn’t know how to recover from hardware interrupts.
on 02023-07-13First in Raymond Chen’s #tutorial about #ARM #asm; apparently #Microsoft-Windows 10 still supports 32-bit ARM, but only in #Thumb mode. This is the intro where he explains the register set, stack alignment constraints, flags, etc.
on 02023-07-13