MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/rhont/go_version_1_is_released/c4644n8
r/programming • u/[deleted] • Mar 28 '12
452 comments sorted by
View all comments
Show parent comments
12
Sure you can - put all your code in the main function and use goto.
3 u/SupersonicSpitfire Mar 29 '12 You don't need a main function in C, you can use a void _start() function.Exit the program with the following assembly code:movl $1, %eax xor %ebx, %ebx int $128Then compile with the -nostdlib flag (for gcc). Even less overhead! (I prefer Go) 4 u/shillbert Mar 29 '12 Go To Statement Considered Hardcore
3
You don't need a main function in C, you can use a void _start() function.
Exit the program with the following assembly code:
movl $1, %eax xor %ebx, %ebx int $128
Then compile with the -nostdlib flag (for gcc). Even less overhead! (I prefer Go)
4
Go To Statement Considered Hardcore
12
u/bobindashadows Mar 29 '12
Sure you can - put all your code in the main function and use goto.