How to write assembly language hello world program for 64 bit Mac OS X using printf?

You didn’t say exactly what the problem you’re seeing is, but I’m guessing that you’re crashing at the point of the call to printf. This is because OS X (both 32- and 64-bit) requires that the stack pointer have 16-byte alignment at the point of any external function call. The stack pointer was 16-byte aligned … Read more

Xcode – symbol(s) not found for architecture x86_64 (iOS Lib)

I had the same trouble with building static library. Finally I have found the basic solution. (You need to build universal library for x86_64/armv7/armv7s/arm64) 1) Click on the project file 2) Click on the target 3) Open “Build Phases” 4) Open “Run Script” 5) Add “/bin/sh” and the script below ########################################## # # c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 … Read more

IIS 7.5 Fixing An attempt was made to load a program with an incorrect format problem?

Found the problem – The solution is in the way that the two AppPools are configured: Default Website/my_app is using DefaultAppPool where Enable 32-Bit applications is TRUE Beta/my_app -> BetaAppPool is using Enable 32-Bit applications is FALSE Changing BetaAppPool to set Enable 32-Bit applications to TRUE has fixed this problem. Solution was found by @Rick … Read more

Size of pid_t, uid_t, gid_t on Linux

#include <stdio.h> #include <sys/types.h> int main() { printf(“pid_t: %zu\n”, sizeof(pid_t)); printf(“uid_t: %zu\n”, sizeof(uid_t)); printf(“gid_t: %zu\n”, sizeof(gid_t)); } EDIT: Per popular request (and because, realistically, 99% of the people coming to this question are going to be running x86 or x86_64)… On an i686 and x86_64 (so, 32-bit and 64-bit) processor running Linux >= 3.0.0, the … Read more