|
MENU SELECTION
a) Since the main program can add, subtract, multiply and divide two numbers, we need a menu slection so that we can do either of these operations or all of the operations.
b) We achieve this by diplaying message saved at MENUMSG in the data segement and shown below.
c) Following the message we have a macro for saving the operation selection typed at the keyboard. The macro reads the selection typed at the keyboard and saves it at MENUINP in the data segement. At MENUINP, the first “2” states the maximum number of characters to be read, while the next two bytes are reserved for the operator selection.
The coding is shown below:
|