‫Hello and welcome, everybody, and in this lecture, we're going to implement the put H.R. function.
‫Now, if we just go to ISI to start see you'll see picture that's come on three with information on
‫the colonel's side.
‫We need to implement it on the userspace side to go to posterized and just have to get key.
‫We're going to do Pusha.
‫We're going to push the base point to move the stack point to the base point.
‫We're going to have command of three.
‫OK, uh, we're going to go in, it's your Zaydi.
‫And we're going to go at E.S.P for Poppy BP right now, we're doing at the Hesp fall because we're about
‫to push something to the stack.
‫So just after we set the command to command three, just go push the word EBP plus eight, OK?
‫And that is variable C, OK, and this is how the function looks.
‫So we're going to just go in it, put Char in it, see.
‫OK, so that's the charge that we're going to put to the kernel essentially.
‫OK guys, so that's the prototype.
‫So.
‫Just copy and paste that into pictures just like that.
‫OK, and I know that this should take a shower.
‫We're just going to provide the industry here just to make sure that the compiler doesn't do anything
‫fancy with this location.
‫It'll probably still work exactly the same.
‫But let's just keep it as an integer for now.
‫It really isn't a big deal.
‫And you know what?
‫Actually, let's do this properly.
‫OK, guys, change that to avoid a return type.
‫We will accept the charge and everything will be fine.
‫I know that it will it won't be a big deal because the stacks fall by wide.
‫So even though it has a charge to type, it's still going to use four bytes is no big deal.
‫OK, so just use the Pusha like that, make sure of overturned type and we're going to change this to
‫our Sunday school picture.
‫Now, the reason for that is because Pusha is a function in the standard library, much like we did
‫with the Madlock.
‫Right.
‫We did Peatross Malakia here because we couldn't use mallock.
‫Right.
‫So just paste that in there like that.
‫OK, and we're then going to put that impetuousness.
‫OK, so it's Peatross Pucher and it just looks like that it's pretty straightforward that that should
‫work.
‫Absolutely.
‫Fine.
‫Just scroll up now and we're going to go global peatross percha and that is a function.
‫OK, so what we're going to do now is we're going to just go into source.
‫We're going to create a new file called SETI o dot org and we're just going to go F and death
‫Peatross, Sealab, WDIA, I mean, Astudillo guys.
‫And we're going to go to find pictures as audio.
‫OK, and we'll see that we haven't done that for astrolabes, so just do that as well, guys.
‫OK, we want to make this clear that this is to do with Peatross.
‫OK, so once you've done that, just create new file here called Theodicy and just include studio dot
‫org.
‫OK, perfect.
‫So inside this file will be our printer.
‫It'll be our Pusha.
‫Everything Io related.
‫Basically everything in the normal C had for a studio.
‫So if we just go to Firefox and we look for studio hates.
‫We can see all about studio, OK?
‫We can see it has the clothes, the affair, the flash, the F open, it has an awful lot in here to
‫do with Io, OK.
‫And I've extended clicked f close there, so I'm going to go back so you can see there's an awful lot
‫here.
‫You have f right tamponading print.
‫You have a lot in here.
‫OK, we have get ok.
‫You can see there's a lot.
‫And we can see pictures in here as well.
‫OK, so Pushka actually returns an inside job and it does except the charges and charges.
‫So I actually wrote it correctly the first time.
‫But that's OK because our version we only want the show.
‫OK, so just copy and paste this prototype here or you can type it and we're going to paste that in
‫there like that.
‫OK, so it look like that in a picture and I'm going to close Firefox there now as well.
‫So all of this is going to do is it's just going to go Peatross put cha cha, OK, and then we're just
‫going to return zero here.
‫OK, we have to follow the same prototype is the C compiler as the C Standard Library expects.
‫So we're going to include features here, OK, and we're going to change this to C, C and we're going
‫to cast that to CHA.
‫OK, so that that's how it works.
‫I'll put cha.
‫OK, so we now go to the makefile here.
‫We're going to add add that to the compilation basically.
‫OK, the audio.
‫So we're going to copy and paste hosted live by here.
‫And we're just going to go to Studio Dotto
‫Studio, a studio don't see and studio.
‫Oh, OK.
‫And if we now put it, that falls at the top here, we just put that in like that.
‫And if we now do make clean bill that S.H..
‫We can see that can pass without problems, so we're now going to try and use pot charges to check this
‫out, so go to blanked out, see, and just after we've put our numbers, we're just going to go put.
‫And we're just going to put character Z in here, OK, and we're going to include a studio pedophile,
‫OK, and now just compile that again.
‫Run that.
‫And we can see outputted, so Pusha works perfectly.
‫There is a little error here in Declaration of Pusha, so just go back to SDI and put it in the header
‫file, basically.
‫OK, guys, the prototype, you guys know the code C, just put it in the header file like that, OK?
‫And now if we want to rebuild, we would have no more warnings.
‫As you can see, no problems, so congratulations, guys, you've just implemented Pucher were almost
‫ready to implement printf.
‫Thank you.