Your employer needs a backend for a translator for a very SIC machine (Simplified Instructional Com- puter, apologies to Leland Beck). Input to the translator will be arithmetic expressions in postfix form and the output will be assembly language code. The target machine has a single register and the following instructions, where the operand is either an identifier or a storage location. L load the operand into the register A add the operand to the contents of the register S subtract the operand from the contents of the register M multiply the contents of the register by the operand D divide the contents of the register by the operand N negate the contents of the register ST store the contents of the register in the operand location An arithmetic operation replaces the contents of the register with the expression result. Temporary storage locations are allocated by the assembler for an operand of the form ā$nā where n is a single digit. Input The input file consists of several legitimate postfix expressions, each on a separate line. Expression operands are single letters and operators are the normal arithmetic operators (+, -, *, /) and unary negation (@). Output Output must be assembly language code that meets the following requirements:
2/2 Sample output LA AB ST $1 LC AD ST $2 LE AF A $2 ST $2 LG AH A $2 A $1 LA AB ST $1 LC AD N A $1