Monthly Archives: February 2014

ASSEMBLY10 An Assembly program to calculate the average of three given numbers stored in memory

Now we will write another Assembly program to calculate the average of three given numbers stored in memory. Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1, NUM2 and NUM3. Other variables will be holding… Read More »

ASSEMBLY09 An Assembly program to read in two decimal inputs and print out the smaller of the two, in decimal

Now we will write another Assembly program to read  two decimal inputs and print out the smaller of the two, in decimal Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1 and NUM2 and Other variables will be holding… Read More »

ASSEMBLY08 An Assembly program to read in two decimal inputs and print out their sum, in decimal

Now we will write another Assembly program to read  two decimal inputs and print out their sum, in decimal Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1 and NUM2. Other variable will be holding the Output or Result… Read More »

ASSEMBLY07 An Assembly program to convert ASCII code to its BCD equivalent

Now we will write another Assembly program to convert ASCII code to its BCD equivalent. Let’s identify variables needed for this program. First variable will be the one which will hold the values entered at Console in its ASCII code and it will be NUM. Other variable will be holding BCD equivalent of the ASCII… Read More »

ASSEMBLY06 An Assembly program to read two decimal numbers, then multiply them together and finally print out the result (in decimal )

Now we will write another Assembly program to read  two decimal numbers, then multiply them together and finally print out the result (in decimal ) Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Multiplied and it will be NUM1 and… Read More »

ASSEMBLY05 An Assembly program to find the sum of two BCD numbers stored in memory

Now we will write another Assembly program to find the sum of two BCD numbers stored in memory. Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1 and NUM2. Other variables will be holding the… Read More »

ASSEMBLY04 An Assembly program to exchange two memory variables using XCHG instruction

Now we will write another Assembly program which does some Exchange Operation. Before actually starting to write the program, Let’s understand XCHG instruction. As we know the programs work only with the instructions in the instruction set. Instruction XCHG is used to EXCHANGE memory variables in the following permutations above. REG stands for Registers (Eg.  AX, BX, CX,… Read More »