| ||
You have become acquainted with the simplified method of calling procedures in MASM. This is the invoke directive. The procedure must be defined beforehand using the PROTO keyword, for example:
MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD ... invoke MessageBox, h, ADDR TheMsg, ADDR TitleW, MB_OK
Here, h is the descriptor of the window, from which the message is called, TheMsg is the message string, TitleW is the window header, and MB_OK is the message type. ADDR in this case is synonymous to OFFSET .
The TASM syntax also has a simplified call.
EXTERN MESSAGEBOX:PROC ... call MessageBox PASCAL, h, ADDR TheMsg, ADDR TitleW, MB_OK
Here, PASCAL is the call type, or, to be more precise, the order of parameters. It is also possible to use the C parameter; then the order of parameters will be inverted.
| ||