Can I handle an array like this in assembly?
db a 10,20,30,40,50
and then say:
mov si,0
and then refer to an element like this
mov AX,a[si]
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.
Technically, yes, but it would be more efficient to write
One more thing:
ais defined as an array of bytes. Andaxis 16bit register. So,mov ax,[si]will makeaxto contain first two bytes ofa(i.e.al=10,ah=20).What you probably want is
or