‫Hello and welcome, everybody, and in this lecture, we're going to take what we did in blanked out,
‫see and apply it to stop terrorism.
‫OK, so essentially what we're going to do is we're going to get these arguments in our Senate library
‫and then pass it to the main function.
‫OK, so so this way the arguments will be anoxia Naqvi provided to us won't have to go and ask for them
‫from the Colonel.
‫OK, we're going to let the standard library ask the Colonel for those arguments for us.
‫OK, so let's just get rid of what we did here and we're just going to put a little placeholder here.
‫We're going to go print Aragvi Zero.
‫OK, just like that.
‫OK.
‫Obviously this won't work right now.
‫We are going to now program it.
‫So those arguments are passed to the main function of the program we're starting.
‫So the next thing I want us to do is to create a new file in here called Start to See OK and start to
‫see will include Stop Hajj.
‫OK, and we're going to have a little function here called Voit Sea and the scrolls start, OK, and
‫it'll take no arguments.
‫OK, so here we're going to go.
‫Extern, inch germein, inch jarkesy, char hogweed.
‫OK, so we're just marking the main function is external basically.
‫OK, now it's stopped lsm we're going to change this extern main to see and discourse start and we're
‫going to call C underscore start and that's how that's going to work now.
‫OK, we're actually going to be calling this C function in Stazi and allowing it to continue.
‫So we're now going to go struct program arguments, arguments and we're going to say process, process,
‫good arguments and we're going to pass in the address of arguments here.
‫OK, and now we're just going to simply go main arguments that ACSI and arguments org v..
‫We can see it says incomplete type, let's just go to stage a minute process arguments.
‫Yes, that's correct.
‫Stazi struct program arguments, OK, should we process arguments?
‫So structured process arguments, arguments and we go Peatross process good arguments.
‫We pass the arguments.
‫Good.
‫So now at this point in time, we have the arguments, right?
‫So then we call the main function passing Occy and Aragvi.
‫OK, so now let's just take the results as well.
‫That main returns and we're not going to do anything with it right now.
‫We're just going to do nothing with it right now.
‫But in the future, you know that that return could be used to pass to the exit command or something
‫like that.
‫Right.
‫So, yeah, that's the start routine in the C-code, OK, because our main function.
‫So I'll start the DSM will call our C-code and I see CocaCola main function.
‫And obviously, as you know, this is the standard library.
‫So somebody who has the main function has to link with us.
‫OK, so we're going to go to the Makefile now and we're just going to copy and paste one of these because
‫we're going to compile it.
‫OK, so we're going to go that.
‫Oh, no, Stotler.
‫Oh will be the object file.
‫OK, it'll be start to see for the source file Stazi for the source file output file we start Dotto
‫and now if we just scroll up to start with the first one that we had, this one needs to change now
‫to to start HSM.
‫Oh OK.
‫And change the one of the files at the top there as well.
‫And we're also going to add stato here now as well because that's our C version now.
‫OK, so the RSM version will be assembled to stop the DSM Dotto, which we need to change.
‫Here is the output format as well guys by here.
‫OK, so the output file start the DSM out and the C version will be stopped.
‫So we've just flip them around now.
‫OK, so that's pretty important.
‫So OK, if we now do a make clean Annabell that S.H. on all of that.
‫We can see that that compound successfully.
‫OK, so we should now be able to print out OK, zero in Planktos, see?
‫So just to test that, if we go Cribben and we just run Kumu here, we see testing.
‫OK, so we can see how that works.
‫OK, we can see that that works now.
‫And if we if we do, if we did something else and the here print, uh did this work just to show that
‫it's using the new, the new code and go make clean bill that S.H..
‫Citibank.
‫WAMU.
‫Yeah, you can see testing did this work, so you can see now we're able to access the arguments pass
‫to us through Occy and Nökkvi, as it's supposed to be.
‫Now, obviously, what's really happening is where request in the arguments here and we're calling the
‫main function.
‫But the point I'm trying to make is it doesn't matter how we'll get in the arguments just as long as
‫we can get them, OK?
‫And just as long as we pass them to the main function as the main function expects, which we now do
‫correctly.
‫So, yeah, congratulations, guys.
‫We are now processing arguments correctly.