@2012goingNutz It's nerds who created youtube so that LOSERS like yourself can post stupid comments on how much nerds suck. Pathetic. Oh and yeah most rich folk are nerds and statistically speaking nerds get more women than the high school jocks who picked on them. Losers like yourself end up slaving away a dead end job with a fat beer gut and a saggy bitch for a wife.
Thank you for posting such an interesting and inspiring tutorial! I am just getting back into programming and want to experiment with C. You have definitely given me some inspiration to actually learn curiously instead of seriously :). (The former seems to always get me so much further!) Thank you!!!!!!
@bulllsize I call main(), hehe. OK to be more specific, fork() is not returning 2 values at the same time. It returns the PID of the child process to the parent and that's that. However, if fork() is then called by the child, fork() will return 0 to the child process that called it. This lets the child know that it is the child (in many other respects the child is a copy of the parent). Yep, confusing. They can pay me to use fork(), but I'd rather use popen().
@bulllsize oops, I mean it's getppid()'s job to tell you who called main(). If you call fork() and it returns 0, that means you are in a child process. You can then call getppid() to get the ID of the parent or who called main. (Again, probably the shell.)
Very good video, I also get bothered a lot by some of the things I read about C which take for granted that there are people who want to make the connection between the code and how it runs on the machine. The term 'stack' is also an abstract concept with relation to what I think you intended with this video. But thats not a big deal, I'm just being really picky I guess. I've picked up a C book again recently and found this video when searching for C programming. Very good stuff.
Where exactly can you learn to do this from please pm me. Really interested but its extremely difficult for me to learn just by watching videos and reading tuts
@TeenNewsLive I learned by using apropos and reading the man pages for each command and by looking at other people's programs. Most of the C statements also have man pages. The SciTE text editor, most text editors actually, let you highlight a keyword, press F1, and automatically open a man page for it. Remaining questions were answered by web searches. Use the ##C IRC channel web site but not the chat room. They cater to professionals and have a short fuse when it comes to FAQs.
@NawafLol Yeah I love writing C code in Linux, for some reason I just find if funny that I can be writing code to be run on an OS that was made from the same compiler. Even the same version of the compiler if I really wanted to.
I also have the 0.01 version of the kernel to look over when I'm bored and feel like understanding it a little better.
wchar_t is implementation defined. Windows defines it as 16 bit. Doesn't really matter though, unless you're looking at the debugger or maybe doing something you shouldn't... The pointer (wchar_t *) is of course a 32 bit pointer (or 64 bit pointer on a 64 bit implementation) that points to the (implementation-defined) data type (usually 16 or 32 bits, but could be anything. Only reason I used it was to figure out some other programs that use that data type and compare them to this.
Thanks. I should have probably mentioned valgrind. It wouldn't be useful here, but it really helped me sort out those memory and threading errors I get from late night stupidity.
It's not an IDE. It's the scite text editor. The LINUX Operating System itself is my Integrated Development Environment (IDE)! I used the Compiz window manager to glue scite and terminal windows together and flip them around in 3D. I also added a bunch of lua script add-ons from the scite lua script page. All free.
@ZeeManDWeasel I lost the lua wiki link for a while. Finally found it by searching google for scite lua users wiki. I contributed 4 or 5 of them myself!
I used Turbo Debugger a lot in MS-DOS days, gdb is a simple version, command version, and I heard of ELF on Linux, and I can see what you were doing by anti-debugging with hexdump, but what on earth is ndisasm? I didnt get that.
There are much better videos on gdb, conditional breakpoints and such. I only had time to touch on a few tools. Also forgot to mention that the terminal should support wide character streams (most do, although gdb doesn't appear to yet...)
is that how you get all the women? LMAO loser!
2012goingNutz 1 month ago
Comment removed
mykebulvai 1 week ago
This has been flagged as spam show
@2012goingNutz It's nerds who created youtube so that LOSERS like yourself can post stupid comments on how much nerds suck. Pathetic. Oh and yeah most rich folk are nerds and statistically speaking nerds get more women than the high school jocks who picked on them. Losers like yourself end up slaving away a dead end job with a fat beer gut and a saggy bitch for a wife.
mykebulvai 1 week ago
I subbed, good information mate.
yullashu 1 month ago
this is a great video and well explained. thank you very much.
sebster3gmail 3 months ago
Hii,
Which IDE is this ? during writing program its showing Intelligence also..
MotaPratik 3 months ago
@MotaPratik It is the SciTE text editor. I have just now added that info to the video description.
themanyone 3 months ago
aaaah dissasembling i remember those times.... thanks for this, have to read a lot now...
geomorillo 4 months ago
Emacs for the wolf.
AlphaNorcalli 6 months ago
what is the cool editor with auto completion feature?
lukmackul 8 months ago
@KiranaForever Good analogy. =D
themanyone 8 months ago
Thanks for this, really helped me transition to gdb
jivealways 10 months ago
so what is this good for? Its useless babble.
FOXnewsAlien 11 months ago
what an idiot. Yeah, looking at the asm is very useful for a 5 line program and a tutorial on gdb for beginners
kotapaka 1 year ago
Thank you for posting such an interesting and inspiring tutorial! I am just getting back into programming and want to experiment with C. You have definitely given me some inspiration to actually learn curiously instead of seriously :). (The former seems to always get me so much further!) Thank you!!!!!!
keirzev 1 year ago
this is a very good tutorial thanks for posting :)
i hope i can learn more from you.
osiris1503 1 year ago
WTF? Try JAVA.
silverpizza100 1 year ago
@silverpizza100
Enjoy your bloated jre.
bblokar1 1 year ago 2
@silverpizza100 Java? C is the mother language of all.
pithikoulis 1 year ago 3
how do I like print the nasm file output into another file ?? and also the output of gdb ?
decodedthoughtDT 1 year ago
@decodedthoughtDT Don't you hate it when people say RTFM without providing a link? ManBashRedirect(dot)tk
themanyone 1 year ago
nice tut thanks
decodedthoughtDT 1 year ago
Wow. How do you guys avoid blowing your brains out? This is exciting!
davidlanham99 1 year ago 4
I m pursuing Graduation in Computer Science and want to know some answers:
1.Who calls main() and I dont expect OS as answer..plz be specific
2.How does fork() return 2 values being a function?
3.how does fork() return 2 values at 2 places i.e parent(pid of child) and child( return val=0)?
plz urgent help
bulllsize 1 year ago
@bulllsize I call main(), hehe. OK to be more specific, fork() is not returning 2 values at the same time. It returns the PID of the child process to the parent and that's that. However, if fork() is then called by the child, fork() will return 0 to the child process that called it. This lets the child know that it is the child (in many other respects the child is a copy of the parent). Yep, confusing. They can pay me to use fork(), but I'd rather use popen().
themanyone 1 year ago
@bulllsize oops, I mean it's getppid()'s job to tell you who called main(). If you call fork() and it returns 0, that means you are in a child process. You can then call getppid() to get the ID of the parent or who called main. (Again, probably the shell.)
themanyone 1 year ago
Comment removed
learnwithtechies 1 year ago
@bulllsize
For the first question: who calls main:
learnwithtechies(dot)com/index.php/component/content/article/4-c/25-who-calls-main-in-c-program
learnwithtechies 1 year ago
Very good video, I also get bothered a lot by some of the things I read about C which take for granted that there are people who want to make the connection between the code and how it runs on the machine. The term 'stack' is also an abstract concept with relation to what I think you intended with this video. But thats not a big deal, I'm just being really picky I guess. I've picked up a C book again recently and found this video when searching for C programming. Very good stuff.
ThunderAppeal 1 year ago
Where exactly can you learn to do this from please pm me. Really interested but its extremely difficult for me to learn just by watching videos and reading tuts
TeenNewsLive 1 year ago
@TeenNewsLive I learned by using apropos and reading the man pages for each command and by looking at other people's programs. Most of the C statements also have man pages. The SciTE text editor, most text editors actually, let you highlight a keyword, press F1, and automatically open a man page for it. Remaining questions were answered by web searches. Use the ##C IRC channel web site but not the chat room. They cater to professionals and have a short fuse when it comes to FAQs.
themanyone 1 year ago
i hate c, basic rulez
MakarovD 1 year ago
C is better and powerful ,you can make a whole operating system with C !
NawafLol 1 year ago
@NawafLol Yeah I love writing C code in Linux, for some reason I just find if funny that I can be writing code to be run on an OS that was made from the same compiler. Even the same version of the compiler if I really wanted to.
I also have the 0.01 version of the kernel to look over when I'm bored and feel like understanding it a little better.
coilgunner2 1 year ago
for 64 bit numbers you can use __int64. Just thought id throw that in their.
0121ryanh117 1 year ago
Great video
jayagk 1 year ago
Hi,very nice video! Can you make a tutorial on buffer overflows and exploiting them?
vincjenzo 2 years ago
WoW. I am seeing this right but a wide character is 4 bytes on Linux? (32 bits!!)
What the hell.
ChaperonNoir 2 years ago
Isnt' it also 4 bytes on windows? wchars are used for unicode and unucode has quite a lot of characters.
gerbrandt92 2 years ago
wchar_t is implementation defined. Windows defines it as 16 bit. Doesn't really matter though, unless you're looking at the debugger or maybe doing something you shouldn't... The pointer (wchar_t *) is of course a 32 bit pointer (or 64 bit pointer on a 64 bit implementation) that points to the (implementation-defined) data type (usually 16 or 32 bits, but could be anything. Only reason I used it was to figure out some other programs that use that data type and compare them to this.
themanyone 2 years ago
Nice dude! At last someone who uses GDB lol.
Sotacap 2 years ago
Thanks. I should have probably mentioned valgrind. It wouldn't be useful here, but it really helped me sort out those memory and threading errors I get from late night stupidity.
themanyone 2 years ago
Excellent and helpful...thanks! Can you do some more helpful tutorials? Great stuff.
ejmarkow 2 years ago
thank you for doing this. love you man.
washumagic 2 years ago
This comment has received too many negative votes show
there are many virsions of c# this is not the c# i know. I know microsoft c#
MrApplication 2 years ago
ok, I'll bite. This is obviously C. Big difference.
You spelled version wrong.
MindTrip51 2 years ago
Pfft, this is C. Not damn C#, nothing to do with M$
tunglour 2 years ago
please till me what is the name of this IDE
shalola5 2 years ago
It's not an IDE. It's the scite text editor. The LINUX Operating System itself is my Integrated Development Environment (IDE)! I used the Compiz window manager to glue scite and terminal windows together and flip them around in 3D. I also added a bunch of lua script add-ons from the scite lua script page. All free.
themanyone 2 years ago
@themanyone
Any chance of a link to the scite lua scripts you used? Looking for a feature to provide something similar to intellisense in visual studio. pls? :)
ZeeManDWeasel 1 year ago
@ZeeManDWeasel I lost the lua wiki link for a while. Finally found it by searching google for scite lua users wiki. I contributed 4 or 5 of them myself!
themanyone 1 year ago
Didn't get why you used hexdump. What was that doing?
Pablos544 2 years ago
I am preparing to crack some anti debugger code.
themanyone 2 years ago
I used Turbo Debugger a lot in MS-DOS days, gdb is a simple version, command version, and I heard of ELF on Linux, and I can see what you were doing by anti-debugging with hexdump, but what on earth is ndisasm? I didnt get that.
Pablos544 2 years ago
ndisasm comes bundled with the Netwide Assembler (nasm) package.
themanyone 2 years ago
Nicely done, thanks..
lalitsrana 2 years ago
There are much better videos on gdb, conditional breakpoints and such. I only had time to touch on a few tools. Also forgot to mention that the terminal should support wide character streams (most do, although gdb doesn't appear to yet...)
themanyone 2 years ago