hey hello everyone in this video I am going to show you how to use this microprocessor emulator 8086 or shortly known as emu 8086 I am just going to give you a basic introduction on how to use this I will show you a demo code , functions and also why we need to use this one mainly that thing because demonstration is going to be very simple and you need to know the reason why you are implementing this and how this emulator has been designed from the real practical model lets get started , so currently if we open emu 8086 we will be getting a screen or window like this , this is the logo here it is emu 8086 as you can see it over here , thats the logo and if we just go over here now if you now go to it you will get a window like this and now go to new go to empty workspace you have a list of options , don't select them , just go to empty workspace click ok and you will get a workspace like this you have here file and many options can run your code and even have a calculator over here to convert decimal octal binary etc and you have a converter also its a 16 bit , if you just type any number it automatically converts so it isn't necessary to go and search for it you have everything here math ascii codes , you have here all ascii values for alphabets , so you have everything here thats what I like about emulator 8086 these are some basic options like save open , so before going into the code and explaining the main parts I would like to explain how this emulator 8086 has been designed if I just go here , I have a pic so this is the real 8086 microprocessor kept in the laboratory this isn't the pin diagram you will have a very small pin that is 8086 microprocessor this is like what to say an instrument that replicates the functions of 8086 microprocessor its also called as 8086 microprocessor kit I used this in college lab before 1 year so it will have these buttons from 0 to 9 it will have offset value , 16 bit or 8 bit add options , assign values here you need to enter a base address and you need to specify all the values manually and you will have code for add move like that separate codes , its called as opcodes so they have just transferred this instrument into virtual form as a software thats what we are using over here so basically instead of coding over this instrument kit we are directly typing in the software so thats what the advancement in technology has done its really great to type your code and run it isn't necessary for everyone have the kit and thats the advantage and how it is designed to execute so now lets just put a simple code I will do the code for addition , thats the simplest of all codes first you need move command , it is used to assign value to a particular general purpose register that is AX or BX so I will put MOV AX , some value 0001 1H that is how it is represented 16 bit value and this value gets stored in AX so now another value MOV BX so AX is called as the accumulator register its a general purpose register , you need to be familiar with the 8086 architecture you need to know the functions of it thats really important before getting into coding thats the basic thing to know about and BX is known as the base register its also similar to AX but also used to store base address but can be used same as AX , so I will put here 0002H thats good , for adding its ADD BX,AX so what this ADD command does is it adds BX and AX values and stores the value in BX because we have specified BX at first so now we have typed this code , if we run it BX value will be stored as 0003 because summation of this will give 0003 just click emulate so here we will get it we have all the registers over here from AX to DX code segment , instruction pointer segment registers all are present over here , so this is our code , so now what we need to do is just press single step what single step means that it executes the first line if you press it once and again if you press it it will execute the second line then the 3rd line and goes on so if I click the first line you will see the AX value being this you know I think so AH and AL higher value and lower value , I think you will be familiar with that BH BL like that so the first 3 lines over here , 1000 , 1001 1002 corresponds to MOV AX, 0001H first 3 lines for that and if I just go here as you can see , if I go here and press if I select over here it will point to the last 2 lines , AX occupies 2 lines over here so it occupys bytes ok this 3 has been highlighted in a pale yellowish color first line appears in blue color , now its green so 3 , 3 , 2 bytes , this is actually the what to say hexadecimal code is getting converted to binary form somewhat like that , machine understandable conversion is happening thats why its represented in 3 bytes , so now lets execute our code no need to go that deep , first lets execute the first line first line is selected and just put single step as you can see here our first line is executed and our value 0001H is getting stored in AX so AX is stored as 01 its now shifted to the next command our next command is MOV BX,0002H its highlighting the second one and if I just click single step our next line will be executed and our BX value will be 0002 so this is the higher and lower value , if I just press single step its 02 thats good , it now goes to the 3rd line and if I just execute single step , our BX value will be 0003 because as I told you earlier if we add BX , AX the resultant value 0003 will be stored in BX as we have specified BX first just put single step after executing it comes to the next line , so thats it our 3 commands are over , as you can see it goes to nop which means no command after that and our BX value is 0003 thats it we have successfully executed our first code so this is adding 2 16 bit values and another important thing what you need to know from this one is for CS value has been some 001 and our instruction pointer has been this value and to have the basic knowledge I would like you to study this one I have a pic for that , so this is the you would be knowing this architecture diagram we have all over here and basically you need to have good knowledge about general purpose register and segment registers , thats the 2 things it has also other features like stack and flags I forgot to tell you about this flags flags are just indicators if something happens like if the sum is 0 , any borrowing happening if you perform addition incase of subtraction its called as carryover carry flag , there are different types of flags if you know architecture , there are 2 types of flags conditional and control flag so here we have the first one CF is the carry flag for arithmetic operations ZF is the zero flag SF sign flag , OF overflow control flags are used basically just to tell the status which are generated by machine it can't be generated by our commands and conditional flags can be done by the user its just obvious to say because if we perform addition , user is going to do it addition based on the values can't be done by the machine control flags are the trap flag direction flag interrupt flap so IF DF and TF , these are the 3 and get indicated by going 0 and 1 so its on and off like that 0 is on and 1 is off you need to have good idea on the commands to to perform this you need to be good in 3 things prerequisites first thing is knowledge about 8086 architecture especially about the registers the segment registers and the general purpose registers AX BX CX DX so have a good idea bout these 2 and another thing is knowledge about these flags so any questions that are going to be asked in viva or practical exams that you are going to be attend its going to happen anyway online , they will ask based on this because flags are really tricky , they can ask when this flag will go on and off carry flag , they can point out and ask can ask the definition , what this code segment does code segment , data segment and extra segment register does they can just randomly ask you what is an instruction pointer , there are many things also and can also ask you about pipelining that process is also important , instruction queue BIU another thing is that 20 bit address offset , 16 bit address gets converted to 20 bit by adding offset you call it as physical address so you need to have prerequisite knowledge about it today being the first video I am uploading on this topic , I think its enough and in the subsequent videos I will use loop incase of loop we will be using CX which is the counter register I will be using that one , its like that increment operator in c and c++ that ++ operator I will be doing subsequent videos in 16 and 8 bit carry flag , multiple videos I will be doing do subscribe my channel it will be helpful mine is a programming channel I have done tutorials in c c++ blender unity So do check other videos of my channel and thanks for watching support me