|
g) Before returning from the sub-procedure, the registers should be popped back from the stack in the reverse order that they were pushed to stack.
h) The “RET” statement is changed to “RETN”, as the program size is less that 64 KB.
d) In the Code Segement, the MUL16 PROC is declared as NEAR, as opposed to FAR, since the sub-procedure MUL16 is withing the 64K byte block of the program.
e) The DOS-RET-SETUP macro is no longer necessary and should be commented or deleted.
e) All registers that will be used in the sub-procedure should be pushed on to the stack for safety using the PUSH AX command for example. We choose to push registers AX, BX, CX, and DX in this case. The changes are shown below:
|