Is there an option to push a range of memory to the stack?
With foo resd x I can reserve x double words, whose addresses are consecutive.
Is there an option to push all the double words from address foo to address foo+(4*x) to the stack?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on the CPU and you haven’t specified it (I’m guessing it’s x86 because
resdis nasm’s way to reserve memory and nasm is x86 only).There’s no x86 instruction that can push an arbitrary number of
(d/q)wordson the stack. You can push several of them one by one in a loop. Or you can reserve space on the stack (by subtracting from(e/r)sp) and then copy the data usingmovorrep movsb/w/d/q.