HOMEWORK PROBLEM : Given the following man program in C which calls a function t
ID: 3632251 • Letter: H
Question
HOMEWORK PROBLEM :
Given the following man program in C which calls a function toPOstfix to convert a string in
infx notation to one in postfix notation.
int main(int argc, char* argv[])
{
char infixstream[100];
char postfixstream[100];
printf(" Enter a mathematical expression :");
scanf("%s",infixstream);
printf(" ");
toPostfix(infixstream,postfixstream);
printf(" The postfix equivalent of the input expression :");
printf("%s",infixstream);
printf(" ");
}
Write an assembly language function toPostfix starting with the code given below to accept an
infix notation formula and convert it to postfix (reverse polish ) notation.
Please note that every line of your code should be explained. You should submit
1- Algorithm developed for the conversion
2- Source code
3- Execution and output examples
Example code
.globl _toPostfix
_toPostfix:
pushl %ebp
movl %esp,%ebp
// YOUR CODE HERE
ret