assembly - Best way to store array of consts -
i'm new in asm (masm 64bit). in programme need array of 64bit constants (30 constants) i'll able them offset first constant. best way it? stack, straight move via mov(i'm not sute can move contants memory without registers) or smth else? in advance
because of 'mov', suspect talking x86 assembler, should specify that!
if constants (i.e. don't vary, known @ compile time) there no reason store them in memory. can declare them 'equ's , utilize them in code.
if have index them @ run-time, can utilize basepointer, or source index point @ base of operations of table, , utilize offsets retrieve values. in 1 instruction, can specify constant offset, or utilize register add together base.
have @ page:
http://www.supernovah.com/tutorials/assembly3.php
it has many examples.
assembly
No comments:
Post a Comment