‫OK, so welcome back, guys, where in this lecture we are going to set up a new build file which will
‫basically export these variables, allowing us to talk with C compiler, we'll call that builder S.H.
‫So in future you'll do things like build that S.H. to build the project rather than MAIKOL.
‫If you did make all, then these exports wouldn't be set up.
‫Right.
‫And because they're not set up to make code fail because what we do plan to use a C compiler after.
‫All right.
‫So by making a builder as Farlam, we export these the path and so on target prefect's here, it will
‫allow us to be able to just go build that S.H. and and we'll be able to access our C compiler.
‫OK, so in the root directory of your operating system, we're just going to go touchup forward, slash,
‫build LSH and now we're going to open that up and get it.
‫And we're just going to go hashtag forward, slash, spin, forward slash bash, Subash file, and we're
‫going to copy and paste our preparation experts here that we've been using on the last lecture and paste
‫those in.
‫And then we're just going to go make all.
‫And it's as simple as that.
‫Now back to the terminal, we're going to have to make this executables so pseudo Chambord plus Stopford
‫slash build that as we now go build that.
‫S.H. can see it runs the makefile successfully.
‫OK, so once again, when we start using the C compiler in our makefile, you'll have to call Bill S.H.
‫because it will require these exports to be set up correctly.
‫So we're not quite done with this lecture yet.
‫There's still quite a few other things we need to do.
‫We're going to remove some of the 32 bit code in our bootloader and put it into its own assembly file.
‫Right.
‫And then we're going to assemble that to an object file and then link it into Colonel Dobbyn, which
‫we haven't created yet.
‫What we will then do is we'll assemble the bootloader as normal.
‫OK, well, then compile our kernel, which will be that which will only be one file for now.
‫It'll be Colonel Dadaism or something.
‫Right.
‫Based on the code, we're going to abstract out, which is here, this 32 bit code here.
‫We're going to abstract all of this out into Colonel ASRM, something like that.
‫Right.
‫So now Makefile will then assemble that into an object, file, an Excel file or something like that.
‫And then we will use the link to create an output binary of code.
‫Colonel Ben.
‫Yeah.
‫And then we will did that into the actual operating system file, which will call stop.
‫We haven't quite got there yet, is just called boot up for now, but boot up bin and Colonel Ben will
‫make up OS stop in which we haven't created yet.
‫OK, and then at that point in time our bootloader and our kernel are separate.
‫OK, so the bootloader will take the first sector, which is the only sectors loaded.
‫It will mean that for this 32 bit code here, we'll have to load the next sector to to actually be able
‫to load this into memory.
‫Right.
‫OK, so sounds like a bit of a mouthful, but this is an important step.
‫So, yeah, we're going to we're going to get on with that now.
‫OK, so open up your visual studio code and our source directory.
‫We're going to create a new file and we're just going to call it Col Diesem, OK?
‫Down here, which 30 to load 32, we're just going to copy all of this.
‫And we're going to paste it into Colonel Darius, OK, now, at this point in time, we can't reference
‫low 32 because our bootloader isn't actually linked.
‫It's it's separate, right?
‫So it doesn't know what it does not know what load 32 is.
‫So what we what we will end up doing is we'll end up loading the colonel into an address, into an address
‫in memory the world that we are aware of.
‫And then we will obviously jump to it.
‫So it might be something like this, you know, something like that, right.
‫Jam code seg x 100000, something like that.
‫Right.
‫So that that's the idea, basically.
‫So for now, we can just put an assembly comment here because we're not going to be using that and we'll
‫just do an infinite jump here just in case we extend the run that at some point, OK, we now need to
‫make a link script because pretty soon we're going to be modifying our makefile.
‫Right.
‫And the link script will describe how how how we're going to actually link our kernel, where things
‫are going to be loaded in memory, et cetera, et cetera.
‫So in our source directory, we create a new file link.
‫Aldy and you can see there is asking me to search for extensions which will help with the Helda files.
‫I'm going to do that because might be something useful.
‫Oh, look at that Linkous script.
‫I stole that because, you know, every little, every little component helps when you are developing
‫Col's.
‫Right.
‫OK, so the first thing in Ilinka file, then we're going to go entry under scroll start Sasagawa.
‫That's our program entry points.
‫Right.
‫We're going to go Output's format binary because our kernel is pretty basic right now.
‫We haven't written function add to be able to read our files and stuff like that.
‫Right.
‫Object files and all this.
‫So what we'll do is we'll output as a flat binary file and bioprinting is a flat binary file.
‫We don't need to have to load headers and all of this stuff that's a little more complicated.
‫Now there are cons to this, such as not being able to distinguish between data and code, which which
‫later on in the course would be helpful.
‫But I need to keep it simple for you guys, because this is a beginner's operating system.
‫Development costs.
‫OK, so let's continue.
‫So we're going to grow sections and we're going to go dot equals one.
‫And now what we're saying here is, is that our kernel will be loaded into one megabyte into memory.
‫So that that's what he's saying.
‫So if we open up a calculator so I can show you this.
‫One thousand twenty four decimal multiplied by one thousand twenty four decimal change that the hex,
‫this is the address in hexadecimal our kernel should be loaded to if we specify dot equals one M, which
‫means that the sections will start at one megabyte in memory.
‫Right.
‫So by by compiling our kernel with this link ascription dot equals one m we are required to load our
‫kernel one mag into memory.
‫If we don't, then there will be problems.
‫So we need to load it into this address.
‫And the reason for that is because the linker is creating addresses based on this origin.
‫So if you load the two mag in memory, but it's addressing one mega memory, you can see why there would
‫be problems.
‫Right?
‫OK, so the next step is we're going to define the text section DOT text Kolon and we just do asterisk
‫dot text.
‫OK, so that's our tech section.
‫Now we need to define read-only data.
‫So we're going to go O data, Darro data, asterisk, dot arrow data.
‫And I'm just going to put a space between these columns.
‫OK, so we're now going to define the data section.
‫So we just go dot data, asterisk, dot data and now we're going to define the best section.
‫So we go dopiest.
‫Asterisk DopIer says, and we also need to go askaris common, but don't worry too much, Brother Celenk,
‫a script because we won't be changing it.
‫OK, so think script is now complete.
‫Now, when we link our object files together, which we haven't created object files yet, when we do
‫when we link them together, it will ensure to have the origin style of one megabyte, which is just
‫what we wanted.
‫OK, so now go to your makefile.
‫And we're just going to create a new label here, top forward slash build.
‫Colonel Diesem daughter.
‫And then we're just going to go forward slash source, Colonel Diesem, as simple as that.
‫Now here we're going to go nazem dsf lth.
‫Don't force our source, Colonel JSM, and then we're going to go forward, slash, build Colonel Dadaism,
‫OK, so that will instruct our Nazeem assembler to assemble Colonel Diesem into an object file.
‫And before I forget.
‫Make sure you put Asho here, OK?
‫And we're also going to put Dashi, which will enable debug and Symbol's in case we want to debug the
‫kernel later on.
‫So this is what the command should look like, guys.
‫Right, Nazem Dash half elf D'Asti.
‫And then goes our source file.
‫Then we do, then we do dash off for the output file and then we do our output path here.
‫OK, now let's create a new label at the very top of the file here.
‫We're going to call it files so we're just going to go files equals dark forward slash build forward
‫slash kernel Dadaism.
‫OK, and now you see our bootloader.
‫This too needs to be abstracted out.
‫So what we're going to do is we're going to copy that and create a new label by here type forward slash
‫forward slash boot up in.
‫OK, and then we're going to go forward, slash, source, boot, boot up, Ben, we're going to paste
‫this here and then this command can stay as it is now for make all the dependancy is going to be the
‫boot file.
‫OK, and then we're just going to go, Dee, if he calls dark forward slash pain, boot up in and then
‫we're just going to go the two right arrows top forward, slash, spin off, stop in, OK.
‫And here, we're also going to go dollar files, if you don't understand this, you need to learn make
‫because this is a requirement of the course briefly.
‫I'll go over it here by specifying the files here.
‫We say that whenever the old command is run, we depend on the files.
‫Right.
‫And then it will go through all the files and it will resolve the labels here running these commands.
‫OK, but you need to learn make to understand what's going on here.
‫OK, so we're just going to try this out now, so we're going to go make clean and we're going to go
‫forward, slash, build our S.H. and we see no rule to make target source boot boot up n OK.
‫And this is a very simple mistake.
‫Replace boot up in here with boot diesem just with this label here, dojos boot boot up and just to
‫boot this simple typo.
‫If we now go back and we render builder S.H., we can see that it's assembled our boot bootloader,
‫which is good, it has assembled our kernel file.
‫But in our kernel we reference Data SEG, which obviously is not set because if we go to boot and bootlace
‫and we scroll up, we set that here.
‫OK, so that's not a big problem.
‫Anyway, let's go back to Colonel Diesem and we're going to do is at the top of the file.
‫We're going to go code seg equals zero zero eight data seg equals zero zero zero x 10.
‫So obviously these are the kernel code segments and data segments.
‫So we now go back and we build the research again.
‫We can see that worked successfully.
‫We now have an OS stop in file that we can boot from, however, back to the makefile, because there's
‫one of the thing we need to do.
‫We need to remove the stop and file every time we run.
‫Maikol so we go I am tachograph top forward slash spin forward slash stop in.
‫And the reason for that is because we appended with our DD command every single time.
‫Right.
‫So if we now go back and we run builder S.H. again, we can see that that worked fine.
‫If we now go into our PIN directory and I'm going to use a chokehold, bless that will just it's just
‫a headset at us and we look at the binaries, we can see that that works successfully.
‫Our bootloader makes up stop in.
‫Now, as as we carry on through this lecture, eventually we are going to link our COL and then did
‫that.
‫So the next sector.
‫OK, so then a quick brief overview.
‫We do make all our top builders just make all that, then says to make I needs the boot dobbyn file
‫and I need all the files specified in the files variable here.
‫So, you know, we'll do things like file to file three and so on.
‫Right.
‫So then what happens is it goes in here, it assembles our bootloader, OK, that dependency is now
‫resolved.
‫Next, it'll go through each file here.
‫It'll see Colonel that OK, let's assemble that into an object file.
‫OK, that's resolved as well.
‫We can now run this label so that it removes the previous operating system build and then writes the
‫boot loader to the stop in file.
‫OK, so.
‫So you're all caught up.
‫That's what we're currently doing.
‫So then the next step is to link the COL, OK, create some sort of Col Dobbyn file and then we will
‫do that to the next sector and stop in.
‫Because remember this Osama Ben is basically just some sort of flat hard disk.
‫Right.
‫That's for the ambulances.
‫It just sees some sort of hard disk.
‫Right.
‫So we just write the sectors to it and job done.
‫OK, then.
‫So I'm now going to show you how you can actually do that.
‫OK, so what we're going to do and we're going to go forward, slash, spin forward, slash Col Dobbyn
‫and we're just going to depend on all of the files and all we're going to do is we're going to go tab
‫ie six eight six dash dash ld dash g for debugging symbols, dash relocatable and now we're going to
‫reference all of the files.
‫So what I Makefile will do is it will replace this variable here, the files with all the files, basically
‫that's what it does.
‫But you guys need to learn make if you don't know it seriously.
‫OK, so we're going to do now is we're going to go dash show dog forward slash build forward slash kernel
‫full throttle.
‫So this is the full kernel build.
‫OK, so it'll go through all of the files, it'll resolve all the dependencies.
‫So it creates object files.
‫And then we use our link here to link them all together into one giant object file.
‫OK, and now the next step is to talk with GCSE and get it to use our linker script.
‫And our linker script says the output format is a binary.
‫So when we pass the next commander, we're going to do it.
‫Gets all our object files.
‫Well, it gets that giant object file, which is the combination of all the linked object files, and
‫it basically outputs it in a binary form.
‫Very, very handy.
‫So resolve all our symbols to binary, there's no header, there's no P file header, there's no Elfreda,
‫just a flat binary.
‫And that's exactly what we want, guys, because then we don't have to parse anything.
‫OK, so back to our makefile next command.
‫I six eight six elf c dash capital T top forward slash hlinka darold, so that tells it.
‫That's how you want to use the Slinker script.
‫Now we go to show top for Slash Robyn Curnow, top 10.
‫Then we go dash f free-standing to FS by there.
‫Make sure you don't put one.
‫And now we're going to turn optimization off o zero because I don't really want to work with optimization
‫just in case we need to debug some assembly.
‫We don't want things being a little tricky to understand.
‫So next we do D'Ascenzo STD lab.
‫We do not want systemsand the library.
‫We're writing our own system.
‫We can't use the standard library that comes with Linux, Dasch, no STD lab and now we do doch.
‫Forward slash build forward slash kernel 4.0.
‫OK, so now the next step.
‫Copy this label.
‫We're going to paste that here.
‫Now this says we need to rely on the kernel and the bootloader.
‫And to be honest, you won't need these files anymore in the old because we've done it in the kernel.
‫OK, because all depends on the kernel and kernel depends on the files.
‫It'll work.
‫OK, so we just go to the terminal now that you've done that and we're just going to go make clean top
‫forward slash build that S.H..
‫And was this no such file or directory?
‫OK, so we need to do source Lenca my mistake type forward slash Sarsae forward slash link Darold.
‫That is where our linker script is.
‫Go back up for us, build the stage and there we go.
‫Is starting to work now.
‫We didn't define a start label which is pretty upset about however let's go and implement it.
‫So if we go to Canada Diesem our low 32 label, we're going to change this and scroll start.
‫OK, now we need to go to the top of the file here and we need to go global and start, which will export
‫the symbol, OK, because otherwise when we assemble this to an object file, this will not be publicly
‫known.
‫So we now go back to the terminal, make clean up efforts to build LSH.
‫We can see that it has worked successfully.
‫If I now go to seed, Ben and I go and this ASRM dark kernel for such Colonel Dobbyn, we can see the
‫disassembly of our cone of binary file.
‫See, everything worked perfectly, guys.
‫It works.
‫OK, so we just need to do the kernel now so we go F equals four slash forward slash curled up in to
‫right our stock forward slash spin spin.
‫I know this is a mouthful guys, but we need to get past this.
‫This is important but this is for our set up.
‫So we go back to the terminal, we're going to go make cleaned up forward, slash, build other sites
‫and there we go.
‫We now go KD bin and you can install blast if you don't have it.
‫By the way, we're going to go blast forward slash.
‫Oh stop in nice hex editor and we can see.
‫That here is our bootloader, here is our colonel, so that worked, but guess what's missing?
‫Our colonel doesn't fill up to a sector which is a problem.
‫So we're going to need an entire sector of nulls, therefore then the second sector will be 512 bytes
‫long.
‫So to do that, we're just going to go into here.
‫We're going to go D.F. equals forward slash dev forward slash zero two.
‫Right.
‫Arrows Dobbyn over stop.
‫And now here we're going to go be Yes.
‫Equals five 12.
‫And you know what, let's just write ten sectors for good measure just to be on the safe side, because
‫later on we're going to want to load an extremely large number so that we won't have to keep coming
‫back and adjusting the bootloader, how many sectors it loads in.
‫And then we have to divide our kernel size by five 12 tanavoli sectors.
‫It's just an absolute pain.
‫Right.
‫So what we do instead is we write a certain amount of sectors to the desk and then we won't have to
‫come back every time with the kernel size increases.
‫And you know what, 10 is too small.
‫Let's put 100.
‫OK, so that that that will give us that will allow us to to read in at least one hundred sectors,
‫which will give us.
‫A colonel size of fifty one thousand two hundred bytes before there's a problem and we have to adjust
‫because remember, if the kernel gets bigger than the amount reloading in, only half of the kernel
‫gets loaded and that that'll be a pain.
‫Trust me on that.
‫OK, excellent.
‫So now that we've done that, we need to write a little driver that will load our kernel into memory.
‫Now, we can't use the bios anymore.
‫Once we're in 32 bit protected mode, we can no longer use the bios.
‫So, you know, we commented out the code segment, Lothar, to where we're going to have it back and
‫so uncommented that and we're going to scroll down and we're going to actually put the load 32 here,
‫OK?
‫Excellent.
‫So now at this point, we're in Free Tibet mode again, and what we're going to do here in Hlophe two
‫is we're going to actually load our colonel into memory and then jump to it.
‫So before we go any further, we need to do bits 32, OK, so that the Sembler assembles it as Free
‫Tibet code, anything beneath this line.
‫Now we're just going to go move X one, move, move X, and we're just going about one hundred here.
‫I think we calculate the 100 sectors, didn't we.
‫Yeah, we did.
‫We're writing a hundred sectors of nulls, so this will be absolutely fine.
‫And now we're going to go move Eddi zero zero one one two three four five five zero zero zero one zero
‫zero zero zero zero.
‫OK, basically, that should be the equivalent of one Meg.
‫OK, so if the numbers are a little off, use the calculator.
‫You'll see.
‫And in fact, just to double check, because I'm being paranoid, we're going to open up a calculator
‫and a Pasir in Hex if you're always unsure how best to check.
‫Right.
‫And yeah, we can see that's one, Meg.
‫So that's no problem.
‫And now we're now going to go call atay lba Reid.
‫So this is this, we haven't defined this yet, but we're going to find a label here which will talk
‫with the drive and actually load the sectors into memory.
‫So we'll use the X register to represent the starting sector we want to load from, which is one we
‫don't want to go from zero because that's the boot sector.
‫X will contain the total number of sectors we want to load and Eddi will contain the address we want
‫to load them into.
‫OK, so let's go to OS Dev.
‫I'm going to go to Google os dev.
‫Atay.
‫OK, so again, this is a fantastic resource, right?
‫It shows you how to ride a driver, but we're not going to use that because we'll ride it my way, I'll
‫show you how to do that.
‫But I just want to make it clear that you can read all about this stuff on this website as well.
‫So it explains what the ATAH is.
‫So the specification is built around an older specification.
‫Each test drive was connected to controllable by two cables, a data cable and a command cable.
‫So, you know, it explains how you have the master and slave drives and so on and so on and explains
‫what bad sectors are all this type of stuff.
‫Essentially, we are talking to a controller on the motherboard which will read from the desk and send
‫the data back to us.
‫OK, so we're going to write the driver now.
‫All right, sit down here.
‫We're going to go atah lba read.
‫OK, now we're going to back up the LBA for later
‫because remember, the Elba's past doesn't register here.
‫Now we first need to send the highest apitz of the albio to the hard disk controller.
‫So we go S.H. are yak's 24.
‫OK, now if I open up my calculator.
‫Thirty to minus 24 is eight.
‫OK, so we shift the cash register 24 bits, so the right meaning that after this after this instructions
‫run, attacks will contain the highest apitz of the LBA because it's been shifted to the right.
‫OK, so we now do move to X.
‫Selects one F six.
‫OK, and this is the part that it expects us to write these eight bits to, I don't worry too much about
‫the hard disk drives and stuff because we're going to be implementing a better implementation and see
‫as the course goes on.
‫So this is mainly just to get us started.
‫We'll only be using this little dummy little drive we're writing now just to get us just to get our
‫kernel loaded.
‫It isn't going to be used after that.
‫We'll write another implementation, see later on.
‫So here then we're going to go out Decs Heiau.
‫OK, so remember, the register is Apitz and contains our highest apitz of the LBA, finished sending
‫the highest apitz of the LBA.
‫So I just like to put comments because it just gets confusing.
‫Otherwise, assembly can get quite hard to read when you're solving larger problems.
‫OK, so we now need to send the top sectors to the hardest controller.
‫So we're going to go move X, X moved X zero x one, F two out DCL.
‫OK, send the total
‫total sectors to read.
‫Finished
‫sending the total sectors to read, so we need to send the, uh.
‫So we need to send some more bits of the LBA to the controllers.
‫So we're going to go move X.
‫SBX, so we're restoring the backup LBA that we wrote earlier.
‫And here we're going to write send more bits of the ALBAR.
‫So I'm just going to go move DKS CLX one f three out decks.
‫And so, again, with this out instruction, we're talking with the bus on the motherboard.
‫Right.
‫And then the controller is listening to us.
‫Finished sending more bits of the LBA.
‫So we need to send a few more bits to the controller before it's ready.
‫I know it's a mouthful.
‫It is complicated.
‫So we're going to go move the X zero, x one, F four.
‫We're going to shift X, so the right by eight bits.
‫But I'll tell you all, just for good measure, we're actually going to go move X Ebix, restore the
‫back up LBA.
‫I know we don't need to, but I'd hate to come down the line.
‫Edit something.
‫Oops, we've corrupted X and we don't realize, you know, is sometimes just more sensible to be more
‫clear.
‫So if we just restore it each time we added it, then we know it won't matter if we damage X in any
‫way.
‫So now we're going to go out the X al.
‫OK, send more bits of the albio finished.
‫Sending more bits of the LBA, OK, send up 16 bits of the LBA finished, sending up 16 bits of albio.
‫And here we're going to go move to zero x one F five, move X X SBX, restore the backup LBA, and then
‫we're going to shift the x rays to the right by 16, OK?
‫And then we're going to put that to the controller.
‫OK, now we're going to go move to X zero x one F seven, move al Xerox 20 out.
‫Al, I don't worry too much about all this because this will be explained more in depth later on when
‫we implement the C driver for reading from the desk.
‫OK, so read all sectors into memory.
‫We now need to implement this.
‫So we're going to go dot next sector and we're going to push the X register to the stack to save it
‫for later.
‫Now we're going to go dot try and scroll again.
‫So right now we're checking if we need to read.
‫OK, because sometimes the controller has a bit of a delay, and even though we've given all these commands,
‫it be in it'll be in a state where it's not ready to rewrite and we need to actually keep checking until
‫it's ready for us to read from it.
‫There's usually a bit of a delay.
‫So here we go, move the X zero x one F seven in Aldy X, so we read from part Xbox One F seven into
‫the Al Register.
‫This is what this means.
‫And now we test the L Register to see if a bit is set in the spit mask.
‫Right.
‫So we look for eight and again, these magic numbers will explain this more in depth later on.
‫So now if that test fails, then we'll jump back to try again until it doesn't fail anymore.
‫OK, so we need to read two hundred and fifty six words at a time.
‫OK, so we go move x two, five, six, move D X, Xerox one F zero rep in W.
‫And I just want to show you this obstruction in case you haven't heard of it before.
‫So what NSW does, it reads are words from the iReport specified in DACs into the memory location specified
‫in the extra segment and the DI Register.
‫Now, if we go back to visually code.
‫You can see here we specify Eddi equals one Megg, so when we do.
‫NSW, that's what it's doing, is reading a word from the port zero one zero, and it's storing it.
‫Into zero six zero one zero zero zero zero zero, right?
‫That makes sense.
‫So when we use the wrap by here, what we're saying is.
‫Do the NSW instruction to you in 56 times, because I use the register, so reads fifty six words,
‫which is five, 10, 12 bytes, i.e. one sector.
‫OK, so now that I've explained that we can carry on.
‫OK, so we're now going to do is we're going to go pop SBX, which will restore the X that we saved
‫here because remember X the total number of sectors we want to read.
‫So we Poppit, restoring that sector number.
‫So what we're now going to do is we're going to go Leupp DOT next sector.
‫Now obviously we've just restored X to the sector count.
‫OK, so this will go to next sector.
‫And also decrement SBX, so that when it loops back around, it is one is it is one sector less to read,
‫which is exactly why one hundred ninety nine.
‫Ninety eight ninety seven.
‫And I want to hit zero.
‫We know that we've read all of the sectors we want to into memory.
‫So then we just go end of reading sectors into memory and then we just go rats to return from the subroutine.
‫So yeah, that was a mouthful and very confusing.
‫I tried to explain it to you in the simplest way I can because this is a lecture in itself or maybe
‫a few lectures.
‫OK, great.
‫So now that we've loaded that into memory, we can jump to the code.
‫So we just go jump code seg zero zero one one, two, three, four, five.
‫So again, you know, zero one and then five zero zero zero zero zero zero.
‫I count myself when there's zeros because it helps keep track.
‫So useful technique.
‫Oh, wait a minute, guys.
‫I forgot one more thing.
‫Just under 24 four, we need to do all X zero zero.
‫And this selects the master's drive, OK, because there's the slave in the master.
‫But we'll explain all of this later on.
‫If we say that now control as we open up the terminal and we're just going to go back, make clean the
‫force Ashbolt LSH to build the project.
‫Cribben, now we're going to Kumu OS.
‫OK, ok, great.
‫Great.
‫That does nothing, which is great because our Colonel hsm all it does is just jam forever.
‫Right, so that's fine.
‫Uh, we now need to attach gdb just to ensure that everything is working as expected from, from just
‫looking at the terminal like this, it looks OK, but we need to check.
‫So if you don't have gdb already pseudo apte install gdb please.
‫So we're going to go gdb and we're going to add our Colonel Fulda oh Simbel files.
‫So to do that we go add Dash Simbel.
‫Dash files.
‫And then we go dot, dot, forward, slash, because we're in the bin directory, so we need to go one
‫level up, build forward slash kernel, full Dotto, I don't press enter.
‫We're going to go Xerox one, one, two, three, four, five, because this is the address that we
‫are loading our kernel into.
‫So JVB needs to know that so it knows how to match up the symbols.
‫Press, enter unknown command, add symbol files.
‫That's because it's add symbol file, not add symbol files.
‫My mistake, you press the power to bring that previous command up.
‫So if you press yes lask you add symbol table to text address six one zero zero zero and so on.
‫Just do yes.
‫Call loaded symbols.
‫Excellent.
‫So remember the command is add dash symbol dash file not philes this one.
‫OK, so once you've done that then uh just go break and start.
‫So now we've set a breakpoint.
‫OK, now let's slow Kumu so we go target remote kumu dash system, dash six and 60 for.
‫S.
‫That's GDB, studio dash four, hard disk, top forward slash Osama bin Center, it's now loaded this
‫pressie to continue and look at that.
‫We have hit our break point start, which is here.
‫Start Start is in Canada, Diesem, we export it here, didn't we?
‫So by attaching to the bug in symbols and saying that we load the kernel at this address, it knows
‫that START is the first label address.
‫So that is the address that is on.
‫So if we now go layout space ASRM, we can use, we can do step II and just step through this.
‫So this is literally our program, you see.
‫I mean, it's our program word for instruction, for instruction right here.
‫So we can see here now we're enabling the Etheline and now we just do an infinite jump.
‫So congratulations.
‫I know that was a huge mouthful, but you've now got your colonel to a place where we are ready to start
‫writing the colonel in.
‫See, so I hope you found that helpful.
‫If you had any problems, please drop me a message, because this is a very complicated lecture.