Tag Archives: code

What is the difference between a function and a macro? Find the largest number among two numbers using a function definition as well as a macro. Which is more efficient in terms of execution time and code size? 10m Jun2006

What is the difference between a function and a macro? Find the largest number among two numbers using a function definition as well as a macro. Which is more efficient in terms of execution time and code size? 10m Jun2006  Difference between a function and a macro:    Function Code [codesyntax lang=”c”] int MAX(X,Y) {… 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 »