| |||||||||
| |||||||||
The IRP (iteration repeat) directive provides a means of supplying a variable parameter to each iteration of a repeat block. It syntax is IRP parameter, < argument1 [, argument2, ...] > statments ENDMThe arguments are given as a list separated by commas. Note that the angle brackets are part of the syntax and are required. During the first iteration, argument1 is assigned to the parameter for use in the block of repeat statements; during the second iteration, argument2 is assigned, and so on. Therefore, the argument list specifies both the number of iterations and the actual values to be used in each iteration.
To save registers AX, BX, CX, DX, we can write SAVE_REGS < AX, BX, CX, DX >which will be expanded into PUSH AX PUSH BX PUSH CX PUSH DXTo restore these registers, write RESTORE_REGS < DX, CX, BX, AX > |