Code segfaults unless esp incremented
I have the following code all it is suppose to do is print Hello World using CoreFoundation functions. However whenever I seemingly have a proper aligned stack it doesn't work, seg faulting. But then when I finally got it working the stack isn't aligned?!?!?! global _main align 4, db 0x90 extern _CFStringCreateWithCString extern _CFShow section .data hw: db 'Hello World!' ,0xA,0 section .text _main: ; entering a new function stack must be balanced right? push ebp ; saving ebp (esp + 4) mov ebp, esp ; moving registers around ; align stack as calling pushed a 4 byte address on to the stack sub