<<< Running Total Prototype | Index | Things To Do >>> |
The prototype of the "Running Total Calculator" uses C++ functions to deal with the user input and with the display of the calculation result. The actual math is done inside m13_calculator.asm, written in Assembly.
All C++ code is finished. The only remaining work is the Assembly module m13_calculator.asm.
When the user enters an arithmetic operator followed by a value, C++ invokes
m13_calculate( arithmetic_operator, value )
function implemented in Assembly. The m13_calculate procedure further dispatches the call to a specific math "handler" procedure. There are six ASM handlers, one for each arithmetic operator:
binary_plus PROTO NEAR32 stdcall, right_operand:DWORD binary_minus PROTO NEAR32 stdcall, right_operand:DWORD binary_multiply PROTO NEAR32 stdcall, right_operand:DWORD binary_divide PROTO NEAR32 stdcall, right_operand:DWORD binary_modulo PROTO NEAR32 stdcall, right_operand:DWORD binary_assign PROTO NEAR32 stdcall, right_operand:DWORD
Two procedures, binary_plus and binary_divide, are fully implemented.
The rest is your assignment. Search for "TODO" comments in m13_calculator.asm
to identify procedures requiring your attention.
<<< Running Total Prototype | Index | Things To Do >>> |