![]() ![]() To repeat more than one line of code, or a complex macro, use the preprocessor %rep directive.Īn effective address is any operand to an instruction which references memory. Note also that TIMES can't be applied to macros: the reason for this is that TIMES is processed after the macro phase, which allows the argument to TIMES to contain expressions such as 64-$+buffer as above. ![]() The operand to TIMES is a critical expression (section 3.8). Note that there is no effective difference between times 100 resb 1 and resb 100, except that the latter will be assembled about 100 times faster due to the internal structure of the assembler. Finally, TIMES can be applied to ordinary instructions, so you can code trivial unrolled loops in it: Which will store exactly enough spaces to make the total length of buffer up to 64. The argument to TIMES is not just a numeric constant, but a numeric expression, so you can do things like ![]() Or similar things but TIMES is more versatile than that. This is partly present as NASM's equivalent of the DUP syntax supported by MASM-compatible assemblers, in that you can code The TIMES prefix causes the instruction to be assembled multiple times. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |